Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/zbar/
Date: Thu, 10 May 2018 10:08:35
Message-Id: 1525946898.a58e50c4bddb838a269abf71deeff789e17c2fd4.asturm@gentoo
1 commit: a58e50c4bddb838a269abf71deeff789e17c2fd4
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 10 10:07:19 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Thu May 10 10:08:18 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a58e50c4
7
8 media-gfx/zbar: Drop USE=qt4
9
10 Closes: https://bugs.gentoo.org/641920
11 Package-Manager: Portage-2.3.36, Repoman-2.3.9
12
13 media-gfx/zbar/zbar-0.10_p20121015-r3.ebuild | 132 +++++++++++++++++++++++++++
14 1 file changed, 132 insertions(+)
15
16 diff --git a/media-gfx/zbar/zbar-0.10_p20121015-r3.ebuild b/media-gfx/zbar/zbar-0.10_p20121015-r3.ebuild
17 new file mode 100644
18 index 00000000000..ecdd0ad2dbf
19 --- /dev/null
20 +++ b/media-gfx/zbar/zbar-0.10_p20121015-r3.ebuild
21 @@ -0,0 +1,132 @@
22 +# Copyright 1999-2018 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=6
26 +
27 +PYTHON_COMPAT=( python2_7 )
28 +
29 +inherit autotools flag-o-matic java-pkg-opt-2 multilib-minimal \
30 + python-single-r1 virtualx
31 +
32 +DESCRIPTION="Library and tools for reading barcodes from images or video"
33 +HOMEPAGE="http://zbar.sourceforge.net/"
34 +SRC_URI="https://dev.gentoo.org/~xmw/zbar-0.10_p20121015.zip"
35 +
36 +LICENSE="LGPL-2.1"
37 +SLOT="0"
38 +KEYWORDS="amd64 ~arm x86"
39 +IUSE="gtk imagemagick java jpeg python static-libs test +threads v4l X xv"
40 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
41 + test? ( X ${PYTHON_REQUIRED_USE} )"
42 +
43 +CDEPEND="gtk? ( dev-libs/glib:2[${MULTILIB_USEDEP}]
44 + x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
45 + imagemagick? ( virtual/imagemagick-tools )
46 + jpeg? ( virtual/jpeg:0[${MULTILIB_USEDEP}] )
47 + python? (
48 + ${PYTHON_DEPS}
49 + gtk? ( >=dev-python/pygtk-2[${PYTHON_USEDEP}] )
50 + )
51 + X? (
52 + x11-libs/libXext[${MULTILIB_USEDEP}]
53 + xv? ( x11-libs/libXv[${MULTILIB_USEDEP}] )
54 + )"
55 +RDEPEND="${CDEPEND}
56 + java? ( >=virtual/jre-1.4 )"
57 +DEPEND="${CDEPEND}
58 + java? ( >=virtual/jdk-1.4
59 + test? ( dev-java/junit:4
60 + dev-java/hamcrest-core:1.3 ) )
61 + test? ( ${PYTHON_DEPS} )
62 + app-arch/unzip
63 + sys-devel/gettext
64 + virtual/pkgconfig"
65 +
66 +pkg_setup() {
67 + if use python || use test; then
68 + python-single-r1_pkg_setup
69 + fi
70 + java-pkg-opt-2_pkg_setup
71 +}
72 +
73 +src_unpack() {
74 + #vcs-snapshot doesn't work on .zip
75 + default
76 + mv * ${P} || die
77 +}
78 +
79 +src_prepare() {
80 + eapply "${FILESDIR}"/${PN}-0.10-errors.patch \
81 + "${FILESDIR}"/${PN}-0.10-python-crash.patch \
82 + "${FILESDIR}"/${PN}-0.10-v4l2-uvcvideo.patch
83 +
84 + # fix use of deprecated qt4 function, bug 572488
85 + sed -e 's:numBytes:byteCount:g' \
86 + -i "${S}"/include/zbar/QZBarImage.h || die
87 +
88 + if has_version '>=media-gfx/imagemagick-7.0.1.0' ; then
89 + eapply "${FILESDIR}/${P}-ImageMagick-7.diff"
90 + fi
91 +
92 + use python && python_fix_shebang examples/upcrpc.py test/*.py
93 + java-pkg-opt-2_src_prepare
94 +
95 + sed -e '/AM_INIT_AUTOMAKE/s: -Werror : :' \
96 + -e '/^AM_CFLAGS=/s: -Werror::' \
97 + -i configure.ac || die
98 + sed "s|javadir = \$(pkgdatadir)|javadir = /usr/$(get_libdir)/zbar|" \
99 + -i java/Makefile.am
100 + eautoreconf
101 +}
102 +
103 +multilib_src_configure() {
104 + if multilib_is_native_abi && use java; then
105 + export JAVACFLAGS="$(java-pkg_javac-args)"
106 + export JAVA_CFLAGS="$(java-pkg_get-jni-cflags)"
107 + if use test ; then # bug 629078
108 + java-pkg_append_ CLASSPATH .
109 + java-pkg_append_ CLASSPATH $(java-pkg_getjar --build-only junit-4 junit.jar)
110 + java-pkg_append_ CLASSPATH $(java-pkg_getjar --build-only hamcrest-core-1.3 hamcrest-core.jar)
111 + fi
112 + fi
113 +
114 + append-cppflags -DNDEBUG
115 +
116 + # different flags for image/graphics magick (bug 552350)
117 + myimagemagick="--without-imagemagick"
118 + has_version media-gfx/imagemagick &&
119 + myimagemagick="$(multilib_native_use_with imagemagick)"
120 + mygraphicsmagick="--without-graphicsmagick"
121 + has_version media-gfx/graphicsmagick &&
122 + mygraphicsmagick="$(multilib_native_use_with imagemagick graphicsmagick)"
123 + ECONF_SOURCE=${S} \
124 + econf \
125 + $(multilib_native_use_with java) \
126 + $(use_with jpeg) \
127 + $(use_with gtk) \
128 + ${myimagemagick} \
129 + ${mygraphicsmagick} \
130 + $(multilib_native_use_with python) \
131 + --without-qt \
132 + $(use_enable static-libs static) \
133 + $(use_enable threads pthread) \
134 + $(use_with X x) \
135 + $(use_with xv xv) \
136 + $(use_enable v4l video)
137 +
138 + # work-around out-of-source build issue
139 + mkdir gtk pygtk qt test || die
140 +}
141 +
142 +src_test() {
143 + virtx multilib-minimal_src_test
144 +}
145 +
146 +multilib_src_install_all() {
147 + dodoc HACKING NEWS README TODO
148 + find "${D}" -name '*.la' -delete || die
149 +}
150 +
151 +pkg_preinst() {
152 + java-pkg-opt-2_pkg_preinst
153 +}