From 2e09eb3a571316d25cbd0953afc09d1fbcd9101b Mon Sep 17 00:00:00 2001 From: Edwin Groothuis Date: Wed, 8 Jun 2005 13:06:50 +0000 Subject: [PATCH] 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 --- chinese/Makefile | 1 + chinese/msttf/Makefile | 74 +++++++++++++++++++++++++++++++++++++ chinese/msttf/distinfo | 3 ++ chinese/msttf/pkg-deinstall | 24 ++++++++++++ chinese/msttf/pkg-descr | 4 ++ chinese/msttf/pkg-install | 28 ++++++++++++++ chinese/msttf/pkg-plist | 5 +++ 7 files changed, 139 insertions(+) create mode 100644 chinese/msttf/Makefile create mode 100644 chinese/msttf/distinfo create mode 100644 chinese/msttf/pkg-deinstall create mode 100644 chinese/msttf/pkg-descr create mode 100644 chinese/msttf/pkg-install create mode 100644 chinese/msttf/pkg-plist diff --git a/chinese/Makefile b/chinese/Makefile index d45e9cf047fc..d069a721a825 100644 --- a/chinese/Makefile +++ b/chinese/Makefile @@ -76,6 +76,7 @@ SUBDIR += moefonts-cid SUBDIR += moettf SUBDIR += mplayer-fonts + SUBDIR += msttf SUBDIR += mule-freewnn SUBDIR += muni SUBDIR += mutt diff --git a/chinese/msttf/Makefile b/chinese/msttf/Makefile new file mode 100644 index 000000000000..58ad3d74bcaf --- /dev/null +++ b/chinese/msttf/Makefile @@ -0,0 +1,74 @@ +# New ports collection makefile for: Microsoft Windows Chinese TrueType fonts +# Date created: 28 Feb 2004 +# Whom: LI Dong +# +# $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 + +.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 diff --git a/chinese/msttf/distinfo b/chinese/msttf/distinfo new file mode 100644 index 000000000000..2a916065af21 --- /dev/null +++ b/chinese/msttf/distinfo @@ -0,0 +1,3 @@ +MD5 (msttf/simhei.ttf) = IGNORE +MD5 (msttf/simsun.ttc) = IGNORE +MD5 (msttf/tahoma.ttf) = IGNORE diff --git a/chinese/msttf/pkg-deinstall b/chinese/msttf/pkg-deinstall new file mode 100644 index 000000000000..592e404e0203 --- /dev/null +++ b/chinese/msttf/pkg-deinstall @@ -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 diff --git a/chinese/msttf/pkg-descr b/chinese/msttf/pkg-descr new file mode 100644 index 000000000000..1323245d0833 --- /dev/null +++ b/chinese/msttf/pkg-descr @@ -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. diff --git a/chinese/msttf/pkg-install b/chinese/msttf/pkg-install new file mode 100644 index 000000000000..d34cb82d4e9d --- /dev/null +++ b/chinese/msttf/pkg-install @@ -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 diff --git a/chinese/msttf/pkg-plist b/chinese/msttf/pkg-plist new file mode 100644 index 000000000000..cadb49339013 --- /dev/null +++ b/chinese/msttf/pkg-plist @@ -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