pkgsrc-WIP-changes archive

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

(ham/wsjtx) configure is not generated from *.ac, so patching it, but fails now



Module Name:	pkgsrc-wip
Committed By:	Makoto Fujiwara (mef) <makoto%ki.nu@localhost>
Pushed By:	mef
Date:		Sat Mar 27 14:48:20 2021 +0900
Changeset:	27994712e5d283d739feeed4246c37019c0e9d22

Modified Files:
	wsjtx/Makefile
	wsjtx/TODO
	wsjtx/distinfo
	wsjtx/patches/patch-hamlib.patch

Log Message:
(ham/wsjtx) configure is not generated from *.ac, so patching it, but fails now

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=27994712e5d283d739feeed4246c37019c0e9d22

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 wsjtx/Makefile                   | 12 ++++++++----
 wsjtx/TODO                       | 35 ++++++++++++++++++++++++++++++++++-
 wsjtx/distinfo                   |  2 +-
 wsjtx/patches/patch-hamlib.patch | 30 +++++++++++++++++++++++-------
 4 files changed, 66 insertions(+), 13 deletions(-)

diffs:
diff --git a/wsjtx/Makefile b/wsjtx/Makefile
index 0b669314ea..038ef518f0 100644
--- a/wsjtx/Makefile
+++ b/wsjtx/Makefile
@@ -22,10 +22,14 @@ CMAKE_ARGS+=	-D CMAKE_INSTALL_PREFIX=${DESTDIR}${PREFIX}
 CMAKE_ARGS+=	-DWSJT_SKIP_MANPAGES=ON
 CMAKE_ARGS+=	-DCMAKE_PREFIX_PATH=${PREFIX}/qt5
 CMAKE_ARGS+=	-DWSJT_GENERATE_DOCS=OFF
-CMAKE_ARGS+=	-DLDFLAGS='-L${PREFIX}/lib -lusb-1.0'
-CMAKE_ARGS+=	-DLDFLAGS=-Wl,-rpath-link=-L${PREFIX}/lib -lusb-1.0
-
-LDFLAGS+=	${COMPILER_RPATH_FLAG}=-L${PREFIX}/lib -lusb-1.0
+CMAKE_ARGS+=	-DLDFLAGS='-lusb-1.0 -L${PREFIX}/lib'
+CMAKE_ARGS+=	-DLDFLAGS=-'Wl,-rpath-link=-lusb-1.0 -L${PREFIX}/lib'
+CMAKE_ARGS+=	-DLIBUSB_CFLAGS='-I ${PREFIX}/include/libusb-1.0 -lusb-1.0 -L${PREFIX}/lib'
+CMAKE_ARGS+=	-DLIBUSB_LIBS=-Wl,-rpath-link=-lusb-1.0 -L${PREFIX}/lib
+CMAKE_ARGS+=	-DLIBS=-Wl,-rpath-link=-lusb-1.0 -L${PREFIX}/lib
+
+LIBUSB_CFLAGS+=	-lusb-1.0 -L${PREFIX}/lib
+LDFLAGS+=	${COMPILER_RPATH_FLAG}=-lusb-1.0 -L${PREFIX}/lib 
 #DFLAGS+=	--rpath,-Wl=-lusb-1.0
 #MAKE_ENV+=	LIBUSB_FLAGS='-L${PREFIX}/lib -lusb-1.0'
 
diff --git a/wsjtx/TODO b/wsjtx/TODO
index bcdcc6f6c1..45a2dc077b 100644
--- a/wsjtx/TODO
+++ b/wsjtx/TODO
@@ -19,4 +19,37 @@ configure:19335: gcc -o conftest -g -O2 -fPIC -fdata-sections -ffunction-section
 ld: cannot find -lusb-1.0
 configure:19335: $? = 1
 configure: failed program was:
