diff options
author | 2023-08-03 20:43:04 +0000 | |
---|---|---|
committer | 2023-09-06 10:00:06 +0300 | |
commit | eb531d515eaf50be0a91564c4dd49359c7d86251 (patch) | |
tree | c84123074e225a20d957c6c985bad08a6bcd556f /app-misc | |
parent | app-i18n/transifex-client: remove old version (diff) | |
download | gentoo-eb531d515eaf50be0a91564c4dd49359c7d86251.tar.gz gentoo-eb531d515eaf50be0a91564c4dd49359c7d86251.tar.bz2 gentoo-eb531d515eaf50be0a91564c4dd49359c7d86251.zip |
app-misc/hddled: Fix call to undeclared function TEMP_FAILURE_RETRY
Closes: https://bugs.gentoo.org/894550
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32163
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-misc')
-rw-r--r-- | app-misc/hddled/files/hddled-0.3-fix-missing-temp_failure_retry.patch | 19 | ||||
-rw-r--r-- | app-misc/hddled/hddled-0.3-r1.ebuild | 49 |
2 files changed, 68 insertions, 0 deletions
diff --git a/app-misc/hddled/files/hddled-0.3-fix-missing-temp_failure_retry.patch b/app-misc/hddled/files/hddled-0.3-fix-missing-temp_failure_retry.patch new file mode 100644 index 000000000000..cff8347a212a --- /dev/null +++ b/app-misc/hddled/files/hddled-0.3-fix-missing-temp_failure_retry.patch @@ -0,0 +1,19 @@ +Bug: https://bugs.gentoo.org/894550 +--- a/hddled.c ++++ b/hddled.c +@@ -43,6 +43,15 @@ + + #define PACKAGE_STRING "hddled 0.3" + #define PACKAGE_BUGREPORT "hddled@very.puzzling.org" ++/* taken from glibc unistd.h and fixes musl */ ++#ifndef TEMP_FAILURE_RETRY ++#define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++#endif + + #define VMSTAT "/proc/vmstat" + diff --git a/app-misc/hddled/hddled-0.3-r1.ebuild b/app-misc/hddled/hddled-0.3-r1.ebuild new file mode 100644 index 000000000000..52a7e3a46975 --- /dev/null +++ b/app-misc/hddled/hddled-0.3-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs flag-o-matic + +DESCRIPTION="Show hard disk activity using the scroll lock LED" +HOMEPAGE="http://members.optusnet.com.au/foonly/whirlpool/code/" +SRC_URI="mirror://gentoo/${P}.c.xz" +S="${WORKDIR}" + +LICENSE="Unlicense" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="X" + +DEPEND="X? ( x11-libs/libX11 )" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-0.3-fix-missing-temp_failure_retry.patch" +) + +src_prepare() { + mv ${P}.c ${PN}.c || die + default +} + +src_compile() { + if use elibc_musl ; then + append-libs -largp + fi + + $(tc-getCC) ${CFLAGS} ${CPPFLAGS} -o ${PN} ${PN}.c ${LDFLAGS} ${LIBS} || die + + if use X ; then + $(tc-getCC) ${CFLAGS} ${CPPFLAGS} -DX -lX11 -o x${PN} ${PN}.c ${LDFLAGS} ${LIBS} || die + fi +} + +src_install() { + dobin ${PN} + + if use X ; then + dobin x${PN} + elog "X version was renamed to x${PN}" + fi +} |