diff options
author | Brahmajit Das <brahmajit.xyz@gmail.com> | 2023-05-14 14:55:25 +0530 |
---|---|---|
committer | Bernard Cafarelli <voyageur@gentoo.org> | 2023-05-25 09:17:38 +0200 |
commit | 87c55164677082145e716a0df4a54d816ff1f0af (patch) | |
tree | 161bcaecb95493b380440047ee58cef5f26f617a /x11-plugins | |
parent | net-analyzer/wireshark: re-enable tests for live (diff) | |
download | gentoo-87c55164677082145e716a0df4a54d816ff1f0af.tar.gz gentoo-87c55164677082145e716a0df4a54d816ff1f0af.tar.bz2 gentoo-87c55164677082145e716a0df4a54d816ff1f0af.zip |
x11-plugins/wmDownload: Fix error: call to undeclared function strtouq
Dont use strtouq while builing on non-glibc systems
Closes: https://bugs.gentoo.org/898922
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/31032
Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
Diffstat (limited to 'x11-plugins')
-rw-r--r-- | x11-plugins/wmDownload/files/wmDownload-strtouq-musl.patch | 24 | ||||
-rw-r--r-- | x11-plugins/wmDownload/wmDownload-0.1.2a-r4.ebuild | 37 |
2 files changed, 61 insertions, 0 deletions
diff --git a/x11-plugins/wmDownload/files/wmDownload-strtouq-musl.patch b/x11-plugins/wmDownload/files/wmDownload-strtouq-musl.patch new file mode 100644 index 000000000000..3a9a5d00b206 --- /dev/null +++ b/x11-plugins/wmDownload/files/wmDownload-strtouq-musl.patch @@ -0,0 +1,24 @@ +https://bugs.gentoo.org/898922 +From: Brahmajit Das <brahmajit.xyz@gmail.com> +Date: Sun, 14 May 2023 14:39:59 +0530 +Subject: [PATCH] Don't use strtouq while building on non-glibc system + +Bug: https://bugs.gentoo.org/898922 +Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> +--- a/wmDownload.c ++++ b/wmDownload.c +@@ -205,7 +205,11 @@ void checknetstats () + { + p = (char *)strtok (NULL, tokens); + ++#ifdef __GLIBC__ + bytes = strtouq(p, NULL, 0); ++#else ++ bytes = strtoul(p, NULL, 0); ++#endif + + kbytes = (bytes == 0)?0:bytes/base; + bytes = bytes%base; +-- +2.40.1 + diff --git a/x11-plugins/wmDownload/wmDownload-0.1.2a-r4.ebuild b/x11-plugins/wmDownload/wmDownload-0.1.2a-r4.ebuild new file mode 100644 index 000000000000..a71cdc57295a --- /dev/null +++ b/x11-plugins/wmDownload/wmDownload-0.1.2a-r4.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +DESCRIPTION="dockapp that displays how much data you've received on each eth and ppp device" +SRC_URI="mirror://sourceforge/wmdownload/${P}.tar.gz" +HOMEPAGE="http://wmdownload.sourceforge.net/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="" + +RDEPEND=">=x11-libs/libdockapp-0.7:= + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXpm" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${PN}" + +PATCHES=( + "${FILESDIR}"/${P}-makefile.patch + "${FILESDIR}"/${PN}-strtouq-musl.patch +) +DOCS=( CHANGELOG CREDITS HINTS README TODO ) + +src_prepare() { + sed -e 's#<dockapp.h>#<libdockapp/dockapp.h>#' -i *.c || die + default +} + +src_compile() { + emake CC="$(tc-getCC)" LIBDIR="/usr/$(get_libdir)" +} |