Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Nov 2013 02:51:46 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/184231: games/tuxpuck: Support CC properly
Message-ID:  <20131125025146.a4860e1381701a1aa08ef697@yahoo.com>
Resent-Message-ID: <201311241810.rAOIA4NX046859@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         184231
>Category:       ports
>Synopsis:       games/tuxpuck: Support CC properly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 24 18:10:04 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Support CC properly

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/games/tuxpuck/Makefile games/tuxpuck/Makefile
--- /usr/ports/games/tuxpuck/Makefile	2013-11-12 18:11:17.000000000 +0900
+++ games/tuxpuck/Makefile	2013-11-25 00:00:00.000000000 +0900
@@ -22,15 +22,19 @@
 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 -urN /usr/ports/games/tuxpuck/files/patch-Makefile games/tuxpuck/files/patch-Makefile
--- /usr/ports/games/tuxpuck/files/patch-Makefile	2013-11-06 22:00:20.000000000 +0900
+++ games/tuxpuck/files/patch-Makefile	2013-11-25 00:00:00.000000000 +0900
@@ -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
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131125025146.a4860e1381701a1aa08ef697>