Add font-motoya-al for two free Japanese TrueType fonts by MOTOYA Co.,Ltd.,
which are available under Apache license. Feature safe: yes
This commit is contained in:
parent
a944e92716
commit
4eb022e27e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=267825
8 changed files with 217 additions and 0 deletions
|
@ -81,6 +81,7 @@
|
|||
SUBDIR += font-kochi
|
||||
SUBDIR += font-migmix
|
||||
SUBDIR += font-mona-ipa
|
||||
SUBDIR += font-motoya-al
|
||||
SUBDIR += font-mplus
|
||||
SUBDIR += font-mplus-ipa
|
||||
SUBDIR += font-sazanami
|
||||
|
|
59
japanese/font-motoya-al/Makefile
Normal file
59
japanese/font-motoya-al/Makefile
Normal file
|
@ -0,0 +1,59 @@
|
|||
# New ports collection makefile for: font-motoya-al
|
||||
# Date created: 7 January 2011
|
||||
# Whom: hrs
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= font-motoya-al
|
||||
PORTVERSION= 0.0.20100921
|
||||
CATEGORIES= japanese x11-fonts
|
||||
MASTER_SITES= LOCAL
|
||||
MASTER_SITE_SUBDIR= hrs
|
||||
DISTNAME= motoya-al-fonts-${PORTVERSION:S,^0.0.,,}
|
||||
|
||||
MAINTAINER= hrs@FreeBSD.org
|
||||
COMMENT= Free Japanese fonts by MOTOYA
|
||||
|
||||
RUN_DEPENDS= fc-cache:${PORTSDIR}/x11-fonts/fontconfig
|
||||
|
||||
USE_BZIP2= yes
|
||||
NO_BUILD= yes
|
||||
PKGINSTALL= ${WRKDIR}/pkg-install
|
||||
PKGDEINSTALL= ${WRKDIR}/pkg-install
|
||||
SUB_FILES= pkg-install
|
||||
SUB_LIST= X_FONTSDIR=${PREFIX}/${X_FONTSDIR}
|
||||
PLIST_SUB= X_FONTSDIR=${X_FONTSDIR} \
|
||||
LOCAL_FONTSDIR=${LOCAL_FONTSDIR}
|
||||
PORTDOCS= newsrelease20100921.pdf
|
||||
|
||||
LOCAL_FONTSDIR= share/fonts
|
||||
X_FONTSDIR= lib/X11/fonts
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${DATADIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/*.ttf ${DATADIR}
|
||||
${MKDIR} ${PREFIX}/${LOCAL_FONTSDIR}/TTF
|
||||
${LN} -s -f \
|
||||
${DATADIR}/MTL*.ttf \
|
||||
${PREFIX}/${LOCAL_FONTSDIR}/TTF/
|
||||
${MKDIR} ${PREFIX}/${X_FONTSDIR}/TTF
|
||||
${LN} -s -f \
|
||||
${DATADIR}/MTL*.ttf \
|
||||
${PREFIX}/${X_FONTSDIR}/TTF/
|
||||
${INSTALL_DATA} ${FILESDIR}/20-unhint-motoya-al.conf \
|
||||
${FILESDIR}/62-fonts-motoya-al.conf \
|
||||
${PREFIX}/etc/fonts/conf.avail
|
||||
${LN} -s -f ../conf.avail/20-unhint-motoya-al.conf \
|
||||
${PREFIX}/etc/fonts/conf.d/20-unhint-motoya-al.conf
|
||||
${LN} -s -f ../conf.avail/62-fonts-motoya-al.conf \
|
||||
${PREFIX}/etc/fonts/conf.d/62-fonts-motoya-al.conf
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${DOCSDIR}
|
||||
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
${LOCALBASE}/bin/fc-cache -f -v ${PREFIX}/${X_FONTSDIR}/TTF
|
||||
${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
|
||||
.include <bsd.port.mk>
|
2
japanese/font-motoya-al/distinfo
Normal file
2
japanese/font-motoya-al/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
SHA256 (motoya-al-fonts-20100921.tar.bz2) = a1fa3c53f0ec3b339b9f655737e089e90efeab186682107f639b8908343d2b06
|
||||
SIZE (motoya-al-fonts-20100921.tar.bz2) = 2933997
|
14
japanese/font-motoya-al/files/20-unhint-motoya-al.conf
Normal file
14
japanese/font-motoya-al/files/20-unhint-motoya-al.conf
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<!-- $FreeBSD$ -->
|
||||
<fontconfig>
|
||||
<match target="font">
|
||||
<test name="family">
|
||||
<string>MotoyaLCeder</string>
|
||||
<string>MotoyaLMaru</string>
|
||||
</test>
|
||||
<edit name="autohint">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
19
japanese/font-motoya-al/files/62-fonts-motoya-al.conf
Normal file
19
japanese/font-motoya-al/files/62-fonts-motoya-al.conf
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<!-- $FreeBSD$ -->
|
||||
<fontconfig>
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
<family>MotoyaLCeder</family>
|
||||
<family>MotoyaLMaru</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>MotoyaLCeder</family>
|
||||
<family>MotoyaLMaru</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
</fontconfig>
|
97
japanese/font-motoya-al/files/pkg-install.in
Normal file
97
japanese/font-motoya-al/files/pkg-install.in
Normal file
|
@ -0,0 +1,97 @@
|
|||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
X_FONTSDIR=%%X_FONTSDIR%%/TTF
|
||||
|
||||
catfontsdir ()
|
||||
{
|
||||
while read _IN
|
||||
do
|
||||
case "${_IN}" in
|
||||
*-motoya-motoyalmaru-*) ;;
|
||||
*-motoya-motoyalceder-*) ;;
|
||||
*-motoya-lmaru-*) ;;
|
||||
*-motoya-lceder-*) ;;
|
||||
[0-9]*|"") ;;
|
||||
*) echo ${_IN} ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
ROMA=""
|
||||
BOLD="ds=y"
|
||||
ITAL="ai=0.15"
|
||||
OBLI="ai=0.15"
|
||||
RITA="ai=0.08"
|
||||
ROBL="ai=0.08"
|
||||
|
||||
make_xlfd()
|
||||
{
|
||||
_enc=$1
|
||||
_file=$2
|
||||
_vendor=$3
|
||||
_fname=$4
|
||||
_poc=$5
|
||||
|
||||
case "${_poc}:${_enc}" in
|
||||
p:jisx0201.1976-*) PFIX="bw=0.5" ;;
|
||||
c:jisx0201.1976-*) PFIX="bw=0.5" ;;
|
||||
p:*) PFIX="" ;;
|
||||
c:*) PFIX="" ;;
|
||||
esac
|
||||
|
||||
set -- "${ROMA}" medium-r \
|
||||
${BOLD} bold-r \
|
||||
${ITAL} medium-i \
|
||||
${ITAL}:${BOLD} bold-i \
|
||||
${OBLI} medium-o \
|
||||
${OBLI}:${BOLD} bold-o \
|
||||
${RITA} medium-ri \
|
||||
${RITA}:${BOLD} bold-ri \
|
||||
${ROBL} medium-ro \
|
||||
${ROBL}:${BOLD} bold-ro
|
||||
while [ $# != 0 ]; do
|
||||
_prefix="${PFIX}:$1"; shift
|
||||
_variant=$1; shift
|
||||
printf "%s:%s -%s-%s-%s-normal--0-0-0-0-%s-0-%s\n" \
|
||||
$_prefix $_file $_vendor $_fname $_variant $_poc $_enc
|
||||
done | sed -e 's,::,:,g' -e 's,^:,,'
|
||||
}
|
||||
|
||||
addentries ()
|
||||
{
|
||||
for ENC in iso8859-1 iso10646-1 jisx0201.1976-0 jisx0208.1983-0 jisx0208.1990-0 jisx0208.1997-0 jisx0213.2004-1
|
||||
do
|
||||
make_xlfd $ENC MTLc3m.ttf motoya motoyalceder c
|
||||
make_xlfd $ENC MTLc3m.ttf motoya lceder c
|
||||
make_xlfd $ENC MTLmr3m.ttf motoya motoyalmaru c
|
||||
make_xlfd $ENC MTLmr3m.ttf motoya lmaru c
|
||||
done
|
||||
}
|
||||
|
||||
nfonts ()
|
||||
{
|
||||
_L=0; while read _IN; do _L=$((${_L}+1)); done; echo ${_L}
|
||||
}
|
||||
|
||||
case "$2" in
|
||||
POST-INSTALL)
|
||||
cd ${X_FONTSDIR}
|
||||
touch fonts.dir
|
||||
(catfontsdir < fonts.dir; 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
|
||||
nfonts < fonts.dir.tmp > fonts.dir
|
||||
cat fonts.dir.tmp >> fonts.dir
|
||||
rm -f fonts.dir.tmp
|
||||
if [ -r fonts.dir -a `wc -l < fonts.dir` = 1 ]; then
|
||||
rm -f fonts.dir
|
||||
fi
|
||||
rmdir ${X_FONTSDIR} > /dev/null 2>&1 || true
|
||||
;;
|
||||
esac
|
7
japanese/font-motoya-al/pkg-descr
Normal file
7
japanese/font-motoya-al/pkg-descr
Normal file
|
@ -0,0 +1,7 @@
|
|||
Two free Japanese TrueType fonts (Apache License) by MOTOYA Co.,Ltd:
|
||||
|
||||
- Motoya L Ceder W3
|
||||
- Motoya L Maru W3
|
||||
|
||||
WWW: http://www.motoyafont.jp/news/newsrelease20100921.pdf
|
||||
WWW: https://android.git.kernel.org/?p=platform/frameworks/base.git;a=commit;h=76d3b0f1bdf31b7315b636834f7da7211ca907e0
|
18
japanese/font-motoya-al/pkg-plist
Normal file
18
japanese/font-motoya-al/pkg-plist
Normal file
|
@ -0,0 +1,18 @@
|
|||
@comment $FreeBSD$
|
||||
%%DATADIR%%/MTLc3m.ttf
|
||||
%%DATADIR%%/MTLmr3m.ttf
|
||||
@dirrm %%DATADIR%%
|
||||
%%LOCAL_FONTSDIR%%/TTF/MTLc3m.ttf
|
||||
%%LOCAL_FONTSDIR%%/TTF/MTLmr3m.ttf
|
||||
@dirrmtry %%LOCAL_FONTSDIR%%/TTF
|
||||
@dirrmtry %%LOCAL_FONTSDIR%%
|
||||
etc/fonts/conf.avail/20-unhint-motoya-al.conf
|
||||
etc/fonts/conf.avail/62-fonts-motoya-al.conf
|
||||
etc/fonts/conf.d/20-unhint-motoya-al.conf
|
||||
etc/fonts/conf.d/62-fonts-motoya-al.conf
|
||||
%%X_FONTSDIR%%/TTF/MTLc3m.ttf
|
||||
%%X_FONTSDIR%%/TTF/MTLmr3m.ttf
|
||||
@unexec %%LOCALBASE%%/bin/fc-cache -s -f -v %D/%%X_FONTSDIR%%/TTF || true
|
||||
@unexec rm -f %D/%%X_FONTSDIR%%/TTF/fonts.cache-1
|
||||
@dirrmtry %%X_FONTSDIR%%/TTF
|
||||
@unexec if [ -d %D/%%X_FONTSDIR%%/TTF ]; then %%LOCALBASE%%/bin/fc-cache -f -v %D/%%X_FONTSDIR%%/TTF || true; fi
|
Loading…
Reference in a new issue