mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-01 05:45:45 +00:00
- Add install script for adding XLFD.
- Clean up Makefile and pkg-plist. - Take maintainership.
This commit is contained in:
parent
b9966eafd7
commit
a64fc33a19
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=213641
@ -7,46 +7,55 @@
|
||||
|
||||
PORTNAME= vlgothic
|
||||
PORTVERSION= 20080429
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= japanese x11-fonts
|
||||
MASTER_SITES= http://vinelinux.org/~daisuke/vlgothic/
|
||||
DISTNAME= VLGothic-${PORTVERSION}
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
MAINTAINER= hrs@FreeBSD.org
|
||||
COMMENT= Free Japanese TrueType fonts named 'VLGothic'
|
||||
|
||||
BUILD_DEPENDS= fc-cache:${PORTSDIR}/x11-fonts/fontconfig
|
||||
RUN_DEPENDS= fc-cache:${PORTSDIR}/x11-fonts/fontconfig
|
||||
|
||||
WRKSRC= ${WRKDIR}/VLGothic
|
||||
|
||||
USE_BZIP2= yes
|
||||
NO_BUILD= yes
|
||||
|
||||
PLIST_SUB= FONTSDIR="${FONTSDIR_REL}"
|
||||
|
||||
FONTSDIR= ${PREFIX}/lib/X11/fonts/vlgothic
|
||||
FONTSDIR_REL= ${FONTSDIR:S,${PREFIX}/,,}
|
||||
|
||||
TTF_FILES= VL-PGothic-Regular.ttf VL-Gothic-Regular.ttf
|
||||
DOC_FILES= Changelog LICENSE LICENSE.en LICENSE_E.mplus LICENSE_J.mplus \
|
||||
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= Changelog LICENSE LICENSE.en LICENSE_E.mplus LICENSE_J.mplus \
|
||||
README README.sazanami README_J.mplus
|
||||
WRKSRC= ${WRKDIR}/VLGothic
|
||||
|
||||
LOCAL_FONTSDIR= share/fonts
|
||||
X_FONTSDIR= lib/X11/fonts
|
||||
|
||||
do-install:
|
||||
@${MKDIR} ${FONTSDIR}
|
||||
.for file in ${TTF_FILES}
|
||||
${INSTALL_DATA} ${WRKSRC}/${file} ${FONTSDIR}
|
||||
.endfor
|
||||
@${MKDIR} ${PREFIX}/etc/fonts/conf.d
|
||||
${INSTALL_DATA} ${FILESDIR}/63-vlgothic.conf \
|
||||
${PREFIX}/etc/fonts/conf.d
|
||||
${MKDIR} ${DATADIR}
|
||||
${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${WRKSRC}
|
||||
${INSTALL_DATA} ${WRKSRC}/*.ttf ${DATADIR}
|
||||
${MKDIR} ${PREFIX}/${LOCAL_FONTSDIR}/TrueType/
|
||||
${LN} -s -f ${DATADIR}/*.ttf \
|
||||
${LOCALBASE}/${LOCAL_FONTSDIR}/TrueType/
|
||||
${MKDIR} ${LOCALBASE}/${X_FONTSDIR}/TrueType
|
||||
${LN} -s -f ${DATADIR}/*.ttf \
|
||||
${LOCALBASE}/${X_FONTSDIR}/TrueType/
|
||||
${INSTALL_DATA} ${FILESDIR}/20-unhint-vlgothic.conf \
|
||||
${FILESDIR}/62-fonts-vlgothic.conf \
|
||||
${PREFIX}/etc/fonts/conf.avail
|
||||
${LN} -s -f ../conf.avail/20-unhint-vlgothic.conf \
|
||||
${PREFIX}/etc/fonts/conf.d/20-unhint-vlgothic.conf
|
||||
${LN} -s -f ../conf.avail/62-fonts-vlgothic.conf \
|
||||
${PREFIX}/etc/fonts/conf.d/62-fonts-vlgothic.conf
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${DOCSDIR}
|
||||
.for file in ${DOC_FILES}
|
||||
${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
|
||||
.endfor
|
||||
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
${LOCALBASE}/bin/fc-cache -f -v ${FONTSDIR}
|
||||
${LOCALBASE}/bin/fc-cache -f -v ${LOCALBASE}/${X_FONTSDIR}/TrueType
|
||||
${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
14
japanese/font-vlgothic/files/20-unhint-vlgothic.conf
Normal file
14
japanese/font-vlgothic/files/20-unhint-vlgothic.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>VL Gothic</string>
|
||||
<string>VL PGothic</string>
|
||||
</test>
|
||||
<edit name="autohint">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
17
japanese/font-vlgothic/files/62-fonts-vlgothic.conf
Normal file
17
japanese/font-vlgothic/files/62-fonts-vlgothic.conf
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<!-- $FreeBSD$ -->
|
||||
<fontconfig>
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
<family>VL PGothic</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>VL Gothic</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
</fontconfig>
|
@ -1,17 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<!-- $FreeBSD$ -->
|
||||
<fontconfig>
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
<family>VL PGothic</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>VL Gothic</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
</fontconfig>
|
87
japanese/font-vlgothic/files/pkg-install.in
Normal file
87
japanese/font-vlgothic/files/pkg-install.in
Normal file
@ -0,0 +1,87 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
X_FONTSDIR=%%X_FONTSDIR%%/TrueType
|
||||
|
||||
catfontsdir ()
|
||||
{
|
||||
while read _IN
|
||||
do
|
||||
case "${_IN}" in
|
||||
*-vlgothic-*|[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="fp=y:bw=0.5" ;;
|
||||
c:jisx0201.1976-*) PFIX="fp=n:bw=0.5" ;;
|
||||
p:*) PFIX="fp=y" ;;
|
||||
c:*) PFIX="fp=n" ;;
|
||||
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
|
||||
do
|
||||
make_xlfd $ENC VL-PGothic-Regular.ttf vlgothic "VL_PGothic" p
|
||||
make_xlfd $ENC VL-Gothic-Regular.ttf vlgothic "VL_Gothic" 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
|
||||
;;
|
||||
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
|
||||
;;
|
||||
esac
|
@ -1,17 +1,21 @@
|
||||
@comment $FreeBSD$
|
||||
etc/fonts/conf.d/63-vlgothic.conf
|
||||
%%FONTSDIR%%/VL-PGothic-Regular.ttf
|
||||
%%FONTSDIR%%/VL-Gothic-Regular.ttf
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Changelog
|
||||
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
|
||||
%%PORTDOCS%%%%DOCSDIR%%/LICENSE.en
|
||||
%%PORTDOCS%%%%DOCSDIR%%/LICENSE_E.mplus
|
||||
%%PORTDOCS%%%%DOCSDIR%%/LICENSE_J.mplus
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README.sazanami
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README_J.mplus
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
@exec %%LOCALBASE%%/bin/fc-cache -f -v %D/%%FONTSDIR%% || true
|
||||
@unexec %%LOCALBASE%%/bin/fc-cache -f -v %D/%%FONTSDIR%% || true
|
||||
@unexec [ -s %D/%%FONTSDIR%%/fonts.cache-1 ] || rm -f %D/%%FONTSDIR%%/fonts.cache-1
|
||||
@dirrmtry %%FONTSDIR%%
|
||||
%%DATADIR%%/VL-PGothic-Regular.ttf
|
||||
%%DATADIR%%/VL-Gothic-Regular.ttf
|
||||
@dirrm %%DATADIR%%
|
||||
%%LOCAL_FONTSDIR%%/TrueType/VL-PGothic-Regular.ttf
|
||||
%%LOCAL_FONTSDIR%%/TrueType/VL-Gothic-Regular.ttf
|
||||
@dirrmtry %%LOCAL_FONTSDIR%%/TrueType
|
||||
@dirrmtry %%LOCAL_FONTSDIR%%
|
||||
etc/fonts/conf.avail/20-unhint-vlgothic.conf
|
||||
etc/fonts/conf.avail/62-fonts-vlgothic.conf
|
||||
@exec ln -s -f ../conf.avail/20-unhint-vlgothic.conf %D/etc/fonts/conf.d/20-unhint-vlgothic.conf
|
||||
@exec ln -s -f ../conf.avail/62-fonts-vlgothic.conf %D/etc/fonts/conf.d/62-fonts-vlgothic.conf
|
||||
@unexec rm -f %D/etc/fonts/conf.d/20-unhint-vlgothic.conf
|
||||
@unexec rm -f %D/etc/fonts/conf.d/62-fonts-vlgothic.conf
|
||||
%%X_FONTSDIR%%/TrueType/VL-PGothic-Regular.ttf
|
||||
%%X_FONTSDIR%%/TrueType/VL-Gothic-Regular.ttf
|
||||
@exec %%LOCALBASE%%/bin/fc-cache -f -v %D/%%X_FONTSDIR%%/TrueType || true
|
||||
@unexec %%LOCALBASE%%/bin/fc-cache -f -v %D/%%X_FONTSDIR%%/TrueType || true
|
||||
@unexec rm -f %D/%%X_FONTSDIR%%/TrueType/fonts.cache-1
|
||||
@dirrmtry %%X_FONTSDIR%%/TrueType
|
||||
@unexec if [ -d %D/%%X_FONTSDIR%%/TrueType ]; then %%LOCALBASE%%/bin/fc-cache -f -v %D/%%X_FONTSDIR%%/TrueType || true; fi
|
||||
|
@ -7,46 +7,55 @@
|
||||
|
||||
PORTNAME= vlgothic
|
||||
PORTVERSION= 20080429
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= japanese x11-fonts
|
||||
MASTER_SITES= http://vinelinux.org/~daisuke/vlgothic/
|
||||
DISTNAME= VLGothic-${PORTVERSION}
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
MAINTAINER= hrs@FreeBSD.org
|
||||
COMMENT= Free Japanese TrueType fonts named 'VLGothic'
|
||||
|
||||
BUILD_DEPENDS= fc-cache:${PORTSDIR}/x11-fonts/fontconfig
|
||||
RUN_DEPENDS= fc-cache:${PORTSDIR}/x11-fonts/fontconfig
|
||||
|
||||
WRKSRC= ${WRKDIR}/VLGothic
|
||||
|
||||
USE_BZIP2= yes
|
||||
NO_BUILD= yes
|
||||
|
||||
PLIST_SUB= FONTSDIR="${FONTSDIR_REL}"
|
||||
|
||||
FONTSDIR= ${PREFIX}/lib/X11/fonts/vlgothic
|
||||
FONTSDIR_REL= ${FONTSDIR:S,${PREFIX}/,,}
|
||||
|
||||
TTF_FILES= VL-PGothic-Regular.ttf VL-Gothic-Regular.ttf
|
||||
DOC_FILES= Changelog LICENSE LICENSE.en LICENSE_E.mplus LICENSE_J.mplus \
|
||||
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= Changelog LICENSE LICENSE.en LICENSE_E.mplus LICENSE_J.mplus \
|
||||
README README.sazanami README_J.mplus
|
||||
WRKSRC= ${WRKDIR}/VLGothic
|
||||
|
||||
LOCAL_FONTSDIR= share/fonts
|
||||
X_FONTSDIR= lib/X11/fonts
|
||||
|
||||
do-install:
|
||||
@${MKDIR} ${FONTSDIR}
|
||||
.for file in ${TTF_FILES}
|
||||
${INSTALL_DATA} ${WRKSRC}/${file} ${FONTSDIR}
|
||||
.endfor
|
||||
@${MKDIR} ${PREFIX}/etc/fonts/conf.d
|
||||
${INSTALL_DATA} ${FILESDIR}/63-vlgothic.conf \
|
||||
${PREFIX}/etc/fonts/conf.d
|
||||
${MKDIR} ${DATADIR}
|
||||
${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${WRKSRC}
|
||||
${INSTALL_DATA} ${WRKSRC}/*.ttf ${DATADIR}
|
||||
${MKDIR} ${PREFIX}/${LOCAL_FONTSDIR}/TrueType/
|
||||
${LN} -s -f ${DATADIR}/*.ttf \
|
||||
${LOCALBASE}/${LOCAL_FONTSDIR}/TrueType/
|
||||
${MKDIR} ${LOCALBASE}/${X_FONTSDIR}/TrueType
|
||||
${LN} -s -f ${DATADIR}/*.ttf \
|
||||
${LOCALBASE}/${X_FONTSDIR}/TrueType/
|
||||
${INSTALL_DATA} ${FILESDIR}/20-unhint-vlgothic.conf \
|
||||
${FILESDIR}/62-fonts-vlgothic.conf \
|
||||
${PREFIX}/etc/fonts/conf.avail
|
||||
${LN} -s -f ../conf.avail/20-unhint-vlgothic.conf \
|
||||
${PREFIX}/etc/fonts/conf.d/20-unhint-vlgothic.conf
|
||||
${LN} -s -f ../conf.avail/62-fonts-vlgothic.conf \
|
||||
${PREFIX}/etc/fonts/conf.d/62-fonts-vlgothic.conf
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${DOCSDIR}
|
||||
.for file in ${DOC_FILES}
|
||||
${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
|
||||
.endfor
|
||||
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
${LOCALBASE}/bin/fc-cache -f -v ${FONTSDIR}
|
||||
${LOCALBASE}/bin/fc-cache -f -v ${LOCALBASE}/${X_FONTSDIR}/TrueType
|
||||
${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
14
japanese/vlgothic/files/20-unhint-vlgothic.conf
Normal file
14
japanese/vlgothic/files/20-unhint-vlgothic.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>VL Gothic</string>
|
||||
<string>VL PGothic</string>
|
||||
</test>
|
||||
<edit name="autohint">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
17
japanese/vlgothic/files/62-fonts-vlgothic.conf
Normal file
17
japanese/vlgothic/files/62-fonts-vlgothic.conf
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<!-- $FreeBSD$ -->
|
||||
<fontconfig>
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
<family>VL PGothic</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>VL Gothic</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
</fontconfig>
|
@ -1,17 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<!-- $FreeBSD$ -->
|
||||
<fontconfig>
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
<family>VL PGothic</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>VL Gothic</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
</fontconfig>
|
87
japanese/vlgothic/files/pkg-install.in
Normal file
87
japanese/vlgothic/files/pkg-install.in
Normal file
@ -0,0 +1,87 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
X_FONTSDIR=%%X_FONTSDIR%%/TrueType
|
||||
|
||||
catfontsdir ()
|
||||
{
|
||||
while read _IN
|
||||
do
|
||||
case "${_IN}" in
|
||||
*-vlgothic-*|[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="fp=y:bw=0.5" ;;
|
||||
c:jisx0201.1976-*) PFIX="fp=n:bw=0.5" ;;
|
||||
p:*) PFIX="fp=y" ;;
|
||||
c:*) PFIX="fp=n" ;;
|
||||
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
|
||||
do
|
||||
make_xlfd $ENC VL-PGothic-Regular.ttf vlgothic "VL_PGothic" p
|
||||
make_xlfd $ENC VL-Gothic-Regular.ttf vlgothic "VL_Gothic" 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
|
||||
;;
|
||||
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
|
||||
;;
|
||||
esac
|
@ -1,17 +1,21 @@
|
||||
@comment $FreeBSD$
|
||||
etc/fonts/conf.d/63-vlgothic.conf
|
||||
%%FONTSDIR%%/VL-PGothic-Regular.ttf
|
||||
%%FONTSDIR%%/VL-Gothic-Regular.ttf
|
||||
%%PORTDOCS%%%%DOCSDIR%%/Changelog
|
||||
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
|
||||
%%PORTDOCS%%%%DOCSDIR%%/LICENSE.en
|
||||
%%PORTDOCS%%%%DOCSDIR%%/LICENSE_E.mplus
|
||||
%%PORTDOCS%%%%DOCSDIR%%/LICENSE_J.mplus
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README.sazanami
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README_J.mplus
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
@exec %%LOCALBASE%%/bin/fc-cache -f -v %D/%%FONTSDIR%% || true
|
||||
@unexec %%LOCALBASE%%/bin/fc-cache -f -v %D/%%FONTSDIR%% || true
|
||||
@unexec [ -s %D/%%FONTSDIR%%/fonts.cache-1 ] || rm -f %D/%%FONTSDIR%%/fonts.cache-1
|
||||
@dirrmtry %%FONTSDIR%%
|
||||
%%DATADIR%%/VL-PGothic-Regular.ttf
|
||||
%%DATADIR%%/VL-Gothic-Regular.ttf
|
||||
@dirrm %%DATADIR%%
|
||||
%%LOCAL_FONTSDIR%%/TrueType/VL-PGothic-Regular.ttf
|
||||
%%LOCAL_FONTSDIR%%/TrueType/VL-Gothic-Regular.ttf
|
||||
@dirrmtry %%LOCAL_FONTSDIR%%/TrueType
|
||||
@dirrmtry %%LOCAL_FONTSDIR%%
|
||||
etc/fonts/conf.avail/20-unhint-vlgothic.conf
|
||||
etc/fonts/conf.avail/62-fonts-vlgothic.conf
|
||||
@exec ln -s -f ../conf.avail/20-unhint-vlgothic.conf %D/etc/fonts/conf.d/20-unhint-vlgothic.conf
|
||||
@exec ln -s -f ../conf.avail/62-fonts-vlgothic.conf %D/etc/fonts/conf.d/62-fonts-vlgothic.conf
|
||||
@unexec rm -f %D/etc/fonts/conf.d/20-unhint-vlgothic.conf
|
||||
@unexec rm -f %D/etc/fonts/conf.d/62-fonts-vlgothic.conf
|
||||
%%X_FONTSDIR%%/TrueType/VL-PGothic-Regular.ttf
|
||||
%%X_FONTSDIR%%/TrueType/VL-Gothic-Regular.ttf
|
||||
@exec %%LOCALBASE%%/bin/fc-cache -f -v %D/%%X_FONTSDIR%%/TrueType || true
|
||||
@unexec %%LOCALBASE%%/bin/fc-cache -f -v %D/%%X_FONTSDIR%%/TrueType || true
|
||||
@unexec rm -f %D/%%X_FONTSDIR%%/TrueType/fonts.cache-1
|
||||
@dirrmtry %%X_FONTSDIR%%/TrueType
|
||||
@unexec if [ -d %D/%%X_FONTSDIR%%/TrueType ]; then %%LOCALBASE%%/bin/fc-cache -f -v %D/%%X_FONTSDIR%%/TrueType || true; fi
|
||||
|
Loading…
Reference in New Issue
Block a user