diff options
author | Michael Weber <xmw@gentoo.org> | 2014-07-21 22:00:02 +0000 |
---|---|---|
committer | Michael Weber <xmw@gentoo.org> | 2014-07-21 22:00:02 +0000 |
commit | 8c6724803622e2a63cec047e058fe6b03e38db9a (patch) | |
tree | edaf2839c2a13891261c5d1e149c316cb2beb653 /app-text/mupdf | |
parent | arm64 stable, bug #517106 (diff) | |
download | gentoo-2-8c6724803622e2a63cec047e058fe6b03e38db9a.tar.gz gentoo-2-8c6724803622e2a63cec047e058fe6b03e38db9a.tar.bz2 gentoo-2-8c6724803622e2a63cec047e058fe6b03e38db9a.zip |
Fix USE=-X for >1.4 (bug 514202, thanks patrick) and .so names, Version bump to 1.5, USE=openssl and curl for >=1.5.
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 62EEF090)
Diffstat (limited to 'app-text/mupdf')
-rw-r--r-- | app-text/mupdf/ChangeLog | 11 | ||||
-rw-r--r-- | app-text/mupdf/files/mupdf-1.5-Makerules-openssl-curl.patch | 27 | ||||
-rw-r--r-- | app-text/mupdf/metadata.xml | 3 | ||||
-rw-r--r-- | app-text/mupdf/mupdf-1.4-r1.ebuild (renamed from app-text/mupdf/mupdf-1.4.ebuild) | 14 | ||||
-rw-r--r-- | app-text/mupdf/mupdf-1.5.ebuild | 120 | ||||
-rw-r--r-- | app-text/mupdf/mupdf-9999.ebuild | 38 |
6 files changed, 184 insertions, 29 deletions
diff --git a/app-text/mupdf/ChangeLog b/app-text/mupdf/ChangeLog index f2021efa7f02..8b5ff56cf770 100644 --- a/app-text/mupdf/ChangeLog +++ b/app-text/mupdf/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for app-text/mupdf # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/ChangeLog,v 1.105 2014/06/05 11:04:14 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/ChangeLog,v 1.106 2014/07/21 22:00:02 xmw Exp $ + +*mupdf-1.4-r1 (21 Jul 2014) +*mupdf-1.5 (21 Jul 2014) + + 21 Jul 2014; Michael Weber <xmw@gentoo.org> + +files/mupdf-1.5-Makerules-openssl-curl.patch, +mupdf-1.4-r1.ebuild, + +mupdf-1.5.ebuild, -mupdf-1.4.ebuild, metadata.xml, mupdf-9999.ebuild: + Fix USE=-X for >1.4 (bug 514202, thanks patrick) and .so names, Version bump + to 1.5, USE=openssl and curl for >=1.5. 05 Jun 2014; Michael Weber <xmw@gentoo.org> +files/mupdf-1.4-old-debian-files.patch, mupdf-9999.ebuild: diff --git a/app-text/mupdf/files/mupdf-1.5-Makerules-openssl-curl.patch b/app-text/mupdf/files/mupdf-1.5-Makerules-openssl-curl.patch new file mode 100644 index 000000000000..bc9312a937f1 --- /dev/null +++ b/app-text/mupdf/files/mupdf-1.5-Makerules-openssl-curl.patch @@ -0,0 +1,27 @@ +--- mupdf-1.5/Makerules ++++ mupdf-1.5/Makerules +@@ -58,17 +58,23 @@ + + HAVE_X11 ?= yes + ++WANT_OPENSSL ?= yes ++ifeq "$(WANT_OPENSSL)" "yes" + ifeq "$(shell pkg-config --exists libcrypto && echo yes)" "yes" + SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL $(shell pkg-config --cflags libcrypto) + SYS_OPENSSL_LIBS = $(shell pkg-config --libs libcrypto) + endif ++endif + ++WANT_CURL ?= yes ++ifeq "$(WANT_CURL)" "yes" + ifeq "$(shell pkg-config --exists libcurl && echo yes)" "yes" + HAVE_CURL = yes + SYS_CURL_CFLAGS = $(shell pkg-config --cflags libcurl) + SYS_CURL_LIBS = $(shell pkg-config --libs libcurl) +-endif + SYS_CURL_DEPS = -lpthread -lrt ++endif ++endif + + SYS_X11_CFLAGS = $(shell pkg-config --cflags x11 xext) + SYS_X11_LIBS = $(shell pkg-config --libs x11 xext) diff --git a/app-text/mupdf/metadata.xml b/app-text/mupdf/metadata.xml index 59acc2cc580e..53b35c21cd8f 100644 --- a/app-text/mupdf/metadata.xml +++ b/app-text/mupdf/metadata.xml @@ -5,5 +5,8 @@ <email>xmw@gentoo.org</email> <name>Michael Weber</name> </maintainer> +<use> + <flag name="openssl">Use dev-libs/openssl crypto backend</flag> +</use> </pkgmetadata> diff --git a/app-text/mupdf/mupdf-1.4.ebuild b/app-text/mupdf/mupdf-1.4-r1.ebuild index dbab2294c60f..aa59e6b77737 100644 --- a/app-text/mupdf/mupdf-1.4.ebuild +++ b/app-text/mupdf/mupdf-1.4-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/mupdf-1.4.ebuild,v 1.2 2014/06/05 09:45:20 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/mupdf-1.4-r1.ebuild,v 1.1 2014/07/21 22:00:02 xmw Exp $ EAPI=5 @@ -58,16 +58,14 @@ src_prepare() { -e "\$aCC = $(tc-getCC)" \ -e "\$aLD = $(tc-getCC)" \ -e "\$aAR = $(tc-getAR)" \ - -e "\$averbose = true" \ + -e "\$averbose = yes" \ -e "\$abuild = debug" \ -e "\$aprefix = ${ED}usr" \ -e "\$alibdir = ${ED}usr/$(get_libdir)" \ -i Makerules || die - if ! use X ; then - sed -e "\$aNOX11 = yes" \ - -i Makerules || die - fi + sed -e "\$aHAVE_X11 = $(usex X yes no)" \ + -i Makerules || die if use static-libs || use static ; then cp -a "${S}" "${S}"-static || die @@ -78,8 +76,8 @@ src_prepare() { -i "${S}"-static/Makerules || die fi - my_soname=libmupdf.so.1.3 - my_soname_js_none=libmupdf-js-none.so.1.3 + my_soname=libmupdf.so.1.4 + my_soname_js_none=libmupdf-js-none.so.1.4 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}:" \ diff --git a/app-text/mupdf/mupdf-1.5.ebuild b/app-text/mupdf/mupdf-1.5.ebuild new file mode 100644 index 000000000000..8242d9a0a61c --- /dev/null +++ b/app-text/mupdf/mupdf-1.5.ebuild @@ -0,0 +1,120 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/mupdf-1.5.ebuild,v 1.1 2014/07/21 22:00:02 xmw Exp $ + +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=b2f096de23e5341fbbcd7c290f3a144423741906;sf=tgz -> ${P}.tar.gz" + +LICENSE="AGPL-3" +SLOT="0/1.5" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="X vanilla +curl +openssl static static-libs" + +LIB_DEPEND="dev-libs/openssl[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?] )" +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] )" + +src_prepare() { + rm -rf thirdparty || die + + epatch \ + "${FILESDIR}"/${PN}-1.3-CFLAGS.patch \ + "${FILESDIR}"/${PN}-1.4-old-debian-files.patch \ + "${FILESDIR}"/${PN}-1.3-pkg-config.patch \ + "${FILESDIR}"/${PN}-1.5-Makerules-openssl-curl.patch + + 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 "1iHAVE_X11 = $(usex X)" \ + -e "1iWANT_OPENSSL = $(usex openssl)" \ + -e "1iWANT_CURL = $(usex curl)" \ + -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.1.5 + my_soname_js_none=libmupdf-js-none.so.1.5 + 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 "/^MUPDF_JS_NONE_LIB :=/s:=.*:= \$(OUT)/${my_soname_js_none}:" \ + -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} +} diff --git a/app-text/mupdf/mupdf-9999.ebuild b/app-text/mupdf/mupdf-9999.ebuild index 012e13df8cc6..7e847f1b472b 100644 --- a/app-text/mupdf/mupdf-9999.ebuild +++ b/app-text/mupdf/mupdf-9999.ebuild @@ -1,10 +1,10 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/mupdf-9999.ebuild,v 1.46 2014/06/05 11:04:14 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/mupdf-9999.ebuild,v 1.47 2014/07/21 22:00:02 xmw Exp $ EAPI=5 -inherit eutils git-2 flag-o-matic multilib toolchain-funcs +inherit eutils git-2 multilib toolchain-funcs DESCRIPTION="a lightweight PDF viewer and toolkit written in portable C" HOMEPAGE="http://mupdf.com/" @@ -12,9 +12,9 @@ EGIT_REPO_URI="git://git.ghostscript.com/mupdf.git" #EGIT_HAS_SUBMODULES=1 LICENSE="AGPL-3" -SLOT="0/1.3" +SLOT="0/1.5" KEYWORDS="" -IUSE="X vanilla static static-libs" +IUSE="X vanilla curl openssl static static-libs" LIB_DEPEND="dev-libs/openssl[static-libs?] media-libs/freetype:2[static-libs?] @@ -41,7 +41,7 @@ src_prepare() { "${FILESDIR}"/${PN}-1.3-CFLAGS.patch \ "${FILESDIR}"/${PN}-1.4-old-debian-files.patch \ "${FILESDIR}"/${PN}-1.3-pkg-config.patch \ - "${FILESDIR}"/${PN}-1.3-sys_curl.patch + "${FILESDIR}"/${PN}-1.5-Makerules-openssl-curl.patch sed -e "/^libdir=/s:/lib:/$(get_libdir):" \ -e "/^prefix=/s:=.*:=${EROOT}/usr:" \ @@ -54,21 +54,19 @@ src_prepare() { sed -e '/^\(Actions\|MimeType\)=/s:\(.*\):\1;:' \ -i platform/debian/${PN}.desktop || die - sed -e "\$aOS = Linux" \ - -e "\$aCC = $(tc-getCC)" \ - -e "\$aLD = $(tc-getCC)" \ - -e "\$aAR = $(tc-getAR)" \ - -e "\$averbose = true" \ - -e "\$abuild = debug" \ - -e "\$aprefix = ${ED}usr" \ - -e "\$alibdir = ${ED}usr/$(get_libdir)" \ + 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 "1iHAVE_X11 = $(usex X)" \ + -e "1iWANT_OPENSSL = $(usex openssl)" \ + -e "1iWANT_CURL = $(usex curl)" \ -i Makerules || die - if ! use X ; then - sed -e "\$aNOX11 = yes" \ - -i Makerules || die - fi - if use static-libs || use static ; then cp -a "${S}" "${S}"-static || die #add missing Libs.private for xcb and freetype @@ -78,8 +76,8 @@ src_prepare() { -i "${S}"-static/Makerules || die fi - my_soname=libmupdf.so.1.3 - my_soname_js_none=libmupdf-js-none.so.1.3 + my_soname=libmupdf.so.1.5 + my_soname_js_none=libmupdf-js-none.so.1.5 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}:" \ |