mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-12 23:00:10 +02:00
95 lines
2.2 KiB
Bash
95 lines
2.2 KiB
Bash
SUMMARY="A library that provides generic access to USB devices"
|
||
DESCRIPTION="libusb is meant to facilitate the communication with USB hardware.
|
||
|
||
- portable: Using a single cross-platform API, it provides access to USB \
|
||
devices on Linux, OS X, Windows and OpenBSD.
|
||
- user-mode: No special privilege or elevation is required for the \
|
||
application to communicate with a device.
|
||
- version-agnostic: All versions of the USB protocol, from 1.0 to 3.0 \
|
||
(latest), are supported."
|
||
HOMEPAGE="https://libusb.info/"
|
||
COPYRIGHT="2001 Johannes Erdfelt
|
||
2007-2009 Daniel Drake
|
||
2010-2012 Peter Stuge
|
||
2008-2016 Nathan Hjelm
|
||
2009-2013 Pete Batard
|
||
2009-2013 Ludovic Rousseau
|
||
2010-2012 Michael Plante
|
||
2011-2013 Hans de Goede
|
||
2012-2013 Martin Pieuchot
|
||
2012-2013 Toby Gray
|
||
2013-2018 Chris Dickens"
|
||
LICENSE="GNU LGPL v2.1"
|
||
REVISION="4"
|
||
SOURCE_URI="https://github.com/libusb/libusb/archive/v$portVersion.tar.gz"
|
||
CHECKSUM_SHA256="3500f7b182750cd9ccf9be8b1df998f83df56a39ab264976bdb3307773e16f48"
|
||
SOURCE_FILENAME="libusb-$portVersion.tar.gz"
|
||
PATCHES="libusb-$portVersion.patchset"
|
||
|
||
ARCHITECTURES="x86 x86_64 x86_gcc2"
|
||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||
|
||
libVersion="0.1.0"
|
||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||
portVers="${portVersion%.*}"
|
||
|
||
PROVIDES="
|
||
libusb$secondaryArchSuffix = $portVersion
|
||
lib:libusb_$portVers$secondaryArchSuffix = $libVersionCompat
|
||
"
|
||
REQUIRES="
|
||
haiku$secondaryArchSuffix
|
||
"
|
||
|
||
PROVIDES_devel="
|
||
libusb${secondaryArchSuffix}_devel = $portVersion
|
||
devel:libusb_$portVers$secondaryArchSuffix = $libVersionCompat
|
||
"
|
||
REQUIRES_devel="
|
||
libusb$secondaryArchSuffix == $portVersion base
|
||
"
|
||
|
||
BUILD_REQUIRES="
|
||
haiku${secondaryArchSuffix}_devel
|
||
"
|
||
BUILD_PREREQUIRES="
|
||
cmd:autoconf
|
||
cmd:automake
|
||
cmd:find
|
||
cmd:gcc$secondaryArchSuffix
|
||
cmd:ld$secondaryArchSuffix
|
||
cmd:libtoolize$secondaryArchSuffix
|
||
cmd:make
|
||
cmd:sed
|
||
"
|
||
|
||
defineDebugInfoPackage libusb$secondaryArchSuffix \
|
||
"$libDir"/libusb-$portVers.so.$libVersion
|
||
|
||
BUILD()
|
||
{
|
||
sh bootstrap.sh
|
||
runConfigure ./configure
|
||
# multiple jobs are not reliable
|
||
make
|
||
}
|
||
|
||
INSTALL()
|
||
{
|
||
make install
|
||
rm -f "$libDir"/libusb-$portVers.la
|
||
|
||
# set up the develop directory correctly
|
||
prepareInstalledDevelLib libusb-$portVers
|
||
fixPkgconfig
|
||
|
||
# devel package
|
||
packageEntries devel \
|
||
$developDir
|
||
}
|
||
|
||
TEST()
|
||
{
|
||
make check
|
||
}
|