Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/zbar/
Date: Thu, 07 Sep 2017 20:31:50
Message-Id: 1504816292.9269e6bb7e59f6686507d78c7662acce54eefc80.mgorny@gentoo
1 commit: 9269e6bb7e59f6686507d78c7662acce54eefc80
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 27 15:02:51 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 7 20:31:32 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9269e6bb
7
8 media-gfx/zbar: Bump to EAPI=6
9
10 media-gfx/zbar/zbar-0.10_p20121015-r2.ebuild | 99 ++++++++++++++++++++++++++++
11 1 file changed, 99 insertions(+)
12
13 diff --git a/media-gfx/zbar/zbar-0.10_p20121015-r2.ebuild b/media-gfx/zbar/zbar-0.10_p20121015-r2.ebuild
14 new file mode 100644
15 index 00000000000..af638ab9c78
16 --- /dev/null
17 +++ b/media-gfx/zbar/zbar-0.10_p20121015-r2.ebuild
18 @@ -0,0 +1,99 @@
19 +# Copyright 1999-2017 Gentoo Foundation
20 +# Distributed under the terms of the GNU General Public License v2
21 +
22 +EAPI=6
23 +
24 +PYTHON_COMPAT=( python2_7 )
25 +
26 +inherit autotools flag-o-matic java-pkg-opt-2 python-single-r1
27 +
28 +DESCRIPTION="Library and tools for reading barcodes from images or video"
29 +HOMEPAGE="http://zbar.sourceforge.net/"
30 +SRC_URI="https://dev.gentoo.org/~xmw/zbar-0.10_p20121015.zip"
31 +
32 +LICENSE="LGPL-2.1"
33 +SLOT="0"
34 +KEYWORDS="~amd64 ~arm ~x86"
35 +IUSE="gtk imagemagick java jpeg python qt4 static-libs +threads v4l X xv"
36 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
37 +
38 +CDEPEND="gtk? ( dev-libs/glib:2 x11-libs/gtk+:2 )
39 + imagemagick? ( virtual/imagemagick-tools )
40 + jpeg? ( virtual/jpeg:0 )
41 + python? (
42 + ${PYTHON_DEPS}
43 + gtk? ( >=dev-python/pygtk-2[${PYTHON_USEDEP}] )
44 + )
45 + qt4? ( dev-qt/qtcore:4 dev-qt/qtgui:4 )
46 + X? (
47 + x11-libs/libXext
48 + xv? ( x11-libs/libXv )
49 + )"
50 +RDEPEND="${CDEPEND}
51 + java? ( >=virtual/jre-1.4 )"
52 +DEPEND="${CDEPEND}
53 + java? ( >=virtual/jdk-1.4 )
54 + sys-devel/gettext
55 + virtual/pkgconfig"
56 +
57 +pkg_setup() {
58 + use python && python-single-r1_pkg_setup
59 + java-pkg-opt-2_pkg_setup
60 +}
61 +
62 +src_unpack() {
63 + #vcs-snapshot doesn't work on .zip
64 + default
65 + mv * ${P} || die
66 +}
67 +
68 +src_prepare() {
69 + eapply "${FILESDIR}"/${PN}-0.10-errors.patch \
70 + "${FILESDIR}"/${PN}-0.10-python-crash.patch \
71 + "${FILESDIR}"/${PN}-0.10-v4l2-uvcvideo.patch
72 +
73 + if has_version '>=media-gfx/imagemagick-7.0.1.0' ; then
74 + eapply "${FILESDIR}/${P}-ImageMagick-7.diff"
75 + fi
76 +
77 + use python && python_fix_shebang examples/upcrpc.py test/*.py
78 + java-pkg-opt-2_src_prepare
79 +
80 + sed -e '/AM_INIT_AUTOMAKE/s: -Werror : :' \
81 + -e '/^AM_CFLAGS=/s: -Werror::' \
82 + -i configure.ac || die
83 + sed "s|javadir = \$(pkgdatadir)|javadir = /usr/$(get_libdir)/zbar|" \
84 + -i java/Makefile.am
85 + eautoreconf
86 +}
87 +
88 +src_configure() {
89 + if use java; then
90 + export JAVACFLAGS="$(java-pkg_javac-args)"
91 + export JAVA_CFLAGS="$(java-pkg_get-jni-cflags)"
92 + fi
93 +
94 + append-cppflags -DNDEBUG
95 + econf \
96 + $(use_with java) \
97 + $(use_with jpeg) \
98 + $(use_with gtk) \
99 + $(use_with imagemagick) \
100 + $(use_with python) \
101 + $(use_with qt4 qt) \
102 + $(use_enable static-libs static) \
103 + $(use_enable threads pthread) \
104 + $(use_with X x) \
105 + $(use_with xv xv) \
106 + $(use_enable v4l video)
107 +}
108 +
109 +src_install() {
110 + emake DESTDIR="${D}" install
111 + dodoc HACKING NEWS README TODO
112 + find "${D}" -name '*.la' -delete || die
113 +}
114 +
115 +pkg_preinst() {
116 + java-pkg-opt-2_pkg_preinst
117 +}