Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Feb 2014 16:11:19 +0000 (UTC)
From:      Martin Wilke <miwi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r343275 - in head/games/typespeed: . files
Message-ID:  <201402071611.s17GBJm5097679@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: miwi
Date: Fri Feb  7 16:11:19 2014
New Revision: 343275
URL: http://svnweb.freebsd.org/changeset/ports/343275
QAT: https://qat.redports.org/buildarchive/r343275/

Log:
  - Stage support
  - Support CC properly

Modified:
  head/games/typespeed/Makefile
  head/games/typespeed/files/pkg-install.in
  head/games/typespeed/pkg-plist

Modified: head/games/typespeed/Makefile
==============================================================================
--- head/games/typespeed/Makefile	Fri Feb  7 16:02:32 2014	(r343274)
+++ head/games/typespeed/Makefile	Fri Feb  7 16:11:19 2014	(r343275)
@@ -3,63 +3,62 @@
 
 PORTNAME=	typespeed
 PORTVERSION=	0.6.5
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	games
 MASTER_SITES=	SF
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Test your typing speed and get your fingers\' CPS
 
-GNU_CONFIGURE=	yes
-CONFIGURE_ARGS=	--with-highscoredir="/var/games/typespeed"
+OPTIONS_DEFINE=	NLS
+OPTIONS_SUB=	yes
 
-SCOREPREFIX?=	/var/games
-SCOREDIR=	${SCOREPREFIX}/typespeed
-SCOREFILE=	typespeed.score
+USES=		ncurses
+GNU_CONFIGURE=	yes
+CONFIGURE_ARGS=	--with-highscoredir="${SCOREDIR}"
 
 CFLAGS+=	-I${LOCALBASE}/include -DWITH_HIGHSCOREDIR=\"${SCOREDIR}\"  \
 		-DHIGHDIR=\"${SCOREDIR}\" -DHIGHSCOREDIR=\"${SCOREDIR}\"
 
 SUB_FILES=	pkg-install pkg-deinstall
-SUB_LIST=	SCOREDIR="${SCOREDIR}" SCOREFILE="${SCOREFILE}" WRKSRC="${WRKSRC}"
-MAN1=		typespeed.1
+SUB_LIST=	SCOREDIR="${SCOREDIR}" SCOREFILE="${SCOREFILE}"
 
-NO_STAGE=	yes
-.include <bsd.port.options.mk>
+NLS_USES=		gettext
+NLS_CONFIGURE_ENABLE=	nls
 
-.if ${PORT_OPTIONS:MNLS}
-USES+=		gettext
-PLIST_SUB+=	NLS=""
-.else
-CONFIGURE_ARGS+=	--disable-nls
-PLIST_SUB+=	NLS="@comment "
-.endif
+SCOREPREFIX?=	/var/games
+SCOREDIR=	${SCOREPREFIX}/typespeed
+SCOREFILE=	typespeed.score
+
+.include <bsd.port.options.mk>
 
 post-patch:
-	@${REINPLACE_CMD} -e 's|\(/etc\)|${PREFIX}\1|' \
-		${WRKSRC}/src/pathnames.h
+	@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \
+		's|^\(CC =\).*|\1 @CC@|'
+	@${REINPLACE_CMD} -e \
+		's|\(/etc\)|${PREFIX}\1|' ${WRKSRC}/src/pathnames.h
 
 do-install:
