diff options
author | Piotr Kubaj <pkubaj@FreeBSD.org> | 2020-01-02 23:29:17 +0000 |
---|---|---|
committer | Piotr Kubaj <pkubaj@FreeBSD.org> | 2020-01-02 23:29:17 +0000 |
commit | ce15b9aca9ae5f4a9a857163f45de951930954f1 (patch) | |
tree | 9d3d62ccadcd3a35aea635816cc41bd83821c67c | |
parent | cad/openvsp: update to 3.20.0 (diff) |
games/eboard: fix build on GCC architectures
Use C++11 compiler and respect CXXFLAGS.
The compiler check is wrong so remove it.
-rw-r--r-- | games/eboard/Makefile | 4 | ||||
-rw-r--r-- | games/eboard/files/patch-configure | 61 |
2 files changed, 58 insertions, 7 deletions
diff --git a/games/eboard/Makefile b/games/eboard/Makefile index a95cffb27d00..ea5055f6886a 100644 --- a/games/eboard/Makefile +++ b/games/eboard/Makefile @@ -19,7 +19,7 @@ COMMENT= GTK+ chess board interface (mainly for FICS and chessd) LIB_DEPENDS= libpng.so:graphics/png EXTRAS= 1pl2 2 -USES= gnome perl5 pkgconfig shebangfix tar:bzip2 +USES= compiler:c++11-lang gnome perl5 pkgconfig shebangfix tar:bzip2 HAS_CONFIGURE= yes USE_PERL5= build USE_GNOME= gtk20 @@ -51,7 +51,7 @@ post-extract: .endfor post-patch: - @${REINPLACE_CMD} -e 's,g++,${CXX},' -e 's,-O6,${CXXFLAGS},' \ + @${REINPLACE_CMD} -e 's,g++,${CXX},' -e 's|-O6|${CXXFLAGS}|' \ ${WRKSRC}/configure .if empty(PORT_OPTIONS:MJOYSTICK) diff --git a/games/eboard/files/patch-configure b/games/eboard/files/patch-configure index 6c7e1c1821d8..aa5c56eff85d 100644 --- a/games/eboard/files/patch-configure +++ b/games/eboard/files/patch-configure @@ -1,6 +1,57 @@ ---- configure.orig 2008-02-22 16:51:22.000000000 +0100 -+++ configure 2008-12-29 11:25:54.000000000 +0100 -@@ -354,7 +354,7 @@ +--- configure.orig 2020-01-02 23:06:25 UTC ++++ configure +@@ -104,7 +104,7 @@ sub run_cmd { + } + + sub cplusplus_lang { +- my @compilers = ( $cxx, 'g++', 'c++' ); ++ my @compilers = ( $cxx, 'g++9', 'c++' ); + my $x; + my $program = <<EOF; + #include <list> +@@ -142,41 +142,6 @@ EOF + print TESTCC "$program"; + close TESTCC; + +- $cxx = 'no'; +- for (@compilers) { +- $x = $_; +- print " trying $x ... "; +- +- unlink('test.o','yytest'); +- log_file("test.cc"); +- +- if (run_cmd($x, '-c', 'test.cc', '-o', 'test.o') != 0) { +- print "compilation FAILED\n"; +- next; +- } +- +- if (run_cmd($x, 'test.o', '-o', 'yytest') != 0) { +- print "compilation ok, linking FAILED\n"; +- next; +- } +- +- $y = `./yytest`; +- if ($y ne "1710\n") { +- print "compilation ok, linking ok, output FAILED\n"; +- next; +- } +- +- $cxx = $x; +- print "it works\n"; +- last; +- } +- unlink('test.o','yytest','test.cc'); +- +- if ($cxx eq 'no') { +- print "FAIL\n"; +- return 0; +- } +- + return 1; + } + +@@ -354,7 +319,7 @@ sub header_check { log_file("test.cc"); @@ -9,7 +60,7 @@ print ": no\n"; $y = header_def($x); print CONFIGH "#undef $y\n"; -@@ -512,17 +512,9 @@ +@@ -512,17 +477,9 @@ if (!header_check("stdio.h","stdlib.h","string.h","uni #optional headers header_check("strings.h","sys/soundcard.h","sys/audioio.h","linux/joystick.h"); @@ -28,7 +79,7 @@ cppdef("USE_SOCK_OPTS"); if ($t1!=0 && $t3!=0) { cppundef("NEED_TCP_H"); -@@ -536,10 +528,10 @@ +@@ -536,10 +493,10 @@ if ($t2 != 0) { print "netinet/tcp.h not required, SOL_TCP present.\n"; } } else { |