mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-30 01:12:58 +02:00
libgusb: re-cross
This commit is contained in:
parent
1f1d752bd4
commit
c9b2771519
2 changed files with 66 additions and 7 deletions
50
srcpkgs/libgusb/patches/add-gir.patch
Normal file
50
srcpkgs/libgusb/patches/add-gir.patch
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
Source: maxice8
|
||||||
|
Upstream: no but feel free to get it upstream where it should be
|
||||||
|
Reason: Conditionalize gobject intropection allowing cross compilation
|
||||||
|
|
||||||
|
Note that this isn't in upstreamable condition (missing checks for vapi depending on gir for example)
|
||||||
|
and considering it is gnome-tech it is very unlikely that it will ever get merged
|
||||||
|
--- gusb/meson.build
|
||||||
|
+++ gusb/meson.build
|
||||||
|
@@ -67,10 +67,17 @@ gusb = shared_library(
|
||||||
|
install : true
|
||||||
|
)
|
||||||
|
|
||||||
|
+deps = [ 'gio-2.0', 'libusb-1.0' ]
|
||||||
|
+
|
||||||
|
+with_gir = get_option('gir')
|
||||||
|
+if with_gir
|
||||||
|
+ deps += [ 'gobject-2.0' ]
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
pkgg = import('pkgconfig')
|
||||||
|
pkgg.generate(
|
||||||
|
libraries : gusb,
|
||||||
|
- requires : [ 'gio-2.0', 'gobject-2.0', 'libusb-1.0' ],
|
||||||
|
+ requires : deps,
|
||||||
|
subdirs : 'gusb-1',
|
||||||
|
version : meson.project_version(),
|
||||||
|
name : 'gusb',
|
||||||
|
@@ -78,6 +85,7 @@ pkgg.generate(
|
||||||
|
description : 'GUsb is a GLib binding for libusb1',
|
||||||
|
)
|
||||||
|
|
||||||
|
+if with_gir
|
||||||
|
libgusb_girtarget = gnome.generate_gir(gusb,
|
||||||
|
sources : [
|
||||||
|
gusb_version_h,
|
||||||
|
@@ -119,6 +127,7 @@ libgusb_girtarget = gnome.generate_gir(gusb,
|
||||||
|
)
|
||||||
|
libgusb_gir = libgusb_girtarget[0]
|
||||||
|
libgusb_typelib = libgusb_girtarget[1]
|
||||||
|
+endif
|
||||||
|
|
||||||
|
if get_option('vapi')
|
||||||
|
gnome.generate_vapi('gusb',
|
||||||
|
--- meson_options.txt
|
||||||
|
+++ meson_options.txt
|
||||||
|
@@ -2,3 +2,4 @@ option('tests', type : 'boolean', value : true, description : 'Build self tests'
|
||||||
|
option('vapi', type : 'boolean', value : true, description : 'Build VAPI')
|
||||||
|
option('usb_ids', type : 'string', value : '/usr/share/hwdata/usb.ids', description : 'Path to usb.ids file')
|
||||||
|
option('docs', type : 'boolean', value : true, description : 'Generate documentation')
|
||||||
|
+option('gir', type : 'boolean', value : true, description : 'Generate gobject introspection data')
|
|
@ -2,24 +2,33 @@
|
||||||
pkgname=libgusb
|
pkgname=libgusb
|
||||||
version=0.3.0
|
version=0.3.0
|
||||||
revision=1
|
revision=1
|
||||||
configure_args="-Ddocs=false"
|
|
||||||
build_style=meson
|
build_style=meson
|
||||||
hostmakedepends="pkg-config gobject-introspection vala"
|
configure_args="-Ddocs=false -Dgir=$(vopt_if gir true false)
|
||||||
makedepends="libglib-devel libusb-devel libgudev-devel vala-devel usbutils"
|
-Dvapi=$(vopt_if vala true false)"
|
||||||
|
hostmakedepends="pkg-config $(vopt_if gir gobject-introspection)
|
||||||
|
$(vopt_if vala vala)"
|
||||||
|
makedepends="libglib-devel libusb-devel libgudev-devel $(vopt_if vala vala-devel) usbutils"
|
||||||
short_desc="GLib wrapper around libusb1"
|
short_desc="GLib wrapper around libusb1"
|
||||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||||
homepage="https://gitorious.org/gusb/"
|
|
||||||
license="LGPL-2.1-or-later"
|
license="LGPL-2.1-or-later"
|
||||||
distfiles="http://people.freedesktop.org/~hughsient/releases/$pkgname-${version}.tar.xz"
|
homepage="https://gitorious.org/gusb/"
|
||||||
|
distfiles="http://people.freedesktop.org/~hughsient/releases/${pkgname}-${version}.tar.xz"
|
||||||
checksum=d8e7950f99b6ae4c3e9b8c65f3692b9635289e6cff8de40c4af41b2e9b348edc
|
checksum=d8e7950f99b6ae4c3e9b8c65f3692b9635289e6cff8de40c4af41b2e9b348edc
|
||||||
nocross="hard-depends on gobject-introspection"
|
|
||||||
|
build_options="gir vala"
|
||||||
|
desc_option_vala="Generate bindings for vala"
|
||||||
|
if [ -z "$CROSS_BUILD" ]; then
|
||||||
|
build_options_default="gir vala"
|
||||||
|
fi
|
||||||
|
|
||||||
libgusb-devel_package() {
|
libgusb-devel_package() {
|
||||||
depends="${makedepends} ${sourcepkg}-${version}_${revision}"
|
depends="${makedepends} ${sourcepkg}-${version}_${revision}"
|
||||||
short_desc+=" - development files"
|
short_desc+=" - development files"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
vmove usr/include
|
vmove usr/include
|
||||||
vmove usr/share
|
if [ "$build_options_gir" ]; then
|
||||||
|
vmove usr/share
|
||||||
|
fi
|
||||||
vmove usr/lib/pkgconfig
|
vmove usr/lib/pkgconfig
|
||||||
vmove "usr/lib/*.so"
|
vmove "usr/lib/*.so"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue