From ff7d488e8822a9db81371f4bff426ff38330036f Mon Sep 17 00:00:00 2001 From: Gavin Pryke Date: Mon, 29 Jun 2020 17:02:45 +0100 Subject: [PATCH] app-text/ansifilter: Pass QA warning for LDFLAGS Second revision of patch alters CC/CXX/CXXFLAGS to save specifying in ebuild. Bug: https://bugs.gentoo.org/713524 --- app-text/ansifilter/ansifilter-2.16.ebuild | 4 +- .../files/ansifilter-2.16-makefile.patch | 56 +++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 app-text/ansifilter/files/ansifilter-2.16-makefile.patch diff --git a/app-text/ansifilter/ansifilter-2.16.ebuild b/app-text/ansifilter/ansifilter-2.16.ebuild index d6ef6e4cc8c..e90bd07d1f9 100644 --- a/app-text/ansifilter/ansifilter-2.16.ebuild +++ b/app-text/ansifilter/ansifilter-2.16.ebuild @@ -22,6 +22,8 @@ RDEPEND=" )" DEPEND="${RDEPEND}" +PATCHES=( "${FILESDIR}/${PN}-2.16-makefile.patch" ) + src_prepare() { default @@ -38,7 +40,7 @@ src_configure() { } src_compile() { - emake -f makefile CC="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS} -DNDEBUG -std=c++11" + emake -f makefile CXX="$(tc-getCXX)" if use qt5 ; then pushd src/qt-gui > /dev/null || die diff --git a/app-text/ansifilter/files/ansifilter-2.16-makefile.patch b/app-text/ansifilter/files/ansifilter-2.16-makefile.patch new file mode 100644 index 00000000000..011b729137d --- /dev/null +++ b/app-text/ansifilter/files/ansifilter-2.16-makefile.patch @@ -0,0 +1,56 @@ +=============================================================================== +Subject: Pass QA check on Gentoo to inherit environment LDFLAGS. + Revised version of patch CC -> CXX for c++ compiler, and edit + CXXFLAGS to save specifying in ebuild. + +Bug: https://bugs.gentoo.org/713524 + +From: Gavin Pryke +=============================================================================== +diff -Naru -x '*.swp' ansifilter-2.16.orig/src/makefile ansifilter-2.16/src/makefile +--- ansifilter-2.16.orig/src/makefile 2020-01-29 18:07:27.000000000 +0000 ++++ ansifilter-2.16/src/makefile 2020-06-28 13:00:23.769958213 +0100 +@@ -4,16 +4,15 @@ + + # afl-g++ for preparing fuzzing tests + +-CC=g++ ++CXX ?= g++ + #CC=clang++ + + # Added -std=c++11 because of auto_ptr to unique_ptr transition +-CXXFLAGS= -Wall -O2 -DNDEBUG -std=c++11 -fPIC ++CXXFLAGS := -Wall -O2 -DNDEBUG -std=c++11 -fPIC $(CXXFLAGS) + #CXXFLAGS= -O0 -ggdb -std=c++11 -fPIC + #CXXFLAGS="-DNDEBUG -g2 -O3 -march=i686" + #cov-build --dir cov-int make -j 2 + +-LDFLAGS= + + SOURCES=arg_parser.o stringtools.o cmdlineoptions.o main.o platform_fs.o\ + codegenerator.o htmlgenerator.o pangogenerator.o texgenerator.o latexgenerator.o rtfgenerator.o svggenerator.o\ +@@ -25,10 +24,10 @@ + all: $(SOURCES) $(EXECUTABLE) + + $(EXECUTABLE): $(OBJECTS) +- $(CC) $(LDFLAGS) $(EXTRA_LDFLAGS) $(OBJECTS) -o $@ ++ $(CXX) $(LDFLAGS) $(EXTRA_LDFLAGS) $(OBJECTS) -o $@ + + .cpp.o: +- $(CC) -c $(CXXFLAGS) $(EXTRA_CXXFLAGS) $< -o $@ ++ $(CXX) -c $(CXXFLAGS) $(EXTRA_CXXFLAGS) $< -o $@ + + clean: + @rm -f *.o +diff -Naru -x '*.swp' ansifilter-2.16.orig/src/tcl/makefile ansifilter-2.16/src/tcl/makefile +--- ansifilter-2.16.orig/src/tcl/makefile 2020-01-29 18:07:27.000000000 +0000 ++++ ansifilter-2.16/src/tcl/makefile 2020-06-21 00:16:56.709894777 +0100 +@@ -5,7 +5,7 @@ + + CFLAGS= -c -Wall -O2 -fPIC + +-LDFLAGS= -shared -fPIC ++LDFLAGS += -shared -fPIC + + SOURCES=stringtools.cpp platform_fs.cpp\ + codegenerator.cpp htmlgenerator.cpp pangogenerator.cpp texgenerator.cpp latexgenerator.cpp rtfgenerator.cpp\ -- 2.26.2