From: "Thomas Beierlein" <tomjbe@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-electronics/puff/, sci-electronics/puff/files/
Date: Sat, 3 Jul 2021 15:47:52 +0000 (UTC) [thread overview]
Message-ID: <1625327256.23e6cad3c576c32f97ad857da284e51a88ae9da1.tomjbe@gentoo> (raw)
commit: 23e6cad3c576c32f97ad857da284e51a88ae9da1
Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 3 15:46:30 2021 +0000
Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
CommitDate: Sat Jul 3 15:47:36 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23e6cad3
sci-electronics/puff: Do not call 'ld' directly
Closes: https://bugs.gentoo.org/799440
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>
.../puff/files/puff-20100127-Makefile.patch | 19 +++++++++++++++++++
.../puff/files/puff-20181104-Makefile.patch | 21 +++++++++++++++++++++
sci-electronics/puff/puff-20100127-r1.ebuild | 10 ++++------
sci-electronics/puff/puff-20181104.ebuild | 9 ++++-----
4 files changed, 48 insertions(+), 11 deletions(-)
diff --git a/sci-electronics/puff/files/puff-20100127-Makefile.patch b/sci-electronics/puff/files/puff-20100127-Makefile.patch
new file mode 100644
index 00000000000..025b7237adf
--- /dev/null
+++ b/sci-electronics/puff/files/puff-20100127-Makefile.patch
@@ -0,0 +1,19 @@
+--- Makefile.old 2010-01-22 18:02:32.000000000 +0100
++++ Makefile 2021-07-03 16:55:59.092249878 +0200
+@@ -1,12 +1,13 @@
+ X11LIBDIR = /usr/X11R6/lib
+ PASCALCOMPILER = fpc
+-CC = gcc
+-CFLAGS = -O2 -g
++#CC = gcc
++#CFLAGS = -O2 -g
+
+ POBJS = puff.o pfart.o pffft.o pfmsc.o pfrw.o pfst.o pfun1.o pfun2.o pfun3.o xgraph.o
+
+ puff: $(POBJS) puff_c.o ppas.sh
+- sed 's/link.res/link.res puff_c.o \/usr\/lib\/libX11.so/' <ppas.sh >ppasx.sh
++ sed -i -e 's!^[^[:space:]]\+ -b!$(LD) -b!g' ppas.sh
++ sed 's/.res/.res $(LDFLAGS) puff_c.o \/usr\/lib64\/libX11.so/' <ppas.sh >ppasx.sh
+ sh ppasx.sh
+
+ %.o: %.pas
diff --git a/sci-electronics/puff/files/puff-20181104-Makefile.patch b/sci-electronics/puff/files/puff-20181104-Makefile.patch
new file mode 100644
index 00000000000..a874b9173ae
--- /dev/null
+++ b/sci-electronics/puff/files/puff-20181104-Makefile.patch
@@ -0,0 +1,21 @@
+# fix lib path for X11 and dont ignore LDFLAGS
+# respect CC and LD
+--- Makefile.old 2021-07-03 16:34:49.937098627 +0200
++++ Makefile 2021-07-03 16:33:56.615284555 +0200
+@@ -1,12 +1,13 @@
+ X11LIBDIR = /usr/X11R6/lib
+ PASCALCOMPILER = fpc
+-CC = gcc
+-CFLAGS = -O2 -g
++#CC = gcc
++#CFLAGS = -O2 -g
+
+ POBJS = puff.o pfart.o pffft.o pfmsc.o pfrw.o pfst.o pfun1.o pfun2.o pfun3.o xgraph.o
+
+ puff: $(POBJS) puff_c.o ppas.sh
+- sed 's/link.res/link.res puff_c.o -lX11/' <ppas.sh >ppasx.sh
++ sed -i -e 's!^[^[:space:]]\+ -b!$(LD) -b!g' ppas.sh
++ sed 's/.res/.res $(LDFLAGS) puff_c.o -lX11/' <ppas.sh >ppasx.sh
+ sh ppasx.sh
+
+ %.o: %.pas
diff --git a/sci-electronics/puff/puff-20100127-r1.ebuild b/sci-electronics/puff/puff-20100127-r1.ebuild
index 1c89266a793..3ec8bccda1f 100644
--- a/sci-electronics/puff/puff-20100127-r1.ebuild
+++ b/sci-electronics/puff/puff-20100127-r1.ebuild
@@ -20,16 +20,14 @@ DEPEND="${RDEPEND}
src_prepare() {
default
# fix lib path for X11 and dont ignore LDFLAGS
- sed -i -e "s#lib\\\/#$(get_libdir)\\\/#" \
- -e 's/CFLAGS/#CFLAGS/' \
- -e 's/CC =/#CC =/' \
- -e 's/link.res/.res/g' \
- -e 's/.res pu/.res $(LDFLAGS) pu/' Makefile || die
+ # respect CC and LD
+ eapply -p0 "${FILESDIR}"/$P-Makefile.patch
+ eapply_user
}
src_compile() {
LDFLAGS="$(raw-ldflags)"
- emake -j1 CC="$(tc-getCC)"
+ emake -j1 CC="$(tc-getCC)" LD="$(tc-getLD)"
}
src_install() {
diff --git a/sci-electronics/puff/puff-20181104.ebuild b/sci-electronics/puff/puff-20181104.ebuild
index bf281406eae..3ec8bccda1f 100644
--- a/sci-electronics/puff/puff-20181104.ebuild
+++ b/sci-electronics/puff/puff-20181104.ebuild
@@ -20,15 +20,14 @@ DEPEND="${RDEPEND}
src_prepare() {
default
# fix lib path for X11 and dont ignore LDFLAGS
- sed -i -e 's/CFLAGS/#CFLAGS/' \
- -e 's/CC =/#CC =/' \
- -e 's/link.res/.res/g' \
- -e 's/.res pu/.res $(LDFLAGS) pu/' Makefile || die
+ # respect CC and LD
+ eapply -p0 "${FILESDIR}"/$P-Makefile.patch
+ eapply_user
}
src_compile() {
LDFLAGS="$(raw-ldflags)"
- emake -j1 CC="$(tc-getCC)"
+ emake -j1 CC="$(tc-getCC)" LD="$(tc-getLD)"
}
src_install() {
reply other threads:[~2021-07-03 15:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1625327256.23e6cad3c576c32f97ad857da284e51a88ae9da1.tomjbe@gentoo \
--to=tomjbe@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