diff options
author | Michael Weber <xmw@gentoo.org> | 2016-01-09 00:45:40 +0100 |
---|---|---|
committer | Michael Weber <xmw@gentoo.org> | 2016-01-09 00:47:33 +0100 |
commit | 8f79eb2c4acb4a2e0a116cc1f7d3257830450b2a (patch) | |
tree | ff7b460f399f5abb6061686371c8762546843e7d /app-text | |
parent | dc1205ba6be30848273a4abf9c1273950812ba79 (diff) | |
download | gentoo-8f79eb2c4acb4a2e0a116cc1f7d3257830450b2a.tar.gz gentoo-8f79eb2c4acb4a2e0a116cc1f7d3257830450b2a.tar.xz |
app-text/mupdf: Version bump, add USE=opengl (thanks Shark, bug 566248).
Package-Manager: portage-2.2.26
Diffstat (limited to 'app-text')
-rw-r--r-- | app-text/mupdf/Manifest | 1 | ||||
-rw-r--r-- | app-text/mupdf/files/mupdf-1.8-system-glfw.patch | 11 | ||||
-rw-r--r-- | app-text/mupdf/mupdf-1.8.ebuild | 139 |
3 files changed, 151 insertions, 0 deletions
diff --git a/app-text/mupdf/Manifest b/app-text/mupdf/Manifest index 73cb5f260b7..3ca01e59463 100644 --- a/app-text/mupdf/Manifest +++ b/app-text/mupdf/Manifest @@ -2,3 +2,4 @@ DIST mupdf-1.5.tar.gz 7485699 SHA256 946393c7abf78e50fa9815f18a9e91f275a1a96a7ea DIST mupdf-1.6.tar.gz 8188199 SHA256 ac6f64d5c287b6549d3c26af8fa298c91697f10ebe52b122ba2c1f43e5ccfa52 SHA512 cda47ef4442bb7de15fc54b87e0e819f80c56c144318b9e953bc36c3da0bb331a10f44016bc89986c317828b7043e737a89556fc51158114b1da58cd8f7977c7 WHIRLPOOL ea14db6f43a70df144f3f70c3421ac7d2096d835fa222f0d5b9c6d64214f5c9156884b6660dda7e1fd2bee83fa9ce66ca25b2f6290ba1588fc55035ad6228413 DIST mupdf-1.7.tar.gz 7342238 SHA256 9c79ef0ad3343f8feed8aabfaaad6ba7cbdb3e3398aa380ed505ed71086d0fbc SHA512 f4c438019285731e5c8bb6f1f9c46ae20b9fd5f720034ab40d4e31ed4b2dd9cd704c45f1b25f68d46c1ed0a9c76d16b01fb26b83aa372497f924a763f9676044 WHIRLPOOL 3674a0144fa44c618380f06cba5093016fa6f0aa37ef6cc32e582e4f0a94cedb2e320db0f42007d6096650d42cbc2cc28716adf3371f214728c01332d4120462 DIST mupdf-1.7a.tar.gz 7345618 SHA256 1e67196e18e900f8af1799133236afbffe2d8e412052a711eb9f6f9c9d603534 SHA512 07260bd7d3fa55531bc2a7c1c71990d032725f32675d88c94c978349736c2ba3367934ea0e4f86b52546ce898f36596d14d32ab876dc87eb5290560a28d4b8b9 WHIRLPOOL c307b8169a7e112aade7700acf7abad1528aa048375310ed17112e8ef8dde5f175d9ad1f07bae371d263f573739f92e0cc12659b8a691a3b4992447cebb9f14a +DIST mupdf-1.8.tar.gz 7706473 SHA256 d4e06644caad381d1dc88401dae12ee614809a7b95f6dcbf6fd086d5b594dcc4 SHA512 6adc30330c61d0bb8c9ee09488ef31701e9a7425cbac76e072eae9816c14a1190a1e2bd1e9155b6892d4198f7d8692661582cc1b82c7caab7b3ba4fddfcc7461 WHIRLPOOL 9fceca049cf5eaffd1520a0077c78bd8647d8e5b384eb2c1bc968a16349b46909b592cb8cbd5ee0546e798434afbece39a258e175ba02d0454b8edc35e179dd7 diff --git a/app-text/mupdf/files/mupdf-1.8-system-glfw.patch b/app-text/mupdf/files/mupdf-1.8-system-glfw.patch new file mode 100644 index 00000000000..bda8bd87e57 --- /dev/null +++ b/app-text/mupdf/files/mupdf-1.8-system-glfw.patch @@ -0,0 +1,11 @@ +--- mupdf-1.8/Makerules ++++ mupdf-1.8/Makerules +@@ -119,6 +119,8 @@ + SYS_JBIG2DEC_LIBS = -ljbig2dec + SYS_JPEG_LIBS = -ljpeg + SYS_ZLIB_LIBS = -lz ++SYS_GLFW_CFLAGS = $(shell pkg-config --cflags glfw3 gl) ++SYS_GLFW_LIBS = $(shell pkg-config --libs glfw3 gl) + + endif + diff --git a/app-text/mupdf/mupdf-1.8.ebuild b/app-text/mupdf/mupdf-1.8.ebuild new file mode 100644 index 00000000000..04fa8cba8f5 --- /dev/null +++ b/app-text/mupdf/mupdf-1.8.ebuild @@ -0,0 +1,139 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils multilib toolchain-funcs vcs-snapshot + +DESCRIPTION="a lightweight PDF viewer and toolkit written in portable C" +HOMEPAGE="http://mupdf.com/" +SRC_URI="http://git.ghostscript.com/?p=mupdf.git;a=snapshot;h=179403598244f069b56e60866c13a0b840c5932e;sf=tgz -> ${P}.tar.gz" + +LICENSE="AGPL-3" +MY_SOVER=1.8 +SLOT="0/${MY_SOVER}" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="X vanilla +curl javascript libressl opengl +openssl static static-libs" + +LIB_DEPEND=" + !libressl? ( dev-libs/openssl:0[static-libs?] ) + libressl? ( dev-libs/libressl[static-libs?] ) + media-libs/freetype:2[static-libs?] + media-libs/jbig2dec[static-libs?] + media-libs/openjpeg:2[static-libs?] + net-misc/curl[static-libs?] + virtual/jpeg[static-libs?] + X? ( x11-libs/libX11[static-libs?] + x11-libs/libXext[static-libs?] ) + javascript? ( dev-lang/mujs ) + opengl? ( >=media-libs/glfw-3 )" +RDEPEND="${LIB_DEPEND}" +DEPEND="${RDEPEND} + virtual/pkgconfig + static-libs? ( ${LIB_DEPEND} ) + static? ( ${LIB_DEPEND//?} + app-arch/bzip2[static-libs] + x11-libs/libXau[static-libs] + x11-libs/libXdmcp[static-libs] + x11-libs/libxcb[static-libs] )" + +REQUIRED_USE="opengl? ( X !static !static-libs )" + +src_prepare() { + rm -rf thirdparty || die + + epatch \ + "${FILESDIR}"/${PN}-1.3-CFLAGS.patch \ + "${FILESDIR}"/${PN}-1.5-old-debian-files.patch \ + "${FILESDIR}"/${PN}-1.3-pkg-config.patch \ + "${FILESDIR}"/${PN}-1.5-Makerules-openssl-curl.patch \ + "${FILESDIR}"/${PN}-1.7a-system-mujs.patch \ + "${FILESDIR}"/${PN}-1.8-system-glfw.patch + + if has_version ">=media-libs/openjpeg-2.1:2" ; then + epatch \ + "${FILESDIR}"/${PN}-1.5-openjpeg-2.1.patch + fi + + sed -e "/^libdir=/s:/lib:/$(get_libdir):" \ + -e "/^prefix=/s:=.*:=${EROOT}/usr:" \ + -i platform/debian/${PN}.pc || die + + use vanilla || epatch \ + "${FILESDIR}"/${PN}-1.3-zoom-2.patch + + #http://bugs.ghostscript.com/show_bug.cgi?id=693467 + sed -e '/^\(Actions\|MimeType\)=/s:\(.*\):\1;:' \ + -i platform/debian/${PN}.desktop || die + + sed -e "1iOS = Linux" \ + -e "1iCC = $(tc-getCC)" \ + -e "1iLD = $(tc-getCC)" \ + -e "1iAR = $(tc-getAR)" \ + -e "1iverbose = yes" \ + -e "1ibuild = debug" \ + -e "1iprefix = ${ED}usr" \ + -e "1ilibdir = ${ED}usr/$(get_libdir)" \ + -e "1idocdir = ${ED}usr/share/doc/${PF}" \ + -e "1iHAVE_X11 = $(usex X)" \ + -e "1iWANT_OPENSSL = $(usex openssl)" \ + -e "1iWANT_CURL = $(usex curl)" \ + -e "1iHAVE_MUJS = $(usex javascript)" \ + -e "1iMUJS_LIBS = -lmujs" \ + -e "1iMUJS_CFLAGS =" \ + -e "1iHAVE_GLFW = $(usex opengl yes no)" \ + -i Makerules || die + + if use static-libs || use static ; then + cp -a "${S}" "${S}"-static || die + #add missing Libs.private for xcb and freetype + sed -e 's:\(pkg-config --libs\):\1 --static:' \ + -e '/^SYS_X11_LIBS = /s:\(.*\):\1 -lpthread:' \ + -e '/^SYS_FREETYPE_LIBS = /s:\(.*\):\1 -lbz2:' \ + -i "${S}"-static/Makerules || die + fi + + my_soname=libmupdf.so.${MY_SOVER} + my_soname_js_none=libmupdf-js-none.so.${MY_SOVER} + sed -e "\$a\$(MUPDF_LIB): \$(MUPDF_JS_NONE_LIB)" \ + -e "\$a\\\t\$(QUIET_LINK) \$(CC) \$(LDFLAGS) --shared -Wl,-soname -Wl,${my_soname} -Wl,--no-undefined -o \$@ \$^ \$(MUPDF_JS_NONE_LIB) \$(LIBS)" \ + -e "/^MUPDF_LIB :=/s:=.*:= \$(OUT)/${my_soname}:" \ + -e "\$a\$(MUPDF_JS_NONE_LIB):" \ + -e "\$a\\\t\$(QUIET_LINK) \$(CC) \$(LDFLAGS) --shared -Wl,-soname -Wl,${my_soname_js_none} -Wl,--no-undefined -o \$@ \$^ \$(LIBS)" \ + -e "/install/s: COPYING : :" \ + -i Makefile || die +} + +src_compile() { + emake XCFLAGS="-fpic" + use static-libs && \ + emake -C "${S}"-static build/debug/lib${PN}{,-js-none}.a + use static && \ + emake -C "${S}"-static XLIBS="-static" +} + +src_install() { + if use X ; then + domenu platform/debian/${PN}.desktop + doicon platform/debian/${PN}.xpm + else + rm docs/man/${PN}.1 + fi + + emake install + dosym ${my_soname} /usr/$(get_libdir)/lib${PN}.so + + use static-libs && \ + dolib.a "${S}"-static/build/debug/lib${PN}{,-js-none}.a + if use static ; then + dobin "${S}"-static/build/debug/mu{tool,draw} + use X && dobin "${S}"-static/build/debug/${PN}-x11 + fi + use X && dosym ${PN}-x11 /usr/bin/${PN} + + insinto /usr/$(get_libdir)/pkgconfig + doins platform/debian/${PN}.pc + + dodoc README docs/*.{txt,c} +} |