public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Frysinger" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/hdparm/, sys-apps/hdparm/files/
Date: Tue, 20 Dec 2016 16:35:29 +0000 (UTC)	[thread overview]
Message-ID: <1482251709.8c1fe8b7b045c175747525f38e6296b1c523246b.vapier@gentoo> (raw)

commit:     8c1fe8b7b045c175747525f38e6296b1c523246b
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 20 16:34:29 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Dec 20 16:35:09 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c1fe8b7

sys-apps/hdparm: fix parallel build failure

Move the sed commands into a patch to make a bit more reliable since
we have to patch the Makefile anyways to fix parallel build errors.

 sys-apps/hdparm/files/hdparm-9.50-build.patch | 32 +++++++++++++++++++++++++++
 sys-apps/hdparm/hdparm-9.50.ebuild            | 10 ++++-----
 2 files changed, 36 insertions(+), 6 deletions(-)

diff --git a/sys-apps/hdparm/files/hdparm-9.50-build.patch b/sys-apps/hdparm/files/hdparm-9.50-build.patch
new file mode 100644
index 00000000..ff1948a
--- /dev/null
+++ b/sys-apps/hdparm/files/hdparm-9.50-build.patch
@@ -0,0 +1,32 @@
+* drop hardcoded -O2 flag from CFLAGS
+* drop hardcoded -s (strip) flag from LDFLAGS, and respect user LDFLAGS
+* fix hardcoded `make` and hardcoded -j2 flags
+* respect CFLAGS when linking
+
+--- a/Makefile
++++ b/Makefile
+@@ -13,9 +13,8 @@
+ CC ?= gcc
+ STRIP ?= strip
+ 
+-CFLAGS := -O2 -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs $(CFLAGS)
++CFLAGS += -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs
+ 
+-LDFLAGS = -s
+ #LDFLAGS = -s -static
+ INSTALL = install
+ INSTALL_DATA = $(INSTALL) -m 644
+@@ -24,11 +23,10 @@ INSTALL_PROGRAM = $(INSTALL)
+ 
+ OBJS = hdparm.o identify.o sgio.o sysfs.o geom.o fallocate.o fibmap.o fwdownload.o dvdspeed.o wdidle3.o
+ 
+-all:
+-	make -j2 hdparm
++all: hdparm
+ 
+ hdparm: hdparm.h sgio.h $(OBJS)
+-	$(CC) $(LDFLAGS) -o hdparm $(OBJS)
++	$(CC) $(CFLAGS) $(LDFLAGS) -o hdparm $(OBJS)
+ 	$(STRIP) hdparm
+ 
+ hdparm.o:	hdparm.h sgio.h

diff --git a/sys-apps/hdparm/hdparm-9.50.ebuild b/sys-apps/hdparm/hdparm-9.50.ebuild
index 4db6889..f447ca4 100644
--- a/sys-apps/hdparm/hdparm-9.50.ebuild
+++ b/sys-apps/hdparm/hdparm-9.50.ebuild
@@ -17,15 +17,13 @@ IUSE="static"
 
 src_prepare() {
 	epatch "${FILESDIR}"/${PN}-9.48-sysmacros.patch #580052
+	epatch "${FILESDIR}"/${PN}-9.50-build.patch
 	use static && append-ldflags -static
-	sed -i \
-		-e "/^CFLAGS/ s:-O2:${CFLAGS}:" \
-		-e "/^LDFLAGS/ s:-s:${LDFLAGS}:" \
-		Makefile || die "sed"
 }
 
-src_compile() {
-	emake STRIP=: CC="$(tc-getCC)"
+src_configure() {
+	tc-export CC
+	export STRIP=:
 }
 
 src_install() {


             reply	other threads:[~2016-12-20 16:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-20 16:35 Mike Frysinger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-11-28  9:06 [gentoo-commits] repo/gentoo:master commit in: sys-apps/hdparm/, sys-apps/hdparm/files/ Lars Wendler
2020-11-21 23:55 Lars Wendler
2021-06-14  9:19 David Seifert
2022-12-26  8:35 Sam James
2023-10-01  7:43 Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1482251709.8c1fe8b7b045c175747525f38e6296b1c523246b.vapier@gentoo \
    --to=vapier@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox