diff options
author | NHOrus <jy6x2b32pie9@yahoo.com> | 2025-01-05 11:57:46 +0400 |
---|---|---|
committer | Bernard Cafarelli <voyageur@gentoo.org> | 2025-01-05 11:59:22 +0100 |
commit | a82b2c5adb5661038bf64fc07a08c8a80e5a4605 (patch) | |
tree | f05a9b2c502fe388668ae6f2cb0665a183d3cf0d /x11-plugins | |
parent | x11-plugins/wmsystray: update EAPI 7 -> 8, port to C23 (diff) | |
download | gentoo-a82b2c5adb5661038bf64fc07a08c8a80e5a4605.tar.gz gentoo-a82b2c5adb5661038bf64fc07a08c8a80e5a4605.tar.bz2 gentoo-a82b2c5adb5661038bf64fc07a08c8a80e5a4605.zip |
x11-plugins/wmbinclock: port to C99 There was a type confusion between array, pointer and pointer to array
Bug: https://bugs.gentoo.org/877109
Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/39983
Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
Diffstat (limited to 'x11-plugins')
-rw-r--r-- | x11-plugins/wmbinclock/files/wmbinclock-0.5-gcc-14.patch | 77 | ||||
-rw-r--r-- | x11-plugins/wmbinclock/wmbinclock-0.51-r1.ebuild | 37 |
2 files changed, 114 insertions, 0 deletions
diff --git a/x11-plugins/wmbinclock/files/wmbinclock-0.5-gcc-14.patch b/x11-plugins/wmbinclock/files/wmbinclock-0.5-gcc-14.patch new file mode 100644 index 000000000000..80e8b99dbf54 --- /dev/null +++ b/x11-plugins/wmbinclock/files/wmbinclock-0.5-gcc-14.patch @@ -0,0 +1,77 @@ +https://bugs.gentoo.org/877109 +fix type confusion +also add fix glib feature macro for usleep +diff -ru a/wmBinClock.c b/wmBinClock.c +--- a/wmBinClock.c 2025-01-05 11:53:41.163293987 +0400 ++++ b/wmBinClock.c 2025-01-05 11:55:33.251648423 +0400 +@@ -6,6 +6,7 @@ + * Copyright (C) 2015 - Thomas Kuiper <tkuiper at inxsoft.net> and Sune Molgaard <sune at molgaard.org> (BSD license) + */ + ++#define _DEFAULT_SOURCE + #include <stdio.h> + #include <unistd.h> + #include <stdlib.h> +@@ -66,7 +67,7 @@ + int DisplayDepth; + GC NormalGC; + +-void IntToBinary(int x, int *str[]); ++void IntToBinary(int x, int str[]); + void PrintHelp(char err[]); + + int main(int argc, char *argv[]) +@@ -667,7 +668,7 @@ + } + + tmp_hour = tmworld->tm_hour; +- IntToBinary(tmp_hour, &tmp_str); ++ IntToBinary(tmp_hour, tmp_str); + + for (s = 0; s < 6; s++) + { +@@ -678,7 +679,7 @@ + } + + tmp_minute = tmworld->tm_min; +- IntToBinary(tmp_minute, &tmp_str); ++ IntToBinary(tmp_minute, tmp_str); + for (s = 0; s < 6; s++) + { + if (tmp_str[s] == 1) +@@ -688,7 +689,7 @@ + } + + tmp_second = tmworld->tm_sec; +- IntToBinary(tmp_second, &tmp_str); ++ IntToBinary(tmp_second, tmp_str); + + for (s = 0; s < 6; s++) + { +@@ -699,7 +700,7 @@ + } + + tmp_day = tmworld->tm_mday; +- IntToBinary(tmp_day, &tmp_str); ++ IntToBinary(tmp_day, tmp_str); + + for (s = 0; s < 6; s++) + { +@@ -710,7 +711,7 @@ + } + + tmp_month = tmworld->tm_mon + 1; +- IntToBinary(tmp_month, &tmp_str); ++ IntToBinary(tmp_month, tmp_str); + + for (s = 0; s < 6; s++) + { +@@ -780,7 +781,7 @@ + usleep(DELAY); + } + } +-void IntToBinary(int x, int *str[]) ++void IntToBinary(int x, int str[]) + { + int i = 0; + int counter = 0; diff --git a/x11-plugins/wmbinclock/wmbinclock-0.51-r1.ebuild b/x11-plugins/wmbinclock/wmbinclock-0.51-r1.ebuild new file mode 100644 index 000000000000..f95e8c142994 --- /dev/null +++ b/x11-plugins/wmbinclock/wmbinclock-0.51-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="a nifty little binary clock dockapp" +HOMEPAGE="https://www.dockapps.net/wmbinclock" +SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" + +RDEPEND="x11-libs/libX11 + x11-libs/libXpm + x11-libs/libXext" +DEPEND="${RDEPEND} + x11-base/xorg-proto" + +PATCHES=( + "${FILESDIR}"/${PN}-0.5-gcc-10.patch + "${FILESDIR}"/${PN}-0.5-gcc-14.patch +) +DOCS=( CHANGELOG README.md ) + +src_compile() { + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" \ + INCDIR="-I/usr/include/X11" LIBDIR="" \ + SYSTEM="${LDFLAGS}" +} + +src_install() { + dobin wmBinClock + einstalldocs +} |