Gentoo Archives: gentoo-commits

From: Virgil Dupras <vdupras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/files/, app-text/mupdf/
Date: Mon, 15 Oct 2018 14:43:15
Message-Id: 1539614498.84450c429203901c5de4e786b4413fbb5f25d731.vdupras@gentoo
1 commit: 84450c429203901c5de4e786b4413fbb5f25d731
2 Author: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 15 14:41:38 2018 +0000
4 Commit: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 15 14:41:38 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84450c42
7
8 app-text/mupdf: fix shared library build
9
10 Closes: https://bugs.gentoo.org/668684
11 Signed-off-by: Virgil Dupras <vdupras <AT> gentoo.org>
12 Package-Manager: Portage-2.3.51, Repoman-2.3.11
13
14 app-text/mupdf/files/mupdf-1.14-Makefile.patch | 46 ++++++++++++++++++++++
15 app-text/mupdf/files/mupdf-1.14-debug-build.patch | 13 ------
16 ...{mupdf-1.14.0.ebuild => mupdf-1.14.0-r1.ebuild} | 11 ++----
17 3 files changed, 50 insertions(+), 20 deletions(-)
18
19 diff --git a/app-text/mupdf/files/mupdf-1.14-Makefile.patch b/app-text/mupdf/files/mupdf-1.14-Makefile.patch
20 new file mode 100644
21 index 00000000000..a8c4ef770dc
22 --- /dev/null
23 +++ b/app-text/mupdf/files/mupdf-1.14-Makefile.patch
24 @@ -0,0 +1,46 @@
25 +1. debug build (not sure why...)
26 +2. build shared library
27 +3. add optional static lib target
28 +4. Don't install COPYING
29 +diff --git a/Makefile b/Makefile
30 +index 37fc48e6..4303e9fa 100644
31 +--- a/Makefile
32 ++++ b/Makefile
33 +@@ -3,7 +3,7 @@
34 + -include user.make
35 +
36 + ifndef build
37 +- build := release
38 ++ build := debug
39 + endif
40 +
41 + ifndef OUT
42 +@@ -190,13 +190,15 @@ generate: source/pdf/js/util.js.h
43 +
44 + # --- Library ---
45 +
46 +-MUPDF_LIB = $(OUT)/libmupdf.a
47 +-THIRD_LIB = $(OUT)/libmupdf-third.a
48 ++MUPDF_LIB = libmupdf.so.$(GENTOO_PV)
49 ++MUPDF_STATIC = $(OUT)/libmupdf.a
50 ++THIRD_LIB =
51 + THREAD_LIB = $(OUT)/libmupdf-threads.a
52 + PKCS7_LIB = $(OUT)/libmupdf-pkcs7.a
53 +
54 +-$(MUPDF_LIB) : $(MUPDF_OBJ)
55 +-$(THIRD_LIB) : $(THIRD_OBJ)
56 ++$(MUPDF_LIB): $(MUPDF_OBJ) $(THIRD_OBJ)
57 ++ $(QUIET_LINK) $(CC) $(LDFLAGS) --shared -Wl,-soname -Wl,$(MUPDF_LIB) -Wl,--no-undefined -o $@ $^ $(THIRD_LIBS) $(LIBS)
58 ++$(MUPDF_STATIC): $(MUPDF_OBJ) $(THIRD_OBJ)
59 + $(THREAD_LIB) : $(THREAD_OBJ)
60 + $(PKCS7_LIB) : $(PKCS7_OBJ)
61 +
62 +@@ -355,7 +357,7 @@ install: libs apps
63 +
64 + install -d $(DESTDIR)$(docdir)
65 + install -d $(DESTDIR)$(docdir)/examples
66 +- install README COPYING CHANGES $(DESTDIR)$(docdir)
67 ++ install README CHANGES $(DESTDIR)$(docdir)
68 + install docs/*.html docs/*.css docs/*.png $(DESTDIR)$(docdir)
69 + install docs/examples/* $(DESTDIR)$(docdir)/examples
70 +
71
72 diff --git a/app-text/mupdf/files/mupdf-1.14-debug-build.patch b/app-text/mupdf/files/mupdf-1.14-debug-build.patch
73 deleted file mode 100644
74 index 6f8b5b96a97..00000000000
75 --- a/app-text/mupdf/files/mupdf-1.14-debug-build.patch
76 +++ /dev/null
77 @@ -1,13 +0,0 @@
78 -diff --git a/Makefile b/Makefile
79 -index 37fc48e6..bd8c6049 100644
80 ---- a/Makefile
81 -+++ b/Makefile
82 -@@ -3,7 +3,7 @@
83 - -include user.make
84 -
85 - ifndef build
86 -- build := release
87 -+ build := debug
88 - endif
89 -
90 - ifndef OUT
91
92 diff --git a/app-text/mupdf/mupdf-1.14.0.ebuild b/app-text/mupdf/mupdf-1.14.0-r1.ebuild
93 similarity index 92%
94 rename from app-text/mupdf/mupdf-1.14.0.ebuild
95 rename to app-text/mupdf/mupdf-1.14.0-r1.ebuild
96 index 3bafaab5d0b..f12cf699e38 100644
97 --- a/app-text/mupdf/mupdf-1.14.0.ebuild
98 +++ b/app-text/mupdf/mupdf-1.14.0-r1.ebuild
99 @@ -41,7 +41,7 @@ S=${WORKDIR}/${P}-source
100
101 PATCHES=(
102 "${FILESDIR}"/${PN}-1.14-CFLAGS.patch
103 - "${FILESDIR}"/${PN}-1.14-debug-build.patch
104 + "${FILESDIR}"/${PN}-1.14-Makefile.patch
105 "${FILESDIR}"/${PN}-1.10a-add-desktop-pc-xpm-files.patch
106 # See bug #662352
107 "${FILESDIR}"/${PN}-1.14-openssl-curl-x11.patch
108 @@ -68,15 +68,12 @@ src_prepare() {
109 -e "1ilibdir = ${ED}usr/$(get_libdir)" \
110 -e "1idocdir = ${ED}usr/share/doc/${PF}" \
111 -i Makerules || die
112 -
113 - if use static-libs; then
114 - cp -a "${S}" "${S}"-static || die
115 - fi
116 }
117
118 _emake() {
119 # When HAVE_OBJCOPY is yes, we end up with a lot of QA warnings.
120 emake \
121 + GENTOO_PV=${PV} \
122 HAVE_GLUT=$(usex opengl yes no) \
123 WANT_CURL=$(usex curl) \
124 WANT_OPENSSL=$(usex openssl) \
125 @@ -93,7 +90,7 @@ src_compile() {
126 use curl && _emake extra-apps
127
128 use static-libs && \
129 - _emake -C "${S}"-static build/debug/lib${PN}{,-js-none}.a
130 + _emake build/debug/lib${PN}.a
131 }
132
133 src_install() {
134 @@ -107,7 +104,7 @@ src_install() {
135 _emake install
136
137 use static-libs && \
138 - dolib.a "${S}"-static/build/debug/lib${PN}{,-js-none}.a
139 + dolib.a build/debug/lib${PN}.a
140 if use opengl ; then
141 einfo "mupdf symlink points to mupdf-gl (bug 616654)"
142 dosym ${PN}-gl /usr/bin/${PN}