ports/149406: [patch] games/connect4: fix amd64 segfault

Anonymous swell.k at gmail.com
Sat Aug 7 17:10:07 UTC 2010


This PR start to look like VCS ;).

- unbreak INSTALL_AS_USER

--- d.diff begins here ---
diff --git games/connect4/Makefile games/connect4/Makefile
index edf5a49..b1ccfac 100644
--- games/connect4/Makefile
+++ games/connect4/Makefile
@@ -24,7 +24,6 @@ EXTRACT_BEFORE_ARGS=	# empty
 EXTRACT_AFTER_ARGS=	| gunshar
 
 MAKE_ENV+=	DATADIR=${DATADIR}
-DATADIR=	/var/games/${PORTNAME}
 
 NO_WRKSUBDIR=	yes
 MAN6=		connect4.6
@@ -38,9 +37,13 @@ BINGRP?=	games
 BINMODE?=	2555
 .endif
 
+.if !defined(INSTALL_AS_USER)
+DATADIR?=	/var/games/${PORTNAME}
+.endif
+
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/c4 ${PREFIX}/bin/connect4
-	${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 775 ${DATADIR}
+	${INSTALL} -d ${_SHROWNGRP} -m 775 ${DATADIR}
 	${INSTALL_DATA} /dev/null ${DATADIR}/scores
 	${INSTALL_MAN} ${FILESDIR}/connect4.6 ${MANPREFIX}/man/man6
 
diff --git games/connect4/pkg-plist games/connect4/pkg-plist
index b4c2e07..61bcdee 100644
--- games/connect4/pkg-plist
+++ games/connect4/pkg-plist
@@ -1,3 +1,3 @@
 bin/connect4
- at unexec if [ ! -s /var/games/connect4/scores ]; then rm -f /var/games/connect4/scores; fi
- at unexec rmdir /var/games/connect4 2>/dev/null || true
+ at unexec if [ ! -s %%DATADIR%%/scores ]; then rm -f %%DATADIR%%/scores; fi
+ at unexec rmdir %%DATADIR%% 2>/dev/null || true
--- d.diff ends here ---



More information about the freebsd-ports-bugs mailing list