commit: 9c8d77147db9d81b4125433ea3c66b7380f20c74
Author: orbea riseup net>
AuthorDate: Sat May 7 03:59:18 2022 +
Commit: Thomas Beierlein gentoo org>
CommitDate: Sun May 8 09:55:37 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c8d7714
media-libs/hamlib: Fix USE=tcl with slibtool
Bug: https://bugs.gentoo.org/798273
Upstream-PR: https://github.com/Hamlib/Hamlib/pull/1023
Upstream-commit: 4fa9a211adbc ("bindings: Fix tcl build with slibtool")
Signed-off-by: orbea riseup.net>
Bug: https://bugs.gentoo.org/798273
Closes: https://github.com/gentoo/gentoo/pull/25363
Signed-off-by: Thomas Beierlein gentoo.org>
media-libs/hamlib/files/hamlib-4.4-slibtool.patch | 73 +++
media-libs/hamlib/hamlib-4.4.ebuild | 8 ++-
2 files changed, 79 insertions(+), 2 deletions(-)
diff --git a/media-libs/hamlib/files/hamlib-4.4-slibtool.patch
b/media-libs/hamlib/files/hamlib-4.4-slibtool.patch
new file mode 100644
index ..140534e744b0
--- /dev/null
+++ b/media-libs/hamlib/files/hamlib-4.4-slibtool.patch
@@ -0,0 +1,73 @@
+From 4fa9a211adbcb1ae9329db41c27854af70f39d64 Mon Sep 17 00:00:00 2001
+From: orbea
+Date: Fri, 6 May 2022 17:13:36 -0700
+Subject: [PATCH] bindings: Fix tcl build with slibtool
+
+---
+ bindings/Makefile.am | 3 ++-
+ configure.ac | 16
+ macros/tcl.m4| 1 +
+ 3 files changed, 15 insertions(+), 5 deletions(-)
+
+diff --git a/bindings/Makefile.am b/bindings/Makefile.am
+index f9f17d567..7e2647945 100644
+--- a/bindings/Makefile.am
b/bindings/Makefile.am
+@@ -149,8 +149,9 @@ PKG_VER = $(ABI_VERSION).$(ABI_REVISION)
+ DLL = hamlibtcl-$(PKG_VER)$(TCL_SHLIB_SUFFIX)
+
+ nodist_hamlibtcl_la_SOURCES = hamlibtcl_wrap.c
++hamlibtcl_la_CFLAGS = $(TCL_CFLAGS)
+ hamlibtcl_la_LDFLAGS = -no-undefined -module -release $(PKG_VER)
-avoid-version
+-hamlibtcl_la_LIBADD = $(top_builddir)/src/libhamlib.la $(TCL_LIB_SPEC)
++hamlibtcl_la_LIBADD = $(top_builddir)/src/libhamlib.la $(TCL_LIB_SPEC)
$(TCL_LIBS)
+
+ hamlibtcl_ladir = $(tcldir)
+ hamlibtcl_la_DATA = pkgIndex.tcl
+diff --git a/configure.ac b/configure.ac
+index f58eb0925..ab6e120f7 100644
+--- a/configure.ac
b/configure.ac
+@@ -589,11 +589,16 @@ AC_ARG_WITH([tcl-binding],
+ [build_tcl=no])
+ AC_MSG_RESULT([$build_tcl])
+
+-dnl SC_PATH_TCLCONFIG and SC_LOAD_TCLCONFIG from macros/tcl.m4
++dnl tcl.pc or SC_PATH_TCLCONFIG and SC_LOAD_TCLCONFIG from macros/tcl.m4
+ AS_IF([test x"${build_tcl}" = "xyes"],[
+-dnl Search for and load tclConfig.sh.
+-SC_PATH_TCLCONFIG
+-SC_LOAD_TCLCONFIG
++dnl Search for and load tcl.pc or tclConfig.sh.
++PKG_CHECK_MODULES([TCL], [tcl],
++[],
++[
++AC_MSG_WARN([Unable to find Tcl pkgconfig])
++SC_PATH_TCLCONFIG
++SC_LOAD_TCLCONFIG
++])
+
+ tcl_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC"
+@@ -617,6 +622,9 @@ AC_SUBST([TCL_VERSION])
+ AC_SUBST([TCL_LIB_SPEC])
+ AC_SUBST([TCL_INCLUDE_SPEC])
+ AC_SUBST([TCL_SHLIB_SUFFIX])
++dnl These variables are set once tcl.pc is found.
++AC_SUBST([TCL_LIBS])
++AC_SUBST([TCL_CFLAGS])
+
+
+ dnl Check for lua availability, so we can enable HamlibLua
+diff --git a/macros/tcl.m4 b/macros/tcl.m4
+index feed05ce3..c1d308cf4 100644
+--- a/macros/tcl.m4
b/macros/tcl.m4
+@@ -130,6 +130,7 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [
+ . $TCL_BIN_DIR/tclConfig.sh
+ else
+ AC_MSG_RESULT([file not found])
++AC_MSG_ERROR([failed to load tclConfig.sh])
+ fi
+
+ #
diff --git a/media-libs/hamlib/hamlib-4.4.ebuild
b/media-libs/hamlib/hamlib-4.4.ebuild
index 72c4dabac98b..64e2839ee422 100644
--- a/media-libs/hamlib/hamlib-4.4.ebuild
+++ b/media-libs/hamlib/hamlib-4.4.ebuild
@@ -38,6 +38,10 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}"
DOCS=(AUTHORS NEWS PLAN README README.betatester README.developer)
+PATCHES=(
+ "${FILESDIR}/${P}-slibtool.patch" # 798273
+)
+
S="${WORKDIR}/${MY_P}"
pkg_setup() {
@@ -45,6 +49,8 @@ pkg_setup() {
}
src_prepare() {
+ default
+
# fix hardcoded libdir paths
sed -i -e "s#fix}/lib#fix}/$(get_libdir)/hamlib#" \
-e "s#fix}/include#fix}/include/hamlib#" \
@@ -60,8 +66,6 @@ src_prepare() {
sed -i -e "s/doc:/html:/g" doc/Makefile.am || die "sed failed"
eautoreconf
-
- eapply_user
}
src_configure() {