From 322e5438d328cec068335735a492ee7d96d04055 Mon Sep 17 00:00:00 2001 From: jbeich Date: Thu, 5 Jan 2017 22:58:02 +0000 Subject: Assume "pkg-config libusb*" works after 9.x EOL FreeBSD appears to use different pkg-config name for 0.1.x API but it doesn't matter much as 0.1, 1.0 and 2.0 share CFLAGS/LIBS. --- emulators/qemu-devel/Makefile | 1 + emulators/qemu-devel/files/patch-configure | 26 -------------------------- emulators/qemu/Makefile | 1 + emulators/qemu/files/patch-configure | 26 -------------------------- 4 files changed, 2 insertions(+), 52 deletions(-) (limited to 'emulators') diff --git a/emulators/qemu-devel/Makefile b/emulators/qemu-devel/Makefile index e0fc0971b363..b576e1ecb91a 100644 --- a/emulators/qemu-devel/Makefile +++ b/emulators/qemu-devel/Makefile @@ -110,6 +110,7 @@ CONFIGURE_ARGS+= --sparc_cpu=v9 # but it shouldn't matter much post-patch: @${REINPLACE_CMD} -e '/LIBS/s|-lprocstat|-lprocstat -lelf|' \ + -e '/libusb/s/ --atleast-version=1\.0\.[0-9]*//' \ ${WRKSRC}/configure @${REINPLACE_CMD} -e '/libs_qga=/s|glib_libs|glib_libs -lintl|' ${WRKSRC}/configure @${REINPLACE_CMD} -E \ diff --git a/emulators/qemu-devel/files/patch-configure b/emulators/qemu-devel/files/patch-configure index 40a964f3df4e..c01324559867 100644 --- a/emulators/qemu-devel/files/patch-configure +++ b/emulators/qemu-devel/files/patch-configure @@ -130,32 +130,6 @@ fi # Search for bswap_32 function -@@ -3992,6 +4045,17 @@ fi - - # check for libusb - if test "$libusb" != "no" ; then -+ cat > $TMPC << EOF -+#include -+ -+int main(void) { return libusb_get_port_path(NULL, NULL, NULL, 0); } -+EOF -+ if compile_prog "-Werror" "-lusb -pthread" ; then -+ libusb="yes" -+ libusb_cflags="" -+ libusb_libs=-lusb -+ libs_softmmu="$libs_softmmu $libusb_libs" -+ else - if $pkg_config --atleast-version=1.0.13 libusb-1.0; then - libusb="yes" - libusb_cflags=$($pkg_config --cflags libusb-1.0) -@@ -4004,6 +4068,7 @@ if test "$libusb" != "no" ; then - fi - libusb="no" - fi -+ fi - fi - - # check for usbredirparser for usb network redirection support @@ -4769,6 +4834,7 @@ echo "Audio drivers $audio_drv_list" echo "Block whitelist (rw) $block_drv_rw_whitelist" echo "Block whitelist (ro) $block_drv_ro_whitelist" diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile index 75bbb759ec5e..b9bd546f803c 100644 --- a/emulators/qemu/Makefile +++ b/emulators/qemu/Makefile @@ -111,6 +111,7 @@ CONFIGURE_ARGS+= --sparc_cpu=v9 # but it shouldn't matter much post-patch: @${REINPLACE_CMD} -e '/LIBS/s|-lprocstat|-lprocstat -lelf|' \ + -e '/libusb/s/ --atleast-version=1\.0\.[0-9]*//' \ ${WRKSRC}/configure @${REINPLACE_CMD} -e '/libs_qga=/s|glib_libs|glib_libs -lintl|' ${WRKSRC}/configure @${REINPLACE_CMD} -E \ diff --git a/emulators/qemu/files/patch-configure b/emulators/qemu/files/patch-configure index 40a964f3df4e..c01324559867 100644 --- a/emulators/qemu/files/patch-configure +++ b/emulators/qemu/files/patch-configure @@ -130,32 +130,6 @@ fi # Search for bswap_32 function -@@ -3992,6 +4045,17 @@ fi - - # check for libusb - if test "$libusb" != "no" ; then -+ cat > $TMPC << EOF -+#include -+ -+int main(void) { return libusb_get_port_path(NULL, NULL, NULL, 0); } -+EOF -+ if compile_prog "-Werror" "-lusb -pthread" ; then -+ libusb="yes" -+ libusb_cflags="" -+ libusb_libs=-lusb -+ libs_softmmu="$libs_softmmu $libusb_libs" -+ else - if $pkg_config --atleast-version=1.0.13 libusb-1.0; then - libusb="yes" - libusb_cflags=$($pkg_config --cflags libusb-1.0) -@@ -4004,6 +4068,7 @@ if test "$libusb" != "no" ; then - fi - libusb="no" - fi -+ fi - fi - - # check for usbredirparser for usb network redirection support @@ -4769,6 +4834,7 @@ echo "Audio drivers $audio_drv_list" echo "Block whitelist (rw) $block_drv_rw_whitelist" echo "Block whitelist (ro) $block_drv_ro_whitelist" -- cgit