aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2013-06-17 03:48:08 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2013-06-17 03:48:08 +0800
commit0b453a276f1981be98db67ac802037768c23ca49 (patch)
treee99a2d54aa6ee3b2878e7b282e7131c14758160f /games
parentc9bde8f288ed41019f04ec69674024b731d7445b (diff)
downloadfreebsd-ports-gnome-0b453a276f1981be98db67ac802037768c23ca49.tar.gz
freebsd-ports-gnome-0b453a276f1981be98db67ac802037768c23ca49.tar.zst
freebsd-ports-gnome-0b453a276f1981be98db67ac802037768c23ca49.zip
- Fix build with clang
- Add LICENSE - Simplify build - Switch to dynamic plist
Diffstat (limited to 'games')
-rw-r--r--games/sdl-ball/Makefile17
-rw-r--r--games/sdl-ball/files/patch-Makefile27
-rw-r--r--games/sdl-ball/files/patch-main.cpp11
-rw-r--r--games/sdl-ball/pkg-plist186
4 files changed, 27 insertions, 214 deletions
diff --git a/games/sdl-ball/Makefile b/games/sdl-ball/Makefile
index 2f09b77a73fd..2b37f59bf8d6 100644
--- a/games/sdl-ball/Makefile
+++ b/games/sdl-ball/Makefile
@@ -10,21 +10,36 @@ MASTER_SITES= SF
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= Arkanoid/Breakout clone with pretty graphics
+LICENSE= GPLv3
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
USE_BZIP2= yes
USE_SDL= sdl mixer image ttf
USE_GL= gl glu
MAKE_ENV= DATADIR=${DATADIR}/
+USE_GMAKE= yes
+USE_DOS2UNIX= main.cpp
WRKSRC= ${WRKDIR}/${PORTNAME}
+PLIST_FILES= bin/${PORTNAME}
+
PORTDOCS= *
+PORTDATA= *
.include <bsd.port.options.mk>
+do-build:
+ cd ${WRKSRC} && ${CXX} ${CXXFLAGS} `${SDL_CONFIG} --cflags --libs` \
+ -lGL -lGLU -lSDL_image -lSDL_ttf -lSDL_mixer \
+ -DDATADIR="\"${DATADIR}/\"" main.cpp -o ${PORTNAME}
+
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/sdl-ball ${PREFIX}/bin/
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/
+.if !defined(NOPORTDATA)
${MKDIR} ${DATADIR}
cd ${WRKSRC}/themes && ${COPYTREE_SHARE} . ${DATADIR}/
+.endif
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/
diff --git a/games/sdl-ball/files/patch-Makefile b/games/sdl-ball/files/patch-Makefile
deleted file mode 100644
index 46f5577ec4c8..000000000000
--- a/games/sdl-ball/files/patch-Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
---- Makefile.orig 2008-12-31 00:42:35.000000000 +0000
-+++ Makefile 2009-01-31 03:45:32.000000000 +0000
-@@ -2,13 +2,12 @@
-
- #append -DWITH_WIIUSE to compile with WIIUSE support!
- #append -DNOSOUND to compile WITHOUT sound support
--CC=g++ -DDATADIR="\"$(DATADIR)\""
-
--CFLAGS+=-c -Wall `sdl-config --cflags`
-+CFLAGS+=-Wall `${SDL_CONFIG} --cflags` -DDATADIR="\"$(DATADIR)\""
-
- #append -lwiiuse to compile with WIIUSE support
- #remove -lSDL_mixer if compiling with -DNOSOUND
--LIBS+=-lGL -lGLU `sdl-config --libs` -lSDL_image -lSDL_ttf -lSDL_mixer
-+LIBS+=-lGL -lGLU `${SDL_CONFIG} --libs` -lSDL_image -lSDL_ttf -lSDL_mixer
-
- SOURCES=main.cpp
- OBJECTS=$(SOURCES:.cpp=.o)
-@@ -18,7 +17,7 @@
- all: $(SOURCES) $(EXECUTABLE)
-
- $(EXECUTABLE): $(OBJECTS)
-- $(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
-+ $(CC) $(CFLAGS) $(SOURCES) $(LIBS) -o $@
-
- .cpp.o:
- $(CC) $(CFLAGS) $< -o $@
diff --git a/games/sdl-ball/files/patch-main.cpp b/games/sdl-ball/files/patch-main.cpp
new file mode 100644
index 000000000000..2027d90c1ec6
--- /dev/null
+++ b/games/sdl-ball/files/patch-main.cpp
@@ -0,0 +1,11 @@
+--- main.cpp.orig 2009-01-11 19:09:56.000000000 +0300
++++ main.cpp 2013-05-30 21:59:20.884120034 +0400
+@@ -1420,7 +1420,7 @@
+ //Leaves an trail of the ball
+ class tracer {
+ private:
+- GLfloat x[100], y[100], r[100], g[100], b[100], a[100],s[100], cr,cg,cb,;
++ GLfloat x[100], y[100], r[100], g[100], b[100], a[100],s[100], cr,cg,cb;
+ bool active[100];
+ int color;
+ GLfloat lastX, lastY; //Last position where we spawned one
diff --git a/games/sdl-ball/pkg-plist b/games/sdl-ball/pkg-plist
deleted file mode 100644
index f957eb95fc63..000000000000
--- a/games/sdl-ball/pkg-plist
+++ /dev/null
@@ -1,186 +0,0 @@
-bin/sdl-ball
-%%DATADIR%%/default/font/Bandal.ttf
-%%DATADIR%%/default/font/COPYING
-%%DATADIR%%/default/font/fonts.txt
-%%DATADIR%%/default/font/subgamefont.ttf
-%%DATADIR%%/default/gfx/ball/fireball.png
-%%DATADIR%%/default/gfx/ball/fireball.txt
-%%DATADIR%%/default/gfx/ball/normal.png
-%%DATADIR%%/default/gfx/ball/normal.txt
-%%DATADIR%%/default/gfx/ball/tail.png
-%%DATADIR%%/default/gfx/ball/tail.txt
-%%DATADIR%%/default/gfx/bg/1.jpg
-%%DATADIR%%/default/gfx/bg/10.jpg
-%%DATADIR%%/default/gfx/bg/11.jpg
-%%DATADIR%%/default/gfx/bg/12.jpg
-%%DATADIR%%/default/gfx/bg/13.jpg
-%%DATADIR%%/default/gfx/bg/14.jpg
-%%DATADIR%%/default/gfx/bg/15.jpg
-%%DATADIR%%/default/gfx/bg/16.jpg
-%%DATADIR%%/default/gfx/bg/17.jpg
-%%DATADIR%%/default/gfx/bg/18.jpg
-%%DATADIR%%/default/gfx/bg/19.jpg
-%%DATADIR%%/default/gfx/bg/2.jpg
-%%DATADIR%%/default/gfx/bg/20.jpg
-%%DATADIR%%/default/gfx/bg/21.jpg
-%%DATADIR%%/default/gfx/bg/22.jpg
-%%DATADIR%%/default/gfx/bg/23.jpg
-%%DATADIR%%/default/gfx/bg/24.jpg
-%%DATADIR%%/default/gfx/bg/25.jpg
-%%DATADIR%%/default/gfx/bg/3.jpg
-%%DATADIR%%/default/gfx/bg/4.jpg
-%%DATADIR%%/default/gfx/bg/5.jpg
-%%DATADIR%%/default/gfx/bg/6.jpg
-%%DATADIR%%/default/gfx/bg/7.jpg
-%%DATADIR%%/default/gfx/bg/8.jpg
-%%DATADIR%%/default/gfx/bg/9.jpg
-%%DATADIR%%/default/gfx/border.png
-%%DATADIR%%/default/gfx/brick/base.png
-%%DATADIR%%/default/gfx/brick/base.txt
-%%DATADIR%%/default/gfx/brick/blue.txt
-%%DATADIR%%/default/gfx/brick/cement.png
-%%DATADIR%%/default/gfx/brick/cement.txt
-%%DATADIR%%/default/gfx/brick/doom-org.png
-%%DATADIR%%/default/gfx/brick/doom.png
-%%DATADIR%%/default/gfx/brick/doom.txt
-%%DATADIR%%/default/gfx/brick/explosive.png
-%%DATADIR%%/default/gfx/brick/explosive.txt
-%%DATADIR%%/default/gfx/brick/glass.png
-%%DATADIR%%/default/gfx/brick/glass.txt
-%%DATADIR%%/default/gfx/brick/green.txt
-%%DATADIR%%/default/gfx/brick/grey.txt
-%%DATADIR%%/default/gfx/brick/invisible.png
-%%DATADIR%%/default/gfx/brick/invisible.txt
-%%DATADIR%%/default/gfx/brick/purple.txt
-%%DATADIR%%/default/gfx/brick/red.txt
-%%DATADIR%%/default/gfx/brick/template.txt
-%%DATADIR%%/default/gfx/brick/white.txt
-%%DATADIR%%/default/gfx/brick/yellow.txt
-%%DATADIR%%/default/gfx/highscore/entername.png
-%%DATADIR%%/default/gfx/menu/but0.png
-%%DATADIR%%/default/gfx/menu/but1.png
-%%DATADIR%%/default/gfx/menu/but2.png
-%%DATADIR%%/default/gfx/menu/highscorebg.png
-%%DATADIR%%/default/gfx/menu/menu0.png
-%%DATADIR%%/default/gfx/paddle/base.png
-%%DATADIR%%/default/gfx/paddle/base.txt
-%%DATADIR%%/default/gfx/paddle/glue.png
-%%DATADIR%%/default/gfx/paddle/glue.txt
-%%DATADIR%%/default/gfx/paddle/gun.png
-%%DATADIR%%/default/gfx/paddle/gun.txt
-%%DATADIR%%/default/gfx/particle.png
-%%DATADIR%%/default/gfx/powerup/aim.png
-%%DATADIR%%/default/gfx/powerup/aim.txt
-%%DATADIR%%/default/gfx/powerup/aimhelp.png
-%%DATADIR%%/default/gfx/powerup/aimhelp.txt
-%%DATADIR%%/default/gfx/powerup/bigball.png
-%%DATADIR%%/default/gfx/powerup/bigball.txt
-%%DATADIR%%/default/gfx/powerup/bullet.png
-%%DATADIR%%/default/gfx/powerup/bullet.txt
-%%DATADIR%%/default/gfx/powerup/coin.png
-%%DATADIR%%/default/gfx/powerup/coin.txt
-%%DATADIR%%/default/gfx/powerup/detonate.png
-%%DATADIR%%/default/gfx/powerup/detonate.txt
-%%DATADIR%%/default/gfx/powerup/die.png
-%%DATADIR%%/default/gfx/powerup/die.txt
-%%DATADIR%%/default/gfx/powerup/drop.png
-%%DATADIR%%/default/gfx/powerup/drop.txt
-%%DATADIR%%/default/gfx/powerup/easybrick.png
-%%DATADIR%%/default/gfx/powerup/easybrick.txt
-%%DATADIR%%/default/gfx/powerup/explosive-grow.png
-%%DATADIR%%/default/gfx/powerup/explosive-grow.txt
-%%DATADIR%%/default/gfx/powerup/explosive.png
-%%DATADIR%%/default/gfx/powerup/explosive.txt
-%%DATADIR%%/default/gfx/powerup/glue.png
-%%DATADIR%%/default/gfx/powerup/glue.txt
-%%DATADIR%%/default/gfx/powerup/go-thru.png
-%%DATADIR%%/default/gfx/powerup/go-thru.txt
-%%DATADIR%%/default/gfx/powerup/growbat.png
-%%DATADIR%%/default/gfx/powerup/growbat.txt
-%%DATADIR%%/default/gfx/powerup/gun.png
-%%DATADIR%%/default/gfx/powerup/gun.txt
-%%DATADIR%%/default/gfx/powerup/laser.png
-%%DATADIR%%/default/gfx/powerup/laser.txt
-%%DATADIR%%/default/gfx/powerup/life.png
-%%DATADIR%%/default/gfx/powerup/life.txt
-%%DATADIR%%/default/gfx/powerup/multiball.png
-%%DATADIR%%/default/gfx/powerup/multiball.txt
-%%DATADIR%%/default/gfx/powerup/nextlevel.png
-%%DATADIR%%/default/gfx/powerup/nextlevel.txt
-%%DATADIR%%/default/gfx/powerup/normalball.png
-%%DATADIR%%/default/gfx/powerup/normalball.txt
-%%DATADIR%%/default/gfx/powerup/shrinkbat.png
-%%DATADIR%%/default/gfx/powerup/shrinkbat.txt
-%%DATADIR%%/default/gfx/powerup/smallball.png
-%%DATADIR%%/default/gfx/powerup/smallball.txt
-%%DATADIR%%/default/gfx/title/title.png
-%%DATADIR%%/default/icon32.png
-%%DATADIR%%/default/levels.txt
-%%DATADIR%%/default/powerupdescriptions.txt
-%%DATADIR%%/default/powerups.txt
-%%DATADIR%%/default/snd/ball-hit-border.ogg
-%%DATADIR%%/default/snd/ball-hit-paddle.ogg
-%%DATADIR%%/default/snd/buy-powerup.ogg
-%%DATADIR%%/default/snd/cement-brick-hit.ogg
-%%DATADIR%%/default/snd/die.ogg
-%%DATADIR%%/default/snd/doom-brick-break.ogg
-%%DATADIR%%/default/snd/evil-po-hit-paddle.ogg
-%%DATADIR%%/default/snd/expl-brick-break.ogg
-%%DATADIR%%/default/snd/gameover.ogg
-%%DATADIR%%/default/snd/glass-brick-break.ogg
-%%DATADIR%%/default/snd/glass-brick-hit.ogg
-%%DATADIR%%/default/snd/glue-ball-hit-paddle.ogg
-%%DATADIR%%/default/snd/good-po-hit-paddle.ogg
-%%DATADIR%%/default/snd/highscore.ogg
-%%DATADIR%%/default/snd/invisible-brick-appear.ogg
-%%DATADIR%%/default/snd/menuclick.ogg
-%%DATADIR%%/default/snd/nextlevel.ogg
-%%DATADIR%%/default/snd/norm-brick-breaka.ogg
-%%DATADIR%%/default/snd/norm-brick-breakb.ogg
-%%DATADIR%%/default/snd/norm-brick-breakc.ogg
-%%DATADIR%%/default/snd/norm-brick-breakd.ogg
-%%DATADIR%%/default/snd/norm-brick-breake.ogg
-%%DATADIR%%/default/snd/po-hit-border.ogg
-%%DATADIR%%/default/snd/shot.ogg
-%%DATADIR%%/default/snd/start.ogg
-%%DATADIR%%/dio-sound-theme/readme
-%%DATADIR%%/dio-sound-theme/snd/ball-hit-border.ogg
-%%DATADIR%%/dio-sound-theme/snd/ball-hit-paddle.ogg
-%%DATADIR%%/dio-sound-theme/snd/buy-powerup.ogg
-%%DATADIR%%/dio-sound-theme/snd/cement-brick-hit.ogg
-%%DATADIR%%/dio-sound-theme/snd/die.ogg
-%%DATADIR%%/dio-sound-theme/snd/doom-brick-break.ogg
-%%DATADIR%%/dio-sound-theme/snd/evil-po-hit-paddle.ogg
-%%DATADIR%%/dio-sound-theme/snd/expl-brick-break.ogg
-%%DATADIR%%/dio-sound-theme/snd/gameover.ogg
-%%DATADIR%%/dio-sound-theme/snd/glass-brick-break.ogg
-%%DATADIR%%/dio-sound-theme/snd/glass-brick-hit.ogg
-%%DATADIR%%/dio-sound-theme/snd/glue-ball-hit-paddle.ogg
-%%DATADIR%%/dio-sound-theme/snd/good-po-hit-paddle.ogg
-%%DATADIR%%/dio-sound-theme/snd/highscore.ogg
-%%DATADIR%%/dio-sound-theme/snd/invisible-brick-appear.ogg
-%%DATADIR%%/dio-sound-theme/snd/menuclick.ogg
-%%DATADIR%%/dio-sound-theme/snd/nextlevel.ogg
-%%DATADIR%%/dio-sound-theme/snd/norm-brick-breaka.ogg
-%%DATADIR%%/dio-sound-theme/snd/norm-brick-breakb.ogg
-%%DATADIR%%/dio-sound-theme/snd/norm-brick-breakc.ogg
-%%DATADIR%%/dio-sound-theme/snd/norm-brick-breakd.ogg
-%%DATADIR%%/dio-sound-theme/snd/norm-brick-breake.ogg
-%%DATADIR%%/dio-sound-theme/snd/po-hit-border.ogg
-%%DATADIR%%/dio-sound-theme/snd/shot.ogg
-%%DATADIR%%/dio-sound-theme/snd/start.ogg
-@dirrm %%DATADIR%%/dio-sound-theme/snd
-@dirrm %%DATADIR%%/dio-sound-theme
-@dirrm %%DATADIR%%/default/snd
-@dirrm %%DATADIR%%/default/gfx/title
-@dirrm %%DATADIR%%/default/gfx/powerup
-@dirrm %%DATADIR%%/default/gfx/paddle
-@dirrm %%DATADIR%%/default/gfx/menu
-@dirrm %%DATADIR%%/default/gfx/highscore
-@dirrm %%DATADIR%%/default/gfx/brick
-@dirrm %%DATADIR%%/default/gfx/bg
-@dirrm %%DATADIR%%/default/gfx/ball
-@dirrm %%DATADIR%%/default/gfx
-@dirrm %%DATADIR%%/default/font
-@dirrm %%DATADIR%%/default
-@dirrm %%DATADIR%%