- Stage support
- Support CC properly
This commit is contained in:
parent
a0e1e2a2d9
commit
8f9d008cef
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=343275
@ -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}"
|
||||
|
||||
NLS_USES= gettext
|
||||
NLS_CONFIGURE_ENABLE= nls
|
||||
|
||||
SCOREPREFIX?= /var/games
|
||||
SCOREDIR= ${SCOREPREFIX}/typespeed
|
||||
SCOREFILE= typespeed.score
|
||||
|
||||
NO_STAGE= yes
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MNLS}
|
||||
USES+= gettext
|
||||
PLIST_SUB+= NLS=""
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-nls
|
||||
PLIST_SUB+= NLS="@comment "
|
||||
.endif
|
||||
|
||||
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>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user