From 83d635b6a7eb8a7fc5b75e0844efe4425d06a1fd Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Mon, 18 Nov 2013 01:25:49 -0700 Subject: [PATCH] Convert/update fitz to working recipe --HG-- rename : media-libs/fitz/fitz-1.0.recipe => media-libs/fitz/fitz-1.1.recipe --- media-libs/fitz/fitz-1.0.recipe | 30 --------- media-libs/fitz/fitz-1.1.recipe | 74 +++++++++++++++++++++++ media-libs/fitz/patches/fitz-1.0.patch | 36 ----------- media-libs/fitz/patches/fitz-1.1.patchset | 34 +++++++++++ 4 files changed, 108 insertions(+), 66 deletions(-) delete mode 100644 media-libs/fitz/fitz-1.0.recipe create mode 100644 media-libs/fitz/fitz-1.1.recipe delete mode 100644 media-libs/fitz/patches/fitz-1.0.patch create mode 100644 media-libs/fitz/patches/fitz-1.1.patchset diff --git a/media-libs/fitz/fitz-1.0.recipe b/media-libs/fitz/fitz-1.0.recipe deleted file mode 100644 index 85c20222f..000000000 --- a/media-libs/fitz/fitz-1.0.recipe +++ /dev/null @@ -1,30 +0,0 @@ -DESCRIPTION="Fitz is a library that is part of MuPDF. The renderer in MuPDF is tailored for high quality anti-aliased graphics. It renders text with metrics and spacing accurate to within fractions of a pixel for the highest fidelity in reproducing the look of a printed page on screen." -HOMEPAGE="http://code.google.com/p/mupdf/" -SRC_URI="http://mupdf.googlecode.com/files/mupdf-1.0-source.tar.gz" -CHECKSUM_MD5="d986ab98e2b035b7abd61afc474562b3" -REVISION="1" -STATUS_HAIKU="stable" -DEPEND="jbig2dec >= 0.11 - openjpeg >= 1.5.0 - jpeg >= 8d - zlib >= 1.2.5 - freetype >=2.4.9" -BUILD() -{ - cd mupdf-1.0-source - make libs -} - -INSTALL() -{ - cd mupdf-1.0-source - make install \ - prefix=${DESTDIR}/`finddir B_COMMON_DIRECTORY` \ - bindir=${DESTDIR}/`finddir B_COMMON_BIN_DIRECTORY` \ - libdir=${DESTDIR}/`finddir B_COMMON_LIB_DIRECTORY` \ - incdir=${DESTDIR}/`finddir B_COMMON_HEADERS_DIRECTORY` \ - mandir=${DESTDIR}/`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man -} - -LICENSE="GNU GPL v3" -COPYRIGHT="2007 Free Software Foundation, Inc." diff --git a/media-libs/fitz/fitz-1.1.recipe b/media-libs/fitz/fitz-1.1.recipe new file mode 100644 index 000000000..c0160cd15 --- /dev/null +++ b/media-libs/fitz/fitz-1.1.recipe @@ -0,0 +1,74 @@ +SUMMARY="Fitz is a PDF library that is part of MuPDF." +DESCRIPTION=" +Fitz is a library that is part of MuPDF. The renderer in MuPDF is +tailored for high quality anti-aliased graphics. It renders text with +metrics and spacing accurate to within fractions of a pixel for the +highest fidelity in reproducing the look of a printed page on screen." +HOMEPAGE="http://code.google.com/p/mupdf/" +LICENSE="GNU GPL v3" +COPYRIGHT="2007 Free Software Foundation, Inc." +SRC_URI="http://mupdf.googlecode.com/files/mupdf-1.1-source.tar.gz" +CHECKSUM_MD5="f7b5fd753f40aca207e9afd70d8f8edf" +REVISION="1" +ARCHITECTURES="x86" +if [ $effectiveTargetArchitecture != x86_gcc2 ]; then + # x86_gcc2 is fine as primary target architecture as long as we're building + # for a different secondary architecture. + ARCHITECTURES="$ARCHITECTURES x86_gcc2" +else + ARCHITECTURES="$ARCHITECTURES !x86_gcc2" +fi +SECONDARY_ARCHITECTURES="x86" + + +PROVIDES=" + fitz$secondaryArchSuffix = $portVersion compat >= 1.1 + lib:libfitz = $portVersion compat >= 1.1 + devel:libfitz$secondaryArchSuffix = $portVersion compat >= 1.1 + " + +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + lib:libjpeg$secondaryArchSuffix + lib:libz$secondaryArchSuffix + lib:libfreetype$secondaryArchSuffix + lib:libopenjpeg$secondaryArchSuffix + lib:libjbig2dec$secondaryArchSuffix + " + +BUILD_REQUIRES=" + devel:libopenjpeg$secondaryArchSuffix + devel:libjbig2dec$secondaryArchSuffix + devel:libjpeg$secondaryArchSuffix + devel:libfreetype$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " + +BUILD_PREREQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + cmd:make + cmd:gcc$secondaryArchSuffix + " + +SOURCE_DIR="mupdf-1.1-source" + +PATCHES="fitz-1.1.patchset" + +BUILD() +{ + # work around broken header layout in our freetype_devel package + XCFLAGS="-I/boot/system/develop/headers/freetype2" \ + make libs +} + +INSTALL() +{ + make install-libs \ + prefix=$prefix \ + bindir=$binDir \ + libdir=$libDir \ + incdir=$includeDir \ + mandir=$manDir + + prepareInstalledDevelLibs libfitz +} diff --git a/media-libs/fitz/patches/fitz-1.0.patch b/media-libs/fitz/patches/fitz-1.0.patch deleted file mode 100644 index 6946f4464..000000000 --- a/media-libs/fitz/patches/fitz-1.0.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -Naur mupdf-1.0-source/Makefile mupdf-1.0-source-haiku/Makefile ---- mupdf-1.0-source/Makefile 2012-04-24 16:41:33.029097984 +0000 -+++ mupdf-1.0-source-haiku/Makefile 2012-06-07 17:13:57.000000000 +0000 -@@ -12,8 +12,8 @@ - # Do not specify CFLAGS or LIBS on the make invocation line - specify - # XCFLAGS or XLIBS instead. Make ignores any lines in the makefile that - # set a variable that was set on the command line. --CFLAGS += $(XCFLAGS) -Ifitz -Ipdf -Ixps -Icbz -Iscripts --LIBS += $(XLIBS) -lfreetype -ljbig2dec -ljpeg -lopenjpeg -lz -lm -+CFLAGS += $(XCFLAGS) -Ifitz -Ipdf -Ixps -Icbz -Iscripts -I/boot/develop/headers/3rdparty/freetype2 -+LIBS += -L/boot/common/lib/ -lfreetype -ljbig2dec -ljpeg -lopenjpeg -lz -lroot - - include Makerules - include Makethird -@@ -144,7 +144,7 @@ - - ifeq "$(NOX11)" "" - MUPDF := $(OUT)/mupdf --$(MUPDF) : $(FITZ_LIB) $(THIRD_LIBS) -+$(MUPDF) : $(FITZ_LIB) - $(MUPDF) : $(addprefix $(OUT)/, x11_main.o x11_image.o pdfapp.o) - $(LINK_CMD) $(X11_LIBS) - endif -@@ -167,11 +167,10 @@ - incdir ?= $(prefix)/include - mandir ?= $(prefix)/share/man - --install: $(FITZ_LIB) $(MU_APPS) $(MUPDF) -+install: $(FITZ_LIB) - install -d $(bindir) $(libdir) $(incdir) $(mandir)/man1 - install $(FITZ_LIB) $(libdir) - install fitz/memento.h fitz/fitz.h pdf/mupdf.h xps/muxps.h cbz/mucbz.h $(incdir) -- install $(MU_APPS) $(MUPDF) $(bindir) - install $(wildcard apps/man/*.1) $(mandir)/man1 - - # --- Clean and Default --- diff --git a/media-libs/fitz/patches/fitz-1.1.patchset b/media-libs/fitz/patches/fitz-1.1.patchset new file mode 100644 index 000000000..f85901a0e --- /dev/null +++ b/media-libs/fitz/patches/fitz-1.1.patchset @@ -0,0 +1,34 @@ +From b98ccb54d6f03bf93aa9bd76ddeaf12a5ad183f0 Mon Sep 17 00:00:00 2001 +From: Chris Roberts +Date: Mon, 18 Nov 2013 01:10:58 -0700 +Subject: Remove libm and add install-libs target + + +diff --git a/Makefile b/Makefile +index 05bb4e8..74319f7 100644 +--- a/Makefile ++++ b/Makefile +@@ -13,7 +13,7 @@ default: all + # XCFLAGS or XLIBS instead. Make ignores any lines in the makefile that + # set a variable that was set on the command line. + CFLAGS += $(XCFLAGS) -Ifitz -Ipdf -Ixps -Icbz -Iscripts +-LIBS += $(XLIBS) -lfreetype -ljbig2dec -ljpeg -lopenjpeg -lz -lm ++LIBS += $(XLIBS) -lfreetype -ljbig2dec -ljpeg -lopenjpeg -lz + + include Makerules + include Makethird +@@ -171,6 +171,11 @@ install: $(FITZ_LIB) $(MUVIEW) $(MUDRAW) $(MUBUSY) + install $(MUVIEW) $(MUDRAW) $(MUBUSY) $(bindir) + install $(wildcard apps/man/*.1) $(mandir)/man1 + ++install-libs: $(FITZ_LIB) ++ install -d $(libdir) $(incdir) ++ install $(FITZ_LIB) $(libdir) ++ install fitz/memento.h fitz/fitz.h pdf/mupdf.h xps/muxps.h cbz/mucbz.h $(incdir) ++ + # --- Clean and Default --- + + all: all-nojs +-- +1.8.3.4 +