aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwg <wg@FreeBSD.org>2013-11-26 23:51:21 +0800
committerwg <wg@FreeBSD.org>2013-11-26 23:51:21 +0800
commit2c255af786d4c0cba206ea1e986c57cb930bc30f (patch)
tree33d78aa22b1b34c3f4e255351b1286a8634647b1
parentcf0a5b86ab44843723c03403e7ad67ac03363216 (diff)
downloadfreebsd-ports-gnome-2c255af786d4c0cba206ea1e986c57cb930bc30f.tar.gz
freebsd-ports-gnome-2c255af786d4c0cba206ea1e986c57cb930bc30f.tar.zst
freebsd-ports-gnome-2c255af786d4c0cba206ea1e986c57cb930bc30f.zip
games/nighthawk: Support CC/CFLAGS properly
- Support CC/CFLAGS properly - Allow staging - USES gmake PR: ports/184221 Submitted by: KATO Tsuguru <tkato432 yahoo.com>
-rw-r--r--games/nighthawk/Makefile28
-rw-r--r--games/nighthawk/pkg-plist9
2 files changed, 18 insertions, 19 deletions
diff --git a/games/nighthawk/Makefile b/games/nighthawk/Makefile
index 665e8905c2f9..786100f1b5d6 100644
--- a/games/nighthawk/Makefile
+++ b/games/nighthawk/Makefile
@@ -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>
diff --git a/games/nighthawk/pkg-plist b/games/nighthawk/pkg-plist
index cd31fcbcf632..689be7f61f8d 100644
--- a/games/nighthawk/pkg-plist
+++ b/games/nighthawk/pkg-plist
@@ -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