From ea693b93b97f68109c3c19a83d410ca5b3c73080 Mon Sep 17 00:00:00 2001 From: Daniil Lunev Date: Mon, 11 Sep 2023 09:03:31 +1000 Subject: [PATCH] sys-apps/hdparm: fix post-build strip Export STRIP only for emake step, to avoid confusing portage's strip step. - strip: strip --strip-unneeded -N __gentoo_check_ldflags__ -R .comment -R .GCC.command.line -R .note.gnu.gold-version + strip: llvm-strip --strip-unneeded -N __gentoo_check_ldflags__ -R .comment -R .GCC.command.line -R .note.gnu.gold-version /sbin/hdparm -strip: Unable to recognise the format of the input file `/build/cherry/tmp/portage/sys-apps/hdparm-9.65/image/sbin/hdparm' [sam: I can't reproduce STRIP=: failing but the issue is clear here anyway, we don't want to interfere with the environment's STRIP (even if maybe Portage should ignore ebuild tampering with it). Just do the cleaner thing which makes the ebuild simpler as a bonus.] Closes: https://bugs.gentoo.org/913959 Signed-off-by: Daniil Lunev Closes: https://github.com/gentoo/gentoo/pull/32718 Signed-off-by: Sam James --- sys-apps/hdparm/hdparm-9.65-r1.ebuild | 45 +++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 sys-apps/hdparm/hdparm-9.65-r1.ebuild diff --git a/sys-apps/hdparm/hdparm-9.65-r1.ebuild b/sys-apps/hdparm/hdparm-9.65-r1.ebuild new file mode 100644 index 0000000000000..7e814b104e2e8 --- /dev/null +++ b/sys-apps/hdparm/hdparm-9.65-r1.ebuild @@ -0,0 +1,45 @@ +# 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="Utility to change hard drive performance parameters" +HOMEPAGE="https://sourceforge.net/projects/hdparm/" +SRC_URI="mirror://sourceforge/hdparm/${P}.tar.gz" + +# GPL-2 only +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="static" + +PATCHES=( + "${FILESDIR}"/${PN}-9.60-build.patch +) + +src_prepare() { + default + + use static && append-ldflags -static +} + +src_compile() { + emake STRIP="true" CC="$(tc-getCC)" +} + +src_install() { + into / + dosbin hdparm contrib/idectl + + newinitd "${FILESDIR}"/hdparm-init-8 hdparm + newconfd "${FILESDIR}"/hdparm-conf.d.3 hdparm + + doman hdparm.8 + dodoc hdparm.lsm Changelog README.acoustic hdparm-sysconfig + + docinto wiper + dodoc wiper/{README.txt,wiper.sh} + docompress -x /usr/share/doc/${PF}/wiper/wiper.sh +}