aboutsummaryrefslogtreecommitdiff
path: root/games/tecnoballz
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2007-07-28 04:23:36 +0000
committerMikhail Teterin <mi@FreeBSD.org>2007-07-28 04:23:36 +0000
commitcac3d1bf8f3f75e10b840a7f4f709d745813f3c6 (patch)
treec300eed13a0b49e55de977bae383e9a1be2b7586 /games/tecnoballz
parent4599c072aea0751a87b65295545292d1c8fe7496 (diff)
downloadports-cac3d1bf8f3f75e10b840a7f4f709d745813f3c6.tar.gz
ports-cac3d1bf8f3f75e10b840a7f4f709d745813f3c6.zip
Notes
Diffstat (limited to 'games/tecnoballz')
-rw-r--r--games/tecnoballz/Makefile15
-rw-r--r--games/tecnoballz/distinfo6
-rw-r--r--games/tecnoballz/files/patch-64bit144
-rw-r--r--games/tecnoballz/files/patch-sizeof34
4 files changed, 184 insertions, 15 deletions
diff --git a/games/tecnoballz/Makefile b/games/tecnoballz/Makefile
index e5340b4b0f6d..b3a34a458350 100644
--- a/games/tecnoballz/Makefile
+++ b/games/tecnoballz/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= tecnoballz
-PORTVERSION= 0.90
-PORTREVISION= 2
+PORTVERSION= 0.91
CATEGORIES= games
MASTER_SITES= http://linux.tlk.fr/games/TecnoballZ/download/
EXTRACT_SUFX= .tgz
@@ -15,27 +14,19 @@ EXTRACT_SUFX= .tgz
MAINTAINER= ports@FreeBSD.org
COMMENT= A brick breaker (Arkanoid-like game)
-LIB_DEPENDS= mikmod.2:${PORTSDIR}/audio/libmikmod
+LIB_DEPENDS= mikmod:${PORTSDIR}/audio/libmikmod
-WRKSRC= ${WRKDIR}/${PORTNAME}
BUILD_WRKSRC= ${WRKSRC}/src
USE_X_PREFIX= yes
USE_SDL= sdl mixer
USE_GMAKE= yes
+MAKE_ARGS+= -j`${SYSCTL} -n hw.ncpu`
MAN6= tecnoballz.6
MAKE_ENV+= LIBMIKMOD_CONFIG=${LOCALBASE}/bin/libmikmod-config
-post-extract:
- @${RM} -f \
- ${WRKSRC}/src/TecnoballZ/hires/.xvpics/*.bmp \
- ${WRKSRC}/src/TecnoballZ/lores/.xvpics/*.bmp
- @${RMDIR} \
- ${WRKSRC}/src/TecnoballZ/hires/.xvpics \
- ${WRKSRC}/src/TecnoballZ/lores/.xvpics \
-
post-patch:
@${FIND} ${WRKSRC}/include -name '*.h' | ${XARGS} ${REINPLACE_CMD} \
-e 's|SDL/||'
diff --git a/games/tecnoballz/distinfo b/games/tecnoballz/distinfo
index 5d34ab99850f..913272c604e5 100644
--- a/games/tecnoballz/distinfo
+++ b/games/tecnoballz/distinfo
@@ -1,3 +1,3 @@
-MD5 (tecnoballz-0.90.tgz) = d6c4f22dd2cdab7c6242b2455d65aa5b
-SHA256 (tecnoballz-0.90.tgz) = 19bb8affcb39fb5fa824fd43c55e350c2b09dc354eee24126a56f25521b34a74
-SIZE (tecnoballz-0.90.tgz) = 1761789
+MD5 (tecnoballz-0.91.tgz) = 6af1aea114f4d22d6c6d0e12babecddf
+SHA256 (tecnoballz-0.91.tgz) = 0a8fc519b37c3ecd1bf56c0fdb362384b8661bf63b370e10e47642fb04ef5622
+SIZE (tecnoballz-0.91.tgz) = 1833861
diff --git a/games/tecnoballz/files/patch-64bit b/games/tecnoballz/files/patch-64bit
new file mode 100644
index 000000000000..80f8ce93856a
--- /dev/null
+++ b/games/tecnoballz/files/patch-64bit
@@ -0,0 +1,144 @@
+These changes are mostly (though not enirely) cosmetic --
+they ensure warning-free compilation on 64-bit platforms.
+
+ -mi
+
+--- src/audiomixer.cc 2005-03-01 09:15:08.000000000 -0500
++++ src/audiomixer.cc 2007-07-27 01:38:09.000000000 -0400
+@@ -350,5 +350,5 @@
+ return (erreur_num = E_SDLMIXER);
+ }
+- Sint32 *p = (Sint32 *)pMixmodule;
++ intptr_t *p = (intptr_t *)pMixmodule;
+ ptModAmiga = (MODULE *)p[1];
+
+--- src/fond_ecran.cc 2005-03-01 09:15:08.000000000 -0500
++++ src/fond_ecran.cc 2007-07-27 01:39:22.000000000 -0400
+@@ -134,6 +134,6 @@
+ //###############################################################
+ Sint32 src_X = 0;
+- Sint32 h = (Sint32)ecran; //use pointer address as random value
+- Sint32 k = (Sint32)fonds; //use pointer address as random value
++ Sint32 h = (intptr_t)ecran; //use pointer address as random value
++ Sint32 k = (intptr_t)fonds; //use pointer address as random value
+ Sint32 nline;
+ if(mVert > 0)
+--- src/mentatCode.cc 2005-03-01 09:15:08.000000000 -0500
++++ src/mentatCode.cc 2007-07-27 01:42:19.000000000 -0400
+@@ -86,5 +86,5 @@
+ if(is_verbose)
+ printf("mentatCode::first_init() [START]\n");
+- hasard_val = (Sint32)first_init;
++ hasard_val = (intptr_t)first_init;
+ memGestion = new RAM_killer();
+ memGestion->initialise(8000);
+@@ -337,14 +337,14 @@
+ delete ptScoreTab;
+ if(is_verbose)
+- printf("==7 ecran_gere %x\n", (Sint32)ecran_gere);
++ printf("==7 ecran_gere %p\n", ecran_gere);
+ delete ecran_gere;
+ #ifndef SOUNDISOFF
+ if(is_verbose)
+- printf("==8 audiomixer %x\n", (Sint32)ptAudiomix);
++ printf("==8 audiomixer %p\n", ptAudiomix);
+ delete ptAudiomix;
+ #endif
+ delete pRessource;
+ if(is_verbose)
+- printf("==9 memGestion %x \n", (Sint32)memGestion);
++ printf("==9 memGestion %p\n", memGestion);
+ delete memGestion;
+ return num_erreur;
+--- src/scrolledit.cc 2005-03-01 09:15:08.000000000 -0500
++++ src/scrolledit.cc 2007-07-27 01:43:05.000000000 -0400
+@@ -657,5 +657,5 @@
+ table += (brush_posx / defilement->motiflarge);
+
+- printf("scrolledit::brush_draw() : (table - carteFirst):%i / i:%i\n",
++ printf("scrolledit::brush_draw() : (table - carteFirst):%ti / i:%i\n",
+ (table - defilement->carteFirst), i);
+
+--- src/tecno_boui.cc 2005-03-01 09:15:08.000000000 -0500
++++ src/tecno_boui.cc 2007-07-27 01:44:19.000000000 -0400
+@@ -64,5 +64,5 @@
+ { flag_actif = 1;
+ Sint32 *monPT = ghost_bobs + (hasard_val & 31);
+- hasard_val += (Sint32)this;
++ hasard_val += (intptr_t)this;
+ Sint32 k = *monPT;
+ miniOffset = k;
+@@ -191,5 +191,5 @@
+ i &= 31;
+ atom_traje = i;
+- hasard_val += (Sint32)this;
++ hasard_val += (intptr_t)this;
+
+
+--- src/zeNewBalls.cc 2005-03-01 09:15:08.000000000 -0500
++++ src/zeNewBalls.cc 2007-07-27 01:45:35.000000000 -0400
+@@ -629,6 +629,6 @@
+ //(char *)monPT += j;
+ monPT = (Sint32 *)((char *)monPT + j);
+- printf("monPT = %x / bumpX->rebonds_GD = %x / *monPT = %i\n",
+- (Sint32)monPT, (Sint32)bumpX->rebonds_GD, *monPT);
++ printf("monPT = %p / bumpX->rebonds_GD = %p / *monPT = %i\n",
++ monPT, bumpX->rebonds_GD, *monPT);
+
+ printf("%i %i\n", bumpX->rebonds_GD[16], bumpX->rebonds_GD[64]);
+--- src/ze_magneye.cc 2005-03-01 09:15:08.000000000 -0500
++++ src/ze_magneye.cc 2007-07-27 01:46:11.000000000 -0400
+@@ -70,5 +70,5 @@
+ { techno_eye *ptEye = objetListe[i];
+ ptEye->centerPosx = Xcoordinat[hval & 31] * resolution;
+- hval += (Sint32)ptEye;
++ hval += (intptr_t)ptEye;
+ ptEye->centerPosy = Ycoordinat[hval & 31] * resolution;
+ hval += keyGestion->sourisGetY();
+--- src/RAM_killer.cc 2005-03-01 09:15:08.000000000 -0500
++++ src/RAM_killer.cc 2007-07-27 08:24:00.000000000 -0400
+@@ -78,8 +78,5 @@
+ {
+ place *= double_mem;
+- char *memPt = NULL;
+- char nulle = 0;
+- char *monPT;
+- Sint32 i ;
++ char *memPt;
+
+ if(mem_nombre == memMaximum)
+@@ -87,5 +84,5 @@
+ return 0;
+ }
+- memPt = (char *) malloc((Sint32)place);
++ memPt = (char *) calloc(place, 1);
+ if(!memPt)
+ { erreur_num = E_NOMEMORY; //allocate error
+@@ -102,7 +99,4 @@
+ if(mem_nombre > maxi_zones)
+ maxi_zones = mem_nombre;
+- monPT = memPt;
+- for(i = 0; i < place; i++)
+- *(monPT++) = nulle; //clear memory
+ //printf("RAM_killer::reserveMem(%i, %x)\n", place, ident);
+ return memPt;
+@@ -140,6 +134,6 @@
+ if(adres)
+ { adrNoFound++;
+- fprintf(stderr, "RAM_killer::liberation() : %i) address %x not found\n",
+- adrNoFound, (Sint32)adres);
++ fprintf(stderr, "RAM_killer::liberation() : %i) address %p not found\n",
++ adrNoFound, adres);
+ }
+ }
+@@ -156,7 +150,7 @@
+ if(adres)
+ { fprintf(stderr,
+- "RAM_killer::libereTout() : addr:%x; size:%i; id:%x\n",
+- (Sint32)memPT->adresseMem, memPT->taille_mem,
+- (Sint32)memPT->identifier);
++ "RAM_killer::libereTout() : addr:%p; size:%i; id:%p\n",
++ memPT->adresseMem, memPT->taille_mem,
++ memPT->identifier);
+ free(adres); //release memory
+ octetTotal -= memPT->taille_mem;
diff --git a/games/tecnoballz/files/patch-sizeof b/games/tecnoballz/files/patch-sizeof
new file mode 100644
index 000000000000..e09e824c4669
--- /dev/null
+++ b/games/tecnoballz/files/patch-sizeof
@@ -0,0 +1,34 @@
+This patch allows the program to run on platforms, where
+pointers are wider than 32-bit...
+
+ -mi
+
+--- src/BOB_killer.cc 2005-03-01 09:15:08.000000000 -0500
++++ src/BOB_killer.cc 2007-07-27 13:49:30.000000000 -0400
+@@ -271,10 +271,10 @@
+
+ // tables of offsets and counters (words and bytes)
+- BOBtableP1 = (Sint16 **)(memGestion->reserveMem(sizeof(Sint32) * animationN, 0x424F4250));
++ BOBtableP1 = (Sint16 **)(memGestion->reserveMem(sizeof(*BOBtableP1) * animationN, 0x424F4250));
+ error_init(memGestion->retour_err());
+ if(erreur_num) return erreur_num;
+
+ // tables of data (pixels of the sprite)
+- BOBtableP2 = (char **)(memGestion->reserveMem(sizeof(Sint32) * animationN, 0x424F4250));
++ BOBtableP2 = (char **)(memGestion->reserveMem(sizeof(*BOBtableP2) * animationN, 0x424F4250));
+ error_init(memGestion->retour_err());
+ if(erreur_num) return erreur_num;
+@@ -282,5 +282,5 @@
+ // tables of offsets and counters (byte peer byte)
+ if(fTableByte)
+- { BOBtableP3 = (Sint16 **)(memGestion->reserveMem(sizeof(Sint32) * animationN, 0x424F4250));
++ { BOBtableP3 = (Sint16 **)(memGestion->reserveMem(sizeof(*BOBtableP3) * animationN, 0x424F4250));
+ error_init(memGestion->retour_err());
+ if(erreur_num) return erreur_num;
+@@ -358,5 +358,5 @@
+ //###################################################################
+ adresseTAB = (char **)
+- (memGestion->reserveMem(sizeof(Sint32) * animationN, 0x424F4250));
++ (memGestion->reserveMem(sizeof(*adresseTAB) * animationN, 0x424F4250));
+ error_init(memGestion->retour_err());
+ if(erreur_num) return erreur_num;