Merge branch 'feature/libusb'

This commit is contained in:
Ricardo Martins 2015-09-28 10:54:10 +01:00
commit 0dc1c507f2
6 changed files with 15 additions and 33 deletions

View File

@ -1,6 +1,6 @@
version=\
(
'0.1.4'
'0.1.5'
)
url=\
@ -10,7 +10,7 @@ url=\
md5=\
(
'2ca521fffadd0c28fdf174e6ec73865b'
'2780b6a758a1e2c2943bdbf7faf740e4'
)
maintainer=\
@ -20,7 +20,7 @@ maintainer=\
requires=\
(
'libusbx/default'
'libusb/default'
)
post_unpack()

View File

@ -1,18 +0,0 @@
diff -Nru libusb-compat-0.1.4/libusb/core.c libusb-compat-0.1.4.rasm/libusb/core.c
--- libusb-compat-0.1.4/libusb/core.c 2012-04-24 06:37:34.000000000 +0100
+++ libusb-compat-0.1.4.rasm/libusb/core.c 2012-08-07 01:45:40.251527822 +0100
@@ -32,12 +32,14 @@
static libusb_context *ctx = NULL;
static int usb_debug = 0;
+#if 0
enum usbi_log_level {
LOG_LEVEL_DEBUG,
LOG_LEVEL_INFO,
LOG_LEVEL_WARNING,
LOG_LEVEL_ERROR,
};
+#endif
#ifdef ENABLE_LOGGING
#define _usbi_log(level, fmt...) usbi_log(level, __FUNCTION__, fmt)

View File

@ -1,32 +1,33 @@
version=\
(
'1.0.12'
'1.0.20'
)
url=\
(
"http://downloads.sourceforge.net/libusbx/libusbx-$version.tar.bz2"
"http://downloads.sourceforge.net/libusb/libusb-$version.tar.bz2"
)
md5=\
(
'c41352ac755c7992edfcbb2ea4ad1349'
'1d4eb194eaaa2bcfbba28102768c7dbf'
)
maintainer=\
(
'Ricardo Martins <rasm@fe.up.pt>'
'Ricardo Martins <rasm@oceanscan-mst.com>'
)
configure()
{
export PKG_CONFIG="${cfg_dir_toolchain}/bin/pkg-config"
export PKG_CONFIG_PATH="$cfg_dir_toolchain_sysroot/usr/lib/pkgconfig"
"../libusbx-$version/configure" \
"../libusb-$version/configure" \
--prefix="$cfg_dir_toolchain_sysroot/usr" \
--target="$cfg_target_canonical" \
--host="$cfg_target_canonical" \
--build="$cfg_host_canonical" \
--disable-udev \
--disable-static \
--enable-shared
}

View File

@ -15,7 +15,7 @@ md5=\
requires=\
(
'libusbx'
'libusb'
'libusb-compat'
)
@ -48,7 +48,7 @@ host_install()
target_install()
{
# Libs:
# Libs:
for f in "$cfg_dir_toolchain_sysroot/usr/lib/"librtlsdr*.so*; do
if [ -L "$f" ]; then
$cmd_cp "$f" "$cfg_dir_rootfs/usr/lib"
@ -57,7 +57,7 @@ target_install()
fi
done
# Bins:
# Bins:
for f in "$cfg_dir_toolchain_sysroot/usr/bin/"rtl_*; do
if [ -L "$f" ]; then
$cmd_cp "$f" "$cfg_dir_rootfs/usr/bin"
@ -69,4 +69,3 @@ target_install()
}

View File

@ -20,7 +20,7 @@ maintainer=\
requires=\
(
'libusbx/default'
'libusb/default'
)
configure()
@ -46,7 +46,7 @@ host_install()
export PKG_CONFIG="${cfg_dir_toolchain}/bin/pkg-config"
export PKG_CONFIG_PATH="$cfg_dir_toolchain_sysroot/usr/lib/pkgconfig"
$cmd_make prefix="$cfg_dir_toolchain_sysroot/usr" install &&
( test -e "${cfg_dir_toolchain_sysroot}/usr/share/pkgconfig/usbutils.pc" && mv "${cfg_dir_toolchain_sysroot}/usr/share/pkgconfig/usbutils.pc" ${PKG_CONFIG_PATH} )
( test -e "${cfg_dir_toolchain_sysroot}/usr/share/pkgconfig/usbutils.pc" && mv "${cfg_dir_toolchain_sysroot}/usr/share/pkgconfig/usbutils.pc" ${PKG_CONFIG_PATH} )
rmdir --ignore-fail-on-non-empty "${cfg_dir_toolchain_sysroot}/usr/share/pkgconfig"
}

View File

@ -20,7 +20,7 @@ maintainer=\
requires=\
(
'libusbx/default'
'libusb/default'
)
build()