Gentoo Archives: gentoo-commits

From: Aaron Bauman <bman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libdbusmenu/
Date: Sat, 30 Nov 2019 01:46:52
Message-Id: 1575078398.44bcfa9809b3440db0020170344d70241d288407.bman@gentoo
1 commit: 44bcfa9809b3440db0020170344d70241d288407
2 Author: Mathy Vanvoorden <mathy <AT> vanvoorden <DOT> be>
3 AuthorDate: Thu Nov 28 23:15:24 2019 +0000
4 Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 30 01:46:38 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44bcfa98
7
8 dev-libs/libdbusmenu: remove Python dependency
9
10 This package only uses Python in two of its tests but these tests are not even
11 enabled upstream because they require you to use the system dbus. So it doesn't
12 make sense to even have the dependency in the first place.
13
14 Closes: https://bugs.gentoo.org/695622
15 Package-Manager: Portage-2.3.76, Repoman-2.3.18
16 Signed-off-by: Mathy Vanvoorden <mathy <AT> vanvoorden.be>
17 Closes: https://github.com/gentoo/gentoo/pull/13790
18 Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
19
20 dev-libs/libdbusmenu/libdbusmenu-16.04.0-r1.ebuild | 146 +++++++++++++++++++++
21 1 file changed, 146 insertions(+)
22
23 diff --git a/dev-libs/libdbusmenu/libdbusmenu-16.04.0-r1.ebuild b/dev-libs/libdbusmenu/libdbusmenu-16.04.0-r1.ebuild
24 new file mode 100644
25 index 00000000000..cdca5d0c621
26 --- /dev/null
27 +++ b/dev-libs/libdbusmenu/libdbusmenu-16.04.0-r1.ebuild
28 @@ -0,0 +1,146 @@
29 +# Copyright 1999-2019 Gentoo Authors
30 +# Distributed under the terms of the GNU General Public License v2
31 +
32 +EAPI=6
33 +
34 +VALA_MIN_API_VERSION=0.16
35 +VALA_USE_DEPEND=vapigen
36 +VIRTUALX_REQUIRED=manual
37 +
38 +inherit autotools flag-o-matic multilib-minimal vala virtualx xdg-utils
39 +
40 +DESCRIPTION="Library to pass menu structure across DBus"
41 +HOMEPAGE="https://launchpad.net/dbusmenu"
42 +SRC_URI="https://launchpad.net/${PN/lib}/${PV%.*}/${PV}/+download/${P}.tar.gz"
43 +
44 +LICENSE="LGPL-2.1 LGPL-3"
45 +SLOT="0"
46 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
47 +IUSE="debug gtk gtk3 +introspection test"
48 +
49 +RDEPEND="
50 + >=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
51 + >=dev-libs/glib-2.35.4[${MULTILIB_USEDEP}]
52 + dev-libs/libxml2[${MULTILIB_USEDEP}]
53 + gtk? ( x11-libs/gtk+:2[introspection?,${MULTILIB_USEDEP}] )
54 + gtk3? ( >=x11-libs/gtk+-3.2:3[introspection?,${MULTILIB_USEDEP}] )
55 + introspection? ( >=dev-libs/gobject-introspection-1 )
56 + !<${CATEGORY}/${PN}-0.5.1-r200"
57 +# tests also have optional dep on valgrind which we do not enforce
58 +DEPEND="${RDEPEND}
59 + app-text/gnome-doc-utils
60 + dev-util/glib-utils
61 + dev-util/intltool
62 + sys-devel/gettext
63 + virtual/pkgconfig[${MULTILIB_USEDEP}]
64 + introspection? ( $(vala_depend) )
65 + test? (
66 + >=dev-libs/json-glib-0.13.4[${MULTILIB_USEDEP}]
67 + >=dev-util/dbus-test-runner-15.04.0_p100
68 + gtk? ( ${VIRTUALX_DEPEND} )
69 + gtk3? ( ${VIRTUALX_DEPEND} )
70 + )"
71 +
72 +pkg_setup() {
73 + xdg_environment_reset
74 +}
75 +
76 +src_prepare() {
77 + if use introspection; then
78 + vala_src_prepare
79 + export VALA_API_GEN="${VAPIGEN}"
80 + fi
81 +
82 + eapply "${FILESDIR}/${P}-configure-fix.patch"
83 + eapply "${FILESDIR}/${P}-werror.patch"
84 + eapply_user
85 + eautoreconf
86 +}
87 +
88 +multilib_src_configure() {
89 + append-flags -Wno-error #414323
90 +
91 + local myconf=(
92 + --cache-file="${BUILD_DIR}"/config.cache
93 + --disable-gtk
94 + --disable-static
95 + # dumper extra tool is only for GTK+-2.x
96 + --disable-dumper
97 + $(multilib_native_use_enable introspection)
98 + $(multilib_native_use_enable introspection vala)
99 + $(use_enable debug massivedebugging)
100 + $(use_enable test tests)
101 + )
102 + local ECONF_SOURCE=${S}
103 + econf "${myconf[@]}"
104 +
105 + GTK_VARIANTS=( $(usex gtk 2 '') $(usex gtk3 3 '') )
106 + local MULTIBUILD_VARIANTS=( "${GTK_VARIANTS[@]}" )
107 + local top_builddir=${BUILD_DIR}
108 +
109 + gtk_configure() {
110 + local gtkconf=(
111 + "${myconf[@]}"
112 + --enable-gtk
113 + --with-gtk="${MULTIBUILD_VARIANT}"
114 + )
115 + mkdir -p "${BUILD_DIR}" || die
116 + cd "${BUILD_DIR}" || die
117 + econf "${gtkconf[@]}"
118 +
119 + rm -r libdbusmenu-glib || die
120 + ln -s "${top_builddir}"/libdbusmenu-glib libdbusmenu-glib || die
121 + }
122 + [[ ${GTK_VARIANTS[@]} ]] && multibuild_foreach_variant gtk_configure
123 +}
124 +
125 +gtk_emake() {
126 + emake -C "${BUILD_DIR}"/libdbusmenu-gtk "${@}"
127 + multilib_is_native_abi && \
128 + emake -C "${BUILD_DIR}"/docs/libdbusmenu-gtk "${@}"
129 +}
130 +
131 +multilib_src_compile() {
132 + emake
133 +
134 + local MULTIBUILD_VARIANTS=( "${GTK_VARIANTS[@]}" )
135 + [[ ${GTK_VARIANTS[@]} ]] && multibuild_foreach_variant \
136 + gtk_emake
137 +}
138 +
139 +multilib_src_test() {
140 + emake check
141 +
142 + gtk_test() {
143 + # please keep the list of GTK+ tests up-to-date
144 + emake -C "${BUILD_DIR}"/tests check \
145 + TESTS="test-gtk-objects-test test-gtk-label
146 + test-gtk-shortcut test-gtk-reorder test-gtk-remove"
147 + }
148 + local MULTIBUILD_VARIANTS=( "${GTK_VARIANTS[@]}" )
149 + [[ ${GTK_VARIANTS[@]} ]] && virtx multibuild_foreach_variant \
150 + gtk_test
151 +}
152 +
153 +multilib_src_install() {
154 + emake -j1 DESTDIR="${D}" install
155 +
156 + local MULTIBUILD_VARIANTS=( "${GTK_VARIANTS[@]}" )
157 + [[ ${GTK_VARIANTS[@]} ]] && multibuild_foreach_variant \
158 + gtk_emake -j1 install DESTDIR="${D}"
159 +}
160 +
161 +multilib_src_install_all() {
162 + einstalldocs
163 + find "${D}" -name '*.la' -delete || die
164 +}
165 +
166 +pkg_preinst() {
167 + # kill old symlinks that Portage will preserve and break install
168 + if [[ -L ${EROOT}/usr/share/gtk-doc/html/libdbusmenu-glib ]]; then
169 + rm -v "${EROOT}/usr/share/gtk-doc/html/libdbusmenu-glib" || die
170 + fi
171 + if [[ -L ${EROOT}/usr/share/gtk-doc/html/libdbusmenu-gtk ]]; then
172 + rm -v "${EROOT}/usr/share/gtk-doc/html/libdbusmenu-gtk" || die
173 + fi
174 +}