Bug 184231 - games/tuxpuck: Support CC properly
Summary: games/tuxpuck: Support CC properly
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pawel Pekala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-24 18:10 UTC by tkato432
Modified: 2013-12-28 18:00 UTC (History)
0 users

See Also:


Attachments
file.diff (1.78 KB, patch)
2013-11-24 18:10 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2013-11-24 18:10:04 UTC
- Support CC properly
Comment 1 Pawel Pekala freebsd_committer freebsd_triage 2013-12-25 19:38:38 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pawel

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-12-25 19:45:16 UTC
Author: pawel
Date: Wed Dec 25 19:45:08 2013
New Revision: 337448
URL: http://svnweb.freebsd.org/changeset/ports/337448

Log:
  Respect CC
  
  PR:		ports/184231
  Submitted by:	KATO Tsuguru <tkato432@yahoo.com>

Modified:
  head/games/tuxpuck/Makefile
  head/games/tuxpuck/files/patch-Makefile   (contents, props changed)

Modified: head/games/tuxpuck/Makefile
==============================================================================
--- head/games/tuxpuck/Makefile	Wed Dec 25 19:39:39 2013	(r337447)
+++ head/games/tuxpuck/Makefile	Wed Dec 25 19:45:08 2013	(r337448)
@@ -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

Modified: head/games/tuxpuck/files/patch-Makefile
==============================================================================
--- head/games/tuxpuck/files/patch-Makefile	Wed Dec 25 19:39:39 2013	(r337447)
+++ head/games/tuxpuck/files/patch-Makefile	Wed Dec 25 19:45:08 2013	(r337448)
@@ -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
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Pawel Pekala freebsd_committer freebsd_triage 2013-12-25 19:45:21 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-12-28 17:58:17 UTC
Author: pawel
Date: Sat Dec 28 17:58:09 2013
New Revision: 337887
URL: http://svnweb.freebsd.org/changeset/ports/337887

Log:
  MFH: r337448
  
  Respect CC
  
  PR:		ports/184231
  Submitted by:	KATO Tsuguru <tkato432@yahoo.com>
  Approved by:    portmgr

Modified:
  branches/2014Q1/games/tuxpuck/Makefile
  branches/2014Q1/games/tuxpuck/files/patch-Makefile   (contents, props changed)
Directory Properties:
  branches/2014Q1/   (props changed)

Modified: branches/2014Q1/games/tuxpuck/Makefile
==============================================================================
--- branches/2014Q1/games/tuxpuck/Makefile	Sat Dec 28 17:45:18 2013	(r337886)
+++ branches/2014Q1/games/tuxpuck/Makefile	Sat Dec 28 17:58:09 2013	(r337887)
@@ -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

Modified: branches/2014Q1/games/tuxpuck/files/patch-Makefile
==============================================================================
--- branches/2014Q1/games/tuxpuck/files/patch-Makefile	Sat Dec 28 17:45:18 2013	(r337886)
+++ branches/2014Q1/games/tuxpuck/files/patch-Makefile	Sat Dec 28 17:58:09 2013	(r337887)
@@ -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
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"