1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00

Fix some fonts.dir leftovers reported by poudriere

While here, trim Makefile header and finish PORT_OPTIONS conversion

Approved by:	portmgr (miwi)
This commit is contained in:
Antoine Brodin 2013-06-27 18:31:06 +00:00
parent 1a7bda6195
commit fe33b412f0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=321898
8 changed files with 30 additions and 22 deletions

View File

@ -1,12 +1,9 @@
# New ports collection makefile for: font-ricty
# Date created: 24 April 2012
# Whom: masaki
#
# Created by: masaki
# $FreeBSD$
#
PORTNAME= ricty
PORTVERSION= 3.2.1b
PORTREVISION= 1
CATEGORIES= japanese x11-fonts
PKGNAMEPREFIX= ja-font-
@ -37,7 +34,7 @@ PORTDOCS= README.md
LOCAL_FONTSDIR= share/fonts
X_FONTSDIR= lib/X11/fonts
OPTIONS_DEFINE= DISCORD
OPTIONS_DEFINE= DISCORD DOCS
DISCORD_DESC= Install Ricty-Discord
OPTIONS_DEFAULT= DISCORD
@ -62,7 +59,7 @@ do-build:
do-install:
${MKDIR} ${DATADIR}
${INSTALL_DATA} ${WRKSRC}/Ricty-*.ttf ${DATADIR}
.if defined(WITH_DISCORD)
.if ${PORT_OPTIONS:MDISCORD}
${INSTALL_DATA} ${WRKSRC}/RictyDiscord-*.ttf ${DATADIR}
.endif
${MKDIR} ${PREFIX}/${LOCAL_FONTSDIR}/TTF
@ -80,7 +77,7 @@ do-install:
${PREFIX}/etc/fonts/conf.d/20-unhint-ricty.conf
${LN} -s -f ../conf.avail/62-fonts-ricty.conf \
${PREFIX}/etc/fonts/conf.d/62-fonts-ricty.conf
.if defined(WITH_DISCORD)
.if ${PORT_OPTIONS:MDISCORD}
${INSTALL_DATA} ${FILESDIR}/20-unhint-rictydiscord.conf \
${FILESDIR}/62-fonts-rictydiscord.conf \
${PREFIX}/etc/fonts/conf.avail
@ -89,7 +86,7 @@ do-install:
${LN} -s -f ../conf.avail/62-fonts-rictydiscord.conf \
${PREFIX}/etc/fonts/conf.d/62-fonts-rictydiscord.conf
.endif
.if !defined(NOPORTDOCS)
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif

View File

@ -87,14 +87,14 @@ case "$2" in
POST-INSTALL)
cd ${X_FONTSDIR}
touch fonts.dir
(catfontsdir < fonts.dir; addentries) > fonts.dir.tmp
(sed 1d fonts.dir | catfontsdir; addentries) > fonts.dir.tmp
nfonts < fonts.dir.tmp > fonts.dir
cat fonts.dir.tmp >> fonts.dir
rm -f fonts.dir.tmp
;;
POST-DEINSTALL)
cd ${X_FONTSDIR}
catfontsdir < fonts.dir > fonts.dir.tmp
sed 1d fonts.dir | catfontsdir > fonts.dir.tmp
nfonts < fonts.dir.tmp > fonts.dir
cat fonts.dir.tmp >> fonts.dir
rm -f fonts.dir.tmp

View File

@ -1,13 +1,9 @@
# New ports collection makefile for: Mona TrueType fonts
# Date created: 14 October 2003
# Whom: MANTANI Nobutaka <nobutaka@FreeBSD.org>
#
# Created by: MANTANI Nobutaka <nobutaka@FreeBSD.org>
# $FreeBSD$
#
PORTNAME= monafonts-ttf
PORTVERSION= 2.90
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= japanese x11-fonts
MASTER_SITES= SF/monafont/monafont/monafont-${PORTVERSION}
DISTNAME= monafont-ttf-${PORTVERSION}

View File

@ -6,6 +6,10 @@ FONTDIR=${PKG_PREFIX}/lib/X11/fonts/TrueType
cd ${FONTDIR}
sed -e '/-mona-/d' fonts.dir > fonts.dir.tmp
numfonts=$(echo $(cat fonts.dir.tmp | wc -l) - 1 | bc)
if [ ${numfonts} != "0" ]; then
echo ${numfonts} > fonts.dir
sed -e 1d fonts.dir.tmp >> fonts.dir
rm -f fonts.dir.tmp
else
rm -f fonts.dir fonts.dir.tmp
fi

View File

@ -1,2 +1,3 @@
%%FONTSDIR%%/fonts.dir.mona
%%FONTSDIR%%/mona.ttf
@dirrmtry %%FONTSDIR%%

View File

@ -9,10 +9,6 @@ MASTER_SITES= http://ftp.netscape.com/pub/communicator/extras/fonts/windows/ \
http://aol-4.vo.llnwd.net/pub/communicator/extras/fonts/windows/ \
ftp://ftp.netscape.com/pub/communicator/extras/fonts/windows/
DISTFILES= Cyberbit.ZIP
.if !defined(NOPORTDOCS)
DISTFILES+= 97CyberBase.Doc 97CyberBit.Doc 97CyberCJK.Doc \
CYBERBIT.DOC CYBERCJK.DOC READMEfirst.txt ReadMe.htm
.endif
DIST_SUBDIR= cyberbit
EXTRACT_ONLY= Cyberbit.ZIP
@ -29,6 +25,15 @@ MAKE_ENV= FONTSDIR=${FONTSDIR}
PLIST_SUB= FONTSDIR=${FONTSDIR}
WRKSRC= ${WRKDIR}
OPTIONS_DEFINE= DOCS
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDOCS}
DISTFILES+= 97CyberBase.Doc 97CyberBit.Doc 97CyberCJK.Doc \
CYBERBIT.DOC CYBERCJK.DOC READMEfirst.txt ReadMe.htm
.endif
do-install:
.if !exists(${PREFIX}/${FONTSDIR})
@${ECHO} "*********************************************************"
@ -40,7 +45,7 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/*.ttf \
${FILESDIR}/fonts.dir.cyberbit \
${PREFIX}/${FONTSDIR}
.if !defined(NOPORTDOCS)
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/97CyberBase.Doc ${DOCSDIR}
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/97CyberBit.Doc ${DOCSDIR}

View File

@ -7,6 +7,10 @@ FONTDIR=${PKG_PREFIX}/lib/X11/fonts/TrueType
cd ${FONTDIR}
sed -e "/${XFLDNAME}/d" fonts.dir > fonts.dir.tmp
numfonts=$(echo $(cat fonts.dir.tmp | wc -l) - 1 | bc)
if [ ${numfonts} != "0" ]; then
echo ${numfonts} > fonts.dir
sed -e 1d fonts.dir.tmp >> fonts.dir
rm -f fonts.dir.tmp
else
rm -f fonts.dir fonts.dir.tmp
fi

View File

@ -1,5 +1,6 @@
%%FONTSDIR%%/fonts.dir.cyberbit
%%FONTSDIR%%/Cyberbit.ttf
@dirrmtry %%FONTSDIR%%
%%PORTDOCS%%%%DOCSDIR%%/97CyberBase.Doc
%%PORTDOCS%%%%DOCSDIR%%/97CyberBit.Doc
%%PORTDOCS%%%%DOCSDIR%%/97CyberCJK.Doc