Gentoo Archives: gentoo-commits

From: Luca Barbato <lu_zero@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/aravis/
Date: Sat, 07 Sep 2019 13:34:26
Message-Id: 1567863249.4f460e57ce8674fa3838024f45614f56533707ac.lu_zero@gentoo
1 commit: 4f460e57ce8674fa3838024f45614f56533707ac
2 Author: Bernardo Meurer <bernardo <AT> standard <DOT> ai>
3 AuthorDate: Mon Sep 2 19:33:07 2019 +0000
4 Commit: Luca Barbato <lu_zero <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 7 13:34:09 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f460e57
7
8 media-video/aravis: update 9999
9
10 Package-Manager: Portage-2.3.75, Repoman-2.3.17
11 Signed-off-by: Bernardo Meurer <bernardo <AT> standard.ai>
12 Signed-off-by: Luca Barbato <lu_zero <AT> gentoo.org>
13
14 media-video/aravis/aravis-9999.ebuild | 110 ++++++++++++++++++++--------------
15 1 file changed, 64 insertions(+), 46 deletions(-)
16
17 diff --git a/media-video/aravis/aravis-9999.ebuild b/media-video/aravis/aravis-9999.ebuild
18 index b62b492a853..0f78ce56983 100644
19 --- a/media-video/aravis/aravis-9999.ebuild
20 +++ b/media-video/aravis/aravis-9999.ebuild
21 @@ -1,67 +1,85 @@
22 -# Copyright 1999-2018 Gentoo Foundation
23 +# Copyright 2019 Gentoo Authors
24 # Distributed under the terms of the GNU General Public License v2
25
26 EAPI=7
27 +inherit meson xdg
28
29 -if [[ ${PV} = *9999 ]]; then
30 - EGIT_REPO_URI="https://github.com/AravisProject/aravis.git"
31 - inherit git-r3 autotools
32 +DESCRIPTION="Library for video acquisition using Genicam cameras"
33 +HOMEPAGE="https://github.com/AravisProject/aravis"
34 +
35 +if [[ ${PV} = 9999 ]]; then
36 + inherit git-r3
37 + EGIT_REPO_URI="https://github.com/AravisProject/${PN}"
38 else
39 - SRC_URI="mirror://gnome/sources/${PN}/$(ver_cut 1-2)/${P}.tar.xz"
40 - KEYWORDS="~amd64"
41 + MY_P="${PN^^}_${PV//./_}"
42 + SRC_URI="https://github.com/AravisProject/${PN}/archive/${MY_P}.tar.gz -> ${P}.tar.gz"
43 + KEYWORDS="~amd64 ~x86"
44 fi
45
46 -DESCRIPTION="Library for video acquisition using Genicam cameras"
47 -HOMEPAGE="https://wiki.gnome.org/Projects/Aravis"
48 -
49 -LICENSE="LGPL-2.1"
50 +LICENSE="LGPL-2"
51 SLOT="0"
52 -IUSE="X gstreamer caps"
53 -
54 -GST_DEPEND="media-libs/gstreamer:1.0
55 - media-libs/gst-plugins-base:1.0"
56 +# FIXME: As of right now tests are always built, once that changes a USE flag
57 +# should be added. c.f. https://github.com/AravisProject/aravis/issues/286
58 +IUSE="doc fast-heartbeat gstreamer introspection packet-socket usb X"
59
60 -RDEPEND=">=dev-libs/glib-2.26
61 - dev-libs/libxml2
62 +GST_DEPEND="
63 + media-libs/gstreamer:1.0
64 + media-libs/gst-plugins-base:1.0
65 +"
66 +BDEPEND="
67 + >=dev-util/meson-0.47.0
68 + virtual/pkgconfig
69 + doc? ( dev-util/gtk-doc )
70 + introspection? ( dev-libs/gobject-introspection )
71 +"
72 +DEPEND="
73 + >=dev-libs/glib-2.34
74 + dev-libs/libxml2:=
75 + sys-libs/zlib:=
76 + gstreamer? ( ${GST_DEPEND} )
77 + packet-socket? ( sys-process/audit )
78 + usb? ( virtual/libusb:1 )
79 X? (
80 - >=x11-libs/gtk+-3.12:3
81 ${GST_DEPEND}
82 - media-libs/gst-plugins-base:1.0
83 + >=x11-libs/gtk+-3.12:3
84 x11-libs/libnotify
85 )
86 - caps? (
87 - sys-libs/libcap-ng
88 - sys-process/audit
89 - )
90 - gstreamer? ( ${GST_DEPEND} )"
91 -DEPEND="${RDEPEND}
92 - virtual/pkgconfig
93 - dev-libs/gobject-introspection"
94 +"
95 +RDEPEND="${DEPEND}"
96
97 -if [[ ${PV} != *9999 ]]; then
98 - DEPEND+=" dev-util/gtk-doc dev-util/intltool"
99 +if [[ ${PV} != 9999 ]]; then
100 + S="${WORKDIR}/${PN}-${MY_P}"
101 fi
102
103 -src_prepare() {
104 - default
105 - if [[ ${PV} = *9999 ]]; then
106 - intltoolize || die
107 - gtkdocize || die
108 - eautoreconf
109 - fi
110 -}
111 -
112 src_configure() {
113 - econf \
114 - --disable-silent-rules \
115 - --disable-static \
116 - $(use_enable X viewer) \
117 - $(use_enable gstreamer gst-plugin) \
118 - $(use_enable caps packet-socket) \
119 - --enable-introspection
120 + local emesonargs=(
121 + $(meson_use doc documentation)
122 + $(meson_use fast-heartbeat)
123 + $(meson_use gstreamer gst-plugin)
124 + $(meson_use introspection)
125 + $(meson_use packet-socket)
126 + $(meson_use usb)
127 + $(meson_use X viewer)
128 + )
129 + meson_src_configure
130 }
131
132 src_install() {
133 - emake install DESTDIR="${D}" aravisdocdir="/usr/share/doc/${PF}"
134 - find "${D}" -name '*.la' -delete
135 + meson_src_install
136 + # Aravis appends the major and min versions (but not the patch) to it's
137 + # binaries and it's folder in /usr/share. Things then end up like
138 + # `arv-tool-0.6`. We use this little hack to find out the version of the
139 + # current build in a way that works even for a -9999 ebuild.
140 + local install_pv="$(ls ${ED}/usr/share | grep aravis- | cut -f 2 -d '-')"
141 + local install_p="${PN}-${install_pv}"
142 +
143 + # Properly place icons
144 + if use X; then
145 + cp -r "${ED}/usr/share/${install_p}/icons" "${ED}/usr/share" || die "Failed to copy icons"
146 + fi
147 +
148 + # Symlink versioned binaries to non-versioned
149 + dosym "arv-tool-${install_pv}" "usr/bin/arv-tool"
150 + dosym "arv-fake-gv-camera-${install_pv}" "usr/bin/arv-fake-gv-camera"
151 + use X && dosym "arv-viewer-${install_pv}" "usr/bin/arv-viewer"
152 }