Skip to content

Commit

Permalink
app-misc/geoclue: 2.5 series packaging fixes, unmask
Browse files Browse the repository at this point in the history
* Enable demo-agent as in 2.4.13, as it's the only known agent
  available for non-GNOME for actually having a geoclue service
  responding on other desktops than GNOME
* Rewrite optional vapi patch to not need sedding
* Port to EAPI-7
* Add missing REQUIRED_USE="vala? ( introspection )"
* Drop unnecessary bogus VALA_MIN_API_VERSION
* Drop unnecessary gnome.org.eclass inherit
* Fix LICENSE
* Fix gtk-doc dep to be conditional to USE=gtk-doc, add missing
  docbook-xml-dtd dep
* Reorder emesonargs to meson_options.txt order for easier
  (future) review and drop unnecessary backslashes at EOLs
* Various other touchups
* Unmask it now together with newer xdg-desktop-portal, as it's
  been reviewed now

Closes: https://bugs.gentoo.org/678814
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Mart Raudsepp <[email protected]>
  • Loading branch information
leio committed Jul 7, 2019
1 parent 6b46c94 commit e6e1c2c
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 122 deletions.
52 changes: 52 additions & 0 deletions app-misc/geoclue/files/2.5.3-optional-vapi.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
From 3598b8b9c1a6ef4a31e2c179a6be3e3a69cce357 Mon Sep 17 00:00:00 2001
From: Mart Raudsepp <[email protected]>
Date: Sun, 7 Jul 2019 15:57:03 +0300
Subject: [PATCH] meson: Make vapi generation optional and remove explicit
vapigen check

meson gnome.generate_vapi properly handles VAPIGEN and other vala
environment variables. It is counter-productive to check for an
unversioned vapigen, as that breaks versioned VAPIGEN usages.
---
libgeoclue/meson.build | 3 +--
meson_options.txt | 3 +++
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libgeoclue/meson.build b/libgeoclue/meson.build
index e228ec3..d053bc1 100644
--- a/libgeoclue/meson.build
+++ b/libgeoclue/meson.build
@@ -58,7 +58,6 @@ 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)
enable_gir = get_option('introspection')
pkg_requirements = ['glib-2.0', 'gio-2.0', 'gio-unix-2.0']
gir_sources = [ libgeoclue_sources,
@@ -78,7 +77,7 @@ if gir.found() and enable_gir
install: true,
header: 'geoclue.h',
extra_args: [ '--quiet' ])
- if vapigen.found()
+ if get_option('vapi')
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..3a832d5 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,6 +4,9 @@ option('libgeoclue',
option('introspection',
type: 'boolean', value: true,
description: 'Enable convenience library introspection generation')
+option('vapi',
+ type: 'boolean', value: true,
+ description: 'Generate vapi data for convenience library (requires vapigen and introspection)')
option('gtk-doc',
type: 'boolean', value: true,
description: 'Whether to generate the API reference for Geocode-GLib')
--
2.20.1

47 changes: 0 additions & 47 deletions app-misc/geoclue/files/geoclue-2.5.3-optional-vapi.patch

This file was deleted.

70 changes: 0 additions & 70 deletions app-misc/geoclue/geoclue-2.5.3-r1.ebuild

This file was deleted.

72 changes: 72 additions & 0 deletions app-misc/geoclue/geoclue-2.5.3-r2.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
VALA_USE_DEPEND="vapigen"

inherit meson systemd vala user xdg

DESCRIPTION="A location information D-Bus service"
HOMEPAGE="https://gitlab.freedesktop.org/geoclue/geoclue/wikis/home"
SRC_URI="https://gitlab.freedesktop.org/geoclue/${PN}/-/archive/${PV}/${P}.tar.bz2"

LICENSE="LGPL-2.1+ GPL-2+"
SLOT="2.0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
IUSE="+introspection gtk-doc modemmanager vala zeroconf"
REQUIRED_USE="vala? ( introspection )"

DEPEND="
>=dev-libs/glib-2.44:2
>=dev-libs/json-glib-0.14.0
>=net-libs/libsoup-2.42.0:2.4
introspection? ( >=dev-libs/gobject-introspection-1.54:= )
modemmanager? ( >=net-misc/modemmanager-1.6 )
zeroconf? ( >=net-dns/avahi-0.6.10[dbus] )
x11-libs/libnotify
"
RDEPEND="${DEPEND}
sys-apps/dbus
"
BDEPEND="
dev-util/gdbus-codegen
dev-util/glib-utils
gtk-doc? (
app-text/docbook-xml-dtd:4.1.2
>=dev-util/gtk-doc-1 )
>=sys-devel/gettext-0.19.8
virtual/pkgconfig
vala? ( $(vala_depend) )
"

PATCHES=(
"${FILESDIR}"/${PV}-optional-vapi.patch
)

src_prepare() {
xdg_src_prepare
use vala && vala_src_prepare
}

src_configure() {
local emesonargs=(
-Dlibgeoclue=true
$(meson_use introspection)
$(meson_use vala vapi)
$(meson_use gtk-doc)
$(meson_use modemmanager 3g-source)
$(meson_use modemmanager cdma-source)
$(meson_use modemmanager modem-gps-source)
$(meson_use zeroconf nmea-source)
-Denable-backend=true
-Ddemo-agent=true
-Dsystemd-system-unit-dir="$(systemd_get_systemunitdir)"
-Ddbus-srv-user=geoclue
)
meson_src_configure
}

pkg_preinst() {
enewgroup geoclue
enewuser geoclue -1 -1 /var/lib/geoclue geoclue
}
5 changes: 0 additions & 5 deletions profiles/package.mask
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,6 @@ sci-biology/vaal
# Bug #664708, #685924
sci-biology/allpathslg

# Sobhan Mohammadpour <[email protected]> (2019-06-19)
# this is new and it needs testing
>=app-misc/geoclue-2.5.3
=sys-apps/xdg-desktop-portal-1.4.2

# Georgy Yakovlev <[email protected]> (2019-06-17)
# this is now provided by dev-lang/rust{-bin}[rustfmt]
# it's tightly integrated with rust toolchain, eselect-rust
Expand Down

0 comments on commit e6e1c2c

Please sign in to comment.