gentoo/x11-misc/cairo-clock/cairo-clock-0.3.4-r4.ebuild
Sam James 6674b870ff
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@gentoo.org>
AuthorDate: Sat Sep 24 11:48:10 2011 +0000
Commit:     Tony Vroon <chainsaw@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@gentoo.org>
AuthorDate: Sat Nov 12 15:19:14 2011 +0000
Commit:     Samuli Suominen <ssuominen@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@gmail.com>
AuthorDate: Mon Feb 27 11:21:58 2017 +0200
Commit:     David Seifert <soap@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@gentoo.org>
2025-09-14 08:32:59 +01:00

51 lines
947 B
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools
DESCRIPTION="An analog clock displaying the system-time"
HOMEPAGE="https://launchpad.net/cairo-clock"
SRC_URI="http://macslow.thepimp.net/projects/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~x86"
RDEPEND="
>=dev-libs/glib-2.8
>=gnome-base/libglade-2.6
>=gnome-base/librsvg-2.14
>=x11-libs/cairo-1.2
>=x11-libs/gtk+-2.10:2
>=x11-libs/pango-1.10
"
DEPEND="${RDEPEND}"
# autoconf-archive for F_S patch
BDEPEND="
dev-util/intltool
dev-build/autoconf-archive
sys-devel/gettext
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${P}-desktop.patch
"${FILESDIR}"/${P}-linker.patch
"${FILESDIR}"/${P}-fortify-source.patch
"${FILESDIR}"/${P}-math-glibc-2.34.patch
)
src_prepare() {
default
eautoreconf
}
src_install() {
default
gzip -d "${ED}"/usr/share/man/man1/cairo-clock.1.gz || die
}