aboutsummaryrefslogtreecommitdiffstats
path: root/games/tuxpuck
diff options
context:
space:
mode:
authorpawel <pawel@FreeBSD.org>2013-12-26 03:45:08 +0800
committerpawel <pawel@FreeBSD.org>2013-12-26 03:45:08 +0800
commit9219e6f6c7b83e5c560b4b6590ea733198ea87b3 (patch)
treec989ec0e8eaea0af46ede8a32f94001c8a1bb1a7 /games/tuxpuck
parent012952f0a6a9ec329583499c4c05b765de7d5603 (diff)
downloadfreebsd-ports-gnome-9219e6f6c7b83e5c560b4b6590ea733198ea87b3.tar.gz
freebsd-ports-gnome-9219e6f6c7b83e5c560b4b6590ea733198ea87b3.tar.zst
freebsd-ports-gnome-9219e6f6c7b83e5c560b4b6590ea733198ea87b3.zip
Respect CC
PR: ports/184231 Submitted by: KATO Tsuguru <tkato432@yahoo.com>
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