commit:     6674b870ff67db5049d6e835cd40346e13544a7c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 14 06:57:06 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 14 07:32:59 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6674b870

x11-misc/cairo-clock: fix linking w/ glibc-2.42; fix ancient patch

Make two changes:
1) Fix linking with glibc-2.42 (add -lm for powf)
2) Fix broken -Wl,--export-dynamic patch

More specifically on the latter...

The fix in

commit 7d8ac434fcb3a1e0fe8ee881c3f90cea0b91e1a9
Author:     Tony Vroon <chainsaw <AT> gentoo.org>
AuthorDate: Sat Sep 24 11:48:10 2011 +0000
Commit:     Tony Vroon <chainsaw <AT> gentoo.org>
CommitDate: Sat Sep 24 11:48:10 2011 +0000

    Debian patch scavenged by Pacho Ramos enables building on GCC 4.6; closes 
bug #362261 by Diego Elio Pettenò.

    (Portage version: 2.1.10.18/cvs/Linux x86_64)

is OK:
- -Wl, --export-dynamic
+ -rdynamic

...

It later got replaced by a sed in

commit 848e2fef33a7334e6ea074de9826d6e2ef281882
Author:     Samuli Suominen <ssuominen <AT> gentoo.org>
AuthorDate: Sat Nov 12 15:19:14 2011 +0000
Commit:     Samuli Suominen <ssuominen <AT> gentoo.org>
CommitDate: Sat Nov 12 15:19:14 2011 +0000

    Version bump wrt #381733 by Jesse Adelman

    (Portage version: 2.2.0_alpha73/cvs/Linux x86_64)

which was also OK.

...

It then got replaced by a patch (not clear from where, might be upstream, 
dunno) in

commit 5a2369ba50c77d52d20e5553e993c88ec2fc449f
Author:     Harri Nieminen <moikkis <AT> gmail.com>
AuthorDate: Mon Feb 27 11:21:58 2017 +0200
Commit:     David Seifert <soap <AT> gentoo.org>
CommitDate: Wed Mar 1 21:43:16 2017 +0100

    x11-misc/cairo-clock: EAPI bump 4 -> 6, fix #452106

    Gentoo-Bug: https://bugs.gentoo.org/452106

    Package-Manager: Portage-2.3.3, Repoman-2.3.1
    Closes: https://github.com/gentoo/gentoo/pull/4091

which does:

-cairo_clock_LDFLAGS = -Wl, --export-dynamic
+cairo_clock_LDFLAGS = -Wl,-export-dynamic

which is NOT ok, because it tells ld that you want an entry point of 
'xport-dynamic'.

Bug: https://bugs.gentoo.org/362261
Bug: https://bugs.gentoo.org/452106
Closes: https://bugs.gentoo.org/961078
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...0.3.4-r3.ebuild => cairo-clock-0.3.4-r4.ebuild} |  3 ++-
 .../files/cairo-clock-0.3.4-linker.patch           | 14 ++----------
 .../files/cairo-clock-0.3.4-math-glibc-2.34.patch  | 26 ++++++++++++++++++++++
 3 files changed, 30 insertions(+), 13 deletions(-)

diff --git a/x11-misc/cairo-clock/cairo-clock-0.3.4-r3.ebuild 
b/x11-misc/cairo-clock/cairo-clock-0.3.4-r4.ebuild
similarity index 91%
rename from x11-misc/cairo-clock/cairo-clock-0.3.4-r3.ebuild
rename to x11-misc/cairo-clock/cairo-clock-0.3.4-r4.ebuild
index d7bd5272ae0d..36d598c198d1 100644
--- a/x11-misc/cairo-clock/cairo-clock-0.3.4-r3.ebuild
+++ b/x11-misc/cairo-clock/cairo-clock-0.3.4-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -34,6 +34,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-desktop.patch
        "${FILESDIR}"/${P}-linker.patch
        "${FILESDIR}"/${P}-fortify-source.patch
+       "${FILESDIR}"/${P}-math-glibc-2.34.patch
 )
 
 src_prepare() {

diff --git a/x11-misc/cairo-clock/files/cairo-clock-0.3.4-linker.patch 
b/x11-misc/cairo-clock/files/cairo-clock-0.3.4-linker.patch
index bdd1a7bc8b1b..dff133ea4c5d 100644
--- a/x11-misc/cairo-clock/files/cairo-clock-0.3.4-linker.patch
+++ b/x11-misc/cairo-clock/files/cairo-clock-0.3.4-linker.patch
@@ -1,14 +1,4 @@
-From 9e1575324da26ef15143ab2dd38f61af222576b4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Mirco=20M=C3=BCller?= <[email protected]>
-Date: Thu, 9 Feb 2017 01:02:03 +0100
-Subject: [PATCH] Updated linker-options so ld is happy.
-
----
- src/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 7057198..fd88852 100644
+https://bugs.gentoo.org/362261
 --- a/src/Makefile.am
 +++ b/src/Makefile.am
 @@ -1,7 +1,7 @@
@@ -16,7 +6,7 @@ index 7057198..fd88852 100644
  transform = s/_/-/g
  
 -cairo_clock_LDFLAGS = -Wl, --export-dynamic
-+cairo_clock_LDFLAGS = -Wl,-export-dynamic
++cairo_clock_LDFLAGS = -Wl,--export-dynamic
  
  cairo_clock_LDADD =   \
        $(GLIB_LIBS)    \

diff --git a/x11-misc/cairo-clock/files/cairo-clock-0.3.4-math-glibc-2.34.patch 
b/x11-misc/cairo-clock/files/cairo-clock-0.3.4-math-glibc-2.34.patch
new file mode 100644
index 000000000000..0eae4632b3ef
--- /dev/null
+++ b/x11-misc/cairo-clock/files/cairo-clock-0.3.4-math-glibc-2.34.patch
@@ -0,0 +1,26 @@
+https://bugs.gentoo.org/961078
+--- a/configure.ac
++++ b/configure.ac
+@@ -63,6 +63,8 @@ AC_DISABLE_STATIC
+ AC_ENABLE_SHARED
+ AC_PROG_LIBTOOL
+ 
++AC_CHECK_LIB([m], [powf])
++
+ dnl intltool
+ ALL_LINGUAS="da de en_GB es fi fr it ja nl nn pl pt_PT ru sl sv tr zh_CN 
zh_TW"
+ AC_SUBST(ALL_LINGUAS)
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -4,9 +4,10 @@ transform = s/_/-/g
+ cairo_clock_LDFLAGS = -Wl,--export-dynamic
+ 
+ cairo_clock_LDADD =   \
++      $(LIBM)         \
+       $(GLIB_LIBS)    \
+       $(GTK_LIBS)     \
+-      $(GTK_DEP_LIBS)          
++      $(GTK_DEP_LIBS)
+ 
+ cairo_clock_CFLAGS =                  \
+       -I$(top_srcdir)                 \

Reply via email to