diff options
author | gahr <gahr@FreeBSD.org> | 2008-02-26 05:44:26 +0800 |
---|---|---|
committer | gahr <gahr@FreeBSD.org> | 2008-02-26 05:44:26 +0800 |
commit | ac4df7fe91ed677e3f534245ac37c0b07bcdf8fc (patch) | |
tree | 147827d4137dd708e1736d0810b1bc254c07f0b3 /games/atr3d | |
parent | 90312e03f94322d3cf13482cefc311bb7a977e0f (diff) | |
download | freebsd-ports-gnome-ac4df7fe91ed677e3f534245ac37c0b07bcdf8fc.tar.gz freebsd-ports-gnome-ac4df7fe91ed677e3f534245ac37c0b07bcdf8fc.tar.zst freebsd-ports-gnome-ac4df7fe91ed677e3f534245ac37c0b07bcdf8fc.zip |
- Fix build on 64-bits platforms
- Adopt maintainship
PR: 120860
Approved by: miwi (mentor)
Diffstat (limited to 'games/atr3d')
-rw-r--r-- | games/atr3d/Makefile | 12 | ||||
-rw-r--r-- | games/atr3d/files/patch-init.cpp | 31 | ||||
-rw-r--r-- | games/atr3d/files/patch-mainplayerthread.cpp | 42 | ||||
-rw-r--r-- | games/atr3d/files/patch-menu.cpp | 24 | ||||
-rw-r--r-- | games/atr3d/files/patch-radar.cpp | 11 | ||||
-rw-r--r-- | games/atr3d/files/patch-servergame.cpp | 11 |
6 files changed, 121 insertions, 10 deletions
diff --git a/games/atr3d/Makefile b/games/atr3d/Makefile index 5be44f05ddeb..303e4e2ce6e0 100644 --- a/games/atr3d/Makefile +++ b/games/atr3d/Makefile @@ -13,7 +13,7 @@ MASTER_SITES= ftp://ftp.avoidtheroid.com/pub/${PORTNAME}/ DISTNAME= ${PORTNAME}_source_${PORTVERSION} EXTRACT_SUFX= .tgz -MAINTAINER= ports@FreeBSD.org +MAINTAINER= gahr@FreeBSD.org COMMENT= 3D asteroids-like multiplayer game LIB_DEPENDS= openal.0:${PORTSDIR}/audio/openal \ @@ -38,14 +38,6 @@ USE_AUTOTOOLS= automake:19 autoconf:261 CPPFLAGS= -I${LOCALBASE}/include -I${X11BASE}/include ${PTHREAD_CFLAGS} LDFLAGS= -L${LOCALBASE}/lib -L${X11BASE}/lib ${PTHREAD_LIBS} -.include <bsd.port.pre.mk> - -.if ${OSVERSION} >= 700042 -.if ${ARCH} == amd64 || ${ARCH} == sparc64 -BROKEN= does not compile -.endif -.endif - pre-patch: @${PERL} -pi.orig -e 's|^aclocal|${ACLOCAL}|; \ s|^autoconf|${AUTOCONF}|; s|^automake|${AUTOMAKE}|' \ @@ -63,4 +55,4 @@ post-configure: 's|-lpthread|${PTHREAD_LIBS}|g' \ ${WRKSRC}/Makefile -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/games/atr3d/files/patch-init.cpp b/games/atr3d/files/patch-init.cpp new file mode 100644 index 000000000000..bc0277845884 --- /dev/null +++ b/games/atr3d/files/patch-init.cpp @@ -0,0 +1,31 @@ +--- init.cpp.orig 2008-02-19 19:27:46.000000000 +0100 ++++ init.cpp 2008-02-19 19:29:23.000000000 +0100 +@@ -36,8 +36,8 @@ + pthread_mutex_t ServerLock; + + +-void LoadSpec(char *dirname, char *filename); +-int copyfile(char *ConfDirName, char *FileName); ++void LoadSpec(char *dirname, const char *filename); ++int copyfile(char *ConfDirName, const char *FileName); + + + void DoInitializations() +@@ -115,7 +115,7 @@ + } + + +-void LoadSpec(char *dirname, char *filename) ++void LoadSpec(char *dirname, const char *filename) + { + FILE *fileptr; + char entry[80]; +@@ -277,7 +277,7 @@ + } + + +-int copyfile(char *ConfDirName, char *FileName) ++int copyfile(char *ConfDirName, const char *FileName) + { + FILE *oldfd, *newfd; + char oldFileName[80], newFileName[80]; diff --git a/games/atr3d/files/patch-mainplayerthread.cpp b/games/atr3d/files/patch-mainplayerthread.cpp new file mode 100644 index 000000000000..517589476c0a --- /dev/null +++ b/games/atr3d/files/patch-mainplayerthread.cpp @@ -0,0 +1,42 @@ +--- mainplayerthread.cpp.orig 2008-02-19 18:54:17.000000000 +0100 ++++ mainplayerthread.cpp 2008-02-19 18:59:50.000000000 +0100 +@@ -21,7 +21,7 @@ + void *MainPlayerThread(void *threadid); + void SetupShipSendData(int shipnum, int threadnum, ShipDesc *ShipData); + void SetupObjSendData(int objnum, struct ObjectDesc *ObjData); +-void SendPlayerData(int threadnum); ++void SendPlayerData(size_t threadnum); + void SetupStatusSendData(char *GameStatus, int playernum); + void TransferData(char *SendData, int *DataSize, int threadnum); + +@@ -29,10 +29,10 @@ + void *MainPlayerThread(void *threadid) + { + int n, rc; +- int threadnum; ++ size_t threadnum; + pthread_t readthread; + +- threadnum=(int)threadid; ++ threadnum=(size_t)threadid; + + SendPlayerData(threadnum); + +@@ -41,7 +41,7 @@ + + + // Main function which loops and continuously sends data to the player +-void SendPlayerData(int threadnum) ++void SendPlayerData(size_t threadnum) + { + int i, j; + int DataSize=0; +@@ -53,7 +53,7 @@ + while(!StopServer) { + pthread_mutex_lock(&ServerLock); + #ifdef DEBUG +- printf("Main Player Thread %d Awake\n", threadnum); ++ printf("Main Player Thread %zd Awake\n", threadnum); + #endif + if (!ServerShips[threadnum]) { + pthread_mutex_unlock(&ServerLock); diff --git a/games/atr3d/files/patch-menu.cpp b/games/atr3d/files/patch-menu.cpp new file mode 100644 index 000000000000..5ea96294bf1d --- /dev/null +++ b/games/atr3d/files/patch-menu.cpp @@ -0,0 +1,24 @@ +--- menu.cpp.orig 2008-02-19 19:29:51.000000000 +0100 ++++ menu.cpp 2008-02-19 19:30:51.000000000 +0100 +@@ -194,8 +194,8 @@ + + ClearScreen(); + DrawText(ScreenWidth/2-200, ScreenHeight/2+50, +- "Congratulations, you've made a high score", &Blue, 1); +- pos=DrawText(ScreenWidth/2-200, ScreenHeight/2, "Enter Name", &Blue, 1); ++ (char *)"Congratulations, you've made a high score", &Blue, 1); ++ pos=DrawText(ScreenWidth/2-200, ScreenHeight/2, (char *)"Enter Name", &Blue, 1); + DrawRect(pos+17, ScreenHeight/2-2, pos+17, ScreenHeight/2+20, + pos+300, ScreenHeight/2+20, pos+300, ScreenHeight/2-2, &DarkGray); + pos=DrawText(pos+20, ScreenHeight/2, TextValue, &Red, 1); +@@ -319,8 +319,8 @@ + int NumScoresDisplayed; + struct Color *TextColor; + +- DrawText(20, ScreenHeight-50, "Name", &Blue, 1); +- DrawText(ScreenWidth/2, ScreenHeight-50, "Score", &Blue, 1); ++ DrawText(20, ScreenHeight-50, (char *)"Name", &Blue, 1); ++ DrawText(ScreenWidth/2, ScreenHeight-50, (char *)"Score", &Blue, 1); + + NumScoresDisplayed=(ScreenHeight-(150+25*NumScoreMenuItems))/25; + if (NumScoresDisplayed > NUM_HIGHSCORES) { diff --git a/games/atr3d/files/patch-radar.cpp b/games/atr3d/files/patch-radar.cpp new file mode 100644 index 000000000000..17656d00a6fd --- /dev/null +++ b/games/atr3d/files/patch-radar.cpp @@ -0,0 +1,11 @@ +--- radar.cpp.orig 2008-02-19 19:31:03.000000000 +0100 ++++ radar.cpp 2008-02-19 19:31:11.000000000 +0100 +@@ -16,7 +16,7 @@ + { + int i; + +- DrawText(ScreenWidth/2-12, ScreenHeight/3, "Radar", &Green); ++ DrawText(ScreenWidth/2-12, ScreenHeight/3, (char *)"Radar", &Green); + DrawCircle(ScreenWidth/2, ScreenHeight/6, &Green, 64, 0.27, 0); + + for (i=0; i<MAX_PLAYERS; i++) { diff --git a/games/atr3d/files/patch-servergame.cpp b/games/atr3d/files/patch-servergame.cpp new file mode 100644 index 000000000000..04a0e626aca3 --- /dev/null +++ b/games/atr3d/files/patch-servergame.cpp @@ -0,0 +1,11 @@ +--- servergame.cpp.orig 2008-02-19 18:59:58.000000000 +0100 ++++ servergame.cpp 2008-02-19 19:03:29.000000000 +0100 +@@ -66,7 +66,7 @@ + + ServerGameRunning=1; + +- threadnum=(int)threadid; ++ threadnum=(size_t)threadid; + + pthread_mutex_lock(&ServerLock); + |