pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/libusb1 devel/libusb1: needs -lrt on RHEL 6



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f57473b558ff
branches:  trunk
changeset: 335545:f57473b558ff
user:      sjmulder <sjmulder%pkgsrc.org@localhost>
date:      Fri Jun 21 16:58:23 2019 +0000

description:
devel/libusb1: needs -lrt on RHEL 6

On glibc <2.17 clock_gettime() requires -lrt but the autoconf check was
broken. Patch the check until a new version is released.

diffstat:

 devel/libusb1/distinfo                   |   6 +-
 devel/libusb1/patches/patch-configure    |  71 ++++++++++++++++++++++++++++++-
 devel/libusb1/patches/patch-configure.ac |  20 +++++++-
 3 files changed, 86 insertions(+), 11 deletions(-)

diffs (135 lines):

diff -r e990d97ecc4b -r f57473b558ff devel/libusb1/distinfo
--- a/devel/libusb1/distinfo    Fri Jun 21 16:42:46 2019 +0000
+++ b/devel/libusb1/distinfo    Fri Jun 21 16:58:23 2019 +0000
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.9 2018/11/25 17:03:34 gdt Exp $
+$NetBSD: distinfo,v 1.10 2019/06/21 16:58:23 sjmulder Exp $
 
 SHA1 (libusb-1.0.22.tar.bz2) = 10116aa265aac4273a0c894faa089370262ec0dc
 RMD160 (libusb-1.0.22.tar.bz2) = 59b800abb0b4c088dbee950fa67bb31240b8a134
 SHA512 (libusb-1.0.22.tar.bz2) = 2a93ba48bb66b9775838c16d74f7269348d9bc163f94ccf2842d1108d95a41cf79f8c8065233bea410fb94261a462dbb08ecfa1a9b6d3ddf4a5980e6043f74f4
 Size (libusb-1.0.22.tar.bz2) = 598833 bytes
-SHA1 (patch-configure) = d6f020881db7ef798fc3f176b8e3f4fb2ab8e13b
-SHA1 (patch-configure.ac) = 0d338ad5ad1ac52e5e9b0622a4691a39c1f06c27
+SHA1 (patch-configure) = 2776ff354ea8f17663a9a5330f6fe990af27d8fe
+SHA1 (patch-configure.ac) = 9344b3d6439348164410d1b2071cf14c3f388354
 SHA1 (patch-libusb_os_sunos__usb.c) = 4896e497d451487a09b3be9ad74f72595a441086
diff -r e990d97ecc4b -r f57473b558ff devel/libusb1/patches/patch-configure
--- a/devel/libusb1/patches/patch-configure     Fri Jun 21 16:42:46 2019 +0000
+++ b/devel/libusb1/patches/patch-configure     Fri Jun 21 16:58:23 2019 +0000
@@ -1,10 +1,13 @@
-$NetBSD: patch-configure,v 1.6 2018/11/25 17:03:34 gdt Exp $
+$NetBSD: patch-configure,v 1.7 2019/06/21 16:58:23 sjmulder Exp $
 
 prepare DragonFlyBSD backend support
 
---- configure.orig     2018-03-25 01:20:03.000000000 +0000
-+++ configure
-@@ -16266,6 +16266,11 @@ $as_echo "OpenBSD" >&6; }
+Fix clock_gettime check
+https://github.com/libusb/libusb/pull/439
+
+--- configure.orig     2019-06-21 01:40:18.666466601 +0200
++++ configure  2019-06-21 01:40:50.766082708 +0200
+@@ -16266,6 +16266,11 @@
        backend=openbsd
        threads=posix
        ;;
@@ -16,3 +19,63 @@
  *-netbsd*)
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: NetBSD" >&5
  $as_echo "NetBSD" >&6; }
