new port: chinese/msttf

Three TrueType fonts from Microsoft Windows(TM) 2000/XP.
	Because of licensing restrictions, end user can use these
	fonts freely in his/her own computers.
	**** Redistribution of pre-compiled binaries is not permitted. ****

PR:		ports/64838
Submitted by:	LI Dong <ld@FreeBSD.org.cn>
This commit is contained in:
Edwin Groothuis 2005-06-08 13:06:50 +00:00
parent 353702c2a4
commit 2e09eb3a57
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=137051
7 changed files with 139 additions and 0 deletions

View File

@ -76,6 +76,7 @@
SUBDIR += moefonts-cid
SUBDIR += moettf
SUBDIR += mplayer-fonts
SUBDIR += msttf
SUBDIR += mule-freewnn
SUBDIR += muni
SUBDIR += mutt

74
chinese/msttf/Makefile Normal file
View File

@ -0,0 +1,74 @@
# New ports collection makefile for: Microsoft Windows Chinese TrueType fonts
# Date created: 28 Feb 2004
# Whom: LI Dong <ld@FreeBSD.org.cn>
#
# $FreeBSD$
#
PORTNAME= msttf
PORTVERSION= 1.0
CATEGORIES= chinese x11-fonts
MASTER_SITES= #
DISTFILES= ${MSTTF_SIMHEI} ${MSTTF_SIMSUN} ${MSTTF_TAHOMA}
DIST_SUBDIR= msttf
EXTRACT_ONLY= # none
MAINTAINER= ld@FreeBSD.org.cn
COMMENT= Three TrueType fonts from Microsoft Windows(TM) 2000/XP
RUN_DEPENDS= ttfm.sh:${PORTSDIR}/chinese/ttfm
MSTTF_SIMHEI= simhei.ttf
MSTTF_SIMSUN= simsun.ttc
MSTTF_TAHOMA= tahoma.ttf
IGNOREFILES= ${MSTTF_SIMHEI} ${MSTTF_SIMSUN} ${MSTTF_TAHOMA}
RESTRICTED= "Redistribution of pre-compiled binaries is not permitted"
NO_PACKAGE= "Redistribution of pre-compiled binaries is not permitted"
NO_BUILD= yes
SHAREMODE= 644
NO_WRKSUBDIR= yes
USE_XLIB= yes
FONTDIR= ${PREFIX}/share/fonts/TrueType
XFONTDIR= ${X11BASE}/lib/X11/fonts/TrueType
INSTALL_ENV= PKG_PREFIX=${PREFIX} XFREE86_VERSION=${XFREE86_VERSION} \
WANT_GS=${WANT_GS} WITHOUT_X=${WITHOUT_X}
.include <bsd.port.pre.mk>
.if !exists(${DISTDIR}/${DIST_SUBDIR}/${MSTTF_SIMHEI})
IGNORE= Because of licensing restrictions, you must copy the three TrueType \
fonts from your copy of Microsoft Windows(TM) 2000/XP manually. End \
user can use these fonts freely in his/her own computers. Please \
place these fonts in ${DISTDIR}/${DIST_SUBDIR}. \
Fonts: ${MSTTF_SIMHEI} of ${MSTTF_SIMHEI} ${MSTTF_SIMSUN} ${MSTTF_TAHOMA}
.endif
.if !exists(${DISTDIR}/${DIST_SUBDIR}/${MSTTF_SIMSUN})
IGNORE= Because of licensing restrictions, you must copy the three \
TrueType fonts from your copy of Microsoft Windows(TM) \
2000/XP manually. End user can use these fonts freely in \
his/her own computers. Please place these fonts in \
${DISTDIR}/${DIST_SUBDIR}. \
Fonts: ${MSTTF_SIMSUN} of ${MSTTF_SIMHEI} ${MSTTF_SIMSUN} ${MSTTF_TAHOMA}\n
.endif
.if !exists(${DISTDIR}/${DIST_SUBDIR}/${MSTTF_TAHOMA})
IGNORE= Because of licensing restrictions, you must copy the three \
TrueType fonts from your copy of Microsoft Windows(TM) \
2000/XP manually. End user can use these fonts freely in \
his/her own computers. Please place these fonts in \
${DISTDIR}/${DIST_SUBDIR}. \
Fonts: ${MSTTF_TAHOMA} of ${MSTTF_SIMHEI} ${MSTTF_SIMSUN} ${MSTTF_TAHOMA}\n
.endif
do-install:
@${MKDIR} ${FONTDIR}
@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/${MSTTF_SIMHEI} ${FONTDIR}
@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/${MSTTF_SIMSUN} ${FONTDIR}
@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/${MSTTF_TAHOMA} ${FONTDIR}
@${SETENV} ${INSTALL_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.post.mk>

3
chinese/msttf/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (msttf/simhei.ttf) = IGNORE
MD5 (msttf/simsun.ttc) = IGNORE
MD5 (msttf/tahoma.ttf) = IGNORE

View File

@ -0,0 +1,24 @@
#!/bin/sh
if [ "$2" != "DEINSTALL" ]; then
exit 0
fi
PKGNAME=$1
PREFIX=${PKG_PREFIX}
TTFM=${PKG_PREFIX}/bin/ttfm.sh
FONTDIR=${PREFIX}/share/fonts/TrueType
FONTS="simhei.ttf simsun.ttc tahoma.ttf"
if [ -r $FONTDIR/$PKGNAME ]; then
for i in `cat $FONTDIR/$PKGNAME`; do
for f in $FONTS; do
$TTFM --remove $i $f
done
done
fi
rm -f $FONTDIR/$PKGNAME
exit 0

4
chinese/msttf/pkg-descr Normal file
View File

@ -0,0 +1,4 @@
Three TrueType fonts from Microsoft Windows(TM) 2000/XP.
Because of licensing restrictions, you must copy the three TrueType
fonts from your copy of Microsoft Windows(TM) 2000/XP manually. End
user can use these fonts freely in his/her own computers.

28
chinese/msttf/pkg-install Normal file
View File

@ -0,0 +1,28 @@
#!/bin/sh
if [ "$2" = "PRE-INSTALL" ]; then
exit 0
fi
PKGNAME=$1
PREFIX=${PKG_PREFIX}
TTFM=${PREFIX}/bin/ttfm.sh
FONTDIR=${PREFIX}/share/fonts/TrueType
FONTS="simhei.ttf simsun.ttc tahoma.ttf"
if [ ! -x $TTFM ]; then
echo "$TTFM not found!"
exit 1
fi
rm -f $FONTDIR/$PKGNAME
if [ "X$WITHOUT_X" = "X" ]; then
for f in $FONTS; do
$TTFM --add xttfm $FONTDIR/$f
done
echo "xttfm" >> $FONTDIR/$PKGNAME
fi
exit 0

5
chinese/msttf/pkg-plist Normal file
View File

@ -0,0 +1,5 @@
share/fonts/TrueType/simhei.ttf
share/fonts/TrueType/simsun.ttc
share/fonts/TrueType/tahoma.ttf
@unexec rmdir %D/share/fonts/TrueType 2>/dev/null || true
@unexec rmdir %D/share/fonts 2>/dev/null || true