diff options
author | rakuco <rakuco@FreeBSD.org> | 2017-08-18 05:59:39 +0800 |
---|---|---|
committer | rakuco <rakuco@FreeBSD.org> | 2017-08-18 05:59:39 +0800 |
commit | 2ebb8380a435b573cd7f05167985d246420aa499 (patch) | |
tree | 742e966b03fa6d3a1a9cc9aaa6fd5273ba8ea683 /mail | |
parent | 304e414394398f3156490003032af586f31ee500 (diff) | |
download | freebsd-ports-gnome-2ebb8380a435b573cd7f05167985d246420aa499.tar.gz freebsd-ports-gnome-2ebb8380a435b573cd7f05167985d246420aa499.tar.zst freebsd-ports-gnome-2ebb8380a435b573cd7f05167985d246420aa499.zip |
Explicitly pass -std=gnu++03 to the compiler.
This fixes the build with GCC 6, which defaults to -std=gnu++14. The port's
code does not work with C++11 or later.
Fixing it also requires adjusting Makefile.in so that invoking the C++ compiler
uses CXXFLAGS, not CFLAGS.
PR: 219275
Diffstat (limited to 'mail')
-rw-r--r-- | mail/annoyance-filter/Makefile | 3 | ||||
-rw-r--r-- | mail/annoyance-filter/files/patch-Makefile.in | 28 |
2 files changed, 28 insertions, 3 deletions
diff --git a/mail/annoyance-filter/Makefile b/mail/annoyance-filter/Makefile index 59e3da6cbf4e..9e14cfacf4d6 100644 --- a/mail/annoyance-filter/Makefile +++ b/mail/annoyance-filter/Makefile @@ -19,6 +19,9 @@ LICENSE_FILE_GPLv2+ = ${WRKSRC}/COPYING.GNU USE_GCC= yes GNU_CONFIGURE= yes +# The port does not build with C++11 or later (GCC 6 defaults to -std=gnu++14). +USE_CXXSTD= gnu++03 + PORTDOCS= INSTALL README *.pdf PLIST_FILES= bin/annoyance-filter \ diff --git a/mail/annoyance-filter/files/patch-Makefile.in b/mail/annoyance-filter/files/patch-Makefile.in index 285462f13e85..aecfbacc1c2d 100644 --- a/mail/annoyance-filter/files/patch-Makefile.in +++ b/mail/annoyance-filter/files/patch-Makefile.in @@ -1,13 +1,22 @@ --- Makefile.in.orig 2004-08-04 14:42:56 UTC +++ Makefile.in -@@ -83,11 +83,11 @@ ipmpar.o: DCDFlib/src/ipmpar.c +@@ -76,18 +76,18 @@ all: $(PROGS) $(DATA) $(DOCUMENTS) + DCDFLIB_OBJS = dcdflib.o ipmpar.o + + dcdflib.o: DCDFlib/src/dcdflib.c +- $(CXX) $(CFLAGS) -IDCDFlib/src -c DCDFlib/src/dcdflib.c ++ $(CXX) $(CXXFLAGS) -IDCDFlib/src -c DCDFlib/src/dcdflib.c + + ipmpar.o: DCDFlib/src/ipmpar.c +- $(CXX) $(CFLAGS) -IDCDFlib/src -c DCDFlib/src/ipmpar.c ++ $(CXX) $(CXXFLAGS) -IDCDFlib/src -c DCDFlib/src/ipmpar.c # Annoyance filter program -$(PRODUCT): $(PRODUCT).o statlib.o $(DCDFLIB_OBJS) getopt.o getopt1.o - $(CXX) $(PRODUCT).o statlib.o $(DCDFLIB_OBJS) getopt.o getopt1.o -o $(PRODUCT) $(CFLAGS) $(LDFLAGS) +$(PRODUCT): $(PRODUCT).o statlib.o $(DCDFLIB_OBJS) -+ $(CXX) $(PRODUCT).o statlib.o $(DCDFLIB_OBJS) -o $(PRODUCT) $(CFLAGS) $(LDFLAGS) ++ $(CXX) $(PRODUCT).o statlib.o $(DCDFLIB_OBJS) -o $(PRODUCT) $(CXXFLAGS) $(LDFLAGS) @rm -f core core.* -$(PRODUCT).o: $(PRODUCT).cc config.h getopt.h @@ -22,7 +31,7 @@ -statlib_test: statlib_test.o statlib.o $(DCDFLIB_OBJS) getopt.o - $(CXX) statlib_test.o statlib.o getopt.o -o statlib_test $(DCDFLIB_OBJS) $(CFLAGS) $(LDFLAGS) +statlib_test: statlib_test.o statlib.o $(DCDFLIB_OBJS) -+ $(CXX) statlib_test.o statlib.o -o statlib_test $(DCDFLIB_OBJS) $(CFLAGS) $(LDFLAGS) ++ $(CXX) statlib_test.o statlib.o -o statlib_test $(DCDFLIB_OBJS) $(CXXFLAGS) $(LDFLAGS) statlib.o: statlib.cc config.h getopt.h statlib.cc: statlib.w @@ -41,3 +50,16 @@ manhtml: $(PRODUCT)_man.html # Test it +@@ -350,10 +342,10 @@ winarch: $(PRODUCT).cc + $(CC) $(CFLAGS) $(INCLUDE_LIBS) $(LDFLAGS) -o $@ $< + + .cc.o: +- $(CXX) $(CFLAGS) $(INCLUDE_LIBS) -c $< ++ $(CXX) $(CXXFLAGS) $(INCLUDE_LIBS) -c $< + + .cc: +- $(CXX) $(CFLAGS) $(INCLUDE_LIBS) $(LDFLAGS) -o $@ $< ++ $(CXX) $(CXXFLAGS) $(INCLUDE_LIBS) $(LDFLAGS) -o $@ $< + + .w.c: + $(CTANGLE) $< |