diff options
author | David Seifert <soap@gentoo.org> | 2020-08-08 18:53:54 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2020-08-08 18:53:54 +0200 |
commit | c6e340c732c5ef61880193a55a9037c8cbe8331f (patch) | |
tree | af6d43345ef57479631b4288d8719a6309c5632f /media-sound/pwavecat | |
parent | media-sound/mp3splt-gtk: Fix building under -fno-common (diff) | |
download | gentoo-c6e340c732c5ef61880193a55a9037c8cbe8331f.tar.gz gentoo-c6e340c732c5ef61880193a55a9037c8cbe8331f.tar.bz2 gentoo-c6e340c732c5ef61880193a55a9037c8cbe8331f.zip |
media-sound/pwavecat: Fix building under -fno-common
* Fix sandbox issue introduced by commit ba033ea82276709866cfa58a301f524ad9955f72
Closes: https://bugs.gentoo.org/656634
Closes: https://bugs.gentoo.org/707194
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'media-sound/pwavecat')
6 files changed, 114 insertions, 39 deletions
diff --git a/media-sound/pwavecat/files/pwavecat-0.4.5-Makefile.patch b/media-sound/pwavecat/files/pwavecat-0.4.5-Makefile.patch new file mode 100644 index 000000000000..c46bbc6ef100 --- /dev/null +++ b/media-sound/pwavecat/files/pwavecat-0.4.5-Makefile.patch @@ -0,0 +1,27 @@ +--- a/Makefile ++++ b/Makefile +@@ -2,7 +2,7 @@ + #CC=/usr/local/bin/gcc + + +-CFLAGS = -O2 -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 ++CFLAGS += -Wall + + LIBRARY = + +@@ -14,14 +14,8 @@ + pwavecat.o \ + parts.o + +-all: +- gcc $(CFLAGS) -c $(SRC1) +- +- gcc -o pwavecat $(OBJECT1) $(LIBRARY) +- + # DEPENDENCIES +-pwavecat.o : pwavecat.c pwavecat.h pwavecat_proto.h parts.h wave_header.h +-parts.o : parts.c parts.h pwavecat.h pwavecat_proto.h wave_header.h ++pwavecat: parts.o + + install: + cp pwavecat /usr/local/bin/ diff --git a/media-sound/pwavecat/files/pwavecat-0.4.5-fno-common.patch b/media-sound/pwavecat/files/pwavecat-0.4.5-fno-common.patch new file mode 100644 index 000000000000..7fb567e0425c --- /dev/null +++ b/media-sound/pwavecat/files/pwavecat-0.4.5-fno-common.patch @@ -0,0 +1,65 @@ +--- a/parts.c ++++ b/parts.c +@@ -19,6 +19,7 @@ + + #include "pwavecat.h" + ++struct part *parttab[2]; + + struct part *lookup_part(char *name) + { +--- a/parts.h ++++ b/parts.h +@@ -12,7 +12,7 @@ + struct part *nxtentr; + struct part *prventr; + }; +-struct part *parttab[2]; ++extern struct part *parttab[2]; + /* first element points to first entry, second element to last entry */ + + #endif /* _PARTS_H_ */ +--- a/pwavecat.c ++++ b/pwavecat.c +@@ -38,6 +38,9 @@ + // DWORD data_length; /* length of data */ + // } wave_header; + ++int debug_flag; ++int verbose_flag; ++ + int modus; + int sample_fq; + int byte_p_sec; +--- a/pwavecat.h ++++ b/pwavecat.h +@@ -12,20 +12,20 @@ + #include "wave_header.h" + #include "parts.h" + +-int debug_flag; +-int verbose_flag; ++extern int debug_flag; ++extern int verbose_flag; + +-int sample_fq; +-int byte_p_sec; +-int byte_p_spl; +-int bit_p_spl; +-int modus; +-int have_format_flag; // set if first wave header is read, now file format is set. ++extern int sample_fq; ++extern int byte_p_sec; ++extern int byte_p_spl; ++extern int bit_p_spl; ++extern int modus; ++extern int have_format_flag; // set if first wave header is read, now file format is set. + + #define MAX_FILES 100 + #define BUFFER_SIZE 65536 + +-char *input_filename[MAX_FILES]; ++extern char *input_filename[MAX_FILES]; + + #define VERSION "0.4.5" + diff --git a/media-sound/pwavecat/files/pwavecat-0.4.5-overflow.patch b/media-sound/pwavecat/files/pwavecat-0.4.5-overflow.patch index f3d54221bc7d..12db68a57cf2 100644 --- a/media-sound/pwavecat/files/pwavecat-0.4.5-overflow.patch +++ b/media-sound/pwavecat/files/pwavecat-0.4.5-overflow.patch @@ -1,5 +1,3 @@ -diff --git a/parts.c b/parts.c -index 670d0d5..a59ad98 100644 --- a/parts.c +++ b/parts.c @@ -338,10 +338,10 @@ if(! file_header) diff --git a/media-sound/pwavecat/files/pwavecat-0.4.5-version.patch b/media-sound/pwavecat/files/pwavecat-0.4.5-version.patch new file mode 100644 index 000000000000..07e263b13be4 --- /dev/null +++ b/media-sound/pwavecat/files/pwavecat-0.4.5-version.patch @@ -0,0 +1,11 @@ +--- a/pwavecat.h ++++ b/pwavecat.h +@@ -27,7 +27,7 @@ + + char *input_filename[MAX_FILES]; + +-#define VERSION "0.4.4" ++#define VERSION "0.4.5" + + #endif /* _PWAVECAT_H_ */ + diff --git a/media-sound/pwavecat/files/pwavecat-0.4.5.diff b/media-sound/pwavecat/files/pwavecat-0.4.5.diff deleted file mode 100644 index abe00c69daec..000000000000 --- a/media-sound/pwavecat/files/pwavecat-0.4.5.diff +++ /dev/null @@ -1,27 +0,0 @@ -diff -Naur pwavecat-0.4.5.orig/Makefile pwavecat-0.4.5/Makefile ---- pwavecat-0.4.5.orig/Makefile 2005-10-06 15:52:56.000000000 +0200 -+++ pwavecat-0.4.5/Makefile 2007-10-06 16:27:25.000000000 +0200 -@@ -15,9 +15,9 @@ - parts.o - - all: -- gcc $(CFLAGS) -c $(SRC1) -+ $(CC) $(CFLAGS) -c $(SRC1) - -- gcc -o pwavecat $(OBJECT1) $(LIBRARY) -+ $(CC) $(LDFLAGS) -o pwavecat $(OBJECT1) $(LIBRARY) - - # DEPENDENCIES - pwavecat.o : pwavecat.c pwavecat.h pwavecat_proto.h parts.h wave_header.h -diff -Naur pwavecat-0.4.5.orig/pwavecat.h pwavecat-0.4.5/pwavecat.h ---- pwavecat-0.4.5.orig/pwavecat.h 2005-10-06 15:52:56.000000000 +0200 -+++ pwavecat-0.4.5/pwavecat.h 2007-10-06 16:27:50.000000000 +0200 -@@ -27,7 +27,7 @@ - - char *input_filename[MAX_FILES]; - --#define VERSION "0.4.4" -+#define VERSION "0.4.5" - - #endif /* _PWAVECAT_H_ */ - diff --git a/media-sound/pwavecat/pwavecat-0.4.5.ebuild b/media-sound/pwavecat/pwavecat-0.4.5.ebuild index 21a4580caba4..f49e51ba3f36 100644 --- a/media-sound/pwavecat/pwavecat-0.4.5.ebuild +++ b/media-sound/pwavecat/pwavecat-0.4.5.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -inherit toolchain-funcs flag-o-matic +inherit flag-o-matic toolchain-funcs DESCRIPTION="concatenates any number of audio files to stdout" HOMEPAGE="http://panteltje.com/panteltje/dvd/" @@ -12,19 +12,20 @@ SRC_URI="http://panteltje.com/panteltje/dvd/${P}.tgz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" PATCHES=( - "${FILESDIR}/${P}.diff" - "${FILESDIR}/${P}-overflow.patch" + "${FILESDIR}"/${P}-Makefile.patch + "${FILESDIR}"/${P}-version.patch + "${FILESDIR}"/${P}-overflow.patch + "${FILESDIR}"/${P}-fno-common.patch ) -src_compile() { - append-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" +src_configure() { + append-lfs-flags + tc-export CC } src_install() { dobin pwavecat - default + einstalldocs } |