patch wsjt-x to use packaged hamlib, too

This commit is contained in:
Jakob Ketterl 2020-05-25 20:30:53 +02:00
parent d24abd436e
commit d2a4f2bc46
3 changed files with 95 additions and 1 deletions

View File

@ -1,9 +1,11 @@
FROM debian:buster-slim FROM debian:buster-slim
ADD docker/files/js8call/js8call-hamlib.patch / ADD docker/files/js8call/js8call-hamlib.patch /
ADD docker/files/wsjtx/*.patch /
ADD docker/scripts/install-dependencies.sh / ADD docker/scripts/install-dependencies.sh /
RUN /install-dependencies.sh && \ RUN /install-dependencies.sh && \
rm /install-dependencies.sh rm /install-dependencies.sh && \
rm /*.patch
ENTRYPOINT ["/init"] ENTRYPOINT ["/init"]

View File

@ -0,0 +1,43 @@
--- CMakeLists.txt 2020-05-25 19:26:41.423517236 +0200
+++ CMakeLists.txt 2020-05-25 19:11:36.116236231 +0200
@@ -79,24 +79,6 @@
include (ExternalProject)
-
-#
-# build and install hamlib locally so it can be referenced by the
-# WSJT-X build
-#
-ExternalProject_Add (hamlib
- GIT_REPOSITORY ${hamlib_repo}
- GIT_TAG ${hamlib_TAG}
- URL ${CMAKE_CURRENT_SOURCE_DIR}/src/hamlib.tgz
- URL_HASH MD5=${hamlib_md5sum}
- UPDATE_COMMAND ./bootstrap
- PATCH_COMMAND ${PATCH_EXECUTABLE} -p1 -N < ${CMAKE_CURRENT_SOURCE_DIR}/hamlib.patch
- CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --disable-shared --enable-static --without-cxx-binding ${EXTRA_FLAGS} # LIBUSB_LIBS=${USB_LIBRARY}
- BUILD_COMMAND $(MAKE) all V=1 # $(MAKE) is ExternalProject_Add() magic to do recursive make
- INSTALL_COMMAND $(MAKE) install-strip V=1 DESTDIR=""
- STEP_TARGETS update install
- )
-
#
# custom target to make a hamlib source tarball
#
@@ -128,7 +110,6 @@
# build and optionally install WSJT-X using the hamlib package built
# above
#
-ExternalProject_Get_Property (hamlib INSTALL_DIR)
ExternalProject_Add (wsjtx
GIT_REPOSITORY ${wsjtx_repo}
GIT_TAG ${WSJTX_TAG}
@@ -152,7 +133,6 @@
DEPENDEES build
)
-set_target_properties (hamlib PROPERTIES EXCLUDE_FROM_ALL 1)
set_target_properties (wsjtx PROPERTIES EXCLUDE_FROM_ALL 1)
add_dependencies (wsjtx-configure hamlib-install)

View File

@ -0,0 +1,49 @@
diff -ur js8call-2.1.1-orig/CMake/Modules/Findhamlib.cmake js8call-2.1.1/CMake/Modules/Findhamlib.cmake
--- js8call-2.1.1-orig/CMake/Modules/Findhamlib.cmake 2020-05-23 15:38:20.730349612 +0000
+++ js8call-2.1.1/CMake/Modules/Findhamlib.cmake 2020-05-23 15:39:28.829772207 +0000
@@ -85,4 +85,4 @@
# Handle the QUIETLY and REQUIRED arguments and set HAMLIB_FOUND to
# TRUE if all listed variables are TRUE
include (FindPackageHandleStandardArgs)
-find_package_handle_standard_args (hamlib DEFAULT_MSG hamlib_INCLUDE_DIRS hamlib_LIBRARIES hamlib_LIBRARY_DIRS)
+find_package_handle_standard_args (hamlib DEFAULT_MSG hamlib_INCLUDE_DIRS hamlib_LIBRARIES)
diff -ur js8call-2.1.1-orig/CMakeLists.txt js8call-2.1.1/CMakeLists.txt
--- js8call-2.1.1-orig/CMakeLists.txt 2020-05-23 15:38:20.730349612 +0000
+++ js8call-2.1.1/CMakeLists.txt 2020-05-23 15:52:46.103389553 +0000
@@ -869,7 +869,7 @@
#
# libhamlib setup
#
-set (hamlib_STATIC 1)
+set (hamlib_STATIC 0)
find_package (hamlib 3 REQUIRED)
find_program (RIGCTL_EXE rigctl)
find_program (RIGCTLD_EXE rigctld)
@@ -1471,27 +1404,6 @@
)
endif(WSJT_BUILD_UTILS)
-install (PROGRAMS
- ${RIGCTL_EXE}
- DESTINATION ${CMAKE_INSTALL_BINDIR}
- #COMPONENT runtime
- RENAME rigctl-wsjtx${CMAKE_EXECUTABLE_SUFFIX}
- )
-
-install (PROGRAMS
- ${RIGCTLD_EXE}
- DESTINATION ${CMAKE_INSTALL_BINDIR}
- #COMPONENT runtime
- RENAME rigctld-wsjtx${CMAKE_EXECUTABLE_SUFFIX}
- )
-
-install (PROGRAMS
- ${RIGCTLCOM_EXE}
- DESTINATION ${CMAKE_INSTALL_BINDIR}
- #COMPONENT runtime
- RENAME rigctlcom-wsjtx${CMAKE_EXECUTABLE_SUFFIX}
- )
-
install (FILES
README
COPYING