diff --git a/games/species/Makefile b/games/species/Makefile index 0a2ec36f6899..37b5d4e97461 100644 --- a/games/species/Makefile +++ b/games/species/Makefile @@ -1,42 +1,38 @@ PORTNAME= species PORTVERSION= 1.2d PORTREVISION= 1 CATEGORIES= games MASTER_SITES= LOCAL/alepulver DISTNAME= redcoder MAINTAINER= ports@FreeBSD.org COMMENT= Corewars evolver - generates warriors using genetic algorithms WWW= http://redcoder.sourceforge.net/?p=species LICENSE= GPLv1+ # though COPYING files mention LGPL21 and GPLv2 instead USES= gmake dos2unix tar:bzip2 + WRKSRC= ${WRKDIR}/${PORTNAME} OPTIONS_DEFINE= VISITOOL -VISITOOL_DESC= Build GUI tool for displaying evolution - OPTIONS_SUB= yes -VISITOOL_USE= WX=2.4 -VISITOOL_ALL_TARGET= all visitool - -.include +VISITOOL_DESC= Build GUI tool for displaying evolution -.if empty(PORT_OPTIONS:MVISITOOL) -MAKE_ENV+= WX_CONFIG="${TRUE}" -.endif +VISITOOL_USE= WX=3.0 +VISITOOL_MAKE_ENV= WX_CONFIG="${TRUE}" +VISITOOL_ALL_TARGET= all visitool do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin @${MKDIR} ${STAGEDIR}${DATADIR} cd ${WRKSRC} && ${INSTALL_DATA} koen.* species.ini *.rc ${STAGEDIR}${DATADIR} .for i in bench evolver_hill wilfiz @(cd ${WRKSRC} && ${COPYTREE_SHARE} ${i} ${STAGEDIR}${DATADIR}) .endfor -.if ${PORT_OPTIONS:MVISITOOL} + +do-install-VISITOOL-on: ${INSTALL_PROGRAM} ${WRKSRC}/visitool ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-visitool -.endif .include diff --git a/games/species/files/patch-Makefile b/games/species/files/patch-Makefile index c98c0f58487f..ad8c0cc8fdfb 100644 --- a/games/species/files/patch-Makefile +++ b/games/species/files/patch-Makefile @@ -1,32 +1,32 @@ ---- ./Makefile.orig Sun Feb 22 03:54:24 2004 -+++ ./Makefile Wed Jan 16 18:29:09 2008 +--- Makefile.orig 2022-12-31 03:50:49 UTC ++++ Makefile @@ -1,22 +1,22 @@ # makefile for species -CC = gcc -CPP = g++ -LD = g++ +CC ?= gcc +CPP = $(CXX) +LD = $(CXX) -OPT = -O4 +#OPT = -O4 DBG = # Recommended extra options for gcc: #OPT += -fomit-frame-pointer -fforce-addr -finline-functions -funroll-loops #OPT += -mcpu=i686 -march=i686 #DBG += -W -Wall -pedantic -ansi -CFLAGS = ${OPT} ${DBG} +CFLAGS += ${OPT} ${DBG} ${WXCFLAGS} -include math.h CPPFLAGS = ${OPT} ${DBG} #set WXDIR if it isn't a global variable on your system, and you will be making visitool (species itself doesn't need wxWindows) -WXCFLAGS = -I${WXDIR}/lib/wx/include/msw-2.4 -I${WXDIR}/include -I${WXDIR}/src/regex -I${WXDIR}/src/zlib -I${WXDIR}/src/png -I${WXDIR}/src/jpeg -I${WXDIR}/src/tiff -D_WIN32_IE=0x400 -D__WXMSW__ -mthreads -DWXUSINGDLL=1 -fno-pcc-struct-return -O4 -MMD -mthreads -Wall -WXLD = -L${WXDIR}/lib -lwxmsw240 -Wl,--subsystem,windows -mwindows -mthreads +WXCFLAGS = `${WX_CONFIG} --cflags` +WXLD = `${WX_CONFIG} --libs` #exhaust files EXHAUST = sim.o asm.o pspace.o diff --git a/games/species/files/patch-main.cpp b/games/species/files/patch-main.cpp index 8b3059f0dafc..a8294c8847da 100644 --- a/games/species/files/patch-main.cpp +++ b/games/species/files/patch-main.cpp @@ -1,11 +1,11 @@ ---- main.cpp.orig +--- main.cpp.orig 2022-12-31 03:50:49 UTC +++ main.cpp -@@ -29,7 +29,7 @@ +@@ -29,7 +29,7 @@ using namespace std; /***** main program entry point ********************/ -int main(int /*argc*/,char /***args*/) { +int main(int /*argc*/,char **/*args*/) { CKingdom kingdom; #ifndef _WIN32