Date: Tue, 17 Dec 2013 02:48:31 +0900 From: KATO Tsuguru <tkato432@yahoo.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/184905: games/gma: Fix build with clang Message-ID: <20131217024831.48f8af3e20eddbd4024984ca@yahoo.com> Resent-Message-ID: <201312161810.rBGIAU6K016690@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 184905 >Category: ports >Synopsis: games/gma: Fix build with clang >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Dec 16 18:10:30 UTC 2013 >Closed-Date: >Last-Modified: >Originator: KATO Tsuguru >Release: FreeBSD 8.4-RELEASE-p4 i386 >Organization: >Environment: >Description: - Fix build with clang - Add LICENSE - Support PLIST_FILES New file: files/patch-apprentice.cc Remove file: files/patch-aa files/patch-configure pkg-plist >How-To-Repeat: >Fix: diff -urN /usr/ports/games/gma/Makefile games/gma/Makefile --- /usr/ports/games/gma/Makefile 2013-11-06 22:00:27.000000000 +0900 +++ games/gma/Makefile 2013-12-17 00:00:00.000000000 +0900 @@ -3,12 +3,22 @@ PORTNAME= gma PORTVERSION= 0.6 +PORTREVISION= 1 CATEGORIES= games MASTER_SITES= http://www.student.nada.kth.se/~d92-jwa/code/gma/ MAINTAINER= ports@FreeBSD.org COMMENT= Go-moku game which learns playing the game from studying its opponent +LICENSE= GPLv2 # (or later) + GNU_CONFIGURE= yes +PLIST_FILES= bin/apprentice.gmaplayer bin/gma-console + +post-patch: + @${REINPLACE_CMD} -e \ + 's|stl\.h|map| ; \ + s|^CXXFLAGS|#CXXFLAGS|' ${WRKSRC}/configure + .include <bsd.port.mk> diff -urN /usr/ports/games/gma/files/patch-aa games/gma/files/patch-aa --- /usr/ports/games/gma/files/patch-aa 2013-11-06 22:00:27.000000000 +0900 +++ games/gma/files/patch-aa 1970-01-01 09:00:00.000000000 +0900 @@ -1,13 +0,0 @@ ---- src/Makefile.in.old Wed Jul 19 16:44:37 2000 -+++ src/Makefile.in Wed Jul 19 16:45:06 2000 -@@ -58,8 +58,8 @@ - PRE_UNINSTALL = : - POST_UNINSTALL = : - AWK = @AWK@ --CXX = @CXX@ --CXXFLAGS = @CXXFLAGS@ -+CXX ?= @CXX@ -+CXXFLAGS += @CXXFLAGS@ - LN_S = @LN_S@ - MAKEINFO = @MAKEINFO@ - PACKAGE = @PACKAGE@ diff -urN /usr/ports/games/gma/files/patch-apprentice.cc games/gma/files/patch-apprentice.cc --- /usr/ports/games/gma/files/patch-apprentice.cc 1970-01-01 09:00:00.000000000 +0900 +++ games/gma/files/patch-apprentice.cc 2013-12-17 00:00:00.000000000 +0900 @@ -0,0 +1,11 @@ +--- src/apprentice.cc.orig ++++ src/apprentice.cc +@@ -32,6 +32,8 @@ + #include "moves.h" + #include "gma.h" + ++using std::string; ++ + #define BOARD_SIZE 50 + #define MAX_DEPTH 2 + diff -urN /usr/ports/games/gma/files/patch-configure games/gma/files/patch-configure --- /usr/ports/games/gma/files/patch-configure 2013-11-06 22:00:27.000000000 +0900 +++ games/gma/files/patch-configure 1970-01-01 09:00:00.000000000 +0900 @@ -1,43 +0,0 @@ ---- configure.orig Sun May 18 19:14:38 2003 -+++ configure Sun May 18 19:17:02 2003 -@@ -1246,40 +1246,6 @@ - fi - - --ac_safe=`echo "stl.h" | sed 'y%./+-%__p_%'` --echo $ac_n "checking for stl.h""... $ac_c" 1>&6 --echo "configure:1252: checking for stl.h" >&5 --if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 --else -- cat > conftest.$ac_ext <<EOF --#line 1257 "configure" --#include "confdefs.h" --#include <stl.h> --EOF --ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:1262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } --ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` --if test -z "$ac_err"; then -- rm -rf conftest* -- eval "ac_cv_header_$ac_safe=yes" --else -- echo "$ac_err" >&5 -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_header_$ac_safe=no" --fi --rm -f conftest* --fi --if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -- : --else -- echo "$ac_t""no" 1>&6 --{ echo "configure: error: This program requires STL to compile. Sorry." 1>&2; exit 1; } --fi -- - ac_safe=`echo "string" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for string""... $ac_c" 1>&6 - echo "configure:1286: checking for string" >&5 diff -urN /usr/ports/games/gma/files/patch-moves.h games/gma/files/patch-moves.h --- /usr/ports/games/gma/files/patch-moves.h 2013-11-06 22:00:27.000000000 +0900 +++ games/gma/files/patch-moves.h 2013-12-17 00:00:00.000000000 +0900 @@ -1,11 +1,13 @@ ---- src/moves.h.orig Sun May 18 19:18:04 2003 -+++ src/moves.h Sun May 18 19:18:19 2003 -@@ -24,7 +24,7 @@ +--- src/moves.h.orig ++++ src/moves.h +@@ -24,7 +24,9 @@ #include "pattern.h" -#include <stl.h> -+#include <map.h> ++#include <map> ++ ++using std::map; class Moves:map<Pattern,int> { diff -urN /usr/ports/games/gma/files/patch-scores.h games/gma/files/patch-scores.h --- /usr/ports/games/gma/files/patch-scores.h 2013-11-06 22:00:27.000000000 +0900 +++ games/gma/files/patch-scores.h 2013-12-17 00:00:00.000000000 +0900 @@ -1,15 +1,16 @@ --- src/scores.h.orig Mon Apr 17 02:52:22 2000 +++ src/scores.h Sun May 18 19:19:41 2003 -@@ -22,9 +22,11 @@ +@@ -22,10 +22,12 @@ #ifndef SCORES_H #define SCORES_H -#include <stl.h> -+#include <map.h> ++#include <map> #include <string> #include "pattern.h" -+ -+using namespace std; ++using std::map; ++ class Scores { + public: diff -urN /usr/ports/games/gma/pkg-descr games/gma/pkg-descr --- /usr/ports/games/gma/pkg-descr 2013-11-06 22:00:27.000000000 +0900 +++ games/gma/pkg-descr 2013-12-17 00:00:00.000000000 +0900 @@ -1,8 +1,9 @@ -GMA or "The Go-Moku Apprentice" is a computerized go-moku player that learns -playing the game entirely from its opponent. It was written for fun by -Johan Walles (d92-jwa@nada.kth.se) in October 1998. +GMA or "The Go-Moku Apprentice" is a computerized go-moku player that +learns playing the game entirely from its opponent. It was written for +fun by Johan Walles (d92-jwa@nada.kth.se) in October 1998. -The goal of Go-Moku is to get five (or more) marks in a row (horisontally, -vertically or diagonally). You get to put one mark each time it is your turn. +The goal of Go-Moku is to get five (or more) marks in a row +(horisontally, vertically or diagonally). You get to put one mark each +time it is your turn. WWW: http://www.student.nada.kth.se/~d92-jwa/code/ diff -urN /usr/ports/games/gma/pkg-plist games/gma/pkg-plist --- /usr/ports/games/gma/pkg-plist 2013-11-06 22:00:27.000000000 +0900 +++ games/gma/pkg-plist 1970-01-01 09:00:00.000000000 +0900 @@ -1,2 +0,0 @@ -bin/apprentice.gmaplayer -bin/gma-console >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131217024831.48f8af3e20eddbd4024984ca>