1 |
commit: 82144645ee6f94af35d580e1dafd3134bf7120da |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 8 23:16:28 2022 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 8 23:29:28 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82144645 |
7 |
|
8 |
media-gfx/zbar: Drop 0.23.1 |
9 |
|
10 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
11 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
12 |
|
13 |
media-gfx/zbar/Manifest | 1 - |
14 |
.../zbar/files/zbar-0.23.1-autoconf-2.70.patch | 38 ---- |
15 |
....23.1_fix_leftover_on_shell_compatibility.patch | 24 --- |
16 |
.../zbar/files/zbar-0.23.1_fix_unittest.patch | 78 ------- |
17 |
.../files/zbar-0.23.1_musl_include_locale_h.patch | 23 --- |
18 |
.../zbar/files/zbar-0.23.1_python_tp_print.patch | 55 ----- |
19 |
.../files/zbar-0.23_fix_Qt5X11Extras_detect.patch | 18 -- |
20 |
media-gfx/zbar/zbar-0.23.1.ebuild | 229 --------------------- |
21 |
8 files changed, 466 deletions(-) |
22 |
|
23 |
diff --git a/media-gfx/zbar/Manifest b/media-gfx/zbar/Manifest |
24 |
index 60c7d029a61a..3343fb13b810 100644 |
25 |
--- a/media-gfx/zbar/Manifest |
26 |
+++ b/media-gfx/zbar/Manifest |
27 |
@@ -1,2 +1 @@ |
28 |
-DIST zbar-0.23.1.tar.gz 1019268 BLAKE2B 5aa8725a0945b6f50eb78bb7b8a61e5b46356b18f07e8af778a63d46b94c894d9e827ed71bd89060898ecbdaebc5b4bb6e638939d7bc0dede390f7137770049f SHA512 ae7741cf750a10cf53dc11abcd482c3885507153ee37f6e3364ed5ed72184ebb009560b8c40d8090603a551fb681700a962838a59ce77d005d080ee49fbfa54b |
29 |
DIST zbar-0.23.90.tar.gz 1005314 BLAKE2B 5d0c193509602dfb55741b421e1d28f1424ecec50aa3be584912544a587922c053284c41cf14ff0b4824095d0d376381ed055e7faf9ff394bd8d44fd9ed2971d SHA512 d73d71873bec68ee021997512a9edbd223f5f5fe43c66c4dd3502224ba6009be2e5e1714766cb8e1056244673e87e0939ed0319116f61d7371b5ab79fb5e04eb |
30 |
|
31 |
diff --git a/media-gfx/zbar/files/zbar-0.23.1-autoconf-2.70.patch b/media-gfx/zbar/files/zbar-0.23.1-autoconf-2.70.patch |
32 |
deleted file mode 100644 |
33 |
index be9547ead111..000000000000 |
34 |
--- a/media-gfx/zbar/files/zbar-0.23.1-autoconf-2.70.patch |
35 |
+++ /dev/null |
36 |
@@ -1,38 +0,0 @@ |
37 |
-https://github.com/mchehab/zbar/commit/89e7900d85dd54ef351a7ed582aec6a5a5d7fa37 |
38 |
-https://bugs.gentoo.org/775656 |
39 |
- |
40 |
-From 89e7900d85dd54ef351a7ed582aec6a5a5d7fa37 Mon Sep 17 00:00:00 2001 |
41 |
-From: Boyuan Yang <byang@××××××.org> |
42 |
-Date: Thu, 31 Dec 2020 12:56:26 -0500 |
43 |
-Subject: [PATCH] configure.ac: Fix quote issue (autoconf 2.70 compat) |
44 |
- |
45 |
-One of the AS_IF() macro was not properly quoted. This commit |
46 |
-fixes that issue. |
47 |
- |
48 |
-This patch closes: #132 (fixes this bug report). |
49 |
---- |
50 |
- configure.ac | 4 ++-- |
51 |
- 1 file changed, 2 insertions(+), 2 deletions(-) |
52 |
- |
53 |
-diff --git a/configure.ac b/configure.ac |
54 |
-index df0220a8..db4bc902 100644 |
55 |
---- a/configure.ac |
56 |
-+++ b/configure.ac |
57 |
-@@ -656,7 +656,7 @@ AS_IF([test "x$with_qt" != "xno"], |
58 |
- [with_qt="no"])])]) |
59 |
- |
60 |
- AS_IF([test "x$with_qt" != "xno"], |
61 |
-- AS_IF([test "x$with_qt5" != "xno"], |
62 |
-+ [AS_IF([test "x$with_qt5" != "xno"], |
63 |
- [AC_CHECK_PROGS(MOC, [moc-qt5 moc]) |
64 |
- AC_MSG_NOTICE([using moc from $MOC]) |
65 |
- QT_VERSION=`$PKG_CONFIG Qt5Gui --modversion` |
66 |
-@@ -672,7 +672,7 @@ dnl -fPIC has no effect on Windows and breaks windres |
67 |
- QT_VERSION=`$PKG_CONFIG QtGui --modversion` |
68 |
- AC_MSG_NOTICE([using Qt version $QT_VERSION]) |
69 |
- qt_pkgconfig_file="zbar-qt.pc" |
70 |
-- ])) |
71 |
-+ ])]) |
72 |
- |
73 |
- AM_CONDITIONAL([HAVE_QT], [test "x$with_qt" = "xyes"]) |
74 |
- |
75 |
|
76 |
diff --git a/media-gfx/zbar/files/zbar-0.23.1_fix_leftover_on_shell_compatibility.patch b/media-gfx/zbar/files/zbar-0.23.1_fix_leftover_on_shell_compatibility.patch |
77 |
deleted file mode 100644 |
78 |
index 62993a8b2b25..000000000000 |
79 |
--- a/media-gfx/zbar/files/zbar-0.23.1_fix_leftover_on_shell_compatibility.patch |
80 |
+++ /dev/null |
81 |
@@ -1,24 +0,0 @@ |
82 |
-From 8e74a2e223bd40e8cf95ac2580df56ac8500a859 Mon Sep 17 00:00:00 2001 |
83 |
-From: Boyuan Yang <byang@××××××.org> |
84 |
-Date: Wed, 22 Apr 2020 10:29:39 -0400 |
85 |
-Subject: [PATCH] configure.ac: Fix leftover on shell compatibility |
86 |
- |
87 |
-Uses "=" instead of "==" in string comparision for POSIX |
88 |
-compatibility. This is a leftover of previous similar fix. |
89 |
---- |
90 |
- configure.ac | 2 +- |
91 |
- 1 file changed, 1 insertion(+), 1 deletion(-) |
92 |
- |
93 |
-diff --git a/configure.ac b/configure.ac |
94 |
-index 105da09..df0220a 100644 |
95 |
---- a/configure.ac |
96 |
-+++ b/configure.ac |
97 |
-@@ -845,7 +845,7 @@ dnl summary log |
98 |
- echo "" |
99 |
- echo "please verify that the detected configuration matches your expectations:" |
100 |
- echo "------------------------------------------------------------------------" |
101 |
--AS_IF([test "x$USE_NLS" == "xyes"], |
102 |
-+AS_IF([test "x$USE_NLS" = "xyes"], |
103 |
- [echo "gettext $USE_NLS"] |
104 |
- ) |
105 |
- AS_IF([test "x$win32" != "xno"], |
106 |
|
107 |
diff --git a/media-gfx/zbar/files/zbar-0.23.1_fix_unittest.patch b/media-gfx/zbar/files/zbar-0.23.1_fix_unittest.patch |
108 |
deleted file mode 100644 |
109 |
index 3f538c81138f..000000000000 |
110 |
--- a/media-gfx/zbar/files/zbar-0.23.1_fix_unittest.patch |
111 |
+++ /dev/null |
112 |
@@ -1,78 +0,0 @@ |
113 |
-diff -ur a/configure.ac b/configure.ac |
114 |
---- a/configure.ac 2020-04-21 00:09:21.000000000 +0300 |
115 |
-+++ b/configure.ac 2020-04-23 16:53:06.654339488 +0300 |
116 |
-@@ -336,6 +336,14 @@ |
117 |
- AC_SUBST(DBUS_CONFDIR) |
118 |
- ]) |
119 |
- |
120 |
-+dnl zbarimg tests |
121 |
-+AC_ARG_WITH([zbarimg_tests], |
122 |
-+ [AS_HELP_STRING([--without-zbarimg-tests], |
123 |
-+ [disable tests for zbarimg])], |
124 |
-+ [], |
125 |
-+ [with_zbarimg_tests="yes"]) |
126 |
-+AM_CONDITIONAL([HAVE_ZBARIMG_TESTS], [test "x$with_zbarimg_tests" = "xyes"]) |
127 |
-+ |
128 |
- dnl libjpeg |
129 |
- AC_ARG_WITH([jpeg], |
130 |
- [AS_HELP_STRING([--without-jpeg], |
131 |
-@@ -724,25 +732,12 @@ |
132 |
- |
133 |
- AC_ARG_VAR([CLASSPATH], [Java class path (include JUnit to run java tests)]) |
134 |
- AS_IF([test "x$CLASSPATH" = "x"], [CLASSPATH="."]) |
135 |
-+AC_SUBST(CLASSPATH) |
136 |
- |
137 |
--dnl Search for Java unit test library |
138 |
--AS_IF([test -z "$JUNIT_HOME"], |
139 |
-- [JUNIT_HOME="/usr/share/java"]) |
140 |
-- |
141 |
--AS_IF([test -f "$JUNIT_HOME/junit4.jar"], |
142 |
-- [JUNIT="$JUNIT_HOME/junit4.jar"], |
143 |
-- [AS_IF([test -f "$JUNIT_HOME/junit.jar"], |
144 |
-- [JUNIT="$JUNIT_HOME/junit.jar"])]) |
145 |
-- |
146 |
--AS_IF([test "x$JUNIT" != "x"], |
147 |
-- [AS_IF([test -f "/usr/share/java/hamcrest/all.jar"], |
148 |
-- [CLASSPATH="$JUNIT:/usr/share/java/hamcrest/all.jar:$CLASSPATH" |
149 |
-- AC_SUBST(CLASSPATH) |
150 |
-- with_java_unit="yes"])], |
151 |
-- [AS_IF([test -f "/usr/share/java/hamcrest-all.jar"], |
152 |
-- [CLASSPATH="$JUNIT:/usr/share/java/hamcrest-all.jar:$CLASSPATH" |
153 |
-- AC_SUBST(CLASSPATH) |
154 |
-- with_java_unit="yes"])]) |
155 |
-+AC_ARG_WITH([java_unit], |
156 |
-+ [AS_HELP_STRING([--without-java-unit], |
157 |
-+ [Enable java unittest])], |
158 |
-+ [with_java_unit="yes"]) |
159 |
- |
160 |
- AM_CONDITIONAL([HAVE_JAVA_UNIT], [test "x$with_java_unit" = "xyes"]) |
161 |
- |
162 |
-@@ -905,6 +900,8 @@ |
163 |
- [echo " => the Java interface will *NOT* be built"]) |
164 |
- AS_IF([test "x$with_java_unit" != "xyes"], |
165 |
- [echo " => the Java unit test will *NOT* be enabled"]) |
166 |
-+AS_IF([test "x$with_zbarimg_tests" != "xyes"], |
167 |
-+ [echo " => zbarimg tests will *NOT* be enabled"]) |
168 |
- #echo "NPAPI Plugin --with-npapi=$with_npapi" |
169 |
- #AS_IF([test "x$with_mozilla" != "xyes"], |
170 |
- # [echo " => the Mozilla/Firefox/OpenOffice plugin will *NOT* be built"]) |
171 |
-diff -ur a/test/Makefile.am.inc b/test/Makefile.am.inc |
172 |
---- a/test/Makefile.am.inc 2020-04-21 00:09:21.000000000 +0300 |
173 |
-+++ b/test/Makefile.am.inc 2020-04-23 17:03:07.819999370 +0300 |
174 |
-@@ -91,11 +91,16 @@ |
175 |
- regress-decoder: test/test_decode |
176 |
- @abs_top_builddir@/test/test_decode -q -n 100000 |
177 |
- |
178 |
-+if HAVE_ZBARIMG_TESTS |
179 |
- check-images-py: zbarimg/zbarimg |
180 |
- @PYTHON@ @abs_top_srcdir@/test/barcodetest.py |
181 |
- |
182 |
- check-images: zbarimg/zbarimg |
183 |
- @abs_top_builddir@/test/test_examples.sh |
184 |
-+else |
185 |
-+check-images-py: |
186 |
-+check-images: |
187 |
-+endif |
188 |
- |
189 |
- check-convert: test/test_convert |
190 |
- @abs_top_srcdir@/test/test_convert |
191 |
|
192 |
diff --git a/media-gfx/zbar/files/zbar-0.23.1_musl_include_locale_h.patch b/media-gfx/zbar/files/zbar-0.23.1_musl_include_locale_h.patch |
193 |
deleted file mode 100644 |
194 |
index 916dee61d431..000000000000 |
195 |
--- a/media-gfx/zbar/files/zbar-0.23.1_musl_include_locale_h.patch |
196 |
+++ /dev/null |
197 |
@@ -1,23 +0,0 @@ |
198 |
-https://github.com/mchehab/zbar/pull/115 |
199 |
---- a/zbarcam/zbarcam.c |
200 |
-+++ b/zbarcam/zbarcam.c |
201 |
-@@ -37,6 +37,7 @@ |
202 |
- #ifdef ENABLE_NLS |
203 |
- #include "../zbar/gettext.h" |
204 |
- # include <libintl.h> |
205 |
-+# include <locale.h> |
206 |
- # define _(string) gettext(string) |
207 |
- #else |
208 |
- # define _(string) string |
209 |
---- a/zbarimg/zbarimg.c |
210 |
-+++ b/zbarimg/zbarimg.c |
211 |
-@@ -42,6 +42,7 @@ |
212 |
- #ifdef ENABLE_NLS |
213 |
- #include "../zbar/gettext.h" |
214 |
- # include <libintl.h> |
215 |
-+# include <locale.h> |
216 |
- # define _(string) gettext(string) |
217 |
- #else |
218 |
- # define _(string) string |
219 |
--- |
220 |
-2.26.2 |
221 |
|
222 |
diff --git a/media-gfx/zbar/files/zbar-0.23.1_python_tp_print.patch b/media-gfx/zbar/files/zbar-0.23.1_python_tp_print.patch |
223 |
deleted file mode 100644 |
224 |
index 8d4d821426d2..000000000000 |
225 |
--- a/media-gfx/zbar/files/zbar-0.23.1_python_tp_print.patch |
226 |
+++ /dev/null |
227 |
@@ -1,55 +0,0 @@ |
228 |
-From 938d39716488b545b92c28f48acc94a7b8fc9138 Mon Sep 17 00:00:00 2001 |
229 |
-From: Mauro Carvalho Chehab <mchehab+huawei@××××××.org> |
230 |
-Date: Tue, 28 Jul 2020 10:27:30 +0200 |
231 |
-Subject: [PATCH] python: enum: make it compatible with Python 3.9 |
232 |
- |
233 |
-As reported by: |
234 |
- https://github.com/mchehab/zbar/issues/92 |
235 |
- |
236 |
-python bindings don't build with Python 3.9, because it is |
237 |
-using tp_print, which has been silently ignored since Python |
238 |
-3.0, according with[1]: |
239 |
- |
240 |
- "The tp_print slot of PyTypeObject has been removed. |
241 |
- It was used for printing objects to files in Python 2.7 |
242 |
- and before. |
243 |
- Since Python 3.0, it has been ignored and unused." |
244 |
- |
245 |
-[1] https://docs.python.org/3.9/whatsnew/3.9.html#id3 |
246 |
- |
247 |
-Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@××××××.org> |
248 |
---- |
249 |
- python/enum.c | 5 +++++ |
250 |
- 1 file changed, 5 insertions(+) |
251 |
- |
252 |
-diff --git a/python/enum.c b/python/enum.c |
253 |
-index a1135531..dfe1b1ef 100644 |
254 |
---- a/python/enum.c |
255 |
-+++ b/python/enum.c |
256 |
-@@ -76,6 +76,8 @@ enumitem_str (zbarEnumItem *self) |
257 |
- return(self->name); |
258 |
- } |
259 |
- |
260 |
-+#if PY_MAJOR_VERSION < 3 |
261 |
-+/* tp_print was dropped on Python 3.9 */ |
262 |
- static int |
263 |
- enumitem_print (zbarEnumItem *self, |
264 |
- FILE *fp, |
265 |
-@@ -83,6 +85,7 @@ enumitem_print (zbarEnumItem *self, |
266 |
- { |
267 |
- return(self->name->ob_type->tp_print(self->name, fp, flags)); |
268 |
- } |
269 |
-+#endif |
270 |
- |
271 |
- static PyObject* |
272 |
- enumitem_repr (zbarEnumItem *self) |
273 |
-@@ -115,7 +118,9 @@ PyTypeObject zbarEnumItem_Type = { |
274 |
- .tp_new = (newfunc)enumitem_new, |
275 |
- .tp_dealloc = (destructor)enumitem_dealloc, |
276 |
- .tp_str = (reprfunc)enumitem_str, |
277 |
-+#if PY_MAJOR_VERSION < 3 |
278 |
- .tp_print = (printfunc)enumitem_print, |
279 |
-+#endif |
280 |
- .tp_repr = (reprfunc)enumitem_repr, |
281 |
- }; |
282 |
- |
283 |
|
284 |
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 |
285 |
deleted file mode 100644 |
286 |
index 7692db41e0da..000000000000 |
287 |
--- a/media-gfx/zbar/files/zbar-0.23_fix_Qt5X11Extras_detect.patch |
288 |
+++ /dev/null |
289 |
@@ -1,18 +0,0 @@ |
290 |
-diff -ur a/configure.ac b/configure.ac |
291 |
---- a/configure.ac 2019-05-23 23:37:12.000000000 +0300 |
292 |
-+++ b/configure.ac 2020-01-22 12:27:14.190755156 +0300 |
293 |
-@@ -638,13 +638,9 @@ |
294 |
- |
295 |
- AC_ARG_VAR([MOC], [full path to Qt moc program]) |
296 |
- |
297 |
--AS_IF([test "x$have_x" = "xyes"], |
298 |
-- [qt_extra="Qt5X11Extras >= 5.0"], |
299 |
-- [qt_extra=""]) |
300 |
-- |
301 |
- AS_IF([test "x$with_qt" != "xno"], |
302 |
- [PKG_CHECK_MODULES([QT], |
303 |
-- [Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 $qt_extra],, |
304 |
-+ [Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 Qt5X11Extras >= 5.0],, |
305 |
- [with_qt5 = "no" |
306 |
- PKG_CHECK_MODULES([QT], |
307 |
- [QtCore >= 4 QtGui >= 4],, |
308 |
|
309 |
diff --git a/media-gfx/zbar/zbar-0.23.1.ebuild b/media-gfx/zbar/zbar-0.23.1.ebuild |
310 |
deleted file mode 100644 |
311 |
index 56e14bbc04eb..000000000000 |
312 |
--- a/media-gfx/zbar/zbar-0.23.1.ebuild |
313 |
+++ /dev/null |
314 |
@@ -1,229 +0,0 @@ |
315 |
-# Copyright 1999-2021 Gentoo Authors |
316 |
-# Distributed under the terms of the GNU General Public License v2 |
317 |
- |
318 |
-EAPI=7 |
319 |
- |
320 |
-PYTHON_COMPAT=( python3_{8..9} ) |
321 |
- |
322 |
-inherit autotools flag-o-matic java-pkg-opt-2 multilib-minimal python-single-r1 virtualx |
323 |
- |
324 |
-DESCRIPTION="Library and tools for reading barcodes from images or video" |
325 |
-HOMEPAGE="https://github.com/mchehab/zbar" |
326 |
-SRC_URI="https://github.com/mchehab/zbar/archive/${PV}.tar.gz -> ${P}.tar.gz" |
327 |
- |
328 |
-LICENSE="LGPL-2.1" |
329 |
-SLOT="0" |
330 |
-KEYWORDS="amd64 ~arm ~arm64 x86" |
331 |
- |
332 |
-IUSE="dbus graphicsmagick gtk +imagemagick introspection java jpeg nls python qt5 static-libs test +threads v4l X xv" |
333 |
-REQUIRED_USE=" |
334 |
- introspection? ( gtk ) |
335 |
- python? ( ${PYTHON_REQUIRED_USE} ) |
336 |
- test? ( |
337 |
- ${PYTHON_REQUIRED_USE} |
338 |
- X? ( imagemagick ) |
339 |
- ) |
340 |
- xv? ( X )" |
341 |
- |
342 |
-RESTRICT="!test? ( test )" |
343 |
- |
344 |
-COMMON_DEPEND=" |
345 |
- dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
346 |
- gtk? ( |
347 |
- dev-libs/glib:2[${MULTILIB_USEDEP}] |
348 |
- x11-libs/gtk+:3[${MULTILIB_USEDEP}] |
349 |
- introspection? ( dev-libs/gobject-introspection ) |
350 |
- ) |
351 |
- imagemagick? ( |
352 |
- !graphicsmagick? ( media-gfx/imagemagick:=[png,jpeg?] ) |
353 |
- graphicsmagick? ( media-gfx/graphicsmagick:=[png,jpeg?] ) |
354 |
- ) |
355 |
- jpeg? ( virtual/jpeg:0[${MULTILIB_USEDEP}] ) |
356 |
- python? ( ${PYTHON_DEPS} ) |
357 |
- qt5? ( |
358 |
- dev-qt/qtcore:5 |
359 |
- dev-qt/qtgui:5 |
360 |
- dev-qt/qtwidgets:5 |
361 |
- dev-qt/qtx11extras:5 |
362 |
- ) |
363 |
- v4l? ( media-libs/libv4l:0=[${MULTILIB_USEDEP}] ) |
364 |
- X? ( |
365 |
- x11-libs/libX11[${MULTILIB_USEDEP}] |
366 |
- x11-libs/libXext[${MULTILIB_USEDEP}] |
367 |
- xv? ( x11-libs/libXv[${MULTILIB_USEDEP}] ) |
368 |
- )" |
369 |
- |
370 |
-RDEPEND="${COMMON_DEPEND} |
371 |
- java? ( >=virtual/jre-1.8 )" |
372 |
- |
373 |
-DEPEND="${COMMON_DEPEND} |
374 |
- java? ( |
375 |
- >=virtual/jdk-1.8 |
376 |
- test? ( |
377 |
- dev-java/hamcrest-core:1.3 |
378 |
- dev-java/junit:4 |
379 |
- ) |
380 |
- ) |
381 |
- test? ( |
382 |
- ${PYTHON_DEPS} |
383 |
- $(python_gen_cond_dep ' |
384 |
- dev-python/pillow[${PYTHON_USEDEP}] |
385 |
- ') |
386 |
- )" |
387 |
- |
388 |
-BDEPEND=" |
389 |
- app-text/xmlto |
390 |
- virtual/pkgconfig |
391 |
- gtk? ( dev-util/glib-utils ) |
392 |
- nls? ( |
393 |
- sys-devel/gettext |
394 |
- virtual/libiconv |
395 |
- )" |
396 |
- |
397 |
-PATCHES=( |
398 |
- "${FILESDIR}/${P}_fix_leftover_on_shell_compatibility.patch" |
399 |
- "${FILESDIR}/${P}_fix_unittest.patch" |
400 |
- "${FILESDIR}/${P}_musl_include_locale_h.patch" |
401 |
- "${FILESDIR}/${PN}-0.23_fix_Qt5X11Extras_detect.patch" |
402 |
- "${FILESDIR}/${PN}-0.23_fix_python_detect.patch" |
403 |
- "${FILESDIR}/${P}-autoconf-2.70.patch" |
404 |
- "${FILESDIR}/${PN}-0.23.1_python_tp_print.patch" |
405 |
-) |
406 |
- |
407 |
-DOCS=( README.md NEWS.md TODO.md HACKING.md TODO.md ChangeLog ) |
408 |
- |
409 |
-pkg_setup() { |
410 |
- if use python || use test; then |
411 |
- python-single-r1_pkg_setup |
412 |
- fi |
413 |
- use java && java-pkg-opt-2_pkg_setup |
414 |
-} |
415 |
- |
416 |
-src_prepare() { |
417 |
- default |
418 |
- |
419 |
- if use python || use test; then |
420 |
- if use test; then |
421 |
- # make tests happy |
422 |
- # because one of the test requires loadable py module from the current ${BUILD_DIR} |
423 |
- sed -e "s|PYTHONPATH=@abs_top_srcdir@|PYTHONPATH=@builddir@|g" \ |
424 |
- -i test/Makefile.am.inc || die |
425 |
- fi |
426 |
- |
427 |
- python_fix_shebang \ |
428 |
- examples/*.py \ |
429 |
- test/{test_python,barcodetest}.py # test_pygtk.py — py2 only |
430 |
- fi |
431 |
- |
432 |
- if use java; then |
433 |
- java-pkg-opt-2_src_prepare |
434 |
- sed -e "s|javadir = \$(pkgdatadir)|javadir = /usr/$(get_libdir)/zbar|" \ |
435 |
- -i java/Makefile.am || die |
436 |
- fi |
437 |
- |
438 |
- # do not install {LICENSE,INSTALL,etc} doc files with 'make install' (use DOCS=() instead) |
439 |
- sed -e "s|^dist_doc_DATA =\(.*\)|dist_doc_DATA =|" -i Makefile.am || die |
440 |
- |
441 |
- eautoreconf |
442 |
-} |
443 |
- |
444 |
-multilib_src_configure() { |
445 |
- append-cppflags -DNDEBUG |
446 |
- |
447 |
- local myeconfargs=( |
448 |
- $(use_with dbus) |
449 |
- $(use_with gtk gtk gtk3) # default is gtk2 |
450 |
- $(use_with jpeg) |
451 |
- $(multilib_native_use_with introspection gir) |
452 |
- $(multilib_native_use_with java) |
453 |
- $(multilib_native_use_with python python auto) |
454 |
- $(use_enable nls) |
455 |
- $(use_enable static-libs static) |
456 |
- $(use_enable threads pthread) |
457 |
- $(use_enable v4l video) |
458 |
- $(use_with X x) |
459 |
- $(use_with X xshm) |
460 |
- $(use_with xv xv) |
461 |
- ) |
462 |
- |
463 |
- if multilib_is_native_abi; then |
464 |
- # both must be enabled to use GraphicsMagick |
465 |
- if use graphicsmagick; then |
466 |
- myeconfargs+=( |
467 |
- --with-graphicsmagick |
468 |
- --without-imagemagick |
469 |
- ) |
470 |
- elif use imagemagick; then |
471 |
- myeconfargs+=( |
472 |
- --with-imagemagick |
473 |
- --without-graphicsmagick |
474 |
- ) |
475 |
- else |
476 |
- myeconfargs+=( |
477 |
- --without-imagemagick |
478 |
- --without-graphicsmagick |
479 |
- ) |
480 |
- fi |
481 |
- |
482 |
- if use java; then |
483 |
- export JAVACFLAGS="$(java-pkg_javac-args)" |
484 |
- append-cflags "$(java-pkg_get-jni-cflags)" |
485 |
- if use test; then # bug 629078 |
486 |
- myeconfargs+=( --with-java-unit ) |
487 |
- java-pkg_append_ CLASSPATH . |
488 |
- java-pkg_append_ CLASSPATH $(java-pkg_getjar --build-only junit-4 junit.jar) |
489 |
- java-pkg_append_ CLASSPATH $(java-pkg_getjar --build-only hamcrest-core-1.3 hamcrest-core.jar) |
490 |
- fi |
491 |
- fi |
492 |
- |
493 |
- if use qt5; then |
494 |
- myeconfargs+=( |
495 |
- --with-qt |
496 |
- --with-qt5 |
497 |
- ) |
498 |
- else |
499 |
- myeconfargs+=( --without-qt ) |
500 |
- fi |
501 |
- else |
502 |
- myeconfargs+=( |
503 |
- --without-graphicsmagick |
504 |
- --without-imagemagick |
505 |
- --without-qt |
506 |
- ) |
507 |
- |
508 |
- # zbarimg tests with native abi only |
509 |
- # (this option from the patch above, stay up to date) |
510 |
- use test && myeconfargs+=( --without-zbarimg-tests ) |
511 |
- fi |
512 |
- |
513 |
- # use bash (bug 721370) |
514 |
- CONFIG_SHELL='/bin/bash' \ |
515 |
- ECONF_SOURCE="${S}" \ |
516 |
- econf "${myeconfargs[@]}" |
517 |
- |
518 |
- # work around out-of-source build issues for multilib systems (bug 672184) |
519 |
- mkdir qt zbarcam || die |
520 |
-} |
521 |
- |
522 |
-src_test() { |
523 |
- virtx multilib-minimal_src_test |
524 |
-} |
525 |
- |
526 |
-src_install() { |
527 |
- if use qt5; then |
528 |
- local MULTILIB_WRAPPED_HEADERS=( |
529 |
- /usr/include/zbar/QZBar.h |
530 |
- /usr/include/zbar/QZBarImage.h |
531 |
- ) |
532 |
- fi |
533 |
- multilib-minimal_src_install |
534 |
-} |
535 |
- |
536 |
-multilib_src_install_all() { |
537 |
- einstalldocs |
538 |
- find "${D}" -name '*.la' -delete || die |
539 |
-} |
540 |
- |
541 |
-pkg_preinst() { |
542 |
- use java && java-pkg-opt-2_pkg_preinst |
543 |
-} |