summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2019-10-20 15:12:09 +0300
committerMart Raudsepp <leio@gentoo.org>2019-10-20 20:38:06 +0300
commit1c30991e131bd6e3bf14580698cc931b94e996da (patch)
tree8fe3124f81ede382887703fc44749940983b741a /dev-libs/libmanette
parentgames-board/tali: bump to 3.32.1 (diff)
downloadgentoo-1c30991e131bd6e3bf14580698cc931b94e996da.tar.gz
gentoo-1c30991e131bd6e3bf14580698cc931b94e996da.tar.bz2
gentoo-1c30991e131bd6e3bf14580698cc931b94e996da.zip
dev-libs/libmanette: New package - a game controller library
Package-Manager: Portage-2.3.69, Repoman-2.3.12 Signed-off-by: Mart Raudsepp <leio@gentoo.org>
Diffstat (limited to 'dev-libs/libmanette')
-rw-r--r--dev-libs/libmanette/Manifest1
-rw-r--r--dev-libs/libmanette/files/0.2.3-optional-introspection-vapi.patch114
-rw-r--r--dev-libs/libmanette/libmanette-0.2.3.ebuild44
-rw-r--r--dev-libs/libmanette/metadata.xml8
4 files changed, 167 insertions, 0 deletions
diff --git a/dev-libs/libmanette/Manifest b/dev-libs/libmanette/Manifest
new file mode 100644
index 000000000000..09715d3fa9c4
--- /dev/null
+++ b/dev-libs/libmanette/Manifest
@@ -0,0 +1 @@
+DIST libmanette-0.2.3.tar.xz 33620 BLAKE2B ec811e0a939713e99eb931a2aa0c1b67a2de1fad4c4e399e47975b795da7672ab56a217cda94f4642f749aed1ff4379c67b58da349f8ac8434c95a80c7909980 SHA512 23d3feae3b0ba81deb75b0ff911eb37f3d0d767a0ae65815d34cadf69f78ca7f081177a2161105ea3979ba9222b3641e6b776bf4fcf3e46a9de716bdce475df6
diff --git a/dev-libs/libmanette/files/0.2.3-optional-introspection-vapi.patch b/dev-libs/libmanette/files/0.2.3-optional-introspection-vapi.patch
new file mode 100644
index 000000000000..15558b47be3d
--- /dev/null
+++ b/dev-libs/libmanette/files/0.2.3-optional-introspection-vapi.patch
@@ -0,0 +1,114 @@
+From b561bd29d8797ae2e72d45df8fc122164fc88b6c Mon Sep 17 00:00:00 2001
+From: Mart Raudsepp <leio@gentoo.org>
+Date: Sun, 20 Oct 2019 14:57:43 +0300
+Subject: [PATCH] build: Support disabling introspection and vapi generation
+
+---
+ meson_options.txt | 14 +++++++++++
+ src/meson.build | 64 ++++++++++++++++++++++++++---------------------
+ 2 files changed, 49 insertions(+), 29 deletions(-)
+
+diff --git a/meson_options.txt b/meson_options.txt
+index a7ce738..c794d4b 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -4,3 +4,17 @@ option (
+ description: 'Find devices via udev',
+ value: 'auto'
+ )
++
++option (
++ 'introspection',
++ type: 'boolean',
++ description: 'Generate introspection data (requires gobject-introspection)',
++ value: true
++)
++
++option (
++ 'vapi',
++ type: 'boolean',
++ description: 'Generate vapi data (requires vapigen and introspection option)',
++ value: true
++)
+diff --git a/src/meson.build b/src/meson.build
+index 7ac916b..50cad92 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -90,39 +90,45 @@ if gudev.found()
+ libmanette_gir_includes += [ 'GUdev-1.0' ]
+ endif
+
+-libmanette_gir = gnome.generate_gir(
+- libmanette_lib,
+- extra_args: libmanette_gir_args,
+- export_packages: libmanette_module,
+- sources: libmanette_headers + libmanette_sources,
+- nsversion: api_version,
+- namespace: 'Manette',
+- identifier_prefix: 'Manette',
+- includes: libmanette_gir_includes,
+- header: libmanette_main_header,
+- install: true,
+- symbol_prefix: 'manette',
+-)
+-
+-libmanette_vapi_packages = [
+- 'gobject-2.0',
+- 'gio-2.0',
+-]
+-
+-if gudev.found()
+- libmanette_vapi_packages += [ 'gudev-1.0' ]
++built_girs = []
++if get_option('introspection')
++ libmanette_gir = gnome.generate_gir(
++ libmanette_lib,
++ extra_args: libmanette_gir_args,
++ export_packages: libmanette_module,
++ sources: libmanette_headers + libmanette_sources,
++ nsversion: api_version,
++ namespace: 'Manette',
++ identifier_prefix: 'Manette',
++ includes: libmanette_gir_includes,
++ header: libmanette_main_header,
++ install: true,
++ symbol_prefix: 'manette',
++ )
++ built_girs += [ libmanette_gir ]
++
++ if get_option('vapi')
++ libmanette_vapi_packages = [
++ 'gobject-2.0',
++ 'gio-2.0',
++ ]
++
++ if gudev.found()
++ libmanette_vapi_packages += [ 'gudev-1.0' ]
++ endif
++
++ gnome.generate_vapi(
++ libmanette_module,
++ install: true,
++ packages: libmanette_vapi_packages,
++ sources: libmanette_gir[0],
++ )
++ endif
+ endif
+
+-gnome.generate_vapi(
+- libmanette_module,
+- install: true,
+- packages: libmanette_vapi_packages,
+- sources: libmanette_gir[0],
+-)
+-
+ libmanette_dep = declare_dependency(
+ link_with: libmanette_lib,
+- sources: libmanette_gir,
++ sources: built_girs,
+ include_directories: confinc,
+ dependencies: libmanette_deps,
+ )
+--
+2.20.1
+
diff --git a/dev-libs/libmanette/libmanette-0.2.3.ebuild b/dev-libs/libmanette/libmanette-0.2.3.ebuild
new file mode 100644
index 000000000000..d7f54324a441
--- /dev/null
+++ b/dev-libs/libmanette/libmanette-0.2.3.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit gnome.org gnome2-utils meson vala xdg
+
+DESCRIPTION="Simple GObject game controller library"
+HOMEPAGE="https://gitlab.gnome.org/aplazas/libmanette"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+introspection +udev +vala"
+REQUIRED_USE="vala? ( introspection )"
+
+RDEPEND="
+ >=dev-libs/glib-2.50:2
+ udev? ( dev-libs/libgudev )
+ dev-libs/libevdev
+ introspection? ( >=dev-libs/gobject-introspection-1.56:= )
+"
+DEPEND="${DEPEND}
+ vala? ( $(vala_depend) )
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ # https://gitlab.gnome.org/aplazas/libmanette/merge_requests/18
+ "${FILESDIR}"/${PV}-optional-introspection-vapi.patch
+)
+
+src_prepare() {
+ xdg_src_prepare
+ use vala && vala_src_prepare
+}
+
+src_configure() {
+ local emesonargs=(
+ $(meson_feature udev gudev)
+ $(meson_use introspection)
+ $(meson_use vala vapi)
+ )
+ meson_src_configure
+}
diff --git a/dev-libs/libmanette/metadata.xml b/dev-libs/libmanette/metadata.xml
new file mode 100644
index 000000000000..39980802b1da
--- /dev/null
+++ b/dev-libs/libmanette/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>gnome@gentoo.org</email>
+ <name>Gentoo GNOME Desktop</name>
+</maintainer>
+</pkgmetadata>