Bug 184221 - games/nighthawk: Support CC/CFLAGS properly
Summary: games/nighthawk: Support CC/CFLAGS 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: William Grzybowski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-24 18:10 UTC by tkato432
Modified: 2013-11-26 16:00 UTC (History)
0 users

See Also:


Attachments
file.diff (2.70 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:00 UTC
- Support CC/CFLAGS properly
Comment 1 William Grzybowski freebsd_committer 2013-11-26 15:44:45 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wg

I'll take it.
Comment 2 dfilter service freebsd_committer 2013-11-26 15:51:29 UTC
Author: wg
Date: Tue Nov 26 15:51:21 2013
New Revision: 334950
URL: http://svnweb.freebsd.org/changeset/ports/334950

Log:
  games/nighthawk: Support CC/CFLAGS properly
  
  - Support CC/CFLAGS properly
  - Allow staging
  - USES gmake
  
  PR:		ports/184221
  Submitted by:	KATO Tsuguru <tkato432 yahoo.com>

Modified:
  head/games/nighthawk/Makefile
  head/games/nighthawk/pkg-plist

Modified: head/games/nighthawk/Makefile
==============================================================================
--- head/games/nighthawk/Makefile	Tue Nov 26 15:45:50 2013	(r334949)
+++ head/games/nighthawk/Makefile	Tue Nov 26 15:51:21 2013	(r334950)
@@ -5,28 +5,24 @@ PORTNAME=	nighthawk
 PORTVERSION=	3.0.0
 PORTREVISION=	2
 CATEGORIES=	games
-MASTER_SITES=	${MASTER_SITE_SUNSITE}
-MASTER_SITE_SUBDIR=	games/arcade
+MASTER_SITES=	SUNSITE/games/arcade
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	An X11 shoot-'em up which requires some lateral thinking
+COMMENT=	X11 shoot-'em up which requires some lateral thinking
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
 USE_BZIP2=	yes
+USES=		gmake
 USE_GL=		glut
-USE_GMAKE=	yes
 MAKE_ARGS=	CC="${CC}" CPP="${CXX}" CC_FLAGS="${CXXFLAGS}" \
-		LIB_FLAGS="${LDFLAGS}"
-
-MAN6=		nighthawk.6
+		LIB_FLAGS="${LDFLAGS}" GCC="${CC}" CFLAGS="${CFLAGS}"
 
 CFLAGS+=	-DINSTALL_DIR=\\\"\${DATADIR}\\\" \
 		-DSCORES_FILE=\\\"/var/games/nighthawk.scores\\\" \
 		-I${LOCALBASE}/include
 LDFLAGS+=	-lm -L${LOCALBASE}/lib -lX11 -lGL -lGLU -lglut
 
-NO_STAGE=	yes
 post-patch:
 	${FIND} ${WRKSRC} -name "Makefile" | ${XARGS} ${REINPLACE_CMD} -e \
 		's|make|$$(MAKE)|g ; \
@@ -36,16 +32,12 @@ post-patch:
 	${REINPLACE_CMD} -e 's|^|#|g' ${WRKSRC}/config.user
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/src/nighthawk ${PREFIX}/bin
-	${CHOWN} root:games ${PREFIX}/bin/nighthawk
-	${CHMOD} g+s ${PREFIX}/bin/nighthawk
-	${INSTALL_DATA} ${WRKSRC}/doc/nighthawk.6 ${MANPREFIX}/man/man6
-	@${MKDIR} ${DATADIR}
+	(cd ${WRKSRC}/src && ${INSTALL_PROGRAM} nighthawk \
+		${STAGEDIR}${PREFIX}/bin)
+	(cd ${WRKSRC}/doc &&  ${INSTALL_MAN} nighthawk.6 \
+		${STAGEDIR}${MANPREFIX}/man/man6)
+	@${MKDIR} ${STAGEDIR}${DATADIR}
 	${TAR} -C ${WRKSRC} --exclude ".xvpics" -cf - data | \
-		${TAR} -C ${DATADIR} --unlink -xf -
-	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DATADIR}
-	@${FIND} ${DATADIR} -type f | ${XARGS} ${CHMOD} ${SHAREMODE}
-	@${FIND} ${DATADIR} -type d | ${XARGS} ${CHMOD} a+rx
-	@${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
+		${TAR} -C ${STAGEDIR}${DATADIR} --unlink -xf -
 
 .include <bsd.port.mk>

Modified: head/games/nighthawk/pkg-plist
==============================================================================
--- head/games/nighthawk/pkg-plist	Tue Nov 26 15:45:50 2013	(r334949)
+++ head/games/nighthawk/pkg-plist	Tue Nov 26 15:51:21 2013	(r334950)
@@ -1,4 +1,11 @@
+@owner root
+@group games
+@mode 6755
 bin/nighthawk
+@owner
+@group
+@mode
+man/man6/nighthawk.6.gz
 %%DATADIR%%/data/Anoyle/Bridge.f
 %%DATADIR%%/data/Anoyle/Bridge.m
 %%DATADIR%%/data/Anoyle/Engineering.f
@@ -215,4 +222,4 @@ bin/nighthawk
 @dirrm %%DATADIR%%/data/Anoyle
 @dirrm %%DATADIR%%/data
 @dirrm %%DATADIR%%
-@unexec if [ -s /var/games/nighthawk.scores ] || rm -f /var/games/nighthawk.scores
+@unexec if [ ! -s /var/games/nighthawk.scores ]; then rm -f /var/games/nighthawk.scores; fi
_______________________________________________
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 William Grzybowski freebsd_committer 2013-11-26 15:52:07 UTC
State Changed
From-To: open->closed

Committed. Thanks!