aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorantoine <antoine@FreeBSD.org>2013-06-28 02:31:06 +0800
committerantoine <antoine@FreeBSD.org>2013-06-28 02:31:06 +0800
commitfce3aec4f402f50d68b6a1805cafa2fc80b9b29f (patch)
tree37b180b2b23bd2a0c68df178f2bd34e61eb502fe
parenta78f213d47ca63a7bf8862b79866f1dfe8e3b521 (diff)
downloadfreebsd-ports-gnome-fce3aec4f402f50d68b6a1805cafa2fc80b9b29f.tar.gz
freebsd-ports-gnome-fce3aec4f402f50d68b6a1805cafa2fc80b9b29f.tar.zst
freebsd-ports-gnome-fce3aec4f402f50d68b6a1805cafa2fc80b9b29f.zip
Fix some fonts.dir leftovers reported by poudriere
While here, trim Makefile header and finish PORT_OPTIONS conversion Approved by: portmgr (miwi)
-rw-r--r--japanese/font-ricty/Makefile15
-rw-r--r--japanese/font-ricty/files/pkg-install.in4
-rw-r--r--japanese/monafonts-ttf/Makefile8
-rw-r--r--japanese/monafonts-ttf/pkg-deinstall4
-rw-r--r--japanese/monafonts-ttf/pkg-plist1
-rw-r--r--x11-fonts/cyberbit-ttfonts/Makefile15
-rw-r--r--x11-fonts/cyberbit-ttfonts/pkg-deinstall4
-rw-r--r--x11-fonts/cyberbit-ttfonts/pkg-plist1
8 files changed, 30 insertions, 22 deletions
diff --git a/japanese/font-ricty/Makefile b/japanese/font-ricty/Makefile
index d6751640ede7..e0b87cb9e073 100644
--- a/japanese/font-ricty/Makefile
+++ b/japanese/font-ricty/Makefile
@@ -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
diff --git a/japanese/font-ricty/files/pkg-install.in b/japanese/font-ricty/files/pkg-install.in
index 9d53097ce8b7..378d103c7fde 100644
--- a/japanese/font-ricty/files/pkg-install.in
+++ b/japanese/font-ricty/files/pkg-install.in
@@ -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
diff --git a/japanese/monafonts-ttf/Makefile b/japanese/monafonts-ttf/Makefile
index 1d8bb513d004..c3ecf11fd561 100644
--- a/japanese/monafonts-ttf/Makefile
+++ b/japanese/monafonts-ttf/Makefile
@@ -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}
diff --git a/japanese/monafonts-ttf/pkg-deinstall b/japanese/monafonts-ttf/pkg-deinstall
index 1b2d071d768f..0f2f4b70ba2d 100644
--- a/japanese/monafonts-ttf/pkg-deinstall
+++ b/japanese/monafonts-ttf/pkg-deinstall
@@ -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
diff --git a/japanese/monafonts-ttf/pkg-plist b/japanese/monafonts-ttf/pkg-plist
index 15d1941cee30..a33ac660e9bb 100644
--- a/japanese/monafonts-ttf/pkg-plist
+++ b/japanese/monafonts-ttf/pkg-plist
@@ -1,2 +1,3 @@
%%FONTSDIR%%/fonts.dir.mona
%%FONTSDIR%%/mona.ttf
+@dirrmtry %%FONTSDIR%%
diff --git a/x11-fonts/cyberbit-ttfonts/Makefile b/x11-fonts/cyberbit-ttfonts/Makefile
index cfb182794b93..f6db97c7dbf8 100644
--- a/x11-fonts/cyberbit-ttfonts/Makefile
+++ b/x11-fonts/cyberbit-ttfonts/Makefile
@@ -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}
diff --git a/x11-fonts/cyberbit-ttfonts/pkg-deinstall b/x11-fonts/cyberbit-ttfonts/pkg-deinstall
index 35c1d3f0dd77..53303469e7e8 100644
--- a/x11-fonts/cyberbit-ttfonts/pkg-deinstall
+++ b/x11-fonts/cyberbit-ttfonts/pkg-deinstall
@@ -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
diff --git a/x11-fonts/cyberbit-ttfonts/pkg-plist b/x11-fonts/cyberbit-ttfonts/pkg-plist
index cedc3f31fdc4..07e2a2a57073 100644
--- a/x11-fonts/cyberbit-ttfonts/pkg-plist
+++ b/x11-fonts/cyberbit-ttfonts/pkg-plist
@@ -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