Ticket #51912: Portfile-mupdf.diff
File Portfile-mupdf.diff, 3.2 KB (added by harciga, 8 years ago) |
---|
-
Portfile
old new 4 4 PortSystem 1.0 5 5 6 6 name mupdf 7 version 1. 87 version 1.9a 8 8 categories graphics 9 9 platforms darwin 10 10 maintainers gmail.com:starkhalo openmaintainer … … 31 31 master_sites ${homepage}downloads/ 32 32 distname ${name}-${version}-source 33 33 34 checksums rmd160 2708f5650f23101a66cef92b7903aafb716f9c02\35 sha256 a2a3c64d8b24920f87cf4ea9339a25abf7388496440f13b37482d1403c33c20634 checksums rmd160 0cb0d098c603b16be217e42299052a928d95c3fc \ 35 sha256 8015c55f4e6dd892d3c50db4f395c1e46660a10b460e2ecd180a497f55bbc4cc 36 36 37 37 depends_build port:pkgconfig 38 38 39 39 depends_lib port:freetype \ 40 port: glfw\40 port:harfbuzz \ 41 41 port:jbig2dec \ 42 42 port:jpeg \ 43 43 port:mesa \ … … 47 47 port:xorg-libXrandr \ 48 48 port:zlib 49 49 50 patchfiles patch-Makerules.diff 51 50 52 use_configure no 51 53 52 54 variant universal {} 53 55 54 # When not using the bundled copies, we have to tell mupdf's build system where55 # to find the headers56 configure.cflags-append \57 -I${prefix}/include/freetype258 59 56 build.args PREFIX=${prefix} 60 57 build.args-append CC=${configure.cc} \ 61 58 CXX=${configure.cxx} \ 62 CPP=${configure.cpp} 63 64 build.env CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \ 65 LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]" \ 59 CPP=${configure.cpp} \ 60 XCFLAGS="${configure.cflags} [get_canonical_archflags cc]" \ 61 XLIBS="${configure.ldflags} [get_canonical_archflags ld]" \ 66 62 build=release \ 67 63 verbose=yes 68 64 69 eval destroot.env ${build.env}70 71 65 destroot.destdir prefix=${destroot}${prefix} 72 66 67 variant glfw description {OpenGL viewer} { 68 build.args-append HAVE_GLFW=yes 69 } 70 73 71 post-extract { 72 # delete thirdparty software other than mujs and openjpeg 74 73 delete ${worksrcpath}/thirdparty/curl 75 74 delete ${worksrcpath}/thirdparty/freetype 76 delete ${worksrcpath}/thirdparty/ glfw75 delete ${worksrcpath}/thirdparty/harfbuzz 77 76 delete ${worksrcpath}/thirdparty/jbig2dec 78 77 delete ${worksrcpath}/thirdparty/jpeg 79 # Got compile errors with openjpeg-2.1 and openjpeg-1.580 #delete ${worksrcpath}/thirdparty/openjpeg81 78 delete ${worksrcpath}/thirdparty/zlib 82 } 83 84 post-destroot { 85 # mupdf has its own javascript interpreter which is maintained in a separate 86 # repository (git://git.ghostscript.com/mujs.git) but shipped with the source 87 # code as a third-party library. Since there hasn't been a versioned release of 88 # it yet and `mujs' is developed especially for mupdf it will be installed via 89 # post-destroot. 90 set libdir ${destroot}${prefix}/lib 91 xinstall -m 644 -W ${worksrcpath} \ 92 build/release/libmujs.a \ 93 ${libdir} 79 if {![variant_isset glfw]} { 80 delete ${worksrcpath}/thirdparty/glfw 81 } 94 82 } 95 83 96 84 # https://trac.macports.org/ticket/33240