mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-24 00:45:52 +00:00
Add new port -- Cica Japanese monospaced fonts for programming
This commit is contained in:
parent
4c3de034c2
commit
abdc1ccb3b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=464559
@ -63,6 +63,7 @@
|
||||
SUBDIR += font-aozoramincho
|
||||
SUBDIR += font-ayu18
|
||||
SUBDIR += font-ayu20
|
||||
SUBDIR += font-cica
|
||||
SUBDIR += font-elisa10
|
||||
SUBDIR += font-elisa8
|
||||
SUBDIR += font-genjyuugothic
|
||||
|
48
japanese/font-cica/Makefile
Normal file
48
japanese/font-cica/Makefile
Normal file
@ -0,0 +1,48 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= cica
|
||||
PORTVERSION= 2.1.0
|
||||
#PORTREVISION= 0
|
||||
CATEGORIES= japanese x11-fonts
|
||||
MASTER_SITES= https://github.com/miiton/Cica/releases/download/v${PORTVERSION}/
|
||||
PKGNAMEPREFIX= ja-font-
|
||||
DISTNAME= Cica_v${PORTVERSION}
|
||||
|
||||
MAINTAINER= ume@FreeBSD.org
|
||||
COMMENT= Cica Japanese monospaced fonts for programming
|
||||
|
||||
USES= fonts:fc zip
|
||||
FONTNAME= cica
|
||||
NO_WRKSUBDIR= yes
|
||||
NO_ARCH= yes
|
||||
NO_BUILD= yes
|
||||
PKGINSTALL= ${WRKDIR}/pkg-install
|
||||
PKGDEINSTALL= ${WRKDIR}/pkg-install
|
||||
SUB_FILES= pkg-install
|
||||
WRKSRC= ${WRKDIR}/${DISTNAME}
|
||||
PORTDOCS= *
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${STAGEDIR}${FONTSDIR}
|
||||
cd ${WRKSRC} && ${INSTALL_DATA} *.ttf ${STAGEDIR}${FONTSDIR}
|
||||
${MKDIR} ${STAGEDIR}${PREFIX}/etc/fonts/conf.avail \
|
||||
${STAGEDIR}${PREFIX}/etc/fonts/conf.d
|
||||
${INSTALL_DATA} ${FILESDIR}/20-unhint-${PORTNAME}.conf \
|
||||
${FILESDIR}/62-fonts-${PORTNAME}.conf \
|
||||
${STAGEDIR}${PREFIX}/etc/fonts/conf.avail
|
||||
${LN} -s -f ../conf.avail/20-unhint-${PORTNAME}.conf \
|
||||
${STAGEDIR}${PREFIX}/etc/fonts/conf.d/20-unhint-${PORTNAME}.conf
|
||||
${LN} -s -f ../conf.avail/62-fonts-${PORTNAME}.conf \
|
||||
${STAGEDIR}${PREFIX}/etc/fonts/conf.d/62-fonts-${PORTNAME}.conf
|
||||
|
||||
post-install-DOCS-on:
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} \
|
||||
"! ( -name Cica-Bold.ttf \
|
||||
-o -name Cica-BoldItalic.ttf \
|
||||
-o -name Cica-Regular.ttf \
|
||||
-o -name Cica-RegularItalic.ttf )"
|
||||
|
||||
.include <bsd.port.mk>
|
3
japanese/font-cica/distinfo
Normal file
3
japanese/font-cica/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1520950521
|
||||
SHA256 (Cica_v2.1.0.zip) = 6b1e4750a3c07995bbcfaadcec0be5ed73de26ca1dc2082dc712b296af35b59b
|
||||
SIZE (Cica_v2.1.0.zip) = 22571722
|
13
japanese/font-cica/files/20-unhint-cica.conf
Normal file
13
japanese/font-cica/files/20-unhint-cica.conf
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<!-- $FreeBSD$ -->
|
||||
<fontconfig>
|
||||
<match target="font">
|
||||
<test name="family">
|
||||
<string>Cica</string>
|
||||
</test>
|
||||
<edit name="autohint">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
11
japanese/font-cica/files/62-fonts-cica.conf
Normal file
11
japanese/font-cica/files/62-fonts-cica.conf
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<!-- $FreeBSD$ -->
|
||||
<fontconfig>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>Cica</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
</fontconfig>
|
108
japanese/font-cica/files/pkg-install.in
Normal file
108
japanese/font-cica/files/pkg-install.in
Normal file
@ -0,0 +1,108 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
catfontsdir()
|
||||
{
|
||||
while read _IN
|
||||
do
|
||||
case "${_IN}" in
|
||||
*-adobe-cica-*|[0-9]*|"") ;;
|
||||
*) echo ${_IN} ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
ROMA=""
|
||||
BOLD="ds=y"
|
||||
RITA="ai=0.08"
|
||||
ROBL="ai=0.08"
|
||||
|
||||
make_xlfd()
|
||||
{
|
||||
_enc=$1
|
||||
_file=$2
|
||||
_vendor=$3
|
||||
_fname=$4
|
||||
_poc=$5
|
||||
_weight=$6
|
||||
|
||||
case "${_poc}:${_enc}" in
|
||||
p:jisx0201.1976-*) PFIX="bw=0.5" ;;
|
||||
c:jisx0201.1976-*) PFIX="bw=0.5" ;;
|
||||
p:*) PFIX="" ;;
|
||||
c:*) PFIX="" ;;
|
||||
esac
|
||||
|
||||
set -- "" ${_weight}-r \
|
||||
${RITA} ${_weight}-ri \
|
||||
${ROBL} ${_weight}-ro
|
||||
while [ $# != 0 ]; do
|
||||
_prefix="${PFIX}:$1"; shift
|
||||
_variant=$1; shift
|
||||
[ ${index_type} = "scale" -a ${_prefix} != ":" ] && continue
|
||||
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,^:,,'
|
||||
|
||||
_prefix="${PFIX}:"
|
||||
[ ${index_type} = "scale" -a ${_prefix} != ":" ] && return
|
||||
_file=$(echo $_file | sed -e 's,\.ttf$,Italic&,')
|
||||
for _variant in ${_weight}-i ${_weight}-o; do
|
||||
printf "%s:%s -%s-%s-%s-normal--0-0-0-0-%s-0-%s\n" \
|
||||
$_prefix $_file $_vendor "$_fname" $_variant $_poc $_enc
|
||||
[ ${index_type} = "scale" ] && break
|
||||
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 Cica-Regular.ttf adobe "cica" c medium
|
||||
make_xlfd $ENC Cica-Bold.ttf adobe "cica" c bold
|
||||
done
|
||||
}
|
||||
|
||||
nfonts()
|
||||
{
|
||||
_L=0; while read _IN; do _L=$((${_L}+1)); done; echo ${_L}
|
||||
}
|
||||
|
||||
install_fontsdir()
|
||||
{
|
||||
index_type=${1:-"dir"}
|
||||
index="fonts.${index_type}"
|
||||
tmpfile="${index}.tmp"
|
||||
touch ${index}
|
||||
(catfontsdir < ${index}; addentries ${index_type}) > ${tmpfile}
|
||||
nfonts < ${tmpfile} > ${index}
|
||||
cat ${tmpfile} >> ${index}
|
||||
rm -f ${tmpfile}
|
||||
}
|
||||
|
||||
deinstall_fontsdir()
|
||||
{
|
||||
index_type=${1:-"dir"}
|
||||
index="fonts.${index_type}"
|
||||
tmpfile="${index}.tmp"
|
||||
catfontsdir < ${index} > ${tmpfile}
|
||||
nfonts < ${tmpfile} > ${index}
|
||||
cat ${tmpfile} >> ${index}
|
||||
rm -f ${tmpfile}
|
||||
if [ -r ${index} -a $(wc -l < ${index}) = 1 ]; then
|
||||
rm -f ${index}
|
||||
fi
|
||||
}
|
||||
|
||||
case "$2" in
|
||||
POST-INSTALL)
|
||||
cd %%FONTSDIR%%
|
||||
install_fontsdir dir
|
||||
install_fontsdir scale
|
||||
;;
|
||||
POST-DEINSTALL)
|
||||
cd %%FONTSDIR%%
|
||||
deinstall_fontsdir dir
|
||||
deinstall_fontsdir scale
|
||||
;;
|
||||
esac
|
3
japanese/font-cica/pkg-descr
Normal file
3
japanese/font-cica/pkg-descr
Normal file
@ -0,0 +1,3 @@
|
||||
Cica Japanese monospaced fonts for programming
|
||||
|
||||
WWW: https://github.com/miiton/Cica
|
8
japanese/font-cica/pkg-plist
Normal file
8
japanese/font-cica/pkg-plist
Normal file
@ -0,0 +1,8 @@
|
||||
etc/fonts/conf.avail/20-unhint-cica.conf
|
||||
etc/fonts/conf.avail/62-fonts-cica.conf
|
||||
etc/fonts/conf.d/20-unhint-cica.conf
|
||||
etc/fonts/conf.d/62-fonts-cica.conf
|
||||
%%FONTSDIR%%/Cica-Bold.ttf
|
||||
%%FONTSDIR%%/Cica-BoldItalic.ttf
|
||||
%%FONTSDIR%%/Cica-Regular.ttf
|
||||
%%FONTSDIR%%/Cica-RegularItalic.ttf
|
Loading…
Reference in New Issue
Block a user