summaryrefslogtreecommitdiff
path: root/x11-fonts
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2014-07-15 18:48:29 +0000
committerSteve Wills <swills@FreeBSD.org>2014-07-15 18:48:29 +0000
commit5bddf3fa9227c14a30f1f3b537d4391b91d5f318 (patch)
tree6fe3845c8c1e36aeaaa85522cdd09b81de6b94d8 /x11-fonts
parentUpdate to 4.8.3. (diff)
x11-fonts/cyberbit-ttfonts: stage, assign maintainership to submitter, cleanup
- Stage - Assign maintainership to submitter - Fix grammar in COMMENT - Cleanup installation - Cleanup docs - Use pkg-message instead of ${ECHO_CMD} PR: 191854 Submitted by: A.J. "Fonz" van Werven <freebsd@skysmurf.nl>
Notes
Notes: svn path=/head/; revision=361995
Diffstat (limited to 'x11-fonts')
-rw-r--r--x11-fonts/cyberbit-ttfonts/Makefile66
-rw-r--r--x11-fonts/cyberbit-ttfonts/files/fonts.dir.cyberbit17
-rw-r--r--x11-fonts/cyberbit-ttfonts/files/pkg-message.in10
-rw-r--r--x11-fonts/cyberbit-ttfonts/pkg-deinstall16
-rw-r--r--x11-fonts/cyberbit-ttfonts/pkg-install16
-rw-r--r--x11-fonts/cyberbit-ttfonts/pkg-plist16
6 files changed, 47 insertions, 94 deletions
diff --git a/x11-fonts/cyberbit-ttfonts/Makefile b/x11-fonts/cyberbit-ttfonts/Makefile
index 2bcc864154f1..a912c18d04d1 100644
--- a/x11-fonts/cyberbit-ttfonts/Makefile
+++ b/x11-fonts/cyberbit-ttfonts/Makefile
@@ -7,54 +7,52 @@ PORTREVISION= 2
CATEGORIES= x11-fonts
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
+ ftp://ftp.netscape.com/pub/communicator/extras/fonts/windows/ \
+ http://www.skysmurf.nl/comp/FreeBSD/distfiles/cyberbit/
+DISTFILES= Cyberbit.ZIP 97CyberBase.Doc 97CyberBit.Doc 97CyberCJK.Doc \
+ CYBERBIT.DOC CYBERCJK.DOC READMEfirst.txt ReadMe.htm
DIST_SUBDIR= cyberbit
EXTRACT_ONLY= Cyberbit.ZIP
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Bitstream Cyberbit is a TrueType font covers Unicode 2.0
+MAINTAINER= freebsd@skysmurf.nl
+COMMENT= Bitstream Cyberbit is a TrueType font that covers Unicode 2.0
+
+BUILD_DEPENDS= mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir \
+ mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale
RESTRICTED= Redistribution not permitted; single user license only.
USES= zip
-NO_BUILD= yes
-FONTSDIR= lib/X11/fonts/TrueType
-MAKE_ENV= FONTSDIR=${FONTSDIR}
-PLIST_SUB= FONTSDIR=${FONTSDIR}
+FONTDIR= lib/X11/fonts/Cyberbit
+PLIST_SUB= FONTDIR="${FONTDIR:S|${PREFIX}/||}"
+
+SUB_FILES= pkg-message
+PKGMESSAGE= ${WRKDIR}/pkg-message
+SUB_LIST= FONTDIR=${PREFIX}/${FONTDIR}
+
WRKSRC= ${WRKDIR}
+PORTDOCS= 97CyberBase.Doc 97CyberBit.Doc 97CyberCJK.Doc \
+ CYBERBIT.DOC CYBERCJK.DOC READMEfirst.txt ReadMe.htm
+
OPTIONS_DEFINE= DOCS
-NO_STAGE= yes
.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
+MKFONTSCALE= ${LOCALBASE}/bin/mkfontscale
+MKFONTDIR= ${LOCALBASE}/bin/mkfontdir
+
+do-build:
+ cd ${WRKSRC} && ${MKFONTSCALE} && ${MKFONTDIR}
do-install:
-.if !exists(${PREFIX}/${FONTSDIR})
- @${ECHO} "*********************************************************"
- @${ECHO} "Please add ${PREFIX}/${FONTSDIR} to your font path"
- @${ECHO} "and load 'xtt' module in /etc/x11/xorg.conf."
- @${ECHO} "*********************************************************"
- ${MKDIR} ${PREFIX}/${FONTSDIR}
-.endif
- ${INSTALL_DATA} ${WRKSRC}/*.ttf \
- ${FILESDIR}/fonts.dir.cyberbit \
- ${PREFIX}/${FONTSDIR}
-.if ${PORT_OPTIONS:MDOCS}
- ${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/97CyberBase.Doc ${DOCSDIR}
- ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/97CyberBit.Doc ${DOCSDIR}
- ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/97CyberCJK.Doc ${DOCSDIR}
- ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/CYBERBIT.DOC ${DOCSDIR}
- ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/CYBERCJK.DOC ${DOCSDIR}
- ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/READMEfirst.txt ${DOCSDIR}
- ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/ReadMe.htm ${DOCSDIR}
-.endif
- ${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @${MKDIR} ${STAGEDIR}${PREFIX}/${FONTDIR}
+ ${INSTALL_DATA} ${WRKSRC}/Cyberbit.ttf ${STAGEDIR}${PREFIX}/${FONTDIR}
+ ${INSTALL_DATA} ${WRKSRC}/fonts.* ${STAGEDIR}${PREFIX}/${FONTDIR}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+.for doc in ${PORTDOCS}
+ ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/${doc} ${STAGEDIR}${DOCSDIR}
+.endfor
+
.include <bsd.port.mk>
diff --git a/x11-fonts/cyberbit-ttfonts/files/fonts.dir.cyberbit b/x11-fonts/cyberbit-ttfonts/files/fonts.dir.cyberbit
deleted file mode 100644
index d3c89e3313b7..000000000000
--- a/x11-fonts/cyberbit-ttfonts/files/fonts.dir.cyberbit
+++ /dev/null
@@ -1,17 +0,0 @@
-16
-Cyberbit.ttf -Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-ascii-0
-Cyberbit.ttf -Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-fcd8859-15
-Cyberbit.ttf -Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-iso10646-1
-Cyberbit.ttf -Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-iso8859-1
-Cyberbit.ttf -Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-iso8859-10
-Cyberbit.ttf -Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-iso8859-15
-Cyberbit.ttf -Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-iso8859-2
-Cyberbit.ttf -Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-iso8859-3
-Cyberbit.ttf -Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-iso8859-4
-Cyberbit.ttf -Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-iso8859-5
-Cyberbit.ttf -Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-iso8859-6
-Cyberbit.ttf -Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-iso8859-7
-Cyberbit.ttf -Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-iso8859-8
-Cyberbit.ttf -Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-iso8859-9
-Cyberbit.ttf -Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-koi8-r
-Cyberbit.ttf -Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-koi8-ru
diff --git a/x11-fonts/cyberbit-ttfonts/files/pkg-message.in b/x11-fonts/cyberbit-ttfonts/files/pkg-message.in
new file mode 100644
index 000000000000..17a60385be9a
--- /dev/null
+++ b/x11-fonts/cyberbit-ttfonts/files/pkg-message.in
@@ -0,0 +1,10 @@
+You can start using the font(s) by following these instructions:
+
+Eiter type the following in an X terminal:
+ xset fp+ %%FONTDIR%%
+ xset fp rehash
+
+Or, more permanently, add the following line to the "Files" section of your
+X.Org configuration file:
+ FontPath "%%FONTDIR%%/"
+and make sure you have the "freetype" module loaded, then restart X.
diff --git a/x11-fonts/cyberbit-ttfonts/pkg-deinstall b/x11-fonts/cyberbit-ttfonts/pkg-deinstall
deleted file mode 100644
index 53303469e7e8..000000000000
--- a/x11-fonts/cyberbit-ttfonts/pkg-deinstall
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-XFLDNAME="-Bitstream-Bitstream\ Cyberbit-"
-if [ "$2" != "DEINSTALL" ]; then
- exit 0
-fi
-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-install b/x11-fonts/cyberbit-ttfonts/pkg-install
deleted file mode 100644
index 398687475ca8..000000000000
--- a/x11-fonts/cyberbit-ttfonts/pkg-install
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-XFLDNAME="-Bitstream-Bitstream Cyberbit-"
-FONTNAME=cyberbit
-FONTDIR=${PKG_PREFIX}/lib/X11/fonts/TrueType
-if [ "$2" = "PRE-INSTALL" ]; then
- echo "Please add ${FONTDIR} to your /etc/x11/xorg.conf file"
- exit 0
-fi
-cd ${FONTDIR}
-touch fonts.dir
-sed -e "/${XFLDNAME}/d" fonts.dir > fonts.dir.tmp
-numfonts=$(echo $(cat fonts.dir.tmp fonts.dir.${FONTNAME} | wc -l) - 2 | bc)
-echo ${numfonts} > fonts.dir
-sed -e 1d fonts.dir.tmp >> fonts.dir
-sed -e 1d fonts.dir.$FONTNAME >> fonts.dir
-rm -f fonts.dir.tmp
diff --git a/x11-fonts/cyberbit-ttfonts/pkg-plist b/x11-fonts/cyberbit-ttfonts/pkg-plist
index 07e2a2a57073..daef1dd0cc8f 100644
--- a/x11-fonts/cyberbit-ttfonts/pkg-plist
+++ b/x11-fonts/cyberbit-ttfonts/pkg-plist
@@ -1,11 +1,5 @@
-%%FONTSDIR%%/fonts.dir.cyberbit
-%%FONTSDIR%%/Cyberbit.ttf
-@dirrmtry %%FONTSDIR%%
-%%PORTDOCS%%%%DOCSDIR%%/97CyberBase.Doc
-%%PORTDOCS%%%%DOCSDIR%%/97CyberBit.Doc
-%%PORTDOCS%%%%DOCSDIR%%/97CyberCJK.Doc
-%%PORTDOCS%%%%DOCSDIR%%/CYBERBIT.DOC
-%%PORTDOCS%%%%DOCSDIR%%/CYBERCJK.DOC
-%%PORTDOCS%%%%DOCSDIR%%/READMEfirst.txt
-%%PORTDOCS%%%%DOCSDIR%%/ReadMe.htm
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
+%%FONTDIR%%/Cyberbit.ttf
+%%FONTDIR%%/fonts.dir
+%%FONTDIR%%/fonts.scale
+@unexec rm %D/%%FONTDIR%%/fonts.cache-1 2>/dev/null || /usr/bin/true
+@dirrm %%FONTDIR%%