aboutsummaryrefslogtreecommitdiff
path: root/games/tuxpuck
diff options
context:
space:
mode:
authorPawel Pekala <pawel@FreeBSD.org>2013-12-25 19:45:08 +0000
committerPawel Pekala <pawel@FreeBSD.org>2013-12-25 19:45:08 +0000
commitb8ddea160ea112713d9e662336210d80fcbc369f (patch)
treec989ec0e8eaea0af46ede8a32f94001c8a1bb1a7 /games/tuxpuck
parentffc78733bc0be6cc2d263fec73096a9408108939 (diff)
downloadports-b8ddea160ea112713d9e662336210d80fcbc369f.tar.gz
ports-b8ddea160ea112713d9e662336210d80fcbc369f.zip
Notes
Diffstat (limited to 'games/tuxpuck')
-rw-r--r--games/tuxpuck/Makefile16
-rw-r--r--games/tuxpuck/files/patch-Makefile4
2 files changed, 12 insertions, 8 deletions
diff --git a/games/tuxpuck/Makefile b/games/tuxpuck/Makefile
index b6eb1abbe84e..697f674a9b6a 100644
--- a/games/tuxpuck/Makefile
+++ b/games/tuxpuck/Makefile
@@ -22,15 +22,19 @@ USES= gmake
ALL_TARGET= ${PORTNAME}
MAKE_JOBS_UNSAFE= yes
-CFLAGS+= -I${LOCALBASE}/include/libpng15
-
PLIST_FILES= bin/${PORTNAME} man/man6/tuxpuck.6.gz
post-patch:
- cd ${WRKSRC}; \
- ${REINPLACE_CMD} 's|timer_create|_timer_create|g' \
- tuxpuck.c video.c timer.c intro.c tuxpuck.h
- ${REINPLACE_CMD} -e 's|sdl-config|$$(SDL_CONFIG)|g' ${WRKSRC}/utils/Makefile
+.for i in intro.c timer.c tuxpuck.c tuxpuck.h video.c
+ @${REINPLACE_CMD} -e \
+ 's|timer_create|_timer_create|g' ${WRKSRC}/${i}
+.endfor
+.for i in data utils
+ @${REINPLACE_CMD} -e \
+ 's|^CC|#CC| ; \
+ s|^CFLAGS|#CFLAGS| ; \
+ s|sdl-config|$$(SDL_CONFIG)|' ${WRKSRC}/${i}/Makefile
+.endfor
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
diff --git a/games/tuxpuck/files/patch-Makefile b/games/tuxpuck/files/patch-Makefile
index 19360c8c2d5e..eb55122f1751 100644
--- a/games/tuxpuck/files/patch-Makefile
+++ b/games/tuxpuck/files/patch-Makefile
@@ -16,12 +16,12 @@
%.o : %.c
- $(CC) $(CFLAGS) `sdl-config --cflags` -c -o $@ $<
-+ $(CC) $(CFLAGS) `$(SDL_CONFIG) --cflags` -c -o $@ $<
++ $(CC) $(CFLAGS) `$(SDL_CONFIG) --cflags` `libpng-config --cflags` -c -o $@ $<
$(NAME) : $(OBJS)
cd data; $(MAKE)
- $(CC) $(CFLAGS) $(OBJS) data/libdata.a `sdl-config --libs` -lm -lpng \
-+ $(CC) $(CFLAGS) $(OBJS) data/libdata.a `$(SDL_CONFIG) --libs` -lm -lpng \
++ $(CC) $(CFLAGS) $(OBJS) data/libdata.a `$(SDL_CONFIG) --libs` `libpng-config --libs` -lm \
-ljpeg -lz -lvorbisfile -lvorbis -logg -o $(NAME)
w32icon.o : data/icons/tuxpuck.ico