summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-06-15 20:53:16 +0100
committerSam James <sam@gentoo.org>2022-06-15 20:53:16 +0100
commitcb8174bfa872071c73e3c5c6ea1e8ac8b83321b9 (patch)
tree30055d7076bd62217a23ed92e1d581330f6559f3 /x11-plugins
parentx11-plugins/cputnik: fix build with lld (diff)
downloadgentoo-cb8174bfa872071c73e3c5c6ea1e8ac8b83321b9.tar.gz
gentoo-cb8174bfa872071c73e3c5c6ea1e8ac8b83321b9.tar.bz2
gentoo-cb8174bfa872071c73e3c5c6ea1e8ac8b83321b9.zip
x11-plugins/asclock: fix build with lld
Closes: https://bugs.gentoo.org/732412 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'x11-plugins')
-rw-r--r--x11-plugins/asclock/asclock-2.0.12-r4.ebuild74
-rw-r--r--x11-plugins/asclock/files/asclock-2.0.12-fix-implicit-func-decl.patch13
2 files changed, 87 insertions, 0 deletions
diff --git a/x11-plugins/asclock/asclock-2.0.12-r4.ebuild b/x11-plugins/asclock/asclock-2.0.12-r4.ebuild
new file mode 100644
index 000000000000..4d5b8555b83d
--- /dev/null
+++ b/x11-plugins/asclock/asclock-2.0.12-r4.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs
+
+DESCRIPTION="Clock applet for AfterStep"
+HOMEPAGE="http://tigr.net/afterstep/applets/"
+SRC_URI="http://www.tigr.net/afterstep/download/asclock/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-solaris"
+
+DEPEND="x11-libs/libXpm"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-gcc41.patch
+ "${FILESDIR}"/${P}-fno-common.patch
+ "${FILESDIR}"/${P}-fix-implicit-func-decl.patch
+)
+
+src_prepare() {
+ default
+
+ ln -s themes/classic default_theme || die
+}
+
+src_configure() {
+ :;
+}
+
+src_compile() {
+ local x
+
+ # Will break Solaris
+ [[ ${CHOST} == *-linux-gnu ]] && CFLAGS="${CFLAGS} \
+ -Dlinux \
+ -D_POSIX_C_SOURCE=199309L \
+ -D_POSIX_SOURCE \
+ -D_XOPEN_SOURCE"
+
+ for x in asclock parser symbols config; do
+ edo $(tc-getCC) \
+ ${CPPFLAGS} ${CFLAGS} ${ASFLAGS} \
+ -I"${EPREFIX}"/usr/include \
+ -D_BSD_SOURCE \
+ -D_SVID_SOURCE \
+ -DFUNCPROTO=15 \
+ -DNARROWPROTO \
+ -c -o ${x}.o ${x}.c
+ done
+
+ edo $(tc-getCC) \
+ ${LDFLAGS} \
+ -o asclock \
+ asclock.o parser.o symbols.o config.o \
+ -L"${ESYSROOT}/usr/$(get_libdir)" \
+ -L"${ESYSROOT}"/usr/lib/X11 \
+ -lXpm -lXext -lX11
+}
+
+src_install() {
+ dobin asclock
+ local themesdir="/usr/share/${PN}/themes"
+ insinto ${themesdir}
+ doins -r themes/*
+ dodoc README README.THEMES TODO
+ cd "${ED}"/${themesdir} || die
+ rm Freeamp/Makefile{,.*} || die
+ ln -s classic default_theme || die
+}
diff --git a/x11-plugins/asclock/files/asclock-2.0.12-fix-implicit-func-decl.patch b/x11-plugins/asclock/files/asclock-2.0.12-fix-implicit-func-decl.patch
new file mode 100644
index 000000000000..b0379a396129
--- /dev/null
+++ b/x11-plugins/asclock/files/asclock-2.0.12-fix-implicit-func-decl.patch
@@ -0,0 +1,13 @@
+diff --git a/asclock.h b/asclock.h
+index 7580df8..ec6883b 100644
+--- a/asclock.h
++++ b/asclock.h
+@@ -137,6 +137,8 @@ extern char *hour_map;
+ extern char *min_map;
+ extern char *sec_map;
+
++int mytime();
++
+ /********* symbols.c ***************/
+ void init_symbols();
+ void postconfig();