diff options
author | Michael Weber <xmw@gentoo.org> | 2013-06-07 22:52:15 +0000 |
---|---|---|
committer | Michael Weber <xmw@gentoo.org> | 2013-06-07 22:52:15 +0000 |
commit | e3e5b97ac5fc2bdca3307ee0c3b3b776d467b9ba (patch) | |
tree | 5eaac454918a91f4afb1028cdeaeb582b605d2b8 /app-text/mupdf | |
parent | Removed masking of >=sci-visualization/fityk-1.1 (diff) | |
download | gentoo-2-e3e5b97ac5fc2bdca3307ee0c3b3b776d467b9ba.tar.gz gentoo-2-e3e5b97ac5fc2bdca3307ee0c3b3b776d467b9ba.tar.bz2 gentoo-2-e3e5b97ac5fc2bdca3307ee0c3b3b776d467b9ba.zip |
Switch to shared libs and binaries (USE=static static-libs, bug 407807), Desktop integration patch, advanced buildsystem patch for 1.0
(Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key 62EEF090)
Diffstat (limited to 'app-text/mupdf')
-rw-r--r-- | app-text/mupdf/ChangeLog | 9 | ||||
-rw-r--r-- | app-text/mupdf/files/mupdf-1.0-buildsystem.patch | 20 | ||||
-rw-r--r-- | app-text/mupdf/metadata.xml | 3 | ||||
-rw-r--r-- | app-text/mupdf/mupdf-1.0.ebuild | 6 | ||||
-rw-r--r-- | app-text/mupdf/mupdf-1.1.ebuild | 6 | ||||
-rw-r--r-- | app-text/mupdf/mupdf-1.1_p20121127.ebuild | 7 | ||||
-rw-r--r-- | app-text/mupdf/mupdf-1.2.ebuild | 88 | ||||
-rw-r--r-- | app-text/mupdf/mupdf-9999.ebuild | 86 |
8 files changed, 152 insertions, 73 deletions
diff --git a/app-text/mupdf/ChangeLog b/app-text/mupdf/ChangeLog index 0b237157092f..d0e126a5fd4e 100644 --- a/app-text/mupdf/ChangeLog +++ b/app-text/mupdf/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-text/mupdf # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/ChangeLog,v 1.69 2013/06/07 00:11:06 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/ChangeLog,v 1.70 2013/06/07 22:52:15 xmw Exp $ + + 07 Jun 2013; Michael Weber <xmw@gentoo.org> + -files/mupdf-1.0-buildsystem.patch, metadata.xml, mupdf-1.0.ebuild, + mupdf-1.1.ebuild, mupdf-1.1_p20121127.ebuild, mupdf-1.2.ebuild, + mupdf-9999.ebuild: + Switch to shared libs and binaries (USE=static static-libs, bug 407807), + Desktop integration patch, advanced buildsystem patch for 1.0 07 Jun 2013; Michael Weber <xmw@gentoo.org> mupdf-1.0.ebuild, mupdf-1.1.ebuild, mupdf-1.1_p20121127.ebuild, mupdf-1.2.ebuild: diff --git a/app-text/mupdf/files/mupdf-1.0-buildsystem.patch b/app-text/mupdf/files/mupdf-1.0-buildsystem.patch deleted file mode 100644 index 6a66f3c46e55..000000000000 --- a/app-text/mupdf/files/mupdf-1.0-buildsystem.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- mupdf-1.0-source/Makerules -+++ mupdf-1.0-source/Makerules -@@ -6,7 +6,7 @@ - CFLAGS += -Wall - - ifeq "$(build)" "debug" --CFLAGS += -pipe -g -DDEBUG -+CFLAGS += -DDEBUG - else ifeq "$(build)" "profile" - CFLAGS += -pipe -O2 -DNDEBUG -pg - LDFLAGS += -pg -@@ -22,7 +22,7 @@ - - ifeq "$(OS)" "Linux" - SYS_FREETYPE_INC := `pkg-config --cflags freetype2` --X11_LIBS := -lX11 -lXext -+X11_LIBS := $(shell pkg-config --libs x11 xext) - endif - - ifeq "$(OS)" "FreeBSD" diff --git a/app-text/mupdf/metadata.xml b/app-text/mupdf/metadata.xml index 59acc2cc580e..04fe0fdcf03b 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="shared-libs">Build shared libraries</flag> +</use> </pkgmetadata> diff --git a/app-text/mupdf/mupdf-1.0.ebuild b/app-text/mupdf/mupdf-1.0.ebuild index c1077d941424..7629bf5fc5d6 100644 --- a/app-text/mupdf/mupdf-1.0.ebuild +++ b/app-text/mupdf/mupdf-1.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/mupdf-1.0.ebuild,v 1.9 2013/06/07 00:11:06 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/mupdf-1.0.ebuild,v 1.10 2013/06/07 22:52:15 xmw Exp $ EAPI=4 @@ -27,7 +27,9 @@ DEPEND="${RDEPEND} S=${WORKDIR}/${P}-source src_prepare() { - epatch "${FILESDIR}"/${P}-buildsystem.patch + epatch \ + "${FILESDIR}"/${PN}-1.1_rc1-buildsystem.patch \ + "${FILESDIR}"/${P}-desktop-integration.patch if ! use vanilla ; then epatch "${FILESDIR}"/${P}-zoom.patch diff --git a/app-text/mupdf/mupdf-1.1.ebuild b/app-text/mupdf/mupdf-1.1.ebuild index 034195ec6b31..450a55ed64ab 100644 --- a/app-text/mupdf/mupdf-1.1.ebuild +++ b/app-text/mupdf/mupdf-1.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/mupdf-1.1.ebuild,v 1.7 2013/06/07 00:11:06 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/mupdf-1.1.ebuild,v 1.8 2013/06/07 22:52:15 xmw Exp $ EAPI=4 @@ -27,7 +27,9 @@ DEPEND="${RDEPEND} S=${WORKDIR}/${P/_rc/-rc}-source src_prepare() { - epatch "${FILESDIR}"/${PN}-1.1_rc1-buildsystem.patch + epatch \ + "${FILESDIR}"/${PN}-1.1_rc1-buildsystem.patch \ + "${FILESDIR}"/${P}-desktop-integration.patch if ! use vanilla ; then epatch "${FILESDIR}"/${PN}-1.1_rc1-zoom-2.patch diff --git a/app-text/mupdf/mupdf-1.1_p20121127.ebuild b/app-text/mupdf/mupdf-1.1_p20121127.ebuild index ccfd9460210d..d14b26c05643 100644 --- a/app-text/mupdf/mupdf-1.1_p20121127.ebuild +++ b/app-text/mupdf/mupdf-1.1_p20121127.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/mupdf-1.1_p20121127.ebuild,v 1.6 2013/06/07 00:11:06 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/mupdf-1.1_p20121127.ebuild,v 1.7 2013/06/07 22:52:15 xmw Exp $ EAPI=4 @@ -25,8 +25,9 @@ DEPEND="${RDEPEND} virtual/pkgconfig" src_prepare() { - epatch "${FILESDIR}"/${P}-buildsystem.patch - epatch "${FILESDIR}"/${P}-desktop-integration.patch + epatch \ + "${FILESDIR}"/${P}-buildsystem.patch \ + "${FILESDIR}"/${P}-desktop-integration.patch if ! use vanilla ; then epatch "${FILESDIR}"/${PN}-1.1_rc1-zoom-2.patch diff --git a/app-text/mupdf/mupdf-1.2.ebuild b/app-text/mupdf/mupdf-1.2.ebuild index c9f4fb434c5b..52da14f6b70f 100644 --- a/app-text/mupdf/mupdf-1.2.ebuild +++ b/app-text/mupdf/mupdf-1.2.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/mupdf-1.2.ebuild,v 1.3 2013/06/07 00:11:06 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/mupdf-1.2.ebuild,v 1.4 2013/06/07 22:52:15 xmw Exp $ -EAPI=4 +EAPI=5 inherit eutils flag-o-matic multilib toolchain-funcs @@ -11,9 +11,9 @@ HOMEPAGE="http://mupdf.com/" SRC_URI="http://${PN}.googlecode.com/files/${P}-source.zip" LICENSE="AGPL-3" -SLOT="0" +SLOT="0/1.2" KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" -IUSE="X vanilla" +IUSE="X vanilla static static-libs" RDEPEND="media-libs/freetype:2 media-libs/jbig2dec @@ -22,6 +22,12 @@ RDEPEND="media-libs/freetype:2 X? ( x11-libs/libX11 x11-libs/libXext )" DEPEND="${RDEPEND} + static? ( app-arch/bzip2[static-libs] + media-libs/freetype:2[static-libs] + media-libs/jbig2dec[static-libs] + virtual/jpeg[static-libs] + X? ( x11-libs/libX11[static-libs] + x11-libs/libXext[static-libs] ) ) virtual/pkgconfig" S=${WORKDIR}/${P}-source @@ -29,37 +35,73 @@ S=${WORKDIR}/${P}-source src_prepare() { rm -rf thirdparty || die - epatch "${FILESDIR}"/${PN}-1.1_p20121127-buildsystem.patch - epatch "${FILESDIR}"/${PN}-1.1_p20121127-desktop-integration.patch - epatch "${FILESDIR}"/${PN}-1.2-mubusy_rename_fix.patch + epatch \ + "${FILESDIR}"/${PN}-1.1_p20121127-buildsystem.patch \ + "${FILESDIR}"/${PN}-1.1_p20121127-desktop-integration.patch \ + "${FILESDIR}"/${PN}-1.2-mubusy_rename_fix.patch - if ! use vanilla ; then - epatch "${FILESDIR}"/${PN}-1.1_rc1-zoom-2.patch + use vanilla || epatch \ + "${FILESDIR}"/${PN}-1.1_rc1-zoom-2.patch + + 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)" \ + -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 + sed -e '/^LIBS +=/s: -lopenjpeg : :' \ + -e '/^LIBS +=/s:=\(.*\):= -Wl,-Bstatic \1 -lbz2 -Wl,-Bdynamic -lopenjpeg:' \ + -i "${S}"-static/Makefile fi + + my_soname=libfitz.so.1.2 + sed -e "\$a\$(FITZ_LIB):" \ + -e "\$a\\\t\$(QUIET_LINK) \$(CC) \$(LDFLAGS) --shared -Wl,-soname -Wl,${my_soname} -o \$@ \$^" \ + -e "/^FITZ_LIB :=/s:=.*:= build/debug/${my_soname}:" \ + -i Makefile || die } src_compile() { - use X || my_nox11="NOX11=yes MUPDF= " - - emake CC="$(tc-getCC)" AR="$(tc-getAR)" OS=Linux \ - build=debug verbose=true ${my_nox11} + emake XCFLAGS="-fpic" + use static-libs && \ + emake -C "${S}"-static build/debug/libfitz.a + use static && \ + emake -C "${S}"-static } src_install() { - emake prefix="${ED}usr" libdir="${ED}usr/$(get_libdir)" \ - build=debug verbose=true ${my_nox11} install + if use X ; then + domenu debian/mupdf.desktop + doicon debian/mupdf.xpm + use static && dobin "${S}"-static/build/debug/mupdf + else + rm apps/man/mupdf.1 + fi + emake install + dosym ${my_soname} /usr/$(get_libdir)/libfitz.so + + use static-libs && \ + dolib.a "${S}"-static/build/debug/libfitz.a + use static && \ + dobin "${S}"-static/build/debug/mu{tool,draw} + insinto /usr/include - doins pdf/mupdf{,-internal}.h - doins fitz/fitz{,-internal}.h - doins xps/muxps{,-internal}.h - + doins pdf/mupdf-internal.h fitz/fitz-internal.h xps/muxps-internal.h + insinto /usr/$(get_libdir)/pkgconfig doins debian/mupdf.pc - if use X ; then - domenu debian/mupdf.desktop - doicon debian/mupdf.xpm - fi dodoc CHANGES README doc/{example.c,overview.txt} } diff --git a/app-text/mupdf/mupdf-9999.ebuild b/app-text/mupdf/mupdf-9999.ebuild index 768c0ee5d9c0..41e01b890356 100644 --- a/app-text/mupdf/mupdf-9999.ebuild +++ b/app-text/mupdf/mupdf-9999.ebuild @@ -1,10 +1,10 @@ # Copyright 1999-2013 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.28 2013/06/06 22:58:47 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/mupdf/mupdf-9999.ebuild,v 1.29 2013/06/07 22:52:15 xmw Exp $ EAPI=5 -inherit eutils git-2 multilib toolchain-funcs +inherit eutils git-2 flag-o-matic 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" +SLOT="0/1.2" KEYWORDS="" -IUSE="X vanilla" +IUSE="X vanilla static static-libs" RDEPEND="media-libs/freetype:2 media-libs/jbig2dec @@ -23,41 +23,83 @@ RDEPEND="media-libs/freetype:2 X? ( x11-libs/libX11 x11-libs/libXext )" DEPEND="${RDEPEND} + static? ( app-arch/bzip2[static-libs] + media-libs/freetype:2[static-libs] + media-libs/jbig2dec[static-libs] + virtual/jpeg[static-libs] + X? ( x11-libs/libX11[static-libs] + x11-libs/libXext[static-libs] ) ) virtual/pkgconfig" src_prepare() { rm -rf thirdparty || die - epatch "${FILESDIR}"/${PN}-9999-buildsystem.patch \ - "${FILESDIR}"/${PN}-9999-openjpeg2.patch + epatch \ + "${FILESDIR}"/${P}-buildsystem.patch \ + "${FILESDIR}"/${P}-openjpeg2.patch - if ! use vanilla ; then - epatch "${FILESDIR}"/${PN}-1.1_rc1-zoom-2.patch + use vanilla || epatch \ + "${FILESDIR}"/${PN}-1.1_rc1-zoom-2.patch + + 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)" \ + -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 + sed -e '/^LIBS +=/s: -lopenjpeg : :' \ + -e '/^LIBS +=/s:=\(.*\):= -Wl,-Bstatic \1 -lbz2 -Wl,-Bdynamic -lopenjpeg:' \ + -i "${S}"-static/Makefile fi + + my_soname=libfitz.so.1.2 + sed -e "\$a\$(FITZ_LIB):" \ + -e "\$a\\\t\$(QUIET_LINK) \$(CC) \$(LDFLAGS) --shared -Wl,-soname -Wl,${my_soname} -o \$@ \$^" \ + -e "/^FITZ_LIB :=/s:=.*:= build/debug/${my_soname}:" \ + -i Makefile || die } src_compile() { - use X || my_nox11="NOX11=yes MUPDF= " - - emake CC="$(tc-getCC)" OS=Linux \ - build=debug verbose=true ${my_nox11} + emake XCFLAGS="-fpic" + use static-libs && \ + emake -C "${S}"-static build/debug/libfitz.a + use static && \ + emake -C "${S}"-static } src_install() { - emake prefix="${ED}usr" libdir="${ED}usr/$(get_libdir)" \ - build=debug verbose=true ${my_nox11} install + if use X ; then + domenu debian/mupdf.desktop + doicon debian/mupdf.xpm + use static && dobin "${S}"-static/build/debug/mupdf + else + rm apps/man/mupdf.1 + fi + emake install + dosym ${my_soname} /usr/$(get_libdir)/libfitz.so + + use static-libs && \ + dolib.a "${S}"-static/build/debug/libfitz.a + use static && \ + dobin "${S}"-static/build/debug/mu{tool,draw} + insinto /usr/include - doins pdf/mupdf{,-internal}.h - doins fitz/fitz{,-internal}.h - doins xps/muxps{,-internal}.h - + doins pdf/mupdf-internal.h fitz/fitz-internal.h xps/muxps-internal.h + insinto /usr/$(get_libdir)/pkgconfig doins debian/mupdf.pc - if use X ; then - domenu debian/mupdf.desktop - doicon debian/mupdf.xpm - fi dodoc README doc/{example.c,overview.txt} } |