mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
- Fix build on 64-bits platforms
- Adopt maintainship PR: 120860 Approved by: miwi (mentor)
This commit is contained in:
parent
45732ab1a7
commit
d08abc1cdc
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=207899
6 changed files with 121 additions and 10 deletions
|
@ -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>
|
||||
|
|
31
games/atr3d/files/patch-init.cpp
Normal file
31
games/atr3d/files/patch-init.cpp
Normal file
|
@ -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];
|
42
games/atr3d/files/patch-mainplayerthread.cpp
Normal file
42
games/atr3d/files/patch-mainplayerthread.cpp
Normal file
|
@ -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);
|
24
games/atr3d/files/patch-menu.cpp
Normal file
24
games/atr3d/files/patch-menu.cpp
Normal file
|
@ -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) {
|
11
games/atr3d/files/patch-radar.cpp
Normal file
11
games/atr3d/files/patch-radar.cpp
Normal file
|
@ -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++) {
|
11
games/atr3d/files/patch-servergame.cpp
Normal file
11
games/atr3d/files/patch-servergame.cpp
Normal file
|
@ -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);
|
||||
|
Loading…
Add table
Reference in a new issue