1 |
commit: 5042a61cbb5a94deec529e6b24ae564b214ff2fa |
2 |
Author: Yury Martynov <email <AT> linxon <DOT> ru> |
3 |
AuthorDate: Mon Jan 6 15:35:20 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 3 17:35:38 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5042a61c |
7 |
|
8 |
media-gfx/zbar: version bump to 0.23 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/689406 |
11 |
Package-Manager: Portage-2.3.79, Repoman-2.3.16 |
12 |
Signed-off-by: Yury Martynov <email <AT> linxon.ru> |
13 |
Closes: https://github.com/gentoo/gentoo/pull/14266 |
14 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
15 |
|
16 |
media-gfx/zbar/Manifest | 1 + |
17 |
...create_correct_pkconfig_file_for_zbar-qt5.patch | 71 +++++++ |
18 |
.../files/zbar-0.23_fix_Qt5X11Extras_detect.patch | 18 ++ |
19 |
...3_fix_detection_of_errors_in_the_v4l_read.patch | 29 +++ |
20 |
.../zbar/files/zbar-0.23_fix_python_detect.patch | 13 ++ |
21 |
...3_reset_conversion_descriptor_after_close.patch | 25 +++ |
22 |
media-gfx/zbar/metadata.xml | 16 +- |
23 |
media-gfx/zbar/zbar-0.23.ebuild | 216 +++++++++++++++++++++ |
24 |
8 files changed, 388 insertions(+), 1 deletion(-) |
25 |
|
26 |
diff --git a/media-gfx/zbar/Manifest b/media-gfx/zbar/Manifest |
27 |
index 00a21a631d2..8d5d753531a 100644 |
28 |
--- a/media-gfx/zbar/Manifest |
29 |
+++ b/media-gfx/zbar/Manifest |
30 |
@@ -1 +1,2 @@ |
31 |
DIST zbar-0.20.1.tar.gz 555199 BLAKE2B f224a2207fa0603da4cc3a0e1d05bc73f3cf0cc9d13c26b3b801d3418f4f6a001b52e468b721552af61f4c8d7357934abd0560c24d3b233107785c69cfe14753 SHA512 21ad9d8fcdecb41bd4b8979366ab8ec6e8eac815f52270b0dc72ce6a126ccef933d048ce8bbe28f46ada5defadf85ba8c97c5c1870c9560a9dab28c585dfaf42 |
32 |
+DIST zbar-0.23.tar.gz 1301948 BLAKE2B dd74ce44bcb10f8a7cf180b982e5bd82f1f5674540931377d207ab730bb2d080fe222bfc42d4a3d70895ad53b78638e73c2294018b80d30dc28f7e6ecc14c761 SHA512 9737f9dca42c29f92aa1eca5c0808da34f1d16c88c65241c9e3984c487e502f398437e7a707a1edd2c440f784db537ba33ea4008a2d1c1caaf5eea6431b1400b |
33 |
|
34 |
diff --git a/media-gfx/zbar/files/zbar-0.23_create_correct_pkconfig_file_for_zbar-qt5.patch b/media-gfx/zbar/files/zbar-0.23_create_correct_pkconfig_file_for_zbar-qt5.patch |
35 |
new file mode 100644 |
36 |
index 00000000000..3be9c222277 |
37 |
--- /dev/null |
38 |
+++ b/media-gfx/zbar/files/zbar-0.23_create_correct_pkconfig_file_for_zbar-qt5.patch |
39 |
@@ -0,0 +1,71 @@ |
40 |
+From cac1fffce80f0835e4d8d234023a775b4243b916 Mon Sep 17 00:00:00 2001 |
41 |
+From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@×××××××××××.de> |
42 |
+Date: Sun, 20 Oct 2019 01:44:02 +0200 |
43 |
+Subject: [PATCH] Create correct pkconfig file for zbar-qt5 |
44 |
+ |
45 |
+Although zbar supports Qt5, the created pkgconfig file always requested |
46 |
+the Qt(4) components. |
47 |
+ |
48 |
+Fixes issue #62. |
49 |
+--- |
50 |
+ configure.ac | 13 ++++++++++--- |
51 |
+ zbar-qt5.pc.in | 12 ++++++++++++ |
52 |
+ 2 files changed, 22 insertions(+), 3 deletions(-) |
53 |
+ create mode 100644 zbar-qt5.pc.in |
54 |
+ |
55 |
+diff --git a/configure.ac b/configure.ac |
56 |
+index 935110a..49ef6a8 100644 |
57 |
+--- a/configure.ac |
58 |
++++ b/configure.ac |
59 |
+@@ -659,15 +659,23 @@ AS_IF([test "x$with_qt" != "xno"], |
60 |
+ CPPFLAGS="$CPPFLAGS $QT_CPPFLAGS" |
61 |
+ dnl -fPIC has no effect on Windows and breaks windres |
62 |
+ AS_IF([test "x$win32" = "xno"], [CPPFLAGS="$CPPFLAGS -fPIC"]) |
63 |
+- AC_MSG_NOTICE([using Qt version $QT_VERSION])], |
64 |
++ AC_MSG_NOTICE([using Qt version $QT_VERSION]) |
65 |
++ qt_pkgconfig_file="zbar-qt5.pc" |
66 |
++ ], |
67 |
+ |
68 |
+ [MOC=`$PKG_CONFIG QtGui --variable=moc_location` |
69 |
+ AC_MSG_NOTICE([using moc from $MOC]) |
70 |
+ QT_VERSION=`$PKG_CONFIG QtGui --modversion` |
71 |
+- AC_MSG_NOTICE([using Qt version $QT_VERSION])])) |
72 |
++ AC_MSG_NOTICE([using Qt version $QT_VERSION]) |
73 |
++ qt_pkgconfig_file="zbar-qt.pc" |
74 |
++ ])) |
75 |
+ |
76 |
+ AM_CONDITIONAL([HAVE_QT], [test "x$with_qt" = "xyes"]) |
77 |
+ |
78 |
++AM_COND_IF([HAVE_QT], |
79 |
++ [AC_CONFIG_FILES([zbar-qt.pc:"${qt_pkgconfig_file}.in"])] |
80 |
++) |
81 |
++ |
82 |
+ dnl Java |
83 |
+ have_java="maybe" |
84 |
+ |
85 |
+@@ -820,7 +828,6 @@ java/Makefile |
86 |
+ zbar/Makefile |
87 |
+ zbar.pc |
88 |
+ zbar-gtk.pc |
89 |
+-zbar-qt.pc |
90 |
+ doc/doxygen.conf]) |
91 |
+ |
92 |
+ AC_CONFIG_FILES([test/test_examples.sh],[chmod 755 test/test_examples.sh]) |
93 |
+diff --git a/zbar-qt5.pc.in b/zbar-qt5.pc.in |
94 |
+new file mode 100644 |
95 |
+index 0000000..3378993 |
96 |
+--- /dev/null |
97 |
++++ b/zbar-qt5.pc.in |
98 |
+@@ -0,0 +1,12 @@ |
99 |
++prefix=@prefix@ |
100 |
++exec_prefix=@exec_prefix@ |
101 |
++libdir=@libdir@ |
102 |
++includedir=@includedir@ |
103 |
++ |
104 |
++Name: zbar-qt |
105 |
++Description: bar code scanning and decoding Qt5 widget |
106 |
++URL: http://zbar.sourceforge.net |
107 |
++Version: @VERSION@ |
108 |
++Requires: zbar, Qt5Core >= 5, Qt5Gui >= 5 |
109 |
++Libs: -L${libdir} -lzbarqt |
110 |
++Cflags: -I${includedir} |
111 |
|
112 |
diff --git a/media-gfx/zbar/files/zbar-0.23_fix_Qt5X11Extras_detect.patch b/media-gfx/zbar/files/zbar-0.23_fix_Qt5X11Extras_detect.patch |
113 |
new file mode 100644 |
114 |
index 00000000000..7692db41e0d |
115 |
--- /dev/null |
116 |
+++ b/media-gfx/zbar/files/zbar-0.23_fix_Qt5X11Extras_detect.patch |
117 |
@@ -0,0 +1,18 @@ |
118 |
+diff -ur a/configure.ac b/configure.ac |
119 |
+--- a/configure.ac 2019-05-23 23:37:12.000000000 +0300 |
120 |
++++ b/configure.ac 2020-01-22 12:27:14.190755156 +0300 |
121 |
+@@ -638,13 +638,9 @@ |
122 |
+ |
123 |
+ AC_ARG_VAR([MOC], [full path to Qt moc program]) |
124 |
+ |
125 |
+-AS_IF([test "x$have_x" = "xyes"], |
126 |
+- [qt_extra="Qt5X11Extras >= 5.0"], |
127 |
+- [qt_extra=""]) |
128 |
+- |
129 |
+ AS_IF([test "x$with_qt" != "xno"], |
130 |
+ [PKG_CHECK_MODULES([QT], |
131 |
+- [Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 $qt_extra],, |
132 |
++ [Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 Qt5X11Extras >= 5.0],, |
133 |
+ [with_qt5 = "no" |
134 |
+ PKG_CHECK_MODULES([QT], |
135 |
+ [QtCore >= 4 QtGui >= 4],, |
136 |
|
137 |
diff --git a/media-gfx/zbar/files/zbar-0.23_fix_detection_of_errors_in_the_v4l_read.patch b/media-gfx/zbar/files/zbar-0.23_fix_detection_of_errors_in_the_v4l_read.patch |
138 |
new file mode 100644 |
139 |
index 00000000000..8484e31b737 |
140 |
--- /dev/null |
141 |
+++ b/media-gfx/zbar/files/zbar-0.23_fix_detection_of_errors_in_the_v4l_read.patch |
142 |
@@ -0,0 +1,29 @@ |
143 |
+From 52a4fa5242af5da770b3cab1713f87e8d899e7ed Mon Sep 17 00:00:00 2001 |
144 |
+From: Dan Fandrich <dan@××××××××××××××.com> |
145 |
+Date: Fri, 27 Dec 2019 18:33:17 +0100 |
146 |
+Subject: [PATCH] Fix detection of errors in the v4l read. |
147 |
+ |
148 |
+The return type must be signed in order to detect a read failure. Also, |
149 |
+display an error message after such a failure. |
150 |
+--- |
151 |
+ zbar/video/v4l2.c | 6 ++++-- |
152 |
+ 1 file changed, 4 insertions(+), 2 deletions(-) |
153 |
+ |
154 |
+diff --git a/zbar/video/v4l2.c b/zbar/video/v4l2.c |
155 |
+index daed38b..c0398ea 100644 |
156 |
+--- a/zbar/video/v4l2.c |
157 |
++++ b/zbar/video/v4l2.c |
158 |
+@@ -133,9 +133,11 @@ static zbar_image_t *v4l2_dq (zbar_video_t *vdo) |
159 |
+ return(NULL); |
160 |
+ |
161 |
+ /* FIXME should read entire image */ |
162 |
+- unsigned long datalen = read(fd, (void*)img->data, img->datalen); |
163 |
+- if(datalen < 0) |
164 |
++ ssize_t datalen = read(fd, (void*)img->data, img->datalen); |
165 |
++ if(datalen < 0) { |
166 |
++ perror("v4l2_dq read"); |
167 |
+ return(NULL); |
168 |
++ } |
169 |
+ else if(datalen != img->datalen) |
170 |
+ zprintf(0, "WARNING: read() size mismatch: 0x%lx != 0x%lx\n", |
171 |
+ datalen, img->datalen); |
172 |
|
173 |
diff --git a/media-gfx/zbar/files/zbar-0.23_fix_python_detect.patch b/media-gfx/zbar/files/zbar-0.23_fix_python_detect.patch |
174 |
new file mode 100644 |
175 |
index 00000000000..54e10184217 |
176 |
--- /dev/null |
177 |
+++ b/media-gfx/zbar/files/zbar-0.23_fix_python_detect.patch |
178 |
@@ -0,0 +1,13 @@ |
179 |
+diff -ur a/configure.ac b/configure.ac |
180 |
+--- a/configure.ac 2019-05-23 23:37:12.000000000 +0300 |
181 |
++++ b/configure.ac 2020-01-06 12:30:41.621264633 +0300 |
182 |
+@@ -559,8 +559,7 @@ |
183 |
+ [with_python="no"]) |
184 |
+ ]) |
185 |
+ ] |
186 |
+- )], |
187 |
+- [with_python="auto"] |
188 |
++ )] |
189 |
+ ) |
190 |
+ |
191 |
+ AS_IF([test "x$with_python" != "xno"], |
192 |
|
193 |
diff --git a/media-gfx/zbar/files/zbar-0.23_reset_conversion_descriptor_after_close.patch b/media-gfx/zbar/files/zbar-0.23_reset_conversion_descriptor_after_close.patch |
194 |
new file mode 100644 |
195 |
index 00000000000..75d02cb996a |
196 |
--- /dev/null |
197 |
+++ b/media-gfx/zbar/files/zbar-0.23_reset_conversion_descriptor_after_close.patch |
198 |
@@ -0,0 +1,25 @@ |
199 |
+From ba0bcb39c4fa57634c05597464352d4e630f1ea2 Mon Sep 17 00:00:00 2001 |
200 |
+From: hz-mk <51707958+hz-mk@××××××××××××××××××××.com> |
201 |
+Date: Tue, 11 Jun 2019 16:32:18 +0200 |
202 |
+Subject: [PATCH] Reset conversion descriptor after close (prevent double free) |
203 |
+ |
204 |
+--- |
205 |
+ zbar/qrcode/qrdectxt.c | 5 ++++- |
206 |
+ 1 file changed, 4 insertions(+), 1 deletion(-) |
207 |
+ |
208 |
+diff --git a/zbar/qrcode/qrdectxt.c b/zbar/qrcode/qrdectxt.c |
209 |
+index 2ab7b9b..4be7635 100644 |
210 |
+--- a/zbar/qrcode/qrdectxt.c |
211 |
++++ b/zbar/qrcode/qrdectxt.c |
212 |
+@@ -409,7 +409,10 @@ int qr_code_data_list_extract_text(const qr_code_data_list *_qrlist, |
213 |
+ /*If eci should be reset between codes, do so.*/ |
214 |
+ if(eci<=QR_ECI_GLI1){ |
215 |
+ eci=-1; |
216 |
+- if(eci_cd!=(iconv_t)-1)iconv_close(eci_cd); |
217 |
++ if(eci_cd!=(iconv_t)-1){ |
218 |
++ iconv_close(eci_cd); |
219 |
++ eci_cd=(iconv_t)-1; |
220 |
++ } |
221 |
+ } |
222 |
+ |
223 |
+ } |
224 |
|
225 |
diff --git a/media-gfx/zbar/metadata.xml b/media-gfx/zbar/metadata.xml |
226 |
index fd5ad454e03..064f2be7587 100644 |
227 |
--- a/media-gfx/zbar/metadata.xml |
228 |
+++ b/media-gfx/zbar/metadata.xml |
229 |
@@ -1,10 +1,24 @@ |
230 |
<?xml version="1.0" encoding="UTF-8"?> |
231 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
232 |
<pkgmetadata> |
233 |
- <!-- maintainer-needed --> |
234 |
+ <maintainer type="person"> |
235 |
+ <email>email@××××××.ru</email> |
236 |
+ <name>Yury Martynov</name> |
237 |
+ </maintainer> |
238 |
+ <maintainer type="project"> |
239 |
+ <email>proxy-maint@g.o</email> |
240 |
+ <name>Proxy Maintainers</name> |
241 |
+ </maintainer> |
242 |
<upstream> |
243 |
<remote-id type="sourceforge">zbar</remote-id> |
244 |
<remote-id type="github">mchehab/zbar</remote-id> |
245 |
<bugs-to>https://github.com/mchehab/zbar/issues</bugs-to> |
246 |
</upstream> |
247 |
+ <longdescription> |
248 |
+ The ZBar Bar Code Reader is a library for scanning and decoding bar |
249 |
+ codes from various sources such as video streams, image files or raw |
250 |
+ intensity sensors. It supports EAN, UPC, Code 128, Code 93, Code 39 |
251 |
+ and Interleaved 2 of 5. The flexible, layered architecture features a |
252 |
+ fast, streaming interface with a minimal memory footprint. |
253 |
+ </longdescription> |
254 |
</pkgmetadata> |
255 |
|
256 |
diff --git a/media-gfx/zbar/zbar-0.23.ebuild b/media-gfx/zbar/zbar-0.23.ebuild |
257 |
new file mode 100644 |
258 |
index 00000000000..34eb41b923a |
259 |
--- /dev/null |
260 |
+++ b/media-gfx/zbar/zbar-0.23.ebuild |
261 |
@@ -0,0 +1,216 @@ |
262 |
+# Copyright 1999-2020 Gentoo Authors |
263 |
+# Distributed under the terms of the GNU General Public License v2 |
264 |
+ |
265 |
+EAPI=7 |
266 |
+ |
267 |
+PYTHON_COMPAT=( python3_{6,7,8} ) |
268 |
+ |
269 |
+inherit autotools flag-o-matic java-pkg-opt-2 multilib-minimal python-single-r1 virtualx |
270 |
+ |
271 |
+DESCRIPTION="Library and tools for reading barcodes from images or video" |
272 |
+HOMEPAGE="https://github.com/mchehab/zbar" |
273 |
+SRC_URI="https://linuxtv.org/downloads/${PN}/${P}.tar.gz" |
274 |
+ |
275 |
+LICENSE="LGPL-2.1" |
276 |
+SLOT="0" |
277 |
+KEYWORDS="~amd64 ~arm ~x86" |
278 |
+ |
279 |
+IUSE="dbus graphicsmagick gtk +imagemagick introspection java jpeg python qt5 static-libs test +threads v4l X xv" |
280 |
+REQUIRED_USE=" |
281 |
+ introspection? ( gtk ) |
282 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
283 |
+ test? ( |
284 |
+ ${PYTHON_REQUIRED_USE} |
285 |
+ X? ( imagemagick ) |
286 |
+ ) |
287 |
+ xv? ( X )" |
288 |
+ |
289 |
+RESTRICT="!test? ( test )" |
290 |
+ |
291 |
+COMMON_DEPEND=" |
292 |
+ dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
293 |
+ gtk? ( |
294 |
+ dev-libs/glib:2[${MULTILIB_USEDEP}] |
295 |
+ x11-libs/gtk+:3[${MULTILIB_USEDEP}] |
296 |
+ introspection? ( dev-libs/gobject-introspection ) |
297 |
+ ) |
298 |
+ imagemagick? ( |
299 |
+ !graphicsmagick? ( media-gfx/imagemagick:=[png,jpeg?] ) |
300 |
+ graphicsmagick? ( media-gfx/graphicsmagick:=[png,jpeg?] ) |
301 |
+ ) |
302 |
+ jpeg? ( virtual/jpeg:0[${MULTILIB_USEDEP}] ) |
303 |
+ python? ( ${PYTHON_DEPS} ) |
304 |
+ qt5? ( |
305 |
+ dev-qt/qtcore:5 |
306 |
+ dev-qt/qtgui:5 |
307 |
+ dev-qt/qtwidgets:5 |
308 |
+ dev-qt/qtx11extras:5 |
309 |
+ ) |
310 |
+ v4l? ( media-libs/libv4l:0=[${MULTILIB_USEDEP}] ) |
311 |
+ X? ( |
312 |
+ x11-libs/libX11[${MULTILIB_USEDEP}] |
313 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
314 |
+ xv? ( x11-libs/libXv[${MULTILIB_USEDEP}] ) |
315 |
+ )" |
316 |
+ |
317 |
+RDEPEND="${COMMON_DEPEND} |
318 |
+ java? ( virtual/jre )" |
319 |
+ |
320 |
+DEPEND="${COMMON_DEPEND} |
321 |
+ java? ( |
322 |
+ >=virtual/jdk-1.8 |
323 |
+ test? ( |
324 |
+ dev-java/hamcrest-core:1.3 |
325 |
+ dev-java/junit:4 |
326 |
+ ) |
327 |
+ ) |
328 |
+ test? ( |
329 |
+ ${PYTHON_DEPS} |
330 |
+ dev-python/pillow[${PYTHON_USEDEP}] |
331 |
+ )" |
332 |
+ |
333 |
+BDEPEND=" |
334 |
+ sys-devel/gettext |
335 |
+ virtual/pkgconfig |
336 |
+ gtk? ( dev-util/glib-utils )" |
337 |
+ |
338 |
+PATCHES=( |
339 |
+ "${FILESDIR}/${PN}-0.10-errors.patch" |
340 |
+ "${FILESDIR}/${P}_create_correct_pkconfig_file_for_zbar-qt5.patch" |
341 |
+ "${FILESDIR}/${P}_fix_detection_of_errors_in_the_v4l_read.patch" |
342 |
+ "${FILESDIR}/${P}_fix_python_detect.patch" |
343 |
+ "${FILESDIR}/${P}_fix_Qt5X11Extras_detect.patch" |
344 |
+ "${FILESDIR}/${P}_reset_conversion_descriptor_after_close.patch" |
345 |
+) |
346 |
+ |
347 |
+DOCS=( README.md NEWS.md TODO.md HACKING.md TODO.md ChangeLog ) |
348 |
+ |
349 |
+pkg_setup() { |
350 |
+ if use python || use test; then |
351 |
+ python-single-r1_pkg_setup |
352 |
+ fi |
353 |
+ use java && java-pkg-opt-2_pkg_setup |
354 |
+} |
355 |
+ |
356 |
+src_prepare() { |
357 |
+ default |
358 |
+ |
359 |
+ if use python || use test; then |
360 |
+ if use test; then |
361 |
+ # make tests happy |
362 |
+ # because one of the test requires loadable py module from the current ${BUILD_DIR} |
363 |
+ sed -i \ |
364 |
+ -e "s|PYTHONPATH=@abs_top_srcdir@|PYTHONPATH=@builddir@|g" \ |
365 |
+ test/Makefile.am.inc || die |
366 |
+ fi |
367 |
+ |
368 |
+ python_fix_shebang \ |
369 |
+ examples/*.py \ |
370 |
+ test/{test_python,barcodetest}.py # test_pygtk.py — py2 only |
371 |
+ fi |
372 |
+ |
373 |
+ if use java; then |
374 |
+ java-pkg-opt-2_src_prepare |
375 |
+ sed "s|javadir = \$(pkgdatadir)|javadir = /usr/$(get_libdir)/zbar|" \ |
376 |
+ -i java/Makefile.am || die |
377 |
+ fi |
378 |
+ |
379 |
+ # do not install {LICENSE,INSTALL,etc}.md doc files with 'make install' (use DOCS=() instead) |
380 |
+ sed -i \ |
381 |
+ -e "s|^dist_doc_DATA =\(.*\)|dist_doc_DATA =|" Makefile.am || die |
382 |
+ |
383 |
+ eautoreconf |
384 |
+} |
385 |
+ |
386 |
+multilib_src_configure() { |
387 |
+ append-cppflags -DNDEBUG |
388 |
+ |
389 |
+ local myeconfargs=( |
390 |
+ $(use_with dbus) |
391 |
+ $(use_with gtk gtk gtk3) # default is gtk2 |
392 |
+ $(use_with jpeg) |
393 |
+ $(multilib_native_use_with introspection gir) |
394 |
+ $(multilib_native_use_with java) |
395 |
+ $(multilib_native_use_with python python auto) |
396 |
+ $(use_enable static-libs static) |
397 |
+ $(use_enable threads pthread) |
398 |
+ $(use_enable v4l video) |
399 |
+ $(use_with X x) |
400 |
+ $(use_with X xshm) |
401 |
+ $(use_with xv xv) |
402 |
+ ) |
403 |
+ |
404 |
+ if multilib_is_native_abi; then |
405 |
+ # both must be enabled to use GraphicsMagick |
406 |
+ if use graphicsmagick; then |
407 |
+ myeconfargs+=( |
408 |
+ --with-graphicsmagick |
409 |
+ --without-imagemagick |
410 |
+ ) |
411 |
+ elif use imagemagick; then |
412 |
+ myeconfargs+=( |
413 |
+ --with-imagemagick |
414 |
+ --without-graphicsmagick |
415 |
+ ) |
416 |
+ else |
417 |
+ myeconfargs+=( |
418 |
+ --without-imagemagick |
419 |
+ --without-graphicsmagick |
420 |
+ ) |
421 |
+ fi |
422 |
+ |
423 |
+ if use java; then |
424 |
+ export JAVACFLAGS="$(java-pkg_javac-args)" |
425 |
+ append-cflags "$(java-pkg_get-jni-cflags)" |
426 |
+ if use test; then # bug 629078 |
427 |
+ java-pkg_append_ CLASSPATH . |
428 |
+ java-pkg_append_ CLASSPATH $(java-pkg_getjar --build-only junit-4 junit.jar) |
429 |
+ java-pkg_append_ CLASSPATH $(java-pkg_getjar --build-only hamcrest-core-1.3 hamcrest-core.jar) |
430 |
+ fi |
431 |
+ fi |
432 |
+ |
433 |
+ if use qt5; then |
434 |
+ myeconfargs+=( |
435 |
+ --with-qt |
436 |
+ --with-qt5 |
437 |
+ ) |
438 |
+ else |
439 |
+ myeconfargs+=( --without-qt ) |
440 |
+ fi |
441 |
+ else |
442 |
+ myeconfargs+=( |
443 |
+ --without-qt |
444 |
+ --without-imagemagick |
445 |
+ --without-graphicsmagick |
446 |
+ ) |
447 |
+ fi |
448 |
+ |
449 |
+ ECONF_SOURCE="${S}" \ |
450 |
+ econf "${myeconfargs[@]}" |
451 |
+ |
452 |
+ # work around out-of-source build issues for multilib systems (bug 672184) |
453 |
+ mkdir qt zbarcam || die |
454 |
+} |
455 |
+ |
456 |
+src_test() { |
457 |
+ virtx multilib-minimal_src_test |
458 |
+} |
459 |
+ |
460 |
+src_install() { |
461 |
+ if use qt5; then |
462 |
+ local MULTILIB_WRAPPED_HEADERS=( |
463 |
+ /usr/include/zbar/QZBar.h |
464 |
+ /usr/include/zbar/QZBarImage.h |
465 |
+ ) |
466 |
+ fi |
467 |
+ multilib-minimal_src_install |
468 |
+ einstalldocs |
469 |
+} |
470 |
+ |
471 |
+multilib_src_install_all() { |
472 |
+ find "${D}" -name '*.la' -delete || die |
473 |
+} |
474 |
+ |
475 |
+pkg_preinst() { |
476 |
+ use java && java-pkg-opt-2_pkg_preinst |
477 |
+} |