--- hamlib/configure.orig 2022-01-02 05:10:19.000000000 -0500 +++ hamlib/configure 2023-09-03 10:33:52.838742000 -0400 @@ -19135,7 +19135,7 @@ case "$host_os" in #( freebsd*) : - AM_CPPFLAGS="-I/usr/local/include ${AM_CPPFLAGS}" + AM_CPPFLAGS="${AM_CPPFLAGS} -I/usr/local/include" AM_LDFLAGS="${AM_LDFLAGS} -L/usr/local/lib" ;; #( darwin* | rhapsody*) : @@ -19211,6 +19211,7 @@ fi +LIBUSB_LIBS="-lusb" LIBUSB="" --- hamlib/hamlib.pc.in.orig 2022-01-02 05:10:11.000000000 -0500 +++ hamlib/hamlib.pc.in 2023-09-03 10:33:52.839354000 -0400 @@ -7,7 +7,6 @@ Description: Library to control radio and rotator equipment. URL: @PACKAGE_URL@ Version: @PACKAGE_VERSION@ -Requires.private: @LIBUSB@ Cflags: -I${includedir} @PTHREAD_CFLAGS@ -Libs: -L${libdir} -lhamlib -Libs.private: @MATH_LIBS@ @DL_LIBS@ @NET_LIBS@ @PTHREAD_LIBS@ +Libs: -L${libdir} ${libdir}/libhamlib.a +Libs.private: @MATH_LIBS@ @DL_LIBS@ @NET_LIBS@ @PTHREAD_LIBS@ -lusb --- hamlib/tests/rigtestlibusb.c.orig 2022-01-02 05:10:11.000000000 -0500 +++ hamlib/tests/rigtestlibusb.c 2023-09-03 10:33:52.839923000 -0400 @@ -115,7 +115,10 @@ printf(" wSpeedSupported: %u\n", ss_usb_cap->wSpeedSupported); printf(" bFunctionalitySupport: %u\n", ss_usb_cap->bFunctionalitySupport); printf(" bU1devExitLat: %u\n", ss_usb_cap->bU1DevExitLat); - printf(" bU2devExitLat: %u\n", ss_usb_cap->bU2DevExitLat); +/* + * does not exist on FreeBSD libusb.h yet + * printf(" bU2devExitLat: %u\n", ss_usb_cap->bU2DevExitLat); + */ } static void print_bos(libusb_device_handle *handle) @@ -133,6 +136,7 @@ printf(" Binary Object Store (BOS):\n"); printf(" wTotalLength: %u\n", bos->wTotalLength); +#if 0 printf(" bNumDeviceCaps: %u\n", bos->bNumDeviceCaps); for (i = 0; i < bos->bNumDeviceCaps; i++) @@ -170,7 +174,7 @@ libusb_free_ss_usb_device_capability_descriptor(ss_dev_cap); } } - +#endif libusb_free_bos_descriptor(bos); } --- hamlib/src/misc.c.orig 2022-01-02 05:10:11.000000000 -0500 +++ hamlib/src/misc.c 2023-09-03 10:33:52.841041000 -0400 @@ -2550,7 +2550,8 @@ if (localtime) { mytm = localtime_r(&t, &result); - mytimezone = timezone; + /* For FreeBSD */ + mytimezone = mytm->tm_gmtoff; } else {