diff options
author | Guido Falsi <madpilot@FreeBSD.org> | 2012-07-18 11:27:01 +0000 |
---|---|---|
committer | Guido Falsi <madpilot@FreeBSD.org> | 2012-07-18 11:27:01 +0000 |
commit | 91907a3009a3a6b48b7fe8f746165cb8e24594c8 (patch) | |
tree | 6d2f521e8ca666801d62ff9807f6941864c3d770 /games/asteroids3d | |
parent | 977e73b396dd800f60993165a7fa94ec9468f074 (diff) | |
download | ports-91907a3009a3a6b48b7fe8f746165cb8e24594c8.tar.gz ports-91907a3009a3a6b48b7fe8f746165cb8e24594c8.zip |
Notes
Diffstat (limited to 'games/asteroids3d')
-rw-r--r-- | games/asteroids3d/Makefile | 62 | ||||
-rw-r--r-- | games/asteroids3d/distinfo | 4 | ||||
-rw-r--r-- | games/asteroids3d/files/patch-src-texture.c | 28 | ||||
-rw-r--r-- | games/asteroids3d/pkg-descr | 5 |
4 files changed, 99 insertions, 0 deletions
diff --git a/games/asteroids3d/Makefile b/games/asteroids3d/Makefile new file mode 100644 index 000000000000..a40092e5c6e6 --- /dev/null +++ b/games/asteroids3d/Makefile @@ -0,0 +1,62 @@ +# New Ports collection makefile for: Asteroids3D +# Date created: 2012-05-20 +# Whom: nemysis@gmx.ch +# +# $FreeBSD$ +# + +PORTNAME= asteroids3d +PORTVERSION= 0.5.1 +CATEGORIES= games +MASTER_SITES= SF/a3d/${PORTVERSION}/ \ + LOCAL/madpilot/asteroids3d/:icons +DISTNAME= ${PORTNAME:S/3d/3D/}-${DISTVERSION} +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ + asteroids3d_icons.tbz:icons + +MAINTAINER= nemysis@gmx.ch +COMMENT= First-person shooter blowing up asteroids in 3D space + +LICENSE= GPLv2 + +WRKSRC= ${WRKDIR}/${PORTNAME:S/3d/3D/}-${PORTVERSION} + +USE_BZIP2= yes +USE_AUTOTOOLS= aclocal autoheader +GNU_CONFIGURE= yes +CONFIGURE_ENV= with_gamesdir="${PREFIX}/bin" with_gamedatadir="${DATADIR}" +USE_GL= glut glu +MAKE_JOBS_SAFE= yes + +CFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib + +PLIST_FILES= bin/${PORTNAME} \ + share/pixmaps/${PORTNAME}_128.png \ + share/pixmaps/${PORTNAME}_48.png + +PORTDATA= * +PORTDOCS= README.html + +pre-configure: + @(cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./autogen.sh) + +post-patch: + @${REINPLACE_CMD} -e 's|/bin/bash|/bin/sh|g' ${WRKSRC}/autogen.sh + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME:S/3d/3D/} ${PREFIX}/bin/${PORTNAME} +# Pixmaps + ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}*.png ${PREFIX}/share/pixmaps +# Data +.if !defined(NOPORTDATA) + ${MKDIR} ${DATADIR} + @(cd ${WRKSRC}/src && ${COPYTREE_SHARE} "*.ub *.ppm" ${DATADIR}) +.endif +# Documentation +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README.html ${DOCSDIR} +.endif + +.include <bsd.port.mk> diff --git a/games/asteroids3d/distinfo b/games/asteroids3d/distinfo new file mode 100644 index 000000000000..f1969e8e959f --- /dev/null +++ b/games/asteroids3d/distinfo @@ -0,0 +1,4 @@ +SHA256 (asteroids3D-0.5.1.tar.bz2) = 68a07541198591c7a010324d870d120932c2dc015981f9197fe2268964a45087 +SIZE (asteroids3D-0.5.1.tar.bz2) = 584201 +SHA256 (asteroids3d_icons.tbz) = e8ed4bd8119e19b6cb423cd00c9b305490edd0e30600c227786f8cbd5bd442a9 +SIZE (asteroids3d_icons.tbz) = 4023 diff --git a/games/asteroids3d/files/patch-src-texture.c b/games/asteroids3d/files/patch-src-texture.c new file mode 100644 index 000000000000..d36d3dce6501 --- /dev/null +++ b/games/asteroids3d/files/patch-src-texture.c @@ -0,0 +1,28 @@ +--- src/texture.c.orig 2008-04-06 16:37:29.000000000 +0200 ++++ src/texture.c 2012-05-20 11:27:24.000000000 +0200 +@@ -99,19 +99,19 @@ + static void average_RGBA_alpha_and_floor(unsigned char *image, + int x, int y, int flr) + { +- int ir, ig, ib, ia, i, new_alpha; ++ int ir, ig, ib, ia, i; + + for (i = 0; i < x * y * 4; i += 4) { + ir = image[i]; + ig = image[i+1]; + ib = image[i+2]; +- ia = image[i+3]; ++ /* ia = image[i+3]; */ + +- new_alpha = (ir + ig + ib) / 3; +- if (new_alpha < flr) +- new_alpha = 0; ++ ia = (ir + ig + ib) / 3; ++ if (ia < flr) ++ ia = 0; + +- image[i+3] = new_alpha; ++ image[i+3] = ia; + } + + return; diff --git a/games/asteroids3d/pkg-descr b/games/asteroids3d/pkg-descr new file mode 100644 index 000000000000..62c8c1b45817 --- /dev/null +++ b/games/asteroids3d/pkg-descr @@ -0,0 +1,5 @@ +A simple first person shooter of blowing up asteroids in 3D space. +The codebase also serves as an introduction to trigonometry and OpenGL. + +WWW: http://sourceforge.net/projects/a3d/ + http://staff.psc.edu/smp/a3d/ |