commit:     d922c3edc3892a32d66a8917150cbe9aa23a3e22
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Wed Aug 20 08:45:34 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Aug 27 05:52:04 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d922c3ed

x11-plugins/asclock: fix gcc15

update HOMEPAGE (dead)

apply a patch from opensuse to fix unprototyped functions.
add missing rdep libXext and libX11, called in the ebuild.

remove obsolete defs and unnecessary flags

Closes: https://bugs.gentoo.org/944001
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/43504
Signed-off-by: Sam James <sam <AT> gentoo.org>

 x11-plugins/asclock/asclock-2.0.12-r5.ebuild       | 64 ++++++++++++++++++++++
 .../asclock/files/asclock-2.0.12-fix_gcc15.patch   | 54 ++++++++++++++++++
 2 files changed, 118 insertions(+)

diff --git a/x11-plugins/asclock/asclock-2.0.12-r5.ebuild 
b/x11-plugins/asclock/asclock-2.0.12-r5.ebuild
new file mode 100644
index 000000000000..b304f447e623
--- /dev/null
+++ b/x11-plugins/asclock/asclock-2.0.12-r5.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2025 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://wiki.afterstep.org/index.php?title=AfterStep_Applets_DataBase#asclock";
+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/libX11
+       x11-libs/libXext
+       x11-libs/libXpm
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-gcc41.patch
+       "${FILESDIR}"/${P}-fno-common.patch
+       "${FILESDIR}"/${P}-fix-implicit-func-decl.patch
+       "${FILESDIR}"/${P}-fix_gcc15.patch
+)
+
+src_prepare() {
+       default
+
+       ln -s themes/classic default_theme || die
+}
+
+src_configure() {
+       :;
+}
+
+src_compile() {
+       local x
+       for x in asclock parser symbols config; do
+               edo $(tc-getCC) \
+                       ${CPPFLAGS} ${CFLAGS} ${ASFLAGS} \
+                       -c -o ${x}.o ${x}.c
+       done
+
+       edo $(tc-getCC) \
+               ${LDFLAGS} \
+               -o asclock \
+               asclock.o parser.o symbols.o config.o \
+               $($(tc-getPKG_CONFIG) --print-errors --libs x11 xext xpm)
+}
+
+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_gcc15.patch 
b/x11-plugins/asclock/files/asclock-2.0.12-fix_gcc15.patch
new file mode 100644
index 000000000000..188e682d9f70
--- /dev/null
+++ b/x11-plugins/asclock/files/asclock-2.0.12-fix_gcc15.patch
@@ -0,0 +1,54 @@
+fix unprototyped functions
+https://build.opensuse.org/projects/openSUSE:Factory/packages/asclock/files/asclock-gcc15.patch
+--- a/asclock.h        2025-05-06 06:26:49.442371383 +0000
++++ b/asclock.h        2025-05-06 06:32:27.594886122 +0000
+@@ -151,9 +151,9 @@ void parseArgs(int argc, char **argv);
+ int read_init(FILE *f);
+ int read_type(int *type);
+ int read_token(char *str, int max);
+-int read_assign();
++int read_assign(void);
+ int read_int(int *ret);
+-int read_semicolon();
++int read_semicolon(void);
+ 
+ #endif /* ASCLOCK_H */
+ 
+--- a/config.c 2025-05-06 06:26:49.442272713 +0000
++++ b/config.c 2025-05-06 06:33:07.998999146 +0000
+@@ -147,13 +147,13 @@ int loadTheme(char *themesdir)
+       exit(-1);
+       } 
+ 
+-      if(!read_assign(f))
++      if(!read_assign())
+       printf("read_assign failed\n");
+       
+       if(!read_int(s->addr))
+       printf("read_int failed\n");
+       
+-      if(!read_semicolon(f))
++      if(!read_semicolon())
+       printf("read_semicolon failed\n");
+     }
+ 
+--- a/parser.c 2025-05-06 06:26:49.442342036 +0000
++++ b/parser.c 2025-05-06 06:32:42.238851768 +0000
+@@ -72,7 +72,7 @@ int read_token(char *str, int max)
+   return TRUE;
+ }
+ 
+-int read_assign() 
++int read_assign(void) 
+ {
+ 
+   while(next!='=')
+@@ -106,7 +106,7 @@ int read_int(int *ret)
+   return TRUE;
+ }
+ 
+-int read_semicolon() 
++int read_semicolon(void) 
+ {
+ 
+   while(next!=';')

Reply via email to