-	${INSTALL_PROGRAM} -g games -m 2555 ${WRKSRC}/src/${PORTNAME} ${PREFIX}/bin
-	${INSTALL_PROGRAM} ${WRKSRC}/src/convert ${PREFIX}/bin/${PORTNAME}-hs-conv
-	${INSTALL_MAN} ${WRKSRC}/man/${PORTNAME}.6 ${MANPREFIX}/man/man1/${MAN1}
-	${INSTALL_DATA} ${WRKSRC}/etc/typespeedrc ${PREFIX}/etc/typespeedrc.dist
-.if !exists(${PREFIX}/etc/typespeedrc)
-	${INSTALL_DATA} ${WRKSRC}/etc/typespeedrc ${PREFIX}/etc
-.endif
-	${MKDIR} ${DATADIR}
-	${MKDIR} ${DATADIR}/words
-	${FIND} ${WRKSRC}/words/ -name "words.*" -type f \
-		-exec ${INSTALL_DATA} {} ${DATADIR}/words \;
+	(cd ${WRKSRC}/src && ${INSTALL_PROGRAM} ${PORTNAME} \
+		${STAGEDIR}${PREFIX}/bin)
+	(cd ${WRKSRC}/src && ${INSTALL_PROGRAM} convert \
+		${STAGEDIR}${PREFIX}/bin/${PORTNAME}-hs-conv)
+	(cd ${WRKSRC}/man && ${INSTALL_MAN} ${PORTNAME}.6 \
+		${STAGEDIR}${MAN6PREFIX}/man/man6)
+	(cd ${WRKSRC}/etc && ${INSTALL_DATA} typespeedrc \
+		${STAGEDIR}${PREFIX}/etc/typespeedrc.dist)
+	@${MKDIR} ${STAGEDIR}${DATADIR}
+	(cd ${WRKSRC}/src && ${INSTALL_DATA} ${SCOREFILE} \
+		${STAGEDIR}${DATADIR}/${SCOREFILE}.default)
+	@${MKDIR} ${STAGEDIR}${DATADIR}/words
+	(cd ${WRKSRC}/words && ${INSTALL_DATA} words.* \
+		${STAGEDIR}${DATADIR}/words)
 .if ${PORT_OPTIONS:MNLS}
 .for i in de_DE fr_FR it
-	${MKDIR} ${PREFIX}/share/locale/${i}/LC_MESSAGES
-	${INSTALL_DATA} ${WRKSRC}/po/${i}.gmo \
-		${PREFIX}/share/locale/${i}/LC_MESSAGES/typespeed.mo
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/locale/${i}/LC_MESSAGES
+	(cd ${WRKSRC}/po && ${INSTALL_DATA} ${i}.gmo \
+		${STAGEDIR}${PREFIX}/share/locale/${i}/LC_MESSAGES/typespeed.mo)
 .endfor
 .endif
 
-post-install:
-	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-
 .include <bsd.port.mk>

Modified: head/games/typespeed/files/pkg-install.in
==============================================================================
--- head/games/typespeed/files/pkg-install.in	Fri Feb  7 16:02:32 2014	(r343274)
+++ head/games/typespeed/files/pkg-install.in	Fri Feb  7 16:11:19 2014	(r343275)
@@ -4,7 +4,6 @@
 
 SCOREDIR="%%SCOREDIR%%"
 SCOREFILE="%%SCOREFILE%%"
-WRKSRC="%%WRKSRC%%"
 
 [ "$2" != "POST-INSTALL" ] && exit 0
 
@@ -13,7 +12,7 @@ if [ ! -d "${SCOREDIR}" ]; then
 	chown root:games ${SCOREDIR}
 fi
 
-install -o root -g games -m 0464 ${WRKSRC}/src/${SCOREFILE} ${SCOREDIR}/${SCOREFILE}.default
+install -o root -g games -m 0464 ${PKG_PREFIX}/share/typespeed/${SCOREFILE}.default ${SCOREDIR}/${SCOREFILE}.default
 
 file="${SCOREDIR}/${SCOREFILE}"
 if [ -f "$file" ]; then

Modified: head/games/typespeed/pkg-plist
==============================================================================
--- head/games/typespeed/pkg-plist	Fri Feb  7 16:02:32 2014	(r343274)
+++ head/games/typespeed/pkg-plist	Fri Feb  7 16:11:19 2014	(r343275)
@@ -1,11 +1,17 @@
+@group games
+@mode 2555
 bin/typespeed
+@mode
+@group
 bin/typespeed-hs-conv
 @unexec if cmp -s %D/etc/typespeedrc %D/etc/typespeedrc.dist; then rm -f %D/etc/typespeedrc; fi
 etc/typespeedrc.dist
 @exec [ -f %B/typespeedrc ] || cp %B/%f %B/typespeedrc
+man/man6/typespeed.6.gz
 %%NLS%%share/locale/de_DE/LC_MESSAGES/typespeed.mo
 %%NLS%%share/locale/fr_FR/LC_MESSAGES/typespeed.mo
 %%NLS%%share/locale/it/LC_MESSAGES/typespeed.mo
+%%DATADIR%%/typespeed.score.default
 %%DATADIR%%/words/words.csharp
 %%DATADIR%%/words/words.csharp_with_operators
 %%DATADIR%%/words/words.dos



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