diff --git a/USER_MANUAL.md b/USER_MANUAL.md index a21631c6..184cfca1 100644 --- a/USER_MANUAL.md +++ b/USER_MANUAL.md @@ -908,6 +908,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes 3. Build system: * Allow overrriding the version tag when building. (PR #727) * Update wxWidgets to 3.2.6. (PR #748) + * Update Hamlib to 4.6. (PR #795) 4. Miscellaneous: * Add issue template for SW bugs. (PR #759) diff --git a/build_osx.sh b/build_osx.sh index 1c128782..4156ecfd 100755 --- a/build_osx.sh +++ b/build_osx.sh @@ -41,7 +41,7 @@ cd $FREEDVGUIDIR if [ ! -d hamlib-code ]; then git clone https://github.com/Hamlib/Hamlib.git hamlib-code fi -cd hamlib-code && git checkout 4.5.5 && git pull +cd hamlib-code && git checkout 4.6 && git pull ./bootstrap if [ $UNIV_BUILD == 1 ]; then CFLAGS="-g -O2 -mmacosx-version-min=10.9 -arch x86_64 -arch arm64" CXXFLAGS="-g -O2 -mmacosx-version-min=10.9 -arch x86_64 -arch arm64" ./configure --enable-shared --prefix $HAMLIBDIR diff --git a/cmake/BuildHamlib.cmake b/cmake/BuildHamlib.cmake index b9964a67..9e4958cf 100644 --- a/cmake/BuildHamlib.cmake +++ b/cmake/BuildHamlib.cmake @@ -16,7 +16,7 @@ endif(MINGW AND CMAKE_CROSSCOMPILING) include(ExternalProject) ExternalProject_Add(build_hamlib - URL https://github.com/Hamlib/Hamlib/archive/refs/heads/Hamlib-4.5.5.zip + URL https://github.com/Hamlib/Hamlib/archive/refs/tags/4.6.zip BUILD_IN_SOURCE 1 INSTALL_DIR external/dist PATCH_COMMAND ${HAMLIB_PATCH_CMD} diff --git a/cmake/GetDependencies.cmake.in b/cmake/GetDependencies.cmake.in index e08923f1..a9cbbc2f 100644 --- a/cmake/GetDependencies.cmake.in +++ b/cmake/GetDependencies.cmake.in @@ -94,6 +94,7 @@ set( _windlls OLEACC.dll msvcrt.dll bcrypt.dll + IPHLPAPI.DLL # The below are additional DLLs required when compiled # using the LLVM version of MinGW. diff --git a/cmake/hamlib-windows.patch b/cmake/hamlib-windows.patch index 276bdf2b..76636c1d 100644 --- a/cmake/hamlib-windows.patch +++ b/cmake/hamlib-windows.patch @@ -1,6 +1,19 @@ ---- hamlib-4.5.5/rigs/dummy/flrig.c 2023-04-05 05:31:23.000000000 -0700 -+++ build_hamlib/rigs/dummy/flrig.c 2023-05-18 18:59:19.584095384 -0700 -@@ -76,7 +76,7 @@ +diff -ur hamlib-4.6-orig/configure.ac hamlib-4.6/configure.ac +--- hamlib-4.6-orig/configure.ac 2024-12-24 00:55:54 ++++ hamlib-4.6/configure.ac 2025-01-05 15:42:44 +@@ -317,7 +317,7 @@ + + [mingw* | pw32* | cygwin*], [ + AM_CONDITIONAL([VERSIONDLL], true) +- WINLDFLAGS="-Wl,--output-def,libhamlib.def -Wl,--add-stdcall-alias" ++ WINLDFLAGS="-Wl,--output-def,libhamlib.def" + VERSIONDLL="version_dll.rc" + AC_SUBST([WINLDFLAGS]) + +diff -ur hamlib-4.6-orig/rigs/dummy/flrig.c hamlib-4.6/rigs/dummy/flrig.c +--- hamlib-4.6-orig/rigs/dummy/flrig.c 2024-12-24 00:55:54 ++++ hamlib-4.6/rigs/dummy/flrig.c 2025-01-05 15:42:59 +@@ -73,7 +73,7 @@ static int flrig_set_vfo(RIG *rig, vfo_t vfo); static int flrig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt); static int flrig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt); @@ -9,14 +22,3 @@ static int flrig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq); static int flrig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq); static int flrig_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, ---- hamlib-4.5.5/configure.ac 2023-04-05 05:31:23.000000000 -0700 -+++ build_hamlib/configure.ac 2023-05-18 19:11:32.454634661 -0700 -@@ -281,7 +281,7 @@ - AC_SUBST([OSXLDFLAGS])], - - [mingw* | pw32* | cygwin*], [ -- WINLDFLAGS="-Wl,--output-def,libhamlib.def -Wl,--add-stdcall-alias" -+ WINLDFLAGS="-Wl,--output-def,libhamlib.def" - AC_SUBST([WINLDFLAGS]) - - # Enable ld's "auto import" for executables