1 |
commit: 6e0b3e7722417649362c3909fbf1fc0b5c80eb93 |
2 |
Author: Virgil Dupras <vdupras <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 7 02:37:54 2019 +0000 |
4 |
Commit: Virgil Dupras <vdupras <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 7 02:38:46 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e0b3e77 |
7 |
|
8 |
app-text/mupdf: bump to 1.15.0 |
9 |
|
10 |
We remove the "curl" USE flag because upstream stopped depending on it |
11 |
with its removal of "progressive loading code". |
12 |
|
13 |
Closes: https://bugs.gentoo.org/653298 |
14 |
Closes: https://bugs.gentoo.org/683490 |
15 |
Closes: https://bugs.gentoo.org/595190 |
16 |
Signed-off-by: Virgil Dupras <vdupras <AT> gentoo.org> |
17 |
Package-Manager: Portage-2.3.62, Repoman-2.3.11 |
18 |
|
19 |
app-text/mupdf/Manifest | 1 + |
20 |
app-text/mupdf/files/mupdf-1.15-CFLAGS.patch | 13 +++ |
21 |
app-text/mupdf/files/mupdf-1.15-Makefile.patch | 42 ++++++++ |
22 |
app-text/mupdf/files/mupdf-1.15-openssl-x11.patch | 20 ++++ |
23 |
app-text/mupdf/mupdf-1.15.0.ebuild | 122 ++++++++++++++++++++++ |
24 |
5 files changed, 198 insertions(+) |
25 |
|
26 |
diff --git a/app-text/mupdf/Manifest b/app-text/mupdf/Manifest |
27 |
index 3c5ff516a7a..c8ad1a8bd31 100644 |
28 |
--- a/app-text/mupdf/Manifest |
29 |
+++ b/app-text/mupdf/Manifest |
30 |
@@ -1 +1,2 @@ |
31 |
DIST mupdf-1.14.0-source.tar.xz 41602372 BLAKE2B bb680038344af16c7231a18a009c0d04c5f50b3fcbaf061c9f5907f35d79eea93eeced7c2a43a06a963b93b39c74d0246c5fdad35655953d1aa5efb79737265a SHA512 bd41125dac1a81b7dbbfbb5f5e06e70bb601854731e0945983688da5d8d7c0bca9771fff2e4b6d9c36dbead6146f0a866ed7427d58e13d02ed6dfd94dcfe54bf |
32 |
+DIST mupdf-1.15.0-source.tar.xz 39828864 BLAKE2B 15d0e4244062a91c7055b98fa61f2b02e0e3effbcf5374fe589f5a0d2ba2a2d4a59318ae3c0f28d866c6b07554e4b1e65ee9264c26a5f4524ef34e998d6c3320 SHA512 ef19362e8b6c2843e214fd2fcdcc9ba91017884383f7e1cfe08ef1f528a233820475ddfdd8aef481e6e37ae69e8b64324eb4b30699baa8055e99e47c2fab31dd |
33 |
|
34 |
diff --git a/app-text/mupdf/files/mupdf-1.15-CFLAGS.patch b/app-text/mupdf/files/mupdf-1.15-CFLAGS.patch |
35 |
new file mode 100644 |
36 |
index 00000000000..a7de530909b |
37 |
--- /dev/null |
38 |
+++ b/app-text/mupdf/files/mupdf-1.15-CFLAGS.patch |
39 |
@@ -0,0 +1,13 @@ |
40 |
+diff --git a/Makerules b/Makerules |
41 |
+index 298b5737..71c307e6 100644 |
42 |
+--- a/Makerules |
43 |
++++ b/Makerules |
44 |
+@@ -21,8 +21,6 @@ SANITIZE_FLAGS += -fsanitize=address |
45 |
+ SANITIZE_FLAGS += -fsanitize=leak |
46 |
+ |
47 |
+ ifeq ($(build),debug) |
48 |
+- CFLAGS += -pipe -g |
49 |
+- LDFLAGS += -g |
50 |
+ else ifeq ($(build),release) |
51 |
+ CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer |
52 |
+ LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s |
53 |
|
54 |
diff --git a/app-text/mupdf/files/mupdf-1.15-Makefile.patch b/app-text/mupdf/files/mupdf-1.15-Makefile.patch |
55 |
new file mode 100644 |
56 |
index 00000000000..cff348d95e4 |
57 |
--- /dev/null |
58 |
+++ b/app-text/mupdf/files/mupdf-1.15-Makefile.patch |
59 |
@@ -0,0 +1,42 @@ |
60 |
+diff --git a/Makefile b/Makefile |
61 |
+index a9539342..e76b2c61 100644 |
62 |
+--- a/Makefile |
63 |
++++ b/Makefile |
64 |
+@@ -3,7 +3,7 @@ |
65 |
+ -include user.make |
66 |
+ |
67 |
+ ifndef build |
68 |
+- build := release |
69 |
++ build := debug |
70 |
+ endif |
71 |
+ |
72 |
+ ifndef OUT |
73 |
+@@ -187,13 +187,15 @@ generate: source/pdf/js/util.js.h |
74 |
+ |
75 |
+ # --- Library --- |
76 |
+ |
77 |
+-MUPDF_LIB = $(OUT)/libmupdf.a |
78 |
+-THIRD_LIB = $(OUT)/libmupdf-third.a |
79 |
++MUPDF_LIB = libmupdf.so.$(GENTOO_PV) |
80 |
++MUPDF_STATIC = $(OUT)/libmupdf.a |
81 |
++THIRD_LIB = |
82 |
+ THREAD_LIB = $(OUT)/libmupdf-threads.a |
83 |
+ PKCS7_LIB = $(OUT)/libmupdf-pkcs7.a |
84 |
+ |
85 |
+-$(MUPDF_LIB) : $(MUPDF_OBJ) |
86 |
+-$(THIRD_LIB) : $(THIRD_OBJ) |
87 |
++$(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_OBJ) |
88 |
++ $(QUIET_LINK) $(CC) $(LDFLAGS) --shared -Wl,-soname -Wl,$(MUPDF_LIB) -o $@ $^ $(THIRD_LIBS) $(LIBS) |
89 |
++$(MUPDF_STATIC): $(MUPDF_OBJ) $(THIRD_OBJ) |
90 |
+ $(THREAD_LIB) : $(THREAD_OBJ) |
91 |
+ $(PKCS7_LIB) : $(PKCS7_OBJ) |
92 |
+ |
93 |
+@@ -322,7 +324,7 @@ install: libs apps |
94 |
+ |
95 |
+ install -d $(DESTDIR)$(docdir) |
96 |
+ install -d $(DESTDIR)$(docdir)/examples |
97 |
+- install -m 644 README COPYING CHANGES $(DESTDIR)$(docdir) |
98 |
++ install -m 644 README CHANGES $(DESTDIR)$(docdir) |
99 |
+ install -m 644 docs/*.html docs/*.css docs/*.png $(DESTDIR)$(docdir) |
100 |
+ install -m 644 docs/examples/* $(DESTDIR)$(docdir)/examples |
101 |
+ |
102 |
|
103 |
diff --git a/app-text/mupdf/files/mupdf-1.15-openssl-x11.patch b/app-text/mupdf/files/mupdf-1.15-openssl-x11.patch |
104 |
new file mode 100644 |
105 |
index 00000000000..22829279e14 |
106 |
--- /dev/null |
107 |
+++ b/app-text/mupdf/files/mupdf-1.15-openssl-x11.patch |
108 |
@@ -0,0 +1,20 @@ |
109 |
+diff --git a/Makerules b/Makerules |
110 |
+index 298b5737..b2079435 100644 |
111 |
+--- a/Makerules |
112 |
++++ b/Makerules |
113 |
+@@ -119,13 +119,13 @@ else ifeq ($(OS),Linux) |
114 |
+ SYS_GLUT_LIBS := -lglut -lGL |
115 |
+ endif |
116 |
+ |
117 |
+- HAVE_X11 := $(shell pkg-config --exists x11 xext && echo yes) |
118 |
++ HAVE_X11 := not-unless-portage-tells-me |
119 |
+ ifeq ($(HAVE_X11),yes) |
120 |
+ X11_CFLAGS := $(shell pkg-config --cflags x11 xext) |
121 |
+ X11_LIBS := $(shell pkg-config --libs x11 xext) |
122 |
+ endif |
123 |
+ |
124 |
+- HAVE_LIBCRYPTO := $(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo yes) |
125 |
++ HAVE_LIBCRYPTO := not-unless-portage-tells-me |
126 |
+ ifeq ($(HAVE_LIBCRYPTO),yes) |
127 |
+ LIBCRYPTO_CFLAGS := $(shell pkg-config --cflags libcrypto) -DHAVE_LIBCRYPTO |
128 |
+ LIBCRYPTO_LIBS := $(shell pkg-config --libs libcrypto) |
129 |
|
130 |
diff --git a/app-text/mupdf/mupdf-1.15.0.ebuild b/app-text/mupdf/mupdf-1.15.0.ebuild |
131 |
new file mode 100644 |
132 |
index 00000000000..258ffd76802 |
133 |
--- /dev/null |
134 |
+++ b/app-text/mupdf/mupdf-1.15.0.ebuild |
135 |
@@ -0,0 +1,122 @@ |
136 |
+# Copyright 1999-2019 Gentoo Authors |
137 |
+# Distributed under the terms of the GNU General Public License v2 |
138 |
+ |
139 |
+EAPI=7 |
140 |
+ |
141 |
+inherit flag-o-matic toolchain-funcs xdg desktop |
142 |
+ |
143 |
+DESCRIPTION="a lightweight PDF viewer and toolkit written in portable C" |
144 |
+HOMEPAGE="https://mupdf.com/" |
145 |
+SRC_URI="https://mupdf.com/downloads/archive/${P}-source.tar.xz" |
146 |
+ |
147 |
+LICENSE="AGPL-3" |
148 |
+SLOT="0/${PV}" |
149 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" |
150 |
+IUSE="X +javascript libressl opengl ssl static-libs vanilla" |
151 |
+ |
152 |
+RDEPEND=" |
153 |
+ >=dev-lang/mujs-1.0.4 |
154 |
+ media-libs/freetype:2=[static-libs?] |
155 |
+ media-libs/harfbuzz:=[static-libs?,truetype] |
156 |
+ media-libs/jbig2dec:=[static-libs?] |
157 |
+ media-libs/libpng:0=[static-libs?] |
158 |
+ >=media-libs/openjpeg-2.1:2=[static-libs?] |
159 |
+ virtual/jpeg[static-libs?] |
160 |
+ ssl? ( |
161 |
+ libressl? ( >=dev-libs/libressl-2.8:0=[static-libs?] ) |
162 |
+ !libressl? ( >=dev-libs/openssl-1.1:0=[static-libs?] ) |
163 |
+ ) |
164 |
+ X? ( |
165 |
+ x11-libs/libX11[static-libs?] |
166 |
+ x11-libs/libXext[static-libs?] |
167 |
+ )" |
168 |
+DEPEND="${RDEPEND} |
169 |
+ virtual/pkgconfig" |
170 |
+ |
171 |
+REQUIRED_USE="opengl? ( !static-libs )" |
172 |
+ |
173 |
+S=${WORKDIR}/${P}-source |
174 |
+ |
175 |
+PATCHES=( |
176 |
+ "${FILESDIR}"/${PN}-1.15-CFLAGS.patch |
177 |
+ "${FILESDIR}"/${PN}-1.15-Makefile.patch |
178 |
+ "${FILESDIR}"/${PN}-1.10a-add-desktop-pc-xpm-files.patch |
179 |
+ # See bugs #662352 |
180 |
+ "${FILESDIR}"/${PN}-1.15-openssl-x11.patch |
181 |
+) |
182 |
+ |
183 |
+src_prepare() { |
184 |
+ xdg_src_prepare |
185 |
+ use hppa && append-cflags -ffunction-sections |
186 |
+ |
187 |
+ use javascript || \ |
188 |
+ sed -e '/* #define FZ_ENABLE_JS/ a\#define FZ_ENABLE_JS 0' \ |
189 |
+ -i include/mupdf/fitz/config.h |
190 |
+ |
191 |
+ use vanilla || eapply \ |
192 |
+ "${FILESDIR}"/${PN}-1.3-zoom-2.patch |
193 |
+ |
194 |
+ # See bug #670832 |
195 |
+ use ssl && use libressl && eapply "${FILESDIR}"/${PN}-1.14-libressl.patch |
196 |
+ |
197 |
+ sed -e "1iOS = Linux" \ |
198 |
+ -e "1iCC = $(tc-getCC)" \ |
199 |
+ -e "1iLD = $(tc-getLD)" \ |
200 |
+ -e "1iAR = $(tc-getAR)" \ |
201 |
+ -e "1iverbose = yes" \ |
202 |
+ -e "1ibuild = debug" \ |
203 |
+ -e "1iprefix = ${ED}/usr" \ |
204 |
+ -e "1ilibdir = ${ED}/usr/$(get_libdir)" \ |
205 |
+ -e "1idocdir = ${ED}/usr/share/doc/${PF}" \ |
206 |
+ -i Makerules || die |
207 |
+} |
208 |
+ |
209 |
+_emake() { |
210 |
+ # When HAVE_OBJCOPY is yes, we end up with a lot of QA warnings. |
211 |
+ # We don't use system's freeglut because upstream has a special modified |
212 |
+ # version of it that gives mupdf clipboard support. See bug #653298 |
213 |
+ emake \ |
214 |
+ GENTOO_PV=${PV} \ |
215 |
+ HAVE_GLUT=$(usex opengl) \ |
216 |
+ HAVE_LIBCRYPTO=$(usex ssl) \ |
217 |
+ HAVE_X11=$(usex X) \ |
218 |
+ USE_SYSTEM_LIBS=yes \ |
219 |
+ USE_SYSTEM_MUJS=yes \ |
220 |
+ USE_SYSTEM_GLUT=no \ |
221 |
+ HAVE_OBJCOPY=no \ |
222 |
+ "$@" |
223 |
+} |
224 |
+ |
225 |
+src_compile() { |
226 |
+ _emake XCFLAGS="-fpic" |
227 |
+ |
228 |
+ use static-libs && \ |
229 |
+ _emake build/debug/lib${PN}.a |
230 |
+} |
231 |
+ |
232 |
+src_install() { |
233 |
+ if use X || use opengl ; then |
234 |
+ domenu platform/debian/${PN}.desktop |
235 |
+ doicon platform/debian/${PN}.xpm |
236 |
+ else |
237 |
+ rm docs/man/${PN}.1 |
238 |
+ fi |
239 |
+ |
240 |
+ _emake install |
241 |
+ |
242 |
+ dosym libmupdf.so.${PV} /usr/$(get_libdir)/lib${PN}.so |
243 |
+ |
244 |
+ use static-libs && \ |
245 |
+ dolib.a build/debug/lib${PN}.a |
246 |
+ if use opengl ; then |
247 |
+ einfo "mupdf symlink points to mupdf-gl (bug 616654)" |
248 |
+ dosym ${PN}-gl /usr/bin/${PN} |
249 |
+ elif use X ; then |
250 |
+ einfo "mupdf symlink points to mupdf-x11 (bug 616654)" |
251 |
+ dosym ${PN}-x11 /usr/bin/${PN} |
252 |
+ fi |
253 |
+ insinto /usr/$(get_libdir)/pkgconfig |
254 |
+ doins platform/debian/${PN}.pc |
255 |
+ |
256 |
+ dodoc README CHANGES CONTRIBUTORS |
257 |
+} |