app-misc/geoclue: 2.5.3 → 2.5.3-r1
authorSobhan Mohammadpour <sobhan@gentoo.org>
Wed, 19 Jun 2019 05:46:28 +0000 (01:46 -0400)
committerSobhan Mohammadpour <sobhan@gentoo.org>
Wed, 19 Jun 2019 05:49:07 +0000 (01:49 -0400)
fix bad meson args and also make vala optional

Suggested-by: Pacho Ramos <pacho@gentoo.org>
Package-Manager: Portage-2.3.67, Repoman-2.3.14
Signed-off-by: Sobhan Mohammadpour <sobhan@gentoo.org>
app-misc/geoclue/files/geoclue-2.5.3-optional-vapi.patch [new file with mode: 0644]
app-misc/geoclue/geoclue-2.5.3-r1.ebuild [moved from app-misc/geoclue/geoclue-2.5.3.ebuild with 73% similarity]
profiles/package.mask

diff --git a/app-misc/geoclue/files/geoclue-2.5.3-optional-vapi.patch b/app-misc/geoclue/files/geoclue-2.5.3-optional-vapi.patch
new file mode 100644 (file)
index 0000000..874488d
--- /dev/null
@@ -0,0 +1,47 @@
+From 56c7ca99dcadbf3e80ff2a9baf3e174f278b6a71 Mon Sep 17 00:00:00 2001
+From: Sobhan Mohammadpour <sobhan@gentoo.org>
+Date: Wed, 19 Jun 2019 01:16:16 -0400
+Subject: [PATCH] optinal vala
+
+---
+ libgeoclue/meson.build | 5 +++--
+ meson_options.txt      | 3 +++
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/libgeoclue/meson.build b/libgeoclue/meson.build
+index e228ec3..e78a3e8 100644
+--- a/libgeoclue/meson.build
++++ b/libgeoclue/meson.build
+@@ -58,7 +58,8 @@ libgeoclue_dep = declare_dependency(link_with: libgeoclue,
+                                     sources: [ libgeoclue_sources, libgeoclue_headers ])
+ gir = find_program('g-ir-scanner', required: false)
+-vapigen = find_program('vapigen', required: false)
++vapigen_req = get_option('vapigen')
++vapigen = find_program('vapigen-ver', required: false)
+ enable_gir = get_option('introspection')
+ pkg_requirements = ['glib-2.0', 'gio-2.0', 'gio-unix-2.0']
+ gir_sources = [ libgeoclue_sources,
+@@ -78,7 +79,7 @@ if gir.found() and enable_gir
+                                install: true,
+                                header: 'geoclue.h',
+                                extra_args: [ '--quiet' ])
+-  if vapigen.found()
++  if vapigen.found() and vapigen_req
+     gnome.generate_vapi('libgeoclue-' + gclue_api_version,
+                         sources: geo_gir[0],
+                         packages: pkg_requirements,
+diff --git a/meson_options.txt b/meson_options.txt
+index 83bc60e..8611f6c 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,3 +1,6 @@
++option('vapigen',
++       type: 'boolean', value: false,
++       description: 'Enable vala?')
+ option('libgeoclue',
+         type: 'boolean', value: true,
+         description: 'Enable convenience library')
+-- 
+2.21.0
+
similarity index 73%
rename from app-misc/geoclue/geoclue-2.5.3.ebuild
rename to app-misc/geoclue/geoclue-2.5.3-r1.ebuild
index 67b5750e57ac4db2bf816d31a38b6a8ca79f3a21..b4c7c3071852647bdb10e8c218a32a130ea837d9 100644 (file)
@@ -2,8 +2,10 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
+VALA_USE_DEPEND="vapigen"
+VALA_MIN_API_VERSION="0.32"
 
-inherit gnome.org meson systemd user
+inherit gnome.org meson systemd vala user xdg
 
 DESCRIPTION="A geoinformation D-Bus service"
 HOMEPAGE="https://gitlab.freedesktop.org/geoclue/geoclue/wikis/home"
@@ -13,7 +15,7 @@ LICENSE="LGPL-2"
 SLOT="2.0"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
 #todo maybe add a use flat for libgeoclue
-IUSE="+introspection gtk-doc modemmanager zeroconf"
+IUSE="+introspection gtk-doc modemmanager vala zeroconf"
 
 RDEPEND="
        >=dev-libs/glib-2.44:2
@@ -32,16 +34,26 @@ DEPEND="${RDEPEND}
        >=dev-util/gtk-doc-1
        sys-devel/gettext
        virtual/pkgconfig
+       vala? (  $(vala_depend) )
 "
 
+src_prepare() {
+       epatch "${FILESDIR}"/${P}-optional-vapi.patch
+
+       vala_src_prepare
+       sed -i -e "s:'vapigen-ver':'vapigen-$(vala_best_api_version)':" libgeoclue/meson.build || die
+       xdg_src_prepare
+}
+
 src_configure() {
        # debug only affects CFLAGS
        local emesonargs=(
                $(meson_use gtk-doc)
-               -Ddbus-service-user=geoclue \
+               $(meson_use vala vapigen)
+               -Ddbus-srv-user=geoclue \
                -Denable-backend=true \
                -Dlibgeoclue=true \
-               -Dsystemdsystemunitdir="$(systemd_get_systemunitdir)" \
+               -Dsystemd-system-unit-dir="$(systemd_get_systemunitdir)" \
                -Ddemo-agent=false \
                $(meson_use introspection) \
                $(meson_use modemmanager 3g-source) \
index dda9242c6994ec6ccae67d723485a6368bc757a4..fb88fd296aa0118aa797ae6c05f6f23aa3bb01cb 100644 (file)
@@ -31,7 +31,7 @@
 
 # Sobhan Mohammadpour <sobhan@gentoo.org> (19 Jun 2019)
 # this is new and it needs testing
-=app-misc/geoclue-2.5.3
+>=app-misc/geoclue-2.5.3
 
 # Georgy Yakovlev <gyakovlev@gentoo.org> (17 Jun 2019)
 # this is now provided by dev-lang/rust{-bin}[rustfmt]