commit:     6ea3c801670938eb023a21c75fa722a64456adc0
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sat Mar 16 16:06:43 2024 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Wed Mar 20 20:31:16 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ea3c801

x11-libs/gtkdatabox: fix undefined references

Closes: https://bugs.gentoo.org/913728
Upstream-PR: https://sourceforge.net/p/gtkdatabox/git/merge-requests/5/
Upstream-Commit: 
https://sourceforge.net/p/gtkdatabox/git/ci/88d2bd66571e083e3beaf0ea6004c1b739a20713/
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/35782
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 .../files/gtkdatabox-1.0.0-slibtool.patch          | 48 ++++++++++++++++++++++
 x11-libs/gtkdatabox/gtkdatabox-1.0.0-r1.ebuild     | 15 ++++---
 2 files changed, 57 insertions(+), 6 deletions(-)

diff --git a/x11-libs/gtkdatabox/files/gtkdatabox-1.0.0-slibtool.patch 
b/x11-libs/gtkdatabox/files/gtkdatabox-1.0.0-slibtool.patch
new file mode 100644
index 000000000000..b729c4ad1e80
--- /dev/null
+++ b/x11-libs/gtkdatabox/files/gtkdatabox-1.0.0-slibtool.patch
@@ -0,0 +1,48 @@
+https://sourceforge.net/p/gtkdatabox/git/merge-requests/5/
+https://sourceforge.net/p/gtkdatabox/git/ci/88d2bd66571e083e3beaf0ea6004c1b739a20713/
+
+From 88d2bd66571e083e3beaf0ea6004c1b739a20713 Mon Sep 17 00:00:00 2001
+From: orbea <[email protected]>
+Date: Thu, 7 Mar 2024 14:29:18 -0800
+Subject: [PATCH] gtk: add missing libm depedency
+
+When building with slibtool it fails with undefined references for libm,
+with GNU libtool it doesn't fails because -no-undefined gets silently
+ignored while slibtool correctly passes -Wl,--no-undefined to the
+linker.
+
+Gentoo issue: https://bugs.gentoo.org/913728
+---
+ configure.ac    | 2 ++
+ gtk/Makefile.am | 5 ++++-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 78b8caa..ac95247 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -40,6 +40,8 @@ AC_PROG_CC_C99
+ AC_PROG_CPP
+ AC_PROG_INSTALL
+ 
++LT_LIB_M
++
+ m4_define([gtk_required_version], [3.4.0])
+ m4_define([pango_required_version], [1.29.0])
+ m4_define([cairo_required_version], [1.10.0])
+diff --git a/gtk/Makefile.am b/gtk/Makefile.am
+index 4a816fb..7d399de 100644
+--- a/gtk/Makefile.am
++++ b/gtk/Makefile.am
+@@ -20,7 +20,10 @@ libgtkdatabox_la_SOURCES= \
+ 
+ libgtkdatabox_la_LDFLAGS= \
+                       -version-info $(DATABOX_LT_VERSION)\
+-                      -no-undefined \
++                      -no-undefined
++
++libgtkdatabox_la_LIBADD= \
++                      @LIBM@ \
+                       @GTK_LIBS@
+ 
+ 

diff --git a/x11-libs/gtkdatabox/gtkdatabox-1.0.0-r1.ebuild 
b/x11-libs/gtkdatabox/gtkdatabox-1.0.0-r1.ebuild
index 6e111b68cb2c..942e352d45ec 100644
--- a/x11-libs/gtkdatabox/gtkdatabox-1.0.0-r1.ebuild
+++ b/x11-libs/gtkdatabox/gtkdatabox-1.0.0-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-inherit xdg-utils
+inherit autotools xdg-utils
 
 DESCRIPTION="Gtk+ Widgets for live display of large amounts of fluctuating 
numerical data"
 HOMEPAGE="https://sourceforge.net/projects/gtkdatabox/";
@@ -26,16 +26,19 @@ RDEPEND="
 "
 DEPEND="${RDEPEND}"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-slibtool.patch
+)
+
 src_prepare() {
        default
 
        # Remove -D.*DISABLE_DEPRECATED cflags
        find . -iname 'Makefile.am' -exec \
                sed -e '/-D[A-Z_]*DISABLE_DEPRECATED/d' -i {} + || die
-       # Do Makefile.in after Makefile.am to avoid automake maintainer-mode
-       find . -iname 'Makefile.in' -exec \
-               sed -e '/-D[A-Z_]*DISABLE_DEPRECATED/d' -i {} + || die
-       sed -e '/SUBDIRS/{s: examples::;}' -i Makefile.am -i Makefile.in || die
+       sed -e '/SUBDIRS/{s: examples::;}' -i Makefile.am || die
+
+       eautoreconf
 }
 
 src_configure() {

Reply via email to