+@@ -16308,9 +16313,9 @@
+ $as_echo "#define OS_LINUX 1" >>confdefs.h
+ 
+ 
+-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime2" >&5
+-$as_echo_n "checking for library containing clock_gettime2... " >&6; }
+-if ${ac_cv_search_clock_gettime2+:} false; then :
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
++$as_echo_n "checking for library containing clock_gettime... " >&6; }
++if ${ac_cv_search_clock_gettime+:} false; then :
+   $as_echo_n "(cached) " >&6
+ else
+   ac_func_search_save_LIBS=$LIBS
+@@ -16323,11 +16328,11 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char clock_gettime2 ();
++char clock_gettime ();
+ int
+ main ()
+ {
+-return clock_gettime2 ();
++return clock_gettime ();
+   ;
+   return 0;
+ }
+@@ -16340,25 +16345,25 @@
+     LIBS="-l$ac_lib -pthread $ac_func_search_save_LIBS"
+   fi
+   if ac_fn_c_try_link "$LINENO"; then :
+-  ac_cv_search_clock_gettime2=$ac_res
++  ac_cv_search_clock_gettime=$ac_res
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+     conftest$ac_exeext
+-  if ${ac_cv_search_clock_gettime2+:} false; then :
++  if ${ac_cv_search_clock_gettime+:} false; then :
+   break
+ fi
+ done
+-if ${ac_cv_search_clock_gettime2+:} false; then :
++if ${ac_cv_search_clock_gettime+:} false; then :
+ 
+ else
+-  ac_cv_search_clock_gettime2=no
++  ac_cv_search_clock_gettime=no
+ fi
+ rm conftest.$ac_ext
+ LIBS=$ac_func_search_save_LIBS
+ fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime2" >&5
+-$as_echo "$ac_cv_search_clock_gettime2" >&6; }
+-ac_res=$ac_cv_search_clock_gettime2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
++$as_echo "$ac_cv_search_clock_gettime" >&6; }
++ac_res=$ac_cv_search_clock_gettime
+ if test "$ac_res" != no; then :
+   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ 
diff -r e990d97ecc4b -r f57473b558ff devel/libusb1/patches/patch-configure.ac
--- a/devel/libusb1/patches/patch-configure.ac  Fri Jun 21 16:42:46 2019 +0000
+++ b/devel/libusb1/patches/patch-configure.ac  Fri Jun 21 16:58:23 2019 +0000
@@ -1,10 +1,13 @@
-$NetBSD: patch-configure.ac,v 1.6 2018/11/25 17:03:34 gdt Exp $
+$NetBSD: patch-configure.ac,v 1.7 2019/06/21 16:58:23 sjmulder Exp $
 
 prepare DragonFlyBSD support
 
---- configure.ac.orig  2018-03-17 07:23:37.000000000 +0000
-+++ configure.ac
-@@ -72,6 +72,10 @@ case $host in
+Fix clock_gettime check
+https://github.com/libusb/libusb/pull/439
+
+--- configure.ac.orig  2019-06-21 01:40:25.914379944 +0200
++++ configure.ac       2019-06-21 01:40:52.394063231 +0200
+@@ -72,6 +72,10 @@
        backend=openbsd
        threads=posix
        ;;
@@ -15,3 +18,12 @@
  *-netbsd*)
        AC_MSG_RESULT([NetBSD])
        backend=netbsd
+@@ -107,7 +111,7 @@
+ linux)
+       AC_DEFINE(OS_LINUX, 1, [Linux backend])
+       AC_SUBST(OS_LINUX)
+-      AC_SEARCH_LIBS([clock_gettime2], [rt], [], [], [-pthread])
++      AC_SEARCH_LIBS([clock_gettime], [rt], [], [], [-pthread])
+       AC_ARG_ENABLE([udev],
+               [AC_HELP_STRING([--enable-udev], [use udev for device enumeration and hotplug support (recommended) [default=yes]])],
+               [], [enable_udev=yes])



Home | Main Index | Thread Index | Old Index