diff options
author | jylefort <jylefort@FreeBSD.org> | 2005-09-01 08:35:35 +0800 |
---|---|---|
committer | jylefort <jylefort@FreeBSD.org> | 2005-09-01 08:35:35 +0800 |
commit | 54087ff43c04975763db305b70188d99e99f6c4a (patch) | |
tree | cd661036c485b6064b17c590663dc866239fc4d5 /games/apoolGL | |
parent | c1441c9ee53340826f8c9fdf130f10e889d3d19a (diff) | |
download | freebsd-ports-gnome-54087ff43c04975763db305b70188d99e99f6c4a.tar.gz freebsd-ports-gnome-54087ff43c04975763db305b70188d99e99f6c4a.tar.zst freebsd-ports-gnome-54087ff43c04975763db305b70188d99e99f6c4a.zip |
Add apoolGL.
Another Pool GL is a 3D computer billiards simulation based on Another Pool,
with a realistic physics system using OpenGL/SDL as graphical subsystem.
WWW: http://www.planetjahn.de/apool/
PR: ports/85324
Submitted by: Igor Pokrovsky <ip@doom.homeunix.org>
Diffstat (limited to 'games/apoolGL')
-rw-r--r-- | games/apoolGL/Makefile | 47 | ||||
-rw-r--r-- | games/apoolGL/distinfo | 2 | ||||
-rw-r--r-- | games/apoolGL/files/patch-apool.c | 36 | ||||
-rw-r--r-- | games/apoolGL/files/patch-gl.c | 54 | ||||
-rw-r--r-- | games/apoolGL/pkg-descr | 7 | ||||
-rw-r--r-- | games/apoolGL/pkg-plist | 65 |
6 files changed, 211 insertions, 0 deletions
diff --git a/games/apoolGL/Makefile b/games/apoolGL/Makefile new file mode 100644 index 000000000000..61d3f09b212c --- /dev/null +++ b/games/apoolGL/Makefile @@ -0,0 +1,47 @@ +# New ports collection makefile for: apoolGL +# Date created: 26 Aug 2005 +# Whom: Igor Pokrovsky <ip@doom.homeunix.org> +# +# $FreeBSD$ +# + +PORTNAME= apoolGL +PORTVERSION= 0.99.22 +CATEGORIES= games +MASTER_SITES= http://www.planetjahn.de/files/ +DISTNAME= ${PORTNAME}-099-pre22 + +MAINTAINER= ip@doom.homeunix.org +COMMENT= Another billiard simulator + +USE_X_PREFIX= yes +USE_REINPLACE= yes +USE_SDL= sdl +USE_GL= yes + +PORTDOCS= ApoolGL.txt CHANGELOG OpenGL-Features + +post-patch: + @${REINPLACE_CMD} -e "s|`${PRINTF} '\r'`$$||" ${WRKSRC}/ApoolGL.txt + @${REINPLACE_CMD} -e 's|SDL/||' ${WRKSRC}/*.c + +do-build: + ${CC} ${CFLAGS} -DDATADIR="\"${DATADIR}\"" \ + `${SDL_CONFIG} --cflags --libs` \ + -I${X11BASE}/include -L${X11BASE}/lib -lGL -lGLU \ + -o ${WRKSRC}/apool ${WRKSRC}/*.c + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/apool ${PREFIX}/bin +.for i in hi lo med + ${MKDIR} ${DATADIR}/textures-${i} + ${INSTALL_DATA} ${WRKSRC}/textures-${i}/*.bmp ${DATADIR}/textures-${i} +.endfor + ${INSTALL_DATA} ${WRKSRC}/*.dat ${DATADIR} + +.ifndef (NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR} +.endif + +.include <bsd.port.mk> diff --git a/games/apoolGL/distinfo b/games/apoolGL/distinfo new file mode 100644 index 000000000000..2b5c8f1a1902 --- /dev/null +++ b/games/apoolGL/distinfo @@ -0,0 +1,2 @@ +MD5 (apoolGL-099-pre22.tar.gz) = 467e953d4c55aafd0e77f2d8981b498b +SIZE (apoolGL-099-pre22.tar.gz) = 2191751 diff --git a/games/apoolGL/files/patch-apool.c b/games/apoolGL/files/patch-apool.c new file mode 100644 index 000000000000..c383f9dfa69d --- /dev/null +++ b/games/apoolGL/files/patch-apool.c @@ -0,0 +1,36 @@ +--- apool.c.orig Fri Aug 12 00:09:34 2005 ++++ apool.c Thu Sep 1 02:23:50 2005 +@@ -27,7 +27,7 @@ + #include <math.h> + #include <time.h> + #include <string.h> +-#include <getopt.h> ++#include <unistd.h> + #include <SDL/SDL.h> + #include <GL/gl.h> + #include <GL/glu.h> +@@ -103,10 +103,10 @@ + for( i=0;i<2;i++) + { ply[i].stat = ply[i].wait = ply[i].col = ply[i].hole_black = 0; } + first_hit = bande_hit = anstoss = 1; +- if( !(dat = fopen("table.dat","r")) ) ++ if( !(dat = fopen(DATADIR"/table.dat","r")) ) + { + close_graphics(); +- printf("error: can't find the file 'table.dat'. \n"); ++ printf("error: can't find the file '" DATADIR "/table.dat'. \n"); + printf("create this file using 'apool -init 50' ...\n\n"); + exit(0); + } +@@ -427,9 +427,9 @@ + time_t sys_time; + char opt; + opterr=0; /* Keine Fehlermeldung bei "falscher" Option ausgeben */ +- if( !(datei = fopen("konst.dat","r") ) ) ++ if( !(datei = fopen(DATADIR"/konst.dat","r") ) ) + { /* Datei für die (phys.) Konstanten */ +- printf("can't open file 'konst.dat'\n"); ++ printf("can't open file '" DATADIR "/konst.dat'\n"); + exit( 0 ); + } + fscanf(datei,"%lg%*[^\n]%lg%*[^\n]%lg%*[^\n]%lg%*[^\n]%lg%*[^\n]", diff --git a/games/apoolGL/files/patch-gl.c b/games/apoolGL/files/patch-gl.c new file mode 100644 index 000000000000..0a79111771f0 --- /dev/null +++ b/games/apoolGL/files/patch-gl.c @@ -0,0 +1,54 @@ +--- gl.c.orig Sat Aug 13 01:51:49 2005 ++++ gl.c Thu Sep 1 02:19:45 2005 +@@ -40,7 +40,7 @@ + #include <GL/glu.h> + #include <string.h> + #include "apool.h" +-#include <linux/param.h> ++#include <sys/param.h> + #include <sys/time.h> + + #ifndef M_PI +@@ -452,14 +452,14 @@ + int LoadGLTextures( void ) /* ebenfalls basierend auf einem Nehe Tutorial */ + { /* aber für mehrere Texturen angepasst und erweitert f. Mipmapping, Cube-Textures, usw.*/ + int i; +- char txt[80]; ++ char txt[PATH_MAX]; + SDL_Surface *TextureImage[ANZ_TEXTURES]; + memset(TextureImage,0,sizeof(void *)*ANZ_TEXTURES); + texture = malloc((sizeof(int) * ANZ_TEXTURES)); + + for(i=0;i<BALLS;i++) + { +- sprintf(txt,"textures-hi/%d.bmp",i); ++ sprintf(txt,DATADIR"/textures-hi/%d.bmp",i); + if( !(TextureImage[i]=LoadBMP(txt)) ) + { + printf("can't find %d of hd textures\n",i); +@@ -469,7 +469,7 @@ + + for(i=BALLS;i<2*BALLS;i++) + { +- sprintf(txt,"textures-lo/%d.bmp",i-BALLS); ++ sprintf(txt,DATADIR"/textures-lo/%d.bmp",i-BALLS); + if( !(TextureImage[i]=LoadBMP(txt)) ) + { + printf("can't find %d of ld textures\n",i-BALLS); +@@ -477,11 +477,11 @@ + } + } + +- if( !(TextureImage[i++]=LoadBMP("textures-hi/Font.bmp")) ) return FALSE; +- if( !(TextureImage[i++]=LoadBMP("textures-hi/Holz.bmp")) ) return FALSE; +- if( !(TextureImage[i++]=LoadBMP("textures-hi/Marmor.bmp")) ) return FALSE; +- if( !(TextureImage[i++]=LoadBMP("textures-hi/Tuch.bmp")) ) return FALSE; +- if( !(TextureImage[i++]=LoadBMP("textures-hi/Env.bmp")) ) return FALSE; ++ if( !(TextureImage[i++]=LoadBMP(DATADIR"/textures-hi/Font.bmp")) ) return FALSE; ++ if( !(TextureImage[i++]=LoadBMP(DATADIR"/textures-hi/Holz.bmp")) ) return FALSE; ++ if( !(TextureImage[i++]=LoadBMP(DATADIR"/textures-hi/Marmor.bmp")) ) return FALSE; ++ if( !(TextureImage[i++]=LoadBMP(DATADIR"/textures-hi/Tuch.bmp")) ) return FALSE; ++ if( !(TextureImage[i++]=LoadBMP(DATADIR"/textures-hi/Env.bmp")) ) return FALSE; + + glGenTextures(ANZ_TEXTURES, &texture[0]); + for (i=0; i<ANZ_TEXTURES; i++) diff --git a/games/apoolGL/pkg-descr b/games/apoolGL/pkg-descr new file mode 100644 index 000000000000..32ec2eaa59d9 --- /dev/null +++ b/games/apoolGL/pkg-descr @@ -0,0 +1,7 @@ +Another Pool GL is a 3D computer billiards simulation based on Another Pool, +with a realistic physics system using OpenGL/SDL as graphical subsystem. + +WWW: http://www.planetjahn.de/apool/ + +- Igor Pokrovsky +ip@doom.homeunix.org diff --git a/games/apoolGL/pkg-plist b/games/apoolGL/pkg-plist new file mode 100644 index 000000000000..55ee658d3990 --- /dev/null +++ b/games/apoolGL/pkg-plist @@ -0,0 +1,65 @@ +bin/apool +%%DATADIR%%/konst.dat +%%DATADIR%%/table.dat +%%DATADIR%%/textures-hi/0.bmp +%%DATADIR%%/textures-hi/1.bmp +%%DATADIR%%/textures-hi/10.bmp +%%DATADIR%%/textures-hi/11.bmp +%%DATADIR%%/textures-hi/12.bmp +%%DATADIR%%/textures-hi/13.bmp +%%DATADIR%%/textures-hi/14.bmp +%%DATADIR%%/textures-hi/15.bmp +%%DATADIR%%/textures-hi/2.bmp +%%DATADIR%%/textures-hi/3.bmp +%%DATADIR%%/textures-hi/4.bmp +%%DATADIR%%/textures-hi/5.bmp +%%DATADIR%%/textures-hi/6.bmp +%%DATADIR%%/textures-hi/7.bmp +%%DATADIR%%/textures-hi/8.bmp +%%DATADIR%%/textures-hi/9.bmp +%%DATADIR%%/textures-hi/Env.bmp +%%DATADIR%%/textures-hi/Font.bmp +%%DATADIR%%/textures-hi/Holz.bmp +%%DATADIR%%/textures-hi/Marmor.bmp +%%DATADIR%%/textures-hi/Tuch.bmp +%%DATADIR%%/textures-lo/0.bmp +%%DATADIR%%/textures-lo/1.bmp +%%DATADIR%%/textures-lo/10.bmp +%%DATADIR%%/textures-lo/11.bmp +%%DATADIR%%/textures-lo/12.bmp +%%DATADIR%%/textures-lo/13.bmp +%%DATADIR%%/textures-lo/14.bmp +%%DATADIR%%/textures-lo/15.bmp +%%DATADIR%%/textures-lo/2.bmp +%%DATADIR%%/textures-lo/3.bmp +%%DATADIR%%/textures-lo/4.bmp +%%DATADIR%%/textures-lo/5.bmp +%%DATADIR%%/textures-lo/6.bmp +%%DATADIR%%/textures-lo/7.bmp +%%DATADIR%%/textures-lo/8.bmp +%%DATADIR%%/textures-lo/9.bmp +%%DATADIR%%/textures-med/0.bmp +%%DATADIR%%/textures-med/1.bmp +%%DATADIR%%/textures-med/10.bmp +%%DATADIR%%/textures-med/11.bmp +%%DATADIR%%/textures-med/12.bmp +%%DATADIR%%/textures-med/13.bmp +%%DATADIR%%/textures-med/14.bmp +%%DATADIR%%/textures-med/15.bmp +%%DATADIR%%/textures-med/2.bmp +%%DATADIR%%/textures-med/3.bmp +%%DATADIR%%/textures-med/4.bmp +%%DATADIR%%/textures-med/5.bmp +%%DATADIR%%/textures-med/6.bmp +%%DATADIR%%/textures-med/7.bmp +%%DATADIR%%/textures-med/8.bmp +%%DATADIR%%/textures-med/9.bmp +%%DATADIR%%/textures-med/Env.bmp +%%DATADIR%%/textures-med/Font.bmp +%%DATADIR%%/textures-med/Holz.bmp +%%DATADIR%%/textures-med/Marmor.bmp +%%DATADIR%%/textures-med/Tuch.bmp +@dirrm %%DATADIR%%/textures-med +@dirrm %%DATADIR%%/textures-lo +@dirrm %%DATADIR%%/textures-hi +@dirrm %%DATADIR%% |