diff options
author | Thomas Beierlein <tomjbe@gentoo.org> | 2021-07-03 17:46:30 +0200 |
---|---|---|
committer | Thomas Beierlein <tomjbe@gentoo.org> | 2021-07-03 17:47:36 +0200 |
commit | 23e6cad3c576c32f97ad857da284e51a88ae9da1 (patch) | |
tree | 58a843084b49f8f11c0670ef236beda0f5e38281 /sci-electronics/puff | |
parent | app-text/apvlv: update HOMEPAGE (diff) | |
download | gentoo-23e6cad3c576c32f97ad857da284e51a88ae9da1.tar.gz gentoo-23e6cad3c576c32f97ad857da284e51a88ae9da1.tar.bz2 gentoo-23e6cad3c576c32f97ad857da284e51a88ae9da1.zip |
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@gentoo.org>
Diffstat (limited to 'sci-electronics/puff')
-rw-r--r-- | sci-electronics/puff/files/puff-20100127-Makefile.patch | 19 | ||||
-rw-r--r-- | sci-electronics/puff/files/puff-20181104-Makefile.patch | 21 | ||||
-rw-r--r-- | sci-electronics/puff/puff-20100127-r1.ebuild | 10 | ||||
-rw-r--r-- | 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 000000000000..025b7237adfe --- /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 000000000000..a874b9173aed --- /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 1c89266a7936..3ec8bccda1fa 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 bf281406eae7..3ec8bccda1fa 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() { |