Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Mar 2004 13:14:21 +0200 (CEST)
From:      LI Dong <ld@FreeBSD.org.cn>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/64838: new port: chinese/msttf
Message-ID:  <200403281114.i2SBELoA002270@cogito.daemonspace.com>
Resent-Message-ID: <200403281120.i2SBKArG000481@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         64838
>Category:       ports
>Synopsis:       new port: chinese/msttf
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 28 03:20:09 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     LI Dong
>Release:        FreeBSD 5.2.1-RELEASE i386
>Organization:
FreeBSD China
>Environment:
System: FreeBSD cogito.daemonspace.com 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #1: Thu Mar 25 23:23:54 CET 2004 root@cogito.daemonspace.com:/home/build/obj/usr/src/sys/ld i386


	
>Description:
	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. ****
>How-To-Repeat:
	
>Fix:

	

--- msttf.txt begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	msttf
#	msttf/pkg-descr
#	msttf/distinfo
#	msttf/pkg-deinstall
#	msttf/Makefile
#	msttf/pkg-install
#	msttf/pkg-plist
#
echo c - msttf
mkdir -p msttf > /dev/null 2>&1
echo x - msttf/pkg-descr
sed 's/^X//' >msttf/pkg-descr << 'END-of-msttf/pkg-descr'
XThree TrueType fonts from Microsoft Windows(TM) 2000/XP.
XBecause of licensing restrictions, you must copy the three TrueType fonts from your
Xcopy of Microsoft Windows(TM) 2000/XP manually. End user can use these fonts freely
Xin his/her own computers.
END-of-msttf/pkg-descr
echo x - msttf/distinfo
sed 's/^X//' >msttf/distinfo << 'END-of-msttf/distinfo'
XMD5 (msttf/simhei.ttf) = 3e20b41f97836e43b9f5d13fab964397
XSIZE (msttf/simhei.ttf) = 10044356
XMD5 (msttf/simsun.ttc) = b2d90e297152d368f087bfcac7b188a4
XSIZE (msttf/simsun.ttc) = 10500792
XMD5 (msttf/tahoma.ttf) = 1cdc29147975497989783734e4669519
XSIZE (msttf/tahoma.ttf) = 379588
END-of-msttf/distinfo
echo x - msttf/pkg-deinstall
sed 's/^X//' >msttf/pkg-deinstall << 'END-of-msttf/pkg-deinstall'
X#!/bin/sh
X
Xif [ "$2" != "DEINSTALL" ]; then
X  exit 0
Xfi
X
XPKGNAME=$1
XPREFIX=${PKG_PREFIX}
XTTFM=${PKG_PREFIX}/bin/ttfm.sh
X
XFONTDIR=${PREFIX}/share/fonts/TrueType
XFONTS="simhei.ttf simsun.ttc tahoma.ttf"
X
Xif [ -r $FONTDIR/$PKGNAME ]; then
X    for i in `cat $FONTDIR/$PKGNAME`; do
X        for f in $FONTS; do
X            $TTFM --remove $i $f
X        done
X    done
Xfi
X
Xrm -f $FONTDIR/$PKGNAME
X
Xexit 0
END-of-msttf/pkg-deinstall
echo x - msttf/Makefile
sed 's/^X//' >msttf/Makefile << 'END-of-msttf/Makefile'
X# New ports collection makefile for:	Microsoft Windows Chinese TrueType fonts
X# Date created:		28 Feb 2004
X# Whom:			LI Dong <ld@FreeBSD.org.cn>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	msttf
XPORTVERSION=	1.0
XCATEGORIES=	chinese x11-fonts
XMASTER_SITES=
XMSTTF_SIMHEI=	simhei.ttf
XMSTTF_SIMSUN=	simsun.ttc
XMSTTF_TAHOMA=	tahoma.ttf
XDISTFILES=	${MSTTF_SIMHEI} ${MSTTF_SIMSUN} ${MSTTF_TAHOMA}
XDIST_SUBDIR=	msttf
XEXTRACT_ONLY=	# none
X
XMAINTAINER=	ld@FreeBSD.org.cn
XCOMMENT=	Three TrueType fonts from Microsoft Windows(TM) 2000/XP
XRESTRICTED=	"Redistribution of pre-compiled binaries is not permitted"
XNO_PACKAGE=	"Redistribution of pre-compiled binaries is not permitted"
X
XRUN_DEPENDS=	ttfm.sh:${PORTSDIR}/chinese/ttfm
X
XNO_BUILD=	yes
XSHAREMODE=	644
XNO_WRKSUBDIR=	yes
XUSE_XLIB=	yes
XFONTDIR=	${PREFIX}/share/fonts/TrueType
XXFONTDIR=	${X11BASE}/lib/X11/fonts/TrueType
XINSTALL_ENV=	PKG_PREFIX=${PREFIX} XFREE86_VERSION=${XFREE86_VERSION} \
X		WANT_GS=${WANT_GS} WITHOUT_X=${WITHOUT_X}
X
XNO_CHECKSUM=	yes
X
X.include <bsd.port.pre.mk>
X
X.if !exists(${DISTDIR}/${DIST_SUBDIR}/${MSTTF_SIMHEI})
XECHO_MSG=/usr/bin/printf
XIGNORE=		\n\
XBecause of licensing restrictions, you must copy the three TrueType fonts from your\n\
Xcopy of Microsoft Windows(TM) 2000/XP manually. End user can use these fonts freely\n\
Xin his/her own computers. Please place these fonts in ${DISTDIR}/${DIST_SUBDIR}. \n\
XFonts: ${MSTTF_SIMHEI} of ${MSTTF_SIMHEI} ${MSTTF_SIMSUN} ${MSTTF_TAHOMA}\n
X.endif
X
X.if !exists(${DISTDIR}/${DIST_SUBDIR}/${MSTTF_SIMSUN})
XECHO_MSG=/usr/bin/printf
XIGNORE=		\n\
XBecause of licensing restrictions, you must copy the three TrueType fonts from your\n\
Xcopy of Microsoft Windows(TM) 2000/XP manually. End user can use these fonts freely\n\
Xin his/her own computers. Please place these fonts in ${DISTDIR}/${DIST_SUBDIR}. \n\
XFonts: ${MSTTF_SIMSUN} of ${MSTTF_SIMHEI} ${MSTTF_SIMSUN} ${MSTTF_TAHOMA}\n
X.endif
X
X.if !exists(${DISTDIR}/${DIST_SUBDIR}/${MSTTF_TAHOMA})
XECHO_MSG=/usr/bin/printf
XIGNORE=		\n\
XBecause of licensing restrictions, you must copy the three TrueType fonts from your\n\
Xcopy of Microsoft Windows(TM) 2000/XP manually. End user can use these fonts freely\n\
Xin his/her own computers. Please place these fonts in ${DISTDIR}/${DIST_SUBDIR}. \n\
XFonts: ${MSTTF_TAHOMA} of ${MSTTF_SIMHEI} ${MSTTF_SIMSUN} ${MSTTF_TAHOMA}\n
X.endif
X
Xdo-install:
X	@${MKDIR} ${FONTDIR}
X	@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/${MSTTF_SIMHEI} ${FONTDIR}
X	@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/${MSTTF_SIMSUN} ${FONTDIR}
X	@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/${MSTTF_TAHOMA} ${FONTDIR}
X	@${SETENV} ${INSTALL_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
X
X.include <bsd.port.post.mk>
END-of-msttf/Makefile
echo x - msttf/pkg-install
sed 's/^X//' >msttf/pkg-install << 'END-of-msttf/pkg-install'
X#!/bin/sh
X
Xif [ "$2" = "PRE-INSTALL" ]; then
X  exit 0
Xfi
X
XPKGNAME=$1
XPREFIX=${PKG_PREFIX}
XTTFM=${PREFIX}/bin/ttfm.sh
X
XFONTDIR=${PREFIX}/share/fonts/TrueType
XFONTS="simhei.ttf simsun.ttc tahoma.ttf"
X
Xif [ ! -x $TTFM ]; then
X    echo "$TTFM not found!"
X    exit 1
Xfi
X
Xrm -f $FONTDIR/$PKGNAME
X
Xif [ "X$WITHOUT_X" = "X" ]; then
X    for f in $FONTS; do
X        $TTFM --add xttfm $FONTDIR/$f
X    done
X    echo "xttfm" >> $FONTDIR/$PKGNAME
Xfi
X
Xexit 0
END-of-msttf/pkg-install
echo x - msttf/pkg-plist
sed 's/^X//' >msttf/pkg-plist << 'END-of-msttf/pkg-plist'
Xshare/fonts/TrueType/simhei.ttf
Xshare/fonts/TrueType/simsun.ttc
Xshare/fonts/TrueType/tahoma.ttf
X@unexec rmdir %D/share/fonts/TrueType 2>/dev/null || true
X@unexec rmdir %D/share/fonts 2>/dev/null || true
END-of-msttf/pkg-plist
exit
--- msttf.txt ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403281114.i2SBELoA002270>