-k
+
+'configure' line where the problem exists
+  19304 LIBUSB=""
+  19305
+  19306
+  19307
+  19308 if test x"${cf_with_libusb}" = "xyes"; then :
+  19309   if test -z $LIBUSB_LIBS; then :
+  19310   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb_init in -lusb-1.0" >&5
+  19311 $as_echo_n "checking for libusb_init in -lusb-1.0... " >&6; }
+  19312 if ${ac_cv_lib_usb_1_0_libusb_init+:} false; then :
+  19313   $as_echo_n "(cached) " >&6
+  19314 else
+  19315   ac_check_lib_save_LIBS=$LIBS
+
+from configure.ac:
+    318 dnl Check for libusb, treat LIBUSB_LIBS and LIBUSB_CFLAGS as precious variables
+    319 AC_MSG_CHECKING([whether to build USB dependent backends])
+    320 AC_ARG_WITH([libusb],
+    321     [AS_HELP_STRING([--without-libusb],
+    322         [disable USB dependent backends @<:@default=yes@:>@])],
+    323         [cf_with_libusb=no],
+    324         [cf_with_libusb=yes]  
+    325     )
+    326 
+    327 AC_MSG_RESULT([$cf_with_libusb])
+    328
+    329 LIBUSB=""
+    330 AC_ARG_VAR([LIBUSB_CFLAGS], [C compiler flags for libusb, overriding configure defaults])
+    331 AC_ARG_VAR([LIBUSB_LIBS], [linker flags for libusb, overriding configure check (useful for specifying static libusb-1.0.a (see INSTALL))])
+    332
+    333 AS_IF([test x"${cf_with_libusb}" = "xyes"],
+
+
diff --git a/wsjtx/distinfo b/wsjtx/distinfo
index 9f40d99f24..c0c57b20c0 100644
--- a/wsjtx/distinfo
+++ b/wsjtx/distinfo
@@ -4,4 +4,4 @@ SHA1 (wsjtx-2.3.0.tgz) = 2caae6d1b74d31cd7f6bc507dd15f8cfd17c2ffb
 RMD160 (wsjtx-2.3.0.tgz) = 9f5dc6c80551e4a70f90671b8d5be7b070e41916
 SHA512 (wsjtx-2.3.0.tgz) = 1b521a7c81d235b2f17b2a314528f5f9fc8b29de95a2f7f5471104866ff13d138f9913666bc00de71f34ed16e692f0f4b93c878cc3538d30a52852e4c179702c
 Size (wsjtx-2.3.0.tgz) = 17245200 bytes
-SHA1 (patch-hamlib.patch) = 36920e05f2f95532a3c572eac23f00ae0f4edc89
+SHA1 (patch-hamlib.patch) = 1a21d91fbb1ab31ba511fa5fb084d78e78cb55d3
diff --git a/wsjtx/patches/patch-hamlib.patch b/wsjtx/patches/patch-hamlib.patch
index 56541ee66c..c705b42015 100644
--- a/wsjtx/patches/patch-hamlib.patch
+++ b/wsjtx/patches/patch-hamlib.patch
@@ -2,9 +2,9 @@ $NetBSD$
 
 patch PREFIX inside patch
 
---- /dev/null	2021-03-27 00:10:09.428068469 +0900
-+++ hamlib.patch	2021-03-27 00:10:47.690107720 +0900
-@@ -0,0 +1,41 @@
+--- /dev/null	2021-03-27 14:25:58.185030027 +0900
++++ hamlib.patch 2021-03-27 14:26:58.703680417 +0900
+@@ -0,0 +1,57 @@
 +--- hamlib-prefix/src/hamlib/hamlib.pc.in.orig	2021-02-01 21:35:36.000000000 +0900
 ++++ hamlib/hamlib.pc.in	2021-03-21 21:07:31.473290128 +0900
 +@@ -9,5 +9,5 @@ URL: @PACKAGE_URL@
@@ -18,31 +18,47 @@ patch PREFIX inside patch
 +
 +--- hamlib/configure.ac.orig	2021-02-01 21:35:36.000000000 +0900
 ++++ hamlib/configure.ac	2021-03-27 00:00:57.899444006 +0900
-+@@ -278,6 +278,11 @@ AS_CASE(["$host_os"],
++@@ -278,6 +278,14 @@ AS_CASE(["$host_os"],
 + 	AM_LDFLAGS="${AM_LDFLAGS} -L/usr/local/lib"
 + 	AC_SUBST([AM_LDFLAGS])],
 + 
 ++    [netbsd*], [
 ++       AM_CPPFLAGS="-I@PREFIX@/include ${AM_CPPFLAGS} -L@PREFIX@/lib -lusb-1.0 ${AM_CPPFLAGS}"
 ++       AM_LDFLAGS="-L@PREFIX@/lib -lusb-1.0 ${AM_LDFLAGS}"
+++       LIBUSB_CFLAGS="-I@PREFIX@/include ${AM_CPPFLAGS} -L@PREFIX@/lib -lusb-1.0 ${AM_CPPFLAGS}"
+++       LIBUSB_LIBS="-L@PREFIX@/lib -lusb-1.0 ${AM_LDFLAGS}"
+++       LIBS="-L@PREFIX@/lib -lusb-1.0 ${AM_LDFLAGS}"
 ++       AC_SUBST([AM_LDFLAGS])],
 ++
 +     [darwin* | rhapsody*], [
 + 	# Tell the OS X linker to allocate enough space inside the
 + 	# libhamlib.X.dylib shared object for install_name_tool(1) to
-+@@ -321,13 +326,13 @@ AC_ARG_WITH([libusb],
++@@ -321,16 +325,16 @@ AC_ARG_WITH([libusb],
 + 
 + AC_MSG_RESULT([$cf_with_libusb])
 + 
 +-LIBUSB=""
 ++LIBUSB="-L@PREFIX@/lib -lusb-1.0"
+++LIBS="-L@PREFIX@/lib -lusb-1.0"
 + AC_ARG_VAR([LIBUSB_CFLAGS], [C compiler flags for libusb, overriding configure defaults])
 + AC_ARG_VAR([LIBUSB_LIBS], [linker flags for libusb, overriding configure check (useful for specifying static libusb-1.0.a (see INSTALL))])
 + 
 + AS_IF([test x"${cf_with_libusb}" = "xyes"],
 +     [AS_IF([test -z $LIBUSB_LIBS],
 +-	[AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBUSB_LIBS="-lusb-1.0"],
-++	[AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBUSB_LIBS="-lusb-1.0 @PREFIX@/lib"],
+++	[AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBUSB_LIBS="-lusb-1.0 -L@PREFIX@/lib"],
 + 	    [AC_MSG_WARN([libusb_init was not found in libusb-1.0--USB backends will be disabled])])
 + 	], [cf_with_libusb="yes"])
-+ 
++
++
++--- hamlib/configure.orig	2021-02-01 21:35:58.000000000 +0900
+++++ hamlib/configure	2021-03-27 14:11:34.897938353 +0900
++@@ -19344,7 +19344,7 @@ fi
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_usb_1_0_libusb_init" >&5
++ $as_echo "$ac_cv_lib_usb_1_0_libusb_init" >&6; }
++ if test "x$ac_cv_lib_usb_1_0_libusb_init" = xyes; then :
++-  LIBUSB_LIBS="-lusb-1.0"
+++  LIBUSB_LIBS="-lusb-1.0 -L@PREFIX@lib"
++ else
++   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libusb_init was not found in libusb-1.0--USB backends will be disabled" >&5
++ $as_echo "$as_me: WARNING: libusb_init was not found in libusb-1.0--USB backends will be disabled" >&2;}


Home | Main Index | Thread Index | Old Index