aboutsummaryrefslogtreecommitdiffstats
path: root/games/motogt
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2014-02-03 02:07:42 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2014-02-03 02:07:42 +0800
commit696f9b6e95c72fb4a8a1a51772e93b5563a94132 (patch)
treee28a892cd27bd182102df0e80c89d3dc8e0b859b /games/motogt
parent9daab89463e52a8160bfe821461b2fa110285bea (diff)
downloadfreebsd-ports-gnome-696f9b6e95c72fb4a8a1a51772e93b5563a94132.tar.gz
freebsd-ports-gnome-696f9b6e95c72fb4a8a1a51772e93b5563a94132.tar.zst
freebsd-ports-gnome-696f9b6e95c72fb4a8a1a51772e93b5563a94132.zip
- Support staging
- Fix crash on first start (e.g. when no config is found) - Fix crash when changing resolutions with no XRender extension (e.g. with nvidia blob)
Diffstat (limited to 'games/motogt')
-rw-r--r--games/motogt/Makefile19
-rw-r--r--games/motogt/files/patch-Makefile10
-rw-r--r--games/motogt/files/patch-src-Config.cpp22
-rw-r--r--games/motogt/files/patch-src-Makefile.common149
-rw-r--r--games/motogt/files/patch-src-Makefile.lnx24
5 files changed, 207 insertions, 17 deletions
diff --git a/games/motogt/Makefile b/games/motogt/Makefile
index 74087a6af9cc..c977d3bac661 100644
--- a/games/motogt/Makefile
+++ b/games/motogt/Makefile
@@ -3,7 +3,7 @@
PORTNAME= motogt
PORTVERSION= 20110505
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= games
MASTER_SITES= SF/motogt/
DISTNAME= MotoGT-${PORTVERSION}
@@ -11,12 +11,11 @@ DISTNAME= MotoGT-${PORTVERSION}
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= 2D top-viewed motorcycle racing game
-LIB_DEPENDS= sfml-system:${PORTSDIR}/devel/sfml \
- png15:${PORTSDIR}/graphics/png
+LIB_DEPENDS= libsfml-system.so:${PORTSDIR}/devel/sfml \
+ libpng.so:${PORTSDIR}/graphics/png
LICENSE= GPLv2 CCbySA
LICENSE_COMB= multi
-LICENSE_FILE_GPLv2= ${WRKSRC}/doc/gpl.txt
LICENSE_NAME_CCbySA= Creative Commons Attribution-ShareAlike
LICENSE_PERMS_CCbySA= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
LICENSE_FILE_CCbySA= ${WRKSRC}/doc/cc-by-sa.txt
@@ -28,19 +27,17 @@ MAKE_JOBS_UNSAFE= yes
CFLAGS+= -I${LOCALBASE}/include/libpng15
MAKE_ENV+= PTHREAD_LIBS="${PTHREAD_LIBS}"
SUB_FILES= motogt
+CXXFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
PLIST_FILES= bin/${PORTNAME} libexec/MotoGT.bin
PORTDATA= *
WRKSRC= ${WRKDIR}/MotoGT
-NO_STAGE= yes
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/MotoGT.bin ${PREFIX}/libexec/
- ${INSTALL_SCRIPT} ${WRKDIR}/motogt ${PREFIX}/bin/
-.if !defined(NOPORTDATA)
- ${MKDIR} ${DATADIR}
- cd ${WRKSRC} && ${COPYTREE_SHARE} data ${DATADIR}/
-.endif
+ ${INSTALL_PROGRAM} ${WRKSRC}/MotoGT.bin ${STAGEDIR}${PREFIX}/libexec/
+ ${INSTALL_SCRIPT} ${WRKDIR}/motogt ${STAGEDIR}${PREFIX}/bin/
+ cd ${WRKSRC} && ${COPYTREE_SHARE} data ${STAGEDIR}${DATADIR}/
.include <bsd.port.mk>
diff --git a/games/motogt/files/patch-Makefile b/games/motogt/files/patch-Makefile
new file mode 100644
index 000000000000..86ad265d849c
--- /dev/null
+++ b/games/motogt/files/patch-Makefile
@@ -0,0 +1,10 @@
+--- Makefile.orig 2011-01-10 20:25:23.000000000 +0300
++++ Makefile 2011-09-27 08:44:25.000000000 +0400
+@@ -1,5 +1,5 @@
+ all:
+- make -C src -f Makefile.lnx
++ ${MAKE} -C src -f Makefile.lnx
+
+ clean:
+- make -C src -f Makefile.lnx clean
++ ${MAKE} -C src -f Makefile.lnx clean
diff --git a/games/motogt/files/patch-src-Config.cpp b/games/motogt/files/patch-src-Config.cpp
new file mode 100644
index 000000000000..148cd380aa43
--- /dev/null
+++ b/games/motogt/files/patch-src-Config.cpp
@@ -0,0 +1,22 @@
+--- src/Config.cpp.orig 2011-01-18 06:52:35.000000000 +0300
++++ src/Config.cpp 2014-02-02 21:13:04.124154052 +0400
+@@ -139,6 +139,9 @@
+ }
+
+ void Config::ChangeResolution(bool up) {
++ if (num_modes == 0)
++ return;
++
+ if (cur_mode!=num_modes) cur_mode+=up?1:num_modes-1;
+ cur_mode=cur_mode%num_modes;
+ real_w=modes_w[cur_mode];
+@@ -226,7 +229,8 @@
+ old_fullscreen=fullscreen;
+ changed=false;
+ ofstream fil((home_dir+"settings.lst").c_str(),ios::trunc);
+- fil<<"version="<<(config->version=VERSION)<<endl;
++ fil<<"version="<<VERSION<<endl;
++ if (config) config->version = VERSION;
+ fil<<"fullscreen="<<(fullscreen?1:0)<<endl;
+ fil<<"low_textures="<<(low_textures?1:0)<<endl;
+ fil<<"sound="<<(sound_on?1:0)<<endl;
diff --git a/games/motogt/files/patch-src-Makefile.common b/games/motogt/files/patch-src-Makefile.common
new file mode 100644
index 000000000000..7b6fb39a5948
--- /dev/null
+++ b/games/motogt/files/patch-src-Makefile.common
@@ -0,0 +1,149 @@
+--- src/Makefile.common.orig 2011-01-10 20:40:30.000000000 +0300
++++ src/Makefile.common 2011-09-27 08:39:09.000000000 +0400
+@@ -1,110 +1,110 @@
+ OBJS=${TEMP_DIR}/BikeSelection.o ${TEMP_DIR}/Data.o ${TEMP_DIR}/main.o ${TEMP_DIR}/Particulas.o ${TEMP_DIR}/Carrera.o ${TEMP_DIR}/Circuito.o ${TEMP_DIR}/Moto.o ${TEMP_DIR}/global.o ${TEMP_DIR}/OSD.o ${TEMP_DIR}/MyFont.o ${TEMP_DIR}/Menu.o ${TEMP_DIR}/Loading.o ${TEMP_DIR}/Confirm.o ${TEMP_DIR}/Jukebox.o ${TEMP_DIR}/RaceExtras.o ${TEMP_DIR}/SelectionWheel.o ${TEMP_DIR}/TrackSelection.o ${TEMP_DIR}/RaceResults.o ${TEMP_DIR}/Shader.o ${TEMP_DIR}/TextViewer.o ${TEMP_DIR}/text.o ${TEMP_DIR}/RaceMenu.o ${TEMP_DIR}/ChampionshipMenu.o ${TEMP_DIR}/MakeData.o ${TEMP_DIR}/ChampionshipData.o ${TEMP_DIR}/Profile.o ${TEMP_DIR}/Config.o ${TEMP_DIR}/MyRenderWindow.o ${TEMP_DIR}/SlideShow.o ${TEMP_DIR}/Experience.o ${TEMP_DIR}/LangSelection.o ${TEMP_DIR}/Records.o ${TEMP_DIR}/StyleOsd.o ${TEMP_DIR}/Intro.o ${TEMP_DIR}/HiddenDriver.o ${TEMP_DIR}/text_hidden.o
+
+ ${TEMP_DIR}/BikeSelection.o: BikeSelection.cpp global.h MyRenderWindow.h Data.h BikeSelection.h Drawer.h MyFont.h SelectionWheel.h Confirm.h Loading.h Config.h Profile.h Jukebox.h
+- ${GPP} ${FLAGS} -c BikeSelection.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c BikeSelection.cpp -o $@
+
+ ${TEMP_DIR}/Data.o: Data.cpp Data.h global.h MyRenderWindow.h Jukebox.h Particulas.h Shader.h ChampionshipData.h Profile.h Config.h
+- ${GPP} ${FLAGS} -c Data.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c Data.cpp -o $@
+
+ ${TEMP_DIR}/main.o: main.cpp global.h MyRenderWindow.h Data.h OSD.h RaceExtras.h Carrera.h Drawer.h Particulas.h Menu.h MyFont.h Loading.h Confirm.h Jukebox.h SelectionWheel.h Shader.h ChampionshipData.h Config.h Profile.h SlideShow.h version.h Circuito.h LangSelection.h StyleOsd.h Intro.h text_hidden.h HiddenDriver.h
+- ${GPP} ${FLAGS} -c main.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c main.cpp -o $@
+
+ ${TEMP_DIR}/Particulas.o: Particulas.cpp Particulas.h global.h MyRenderWindow.h Data.h Moto.h Circuito.h
+- ${GPP} ${FLAGS} -c Particulas.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c Particulas.cpp -o $@
+
+ ${TEMP_DIR}/Carrera.o: Carrera.cpp Carrera.h global.h MyRenderWindow.h Data.h Drawer.h Confirm.h RaceExtras.h Circuito.h Particulas.h Moto.h OSD.h Loading.h Shader.h Jukebox.h Profile.h Config.h TextViewer.h text.h StyleOsd.h
+- ${GPP} ${FLAGS} -c Carrera.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c Carrera.cpp -o $@
+
+ ${TEMP_DIR}/Circuito.o: Circuito.cpp Circuito.h global.h MyRenderWindow.h Data.h Jukebox.h Loading.h Drawer.h Confirm.h MakeData.h Profile.h Config.h OSD.h
+- ${GPP} ${FLAGS} -c Circuito.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c Circuito.cpp -o $@
+
+ ${TEMP_DIR}/Moto.o: Moto.cpp Moto.h Circuito.h global.h MyRenderWindow.h Data.h Jukebox.h RaceExtras.h Particulas.h Carrera.h Drawer.h Loading.h Profile.h Config.h StyleOsd.h
+- ${GPP} ${FLAGS} -c Moto.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c Moto.cpp -o $@
+
+ ${TEMP_DIR}/global.o: global.cpp global.h MyRenderWindow.h Data.h
+- ${GPP} ${FLAGS} -c global.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c global.cpp -o $@
+
+ ${TEMP_DIR}/OSD.o: OSD.cpp OSD.h global.h MyRenderWindow.h Data.h Carrera.h Drawer.h Moto.h Circuito.h MyFont.h Config.h
+- ${GPP} ${FLAGS} -c OSD.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c OSD.cpp -o $@
+
+ ${TEMP_DIR}/MyFont.o: MyFont.cpp MyFont.h global.h MyRenderWindow.h Data.h
+- ${GPP} ${FLAGS} -c MyFont.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c MyFont.cpp -o $@
+
+ ${TEMP_DIR}/Menu.o: Menu.cpp Menu.h global.h MyRenderWindow.h Data.h Drawer.h Carrera.h MyFont.h Jukebox.h Confirm.h Loading.h EnterName.h SelectionWheel.h TrackSelection.h RaceResults.h RaceExtras.h Particulas.h TextViewer.h text.h Shader.h Circuito.h RaceMenu.h version.h BikeSelection.h ChampionshipMenu.h Config.h Profile.h OSD.h Records.h HiddenDriver.h text_hidden.h
+- ${GPP} ${FLAGS} -c Menu.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c Menu.cpp -o $@
+
+ ${TEMP_DIR}/Loading.o: Loading.cpp Loading.h global.h MyRenderWindow.h Data.h Drawer.h
+- ${GPP} ${FLAGS} -c Loading.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c Loading.cpp -o $@
+
+ ${TEMP_DIR}/Confirm.o: Confirm.cpp Confirm.h global.h MyRenderWindow.h Data.h Drawer.h MyFont.h Config.h Jukebox.h Loading.h
+- ${GPP} ${FLAGS} -c Confirm.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c Confirm.cpp -o $@
+
+ ${TEMP_DIR}/Jukebox.o: Jukebox.cpp Jukebox.h global.h MyRenderWindow.h Data.h Config.h
+- ${GPP} ${FLAGS} -c Jukebox.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c Jukebox.cpp -o $@
+
+ ${TEMP_DIR}/RaceExtras.o: RaceExtras.cpp RaceExtras.h global.h MyRenderWindow.h Data.h Carrera.h Drawer.h MyFont.h
+- ${GPP} ${FLAGS} -c RaceExtras.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c RaceExtras.cpp -o $@
+
+ ${TEMP_DIR}/SelectionWheel.o: SelectionWheel.cpp SelectionWheel.h global.h MyRenderWindow.h Data.h
+- ${GPP} ${FLAGS} -c SelectionWheel.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c SelectionWheel.cpp -o $@
+
+ ${TEMP_DIR}/TrackSelection.o: TrackSelection.cpp TrackSelection.h global.h MyRenderWindow.h Data.h Drawer.h MyFont.h SelectionWheel.h Loading.h Profile.h Config.h Confirm.h ChampionshipData.h Jukebox.h
+- ${GPP} ${FLAGS} -c TrackSelection.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c TrackSelection.cpp -o $@
+
+ ${TEMP_DIR}/RaceResults.o: RaceResults.cpp RaceResults.h global.h MyRenderWindow.h Data.h Drawer.h Carrera.h MyFont.h Moto.h Circuito.h SelectionWheel.h Jukebox.h ChampionshipData.h Config.h Profile.h
+- ${GPP} ${FLAGS} -c RaceResults.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c RaceResults.cpp -o $@
+
+ ${TEMP_DIR}/Shader.o: Shader.cpp Shader.h global.h MyRenderWindow.h Data.h
+- ${GPP} ${FLAGS} -c Shader.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c Shader.cpp -o $@
+
+ ${TEMP_DIR}/TextViewer.o: TextViewer.cpp TextViewer.h global.h MyRenderWindow.h Data.h text.h MyFont.h Config.h Jukebox.h
+- ${GPP} ${FLAGS} -c TextViewer.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c TextViewer.cpp -o $@
+
+ ${TEMP_DIR}/text.o: text.cpp
+- ${GPP} ${FLAGS} -c text.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c text.cpp -o $@
+
+ ${TEMP_DIR}/RaceMenu.o: RaceMenu.cpp RaceMenu.h global.h MyRenderWindow.h Data.h Drawer.h MyFont.h SelectionWheel.h TextViewer.h text.h Loading.h Circuito.h Carrera.h Moto.h Confirm.h RaceResults.h BikeSelection.h Profile.h Config.h ChampionshipData.h Jukebox.h Experience.h HiddenDriver.h text_hidden.h
+- ${GPP} ${FLAGS} -c RaceMenu.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c RaceMenu.cpp -o $@
+
+ ${TEMP_DIR}/ChampionshipMenu.o: ChampionshipMenu.cpp ChampionshipMenu.h global.h MyRenderWindow.h Data.h Drawer.h Config.h MyFont.h SelectionWheel.h TextViewer.h text.h Loading.h Circuito.h Carrera.h Moto.h Confirm.h RaceResults.h BikeSelection.h ChampionshipData.h Profile.h TrackSelection.h RaceMenu.h Jukebox.h SlideShow.h HiddenDriver.h text_hidden.h
+- ${GPP} ${FLAGS} -c ChampionshipMenu.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c ChampionshipMenu.cpp -o $@
+
+ ${TEMP_DIR}/MakeData.o: MakeData.cpp global.h MyRenderWindow.h Data.h Config.h Confirm.h Drawer.h
+- ${GPP} ${FLAGS} -c MakeData.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c MakeData.cpp -o $@
+
+ ${TEMP_DIR}/ChampionshipData.o: ChampionshipData.cpp ChampionshipData.h Data.h global.h MyRenderWindow.h Profile.h Moto.h Circuito.h Experience.h
+- ${GPP} ${FLAGS} -c ChampionshipData.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c ChampionshipData.cpp -o $@
+
+ ${TEMP_DIR}/Profile.o: Profile.cpp Profile.h global.h MyRenderWindow.h Data.h ChampionshipData.h
+- ${GPP} ${FLAGS} -c Profile.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c Profile.cpp -o $@
+
+ ${TEMP_DIR}/Config.o: Config.cpp Config.h global.h MyRenderWindow.h Data.h Shader.h Particulas.h Jukebox.h
+- ${GPP} ${FLAGS} -c Config.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c Config.cpp -o $@
+
+ ${TEMP_DIR}/MyRenderWindow.o: MyRenderWindow.cpp global.h MyRenderWindow.h Data.h Config.h
+- ${GPP} ${FLAGS} -c MyRenderWindow.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c MyRenderWindow.cpp -o $@
+
+ ${TEMP_DIR}/SlideShow.o: SlideShow.cpp SlideShow.h global.h MyRenderWindow.h Data.h Config.h Jukebox.h Loading.h Drawer.h
+- ${GPP} ${FLAGS} -c SlideShow.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c SlideShow.cpp -o $@
+
+ ${TEMP_DIR}/Experience.o: Experience.cpp Experience.h global.h MyRenderWindow.h Data.h MyFont.h Config.h SelectionWheel.h Jukebox.h
+- ${GPP} ${FLAGS} -c Experience.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c Experience.cpp -o $@
+
+ ${TEMP_DIR}/LangSelection.o: LangSelection.cpp LangSelection.h global.h MyRenderWindow.h Data.h Config.h
+- ${GPP} ${FLAGS} -c LangSelection.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c LangSelection.cpp -o $@
+
+ ${TEMP_DIR}/Records.o: Records.cpp Records.h global.h MyRenderWindow.h Data.h Config.h Jukebox.h SelectionWheel.h MyFont.h
+- ${GPP} ${FLAGS} -c Records.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c Records.cpp -o $@
+
+ ${TEMP_DIR}/StyleOsd.o: StyleOsd.cpp StyleOsd.h global.h MyRenderWindow.h Data.h
+- ${GPP} ${FLAGS} -c StyleOsd.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c StyleOsd.cpp -o $@
+
+ ${TEMP_DIR}/Intro.o: Intro.cpp Intro.h global.h MyRenderWindow.h Data.h
+- ${GPP} ${FLAGS} -c Intro.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c Intro.cpp -o $@
+
+ ${TEMP_DIR}/HiddenDriver.o: HiddenDriver.cpp HiddenDriver.h global.h MyRenderWindow.h Data.h text_hidden.h Config.h Jukebox.h MyFont.h
+- ${GPP} ${FLAGS} -c HiddenDriver.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c HiddenDriver.cpp -o $@
+
+ ${TEMP_DIR}/text_hidden.o: text_hidden.cpp text_hidden.h
+- ${GPP} ${FLAGS} -c text_hidden.cpp -o $@
++ ${CXX} ${CXXFLAGS} -c text_hidden.cpp -o $@
+
diff --git a/games/motogt/files/patch-src-Makefile.lnx b/games/motogt/files/patch-src-Makefile.lnx
index 3942ae0f5689..9905f7ac207c 100644
--- a/games/motogt/files/patch-src-Makefile.lnx
+++ b/games/motogt/files/patch-src-Makefile.lnx
@@ -1,13 +1,25 @@
--- src/Makefile.lnx.orig 2011-01-10 20:54:57.000000000 +0300
-+++ src/Makefile.lnx 2011-09-26 01:57:51.000000000 +0400
-@@ -1,7 +1,6 @@
++++ src/Makefile.lnx 2011-09-27 08:41:42.000000000 +0400
+@@ -1,8 +1,8 @@
-GPP=g++
-GCC=gcc
-FLAGS= -O2 -ffast-math
-LIBS= -s -lpng -lsfml-window -lsfml-graphics -lsfml-system -lsfml-audio
-+GPP=${CXX}
-+FLAGS=${CXXFLAGS} -I${LOCALBASE}/include
-+LIBS= -L${LOCALBASE}/lib -lpng -lsfml-window -lsfml-graphics -lsfml-system -lsfml-audio ${PTHREAD_LIBS}
- TEMP_DIR=../tmp-lnx
+-TEMP_DIR=../tmp-lnx
++CXX?= g++
++CXXFLAGS?= -O2 -ffast-math
++LIBS= -lpng -lsfml-window -lsfml-graphics -lsfml-system -lsfml-audio
++LDFLAGS?= -s
++TEMP_DIR= ../tmp-lnx
all: ${TEMP_DIR} ../MotoGT.bin
+
+@@ -12,7 +12,7 @@
+ rm -rf ${OBJS} ../MotoGT.bin
+
+ ../MotoGT.bin: ${OBJS}
+- ${GPP} ${OBJS} ${LIBS} -o $@
++ ${CXX} ${LDFLAGS} ${LIBS} ${OBJS} -o $@
+
+ ${TEMP_DIR}:
+ mkdir ${TEMP_DIR}