summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVirgil Dupras <vdupras@gentoo.org>2018-10-15 10:41:38 -0400
committerVirgil Dupras <vdupras@gentoo.org>2018-10-15 10:41:38 -0400
commit84450c429203901c5de4e786b4413fbb5f25d731 (patch)
tree684f0da59cabacf94de7109fc03b7f96aa3669af /app-text/mupdf
parentsys-kernel/vanilla-sources: Automated version bump to {4.4.161,4.9.133,4.14.7... (diff)
downloadgentoo-84450c429203901c5de4e786b4413fbb5f25d731.tar.gz
gentoo-84450c429203901c5de4e786b4413fbb5f25d731.tar.bz2
gentoo-84450c429203901c5de4e786b4413fbb5f25d731.zip
app-text/mupdf: fix shared library build
Closes: https://bugs.gentoo.org/668684 Signed-off-by: Virgil Dupras <vdupras@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'app-text/mupdf')
-rw-r--r--app-text/mupdf/files/mupdf-1.14-Makefile.patch46
-rw-r--r--app-text/mupdf/files/mupdf-1.14-debug-build.patch13
-rw-r--r--app-text/mupdf/mupdf-1.14.0-r1.ebuild (renamed from app-text/mupdf/mupdf-1.14.0.ebuild)11
3 files changed, 50 insertions, 20 deletions
diff --git a/app-text/mupdf/files/mupdf-1.14-Makefile.patch b/app-text/mupdf/files/mupdf-1.14-Makefile.patch
new file mode 100644
index 000000000000..a8c4ef770dce
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.14-Makefile.patch
@@ -0,0 +1,46 @@
+1. debug build (not sure why...)
+2. build shared library
+3. add optional static lib target
+4. Don't install COPYING
+diff --git a/Makefile b/Makefile
+index 37fc48e6..4303e9fa 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3,7 +3,7 @@
+ -include user.make
+
+ ifndef build
+- build := release
++ build := debug
+ endif
+
+ ifndef OUT
+@@ -190,13 +190,15 @@ generate: source/pdf/js/util.js.h
+
+ # --- Library ---
+
+-MUPDF_LIB = $(OUT)/libmupdf.a
+-THIRD_LIB = $(OUT)/libmupdf-third.a
++MUPDF_LIB = libmupdf.so.$(GENTOO_PV)
++MUPDF_STATIC = $(OUT)/libmupdf.a
++THIRD_LIB =
+ THREAD_LIB = $(OUT)/libmupdf-threads.a
+ PKCS7_LIB = $(OUT)/libmupdf-pkcs7.a
+
+-$(MUPDF_LIB) : $(MUPDF_OBJ)
+-$(THIRD_LIB) : $(THIRD_OBJ)
++$(MUPDF_LIB): $(MUPDF_OBJ) $(THIRD_OBJ)
++ $(QUIET_LINK) $(CC) $(LDFLAGS) --shared -Wl,-soname -Wl,$(MUPDF_LIB) -Wl,--no-undefined -o $@ $^ $(THIRD_LIBS) $(LIBS)
++$(MUPDF_STATIC): $(MUPDF_OBJ) $(THIRD_OBJ)
+ $(THREAD_LIB) : $(THREAD_OBJ)
+ $(PKCS7_LIB) : $(PKCS7_OBJ)
+
+@@ -355,7 +357,7 @@ install: libs apps
+
+ install -d $(DESTDIR)$(docdir)
+ install -d $(DESTDIR)$(docdir)/examples
+- install README COPYING CHANGES $(DESTDIR)$(docdir)
++ install README CHANGES $(DESTDIR)$(docdir)
+ install docs/*.html docs/*.css docs/*.png $(DESTDIR)$(docdir)
+ install docs/examples/* $(DESTDIR)$(docdir)/examples
+
diff --git a/app-text/mupdf/files/mupdf-1.14-debug-build.patch b/app-text/mupdf/files/mupdf-1.14-debug-build.patch
deleted file mode 100644
index 6f8b5b96a973..000000000000
--- a/app-text/mupdf/files/mupdf-1.14-debug-build.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 37fc48e6..bd8c6049 100644
---- a/Makefile
-+++ b/Makefile
-@@ -3,7 +3,7 @@
- -include user.make
-
- ifndef build
-- build := release
-+ build := debug
- endif
-
- ifndef OUT
diff --git a/app-text/mupdf/mupdf-1.14.0.ebuild b/app-text/mupdf/mupdf-1.14.0-r1.ebuild
index 3bafaab5d0bc..f12cf699e389 100644
--- a/app-text/mupdf/mupdf-1.14.0.ebuild
+++ b/app-text/mupdf/mupdf-1.14.0-r1.ebuild
@@ -41,7 +41,7 @@ S=${WORKDIR}/${P}-source
PATCHES=(
"${FILESDIR}"/${PN}-1.14-CFLAGS.patch
- "${FILESDIR}"/${PN}-1.14-debug-build.patch
+ "${FILESDIR}"/${PN}-1.14-Makefile.patch
"${FILESDIR}"/${PN}-1.10a-add-desktop-pc-xpm-files.patch
# See bug #662352
"${FILESDIR}"/${PN}-1.14-openssl-curl-x11.patch
@@ -68,15 +68,12 @@ src_prepare() {
-e "1ilibdir = ${ED}usr/$(get_libdir)" \
-e "1idocdir = ${ED}usr/share/doc/${PF}" \
-i Makerules || die
-
- if use static-libs; then
- cp -a "${S}" "${S}"-static || die
- fi
}
_emake() {
# When HAVE_OBJCOPY is yes, we end up with a lot of QA warnings.
emake \
+ GENTOO_PV=${PV} \
HAVE_GLUT=$(usex opengl yes no) \
WANT_CURL=$(usex curl) \
WANT_OPENSSL=$(usex openssl) \
@@ -93,7 +90,7 @@ src_compile() {
use curl && _emake extra-apps
use static-libs && \
- _emake -C "${S}"-static build/debug/lib${PN}{,-js-none}.a
+ _emake build/debug/lib${PN}.a
}
src_install() {
@@ -107,7 +104,7 @@ src_install() {
_emake install
use static-libs && \
- dolib.a "${S}"-static/build/debug/lib${PN}{,-js-none}.a
+ dolib.a build/debug/lib${PN}.a
if use opengl ; then
einfo "mupdf symlink points to mupdf-gl (bug 616654)"
dosym ${PN}-gl /usr/bin/${PN}