public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michael Weber" <xmw@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/
Date: Sat,  4 Jun 2016 19:46:47 +0000 (UTC)	[thread overview]
Message-ID: <1465069569.9d40bc9df5cd1c5de3bcdd0d6e846ae832ede27b.xmw@gentoo> (raw)

commit:     9d40bc9df5cd1c5de3bcdd0d6e846ae832ede27b
Author:     Michael Weber <xmw <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  4 19:45:29 2016 +0000
Commit:     Michael Weber <xmw <AT> gentoo <DOT> org>
CommitDate: Sat Jun  4 19:46:09 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d40bc9d

app-text/mupdf: Version bump (thanks johncarmack <AT> cock.li for the hint, bug 584266).

Package-Manager: portage-2.3.0_rc1

 app-text/mupdf/Manifest                            |   1 +
 app-text/mupdf/files/mupdf-1.9a-CFLAGS.patch       |  11 ++
 app-text/mupdf/files/mupdf-1.9a-debug-build.patch  |  10 ++
 app-text/mupdf/files/mupdf-1.9a-no-thirdlibs.patch | 113 ++++++++++++++++
 app-text/mupdf/mupdf-1.9a.ebuild                   | 144 +++++++++++++++++++++
 5 files changed, 279 insertions(+)

diff --git a/app-text/mupdf/Manifest b/app-text/mupdf/Manifest
index 6faa9d9..88b3b21 100644
--- a/app-text/mupdf/Manifest
+++ b/app-text/mupdf/Manifest
@@ -1,2 +1,3 @@
 DIST mupdf-1.5.tar.gz 7485699 SHA256 946393c7abf78e50fa9815f18a9e91f275a1a96a7ea14ae39b5237944070d1f5 SHA512 bfb79838eba629295ab164cf37e49edc8846689598fbad9312409535022a2e747bd062718b899909564c6cf5826fb46a2b4b579ced8c7a3896d6098e7e5ccf40 WHIRLPOOL ebcaf5f677984a78aecf9eeb72e7a79e6e2a6388db5024427d8bf55f31b3690844dd291ada3cd578a5bb9a370ea21cb2a044656c21a0ef47cdf7bfc42c842beb
 DIST mupdf-1.8.tar.gz 7706473 SHA256 d4e06644caad381d1dc88401dae12ee614809a7b95f6dcbf6fd086d5b594dcc4 SHA512 6adc30330c61d0bb8c9ee09488ef31701e9a7425cbac76e072eae9816c14a1190a1e2bd1e9155b6892d4198f7d8692661582cc1b82c7caab7b3ba4fddfcc7461 WHIRLPOOL 9fceca049cf5eaffd1520a0077c78bd8647d8e5b384eb2c1bc968a16349b46909b592cb8cbd5ee0546e798434afbece39a258e175ba02d0454b8edc35e179dd7
+DIST mupdf-1.9a.tar.gz 13282205 SHA256 2a7d6d73cd1f6de8f70792dff9936b84c54c127feecd485675e0d0c17debc98d SHA512 aa268484371597f2082bff61052b3f80e30b8d41018bf0477b8975e4520849090b75e6c4be6be15d6af9cea6d9315deb28f82c6afc8b6f3c5bfc3498eca91140 WHIRLPOOL b552e68d0412e723e23c645516e87d695e00af0c88b14ab1ebc6b65e374f525fab6df2b5f81fe72fc8a61a8a9f616712ef0d215a07327745d33fb0238509eac9

diff --git a/app-text/mupdf/files/mupdf-1.9a-CFLAGS.patch b/app-text/mupdf/files/mupdf-1.9a-CFLAGS.patch
new file mode 100644
index 0000000..a6caa30
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.9a-CFLAGS.patch
@@ -0,0 +1,11 @@
+--- mupdf-1.9a/Makerules
++++ mupdf-1.9a/Makerules
+@@ -10,7 +10,7 @@
+ CFLAGS += -Wall
+ 
+ ifeq "$(build)" "debug"
+-CFLAGS += -pipe -g -DDEBUG
++CFLAGS += -DDEBUG
+ LDFLAGS += -g
+ else ifeq "$(build)" "release"
+ CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer

diff --git a/app-text/mupdf/files/mupdf-1.9a-debug-build.patch b/app-text/mupdf/files/mupdf-1.9a-debug-build.patch
new file mode 100644
index 0000000..93c52f5
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.9a-debug-build.patch
@@ -0,0 +1,10 @@
+--- mupdf-1.9a/Makefile
++++ mupdf-1.9a/Makefile
+@@ -1,6 +1,6 @@
+ # GNU Makefile
+ 
+-build ?= release
++build ?= debug
+ 
+ OUT := build/$(build)
+ GEN := generated

diff --git a/app-text/mupdf/files/mupdf-1.9a-no-thirdlibs.patch b/app-text/mupdf/files/mupdf-1.9a-no-thirdlibs.patch
new file mode 100644
index 0000000..08d2eca
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.9a-no-thirdlibs.patch
@@ -0,0 +1,113 @@
+--- mupdf-1.9a/Makefile
++++ mupdf-1.9a/Makefile
+@@ -142,15 +141,12 @@
+ # --- Library ---
+ 
+ MUPDF_LIB = $(OUT)/libmupdf.a
+-THIRD_LIB = $(OUT)/libmupdfthird.a
+ 
+ MUPDF_OBJ := $(FITZ_OBJ) $(FONT_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(CBZ_OBJ) $(HTML_OBJ) $(GPRF_OBJ)
+-THIRD_OBJ := $(FREETYPE_OBJ) $(HARFBUZZ_OBJ) $(JBIG2DEC_OBJ) $(JPEG_OBJ) $(MUJS_OBJ) $(OPENJPEG_OBJ) $(ZLIB_OBJ)
+ 
+ $(MUPDF_LIB) : $(MUPDF_OBJ)
+-$(THIRD_LIB) : $(THIRD_OBJ)
+ 
+-INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB)
++INSTALL_LIBS := $(MUPDF_LIB)
+ 
+ # --- Rules ---
+ 
+@@ -251,19 +247,19 @@
+ MUTOOL := $(addprefix $(OUT)/, mutool)
+ MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.o mudraw.o murun.o pdfclean.o pdfcreate.o pdfextract.o pdfinfo.o pdfposter.o pdfshow.o pdfpages.o pdfmerge.o)
+ $(MUTOOL_OBJ): $(FITZ_HDR) $(PDF_HDR)
+-$(MUTOOL) : $(MUPDF_LIB) $(THIRD_LIB)
++$(MUTOOL) : $(MUPDF_LIB)
+ $(MUTOOL) : $(MUTOOL_OBJ)
+ 	$(LINK_CMD)
+ 
+ MJSGEN := $(OUT)/mjsgen
+-$(MJSGEN) : $(MUPDF_LIB) $(THIRD_LIB)
++$(MJSGEN) : $(MUPDF_LIB)
+ $(MJSGEN) : $(addprefix $(OUT)/tools/, mjsgen.o)
+ 	$(LINK_CMD)
+ 
+ MUJSTEST := $(OUT)/mujstest
+ MUJSTEST_OBJ := $(addprefix $(OUT)/platform/x11/, jstest_main.o pdfapp.o)
+ $(MUJSTEST_OBJ) : $(FITZ_HDR) $(PDF_HDR)
+-$(MUJSTEST) : $(MUPDF_LIB) $(THIRD_LIB)
++$(MUJSTEST) : $(MUPDF_LIB)
+ $(MUJSTEST) : $(MUJSTEST_OBJ)
+ 	$(LINK_CMD)
+ 
+@@ -271,7 +267,7 @@
+ MUVIEW_X11 := $(OUT)/mupdf-x11
+ MUVIEW_X11_OBJ := $(addprefix $(OUT)/platform/x11/, x11_main.o x11_image.o pdfapp.o)
+ $(MUVIEW_X11_OBJ) : $(FITZ_HDR) $(PDF_HDR)
+-$(MUVIEW_X11) : $(MUPDF_LIB) $(THIRD_LIB)
++$(MUVIEW_X11) : $(MUPDF_LIB)
+ $(MUVIEW_X11) : $(MUVIEW_X11_OBJ)
+ 	$(LINK_CMD) $(X11_LIBS)
+ 
+@@ -279,7 +275,7 @@
+ MUVIEW_GLFW := $(OUT)/mupdf-gl
+ MUVIEW_GLFW_OBJ := $(addprefix $(OUT)/platform/gl/, gl-font.o gl-input.o gl-main.o)
+ $(MUVIEW_GLFW_OBJ) : $(FITZ_HDR) $(PDF_HDR) platform/gl/gl-app.h
+-$(MUVIEW_GLFW) : $(MUPDF_LIB) $(THIRD_LIB) $(GLFW_LIB)
++$(MUVIEW_GLFW) : $(MUPDF_LIB) $(GLFW_LIB)
+ $(MUVIEW_GLFW) : $(MUVIEW_GLFW_OBJ)
+ 	$(LINK_CMD) $(GLFW_LIBS)
+ endif
+@@ -288,7 +284,7 @@
+ MUVIEW_X11_CURL := $(OUT)/mupdf-x11-curl
+ MUVIEW_X11_CURL_OBJ := $(addprefix $(OUT)/platform/x11/curl/, x11_main.o x11_image.o pdfapp.o curl_stream.o)
+ $(MUVIEW_X11_CURL_OBJ) : $(FITZ_HDR) $(PDF_HDR)
+-$(MUVIEW_X11_CURL) : $(MUPDF_LIB) $(THIRD_LIB) $(CURL_LIB)
++$(MUVIEW_X11_CURL) : $(MUPDF_LIB) $(CURL_LIB)
+ $(MUVIEW_X11_CURL) : $(MUVIEW_X11_CURL_OBJ)
+ 	$(LINK_CMD) $(X11_LIBS) $(CURL_LIBS) $(SYS_CURL_DEPS)
+ endif
+@@ -298,7 +294,7 @@
+ MUVIEW_WIN32 := $(OUT)/mupdf
+ MUVIEW_WIN32_OBJ := $(addprefix $(OUT)/platform/x11/, win_main.o pdfapp.o win_res.o)
+ $(MUVIEW_WIN32_OBJ) : $(FITZ_HDR) $(PDF_HDR)
+-$(MUVIEW_WIN32) : $(MUPDF_LIB) $(THIRD_LIB)
++$(MUVIEW_WIN32) : $(MUPDF_LIB)
+ $(MUVIEW_WIN32) : $(MUVIEW_WIN32_OBJ)
+ 	$(LINK_CMD) $(WIN32_LIBS)
+ endif
+@@ -312,9 +308,9 @@
+ 
+ examples: $(OUT)/example $(OUT)/multi-threaded
+ 
+-$(OUT)/example: docs/example.c $(MUPDF_LIB) $(THIRD_LIB)
++$(OUT)/example: docs/example.c $(MUPDF_LIB)
+ 	$(LINK_CMD) $(CFLAGS)
+-$(OUT)/multi-threaded: docs/multi-threaded.c $(MUPDF_LIB) $(THIRD_LIB)
++$(OUT)/multi-threaded: docs/multi-threaded.c $(MUPDF_LIB)
+ 	$(LINK_CMD) $(CFLAGS) -lpthread
+ 
+ # --- Update version string header ---
+@@ -343,7 +339,6 @@
+ mandir ?= $(prefix)/share/man
+ docdir ?= $(prefix)/share/doc/mupdf
+ 
+-third: $(THIRD_LIB)
+ extra: $(CURL_LIB) $(GLFW_LIB)
+ libs: $(INSTALL_LIBS)
+ apps: $(INSTALL_APPS)
+@@ -376,7 +371,7 @@
+ java:
+ 	$(MAKE) -C platform/java
+ 
+-tags: $(shell find include source platform thirdparty -name '*.[ch]' -or -name '*.cc' -or -name '*.hh')
++tags: $(shell find include source platform -name '*.[ch]' -or -name '*.cc' -or -name '*.hh')
+ 	ctags $^
+ 
+ cscope.files: $(shell find include source platform -name '*.[ch]')
+@@ -397,4 +392,4 @@
+ debug:
+ 	$(MAKE) build=debug
+ 
+-.PHONY: all clean nuke install third libs apps generate
++.PHONY: all clean nuke install libs apps generate

diff --git a/app-text/mupdf/mupdf-1.9a.ebuild b/app-text/mupdf/mupdf-1.9a.ebuild
new file mode 100644
index 0000000..c40e027
--- /dev/null
+++ b/app-text/mupdf/mupdf-1.9a.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic 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=027860688eafc89ca3d57937a77a43a9bb96f590;sf=tgz -> ${P}.tar.gz"
+
+LICENSE="AGPL-3"
+MY_SOVER=1.9
+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/harfbuzz[static-libs?]
+	media-libs/jbig2dec[static-libs?]
+	media-libs/libpng:0[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-0_p20160504 )
+	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() {
+	use hppa && append-cflags -ffunction-sections
+
+	rm -rf thirdparty || die
+
+	epatch \
+		"${FILESDIR}"/${PN}-1.9a-CFLAGS.patch \
+		"${FILESDIR}"/${PN}-1.9a-debug-build.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.9a-no-thirdlibs.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}
+}


             reply	other threads:[~2016-06-04 19:46 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-04 19:46 Michael Weber [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-28  6:11 [gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/ Joonas Niilola
2024-08-28  6:11 Joonas Niilola
2024-05-25  7:06 Arthur Zamarin
2024-05-25  7:06 Arthur Zamarin
2023-02-26  7:02 Joonas Niilola
2023-01-04  5:50 Sam James
2022-12-29 20:50 Florian Schmaus
2022-12-29 20:50 Florian Schmaus
2022-07-19  7:41 Florian Schmaus
2022-06-30 13:33 Florian Schmaus
2021-12-04  8:20 Joonas Niilola
2021-04-14 22:03 Sam James
2020-10-13 23:21 Sam James
2020-08-14  4:21 Sam James
2020-01-21 23:04 Sergei Trofimovich
2019-11-26 14:25 Jory Pratt
2019-05-07  2:39 Virgil Dupras
2019-02-19 21:02 Virgil Dupras
2018-12-16 20:24 Virgil Dupras
2018-08-27 19:53 Virgil Dupras
2018-04-12  1:03 Thomas Deutschmann
2018-01-28  9:53 Michael Weber
2017-03-06 22:12 Michael Weber
2017-02-09 21:10 Michael Weber
2017-01-23  0:31 Michael Weber
2015-08-10 22:52 Michael Weber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1465069569.9d40bc9df5cd1c5de3bcdd0d6e846ae832ede27b.xmw@gentoo \
    --to=xmw@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox