libgusb, new recipe (#8506)

This commit is contained in:
Schrijvers Luc
2023-04-24 15:44:11 +02:00
committed by GitHub
parent 166f874cb4
commit 7bf431a0a3

View File

@@ -0,0 +1,85 @@
SUMMARY="Glib wrapper around libusb1"
DESCRIPTION="GUsb is a GObject wrapper for libusb1 that makes it easy to do asynchronous \
control, bulk and interrupt transfers with proper cancellation and integration into a mainloop.
This makes it easy to integrate low level USB transfers with your high-level application or \
system daemon."
HOMEPAGE="https://github.com/hughsie/libgusb"
COPYRIGHT="2023 Richard Hughes"
LICENSE="GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="$HOMEPAGE/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="74e492fc3eda2caf7ed0a0e472c83e49e3c9c063f9729e965b79addcbd387c64"
SOURCE_FILENAME="libgusb-$portVersion.tar.gz"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="2.0.10"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
libgusb$secondaryArchSuffix = $portVersion
cmd:gusbcmd$secondaryArchSuffix
lib:libgusb$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libgio_2.0$secondaryArchSuffix
lib:libgirepository_1.0$secondaryArchSuffix
lib:libjson_glib_1.0$secondaryArchSuffix
lib:libusb_1.0$secondaryArchSuffix
"
PROVIDES_devel="
libgusb${secondaryArchSuffix}_devel = $portVersion
devel:libgusb$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
libgusb$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libgio_2.0$secondaryArchSuffix
devel:libgirepository_1.0$secondaryArchSuffix
devel:libjson_glib_1.0$secondaryArchSuffix
devel:libusb_1.0$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:diff
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:meson
cmd:ninja
cmd:pkg_config$secondaryArchSuffix
cmd:python3
cmd:vapigen
"
BUILD()
{
meson build --buildtype=release \
--prefix=$prefix \
--bindir=$binDir \
--libdir=$libDir \
--includedir=$includeDir \
-Ddocs=false
ninja -C build $jobArgs
}
INSTALL()
{
ninja -C build install
prepareInstalledDevelLib libgusb
fixPkgconfig
packageEntries devel \
$developDir
}
TEST()
{
ninja -C build test
}