freebsd-ports/print/ghostscript7-commfont/files/Makefile.in
Hiroki Sato d83170403e japanese/font-std, chinese/font-std, and dependency fixups due
to it have been added.  These are to install standard fonts used in the
Ports Collection.  Currently they contain:

 std.ja_JP/Mincho
 std.ja_JP/Gothic
 std.ja_JP/Ryumin-Light
 std.ja_JP/GothicBBB-Medium
 std.zh_CN/STHeiti-Regular
 std.zh_CN/STSong-Light
 std.zh_CN/MSung-Light
 std.zh_CN/MHei-Medium

under ${PREFIX}/share/fonts/.  They are just symlinks to
corresponding font files.  The symlink names are based on popular
PostScript font names.

Applications should refer the font files via XLFD or fontconfig
first.  If they need a direct reference to the font file, please use
files in std.*/*.  This is because direct reference to a specific
font name in an application configuration file makes the maintenance
difficult when the font file name is changed, for example.
2009-05-31 09:19:10 +00:00

140 lines
4.3 KiB
Makefile
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# $FreeBSD$
PREFIX?= /usr/local
LOCALBASE?= /usr/local
CMAPDIR?= ${LOCALBASE}/share/fonts/adobe-cmaps
CIDFONTDIR?= ${LOCALBASE}/share/fonts/CIDFont
GS_FONTDIR?= ${LOCALBASE}/share/ghostscript/fonts
GS_RESFONTDIR?= ${LOCALBASE}/share/ghostscript/Resource/Font
GS_RESCIDFONTDIR?= ${LOCALBASE}/share/ghostscript/Resource/CIDFont
GS_RESCMAPDIR?= ${LOCALBASE}/share/ghostscript/Resource/CMap
INSTALL_DATA?= install -m 444
MKDIR?= mkdir -p
LN?= ln
FIND?= find
AWK?= awk
R?= 
PROGRESS?= BEGIN { mark[0]=\"|\"; mark[1]=\"|\"; mark[2]=\"/\"; mark[3]=\"/\"; mark[4]=\"-\"; mark[5]=\"-\"; mark[6]=\"\\\\\"; mark[7]=\"\\\\\"; line = 0; } { line = (line + 1) % 8; printf(\"Generating virtual fonts...%s${R}\n\", mark[line]); }
TEMPLATES_TTF= cs.serif cs.sansserif \
ct.serif cs.sansserif \
ja.serif ja.sansserif
TEMPLATES_CID= ko.serif ko.sansserif
CS.CMAPS= ac15
CS.SERIF.GENERIC= STSong-Light
CS.SERIF.GENERIC_SUBST= STSong-Light
CS.SERIF= STSong-Light
CS.SANSSERIF.GENERIC= STHeiti-Regular
CS.SANSSERIF.GENERIC_SUBST= STHeiti-Regular
CS.SANSSERIF= STHeiti-Regular
CT.CMAPS= ag15
CT.SERIF.GENERIC= MSung-Light
CT.SERIF.GENERIC_SUBST= MSung-Light
CT.SERIF= MSung-Light
CT.SANSSERIF.GENERIC= MHei-Medium
CT.SANSSERIF.GENERIC_SUBST= MHei-Medium
CT.SANSSERIF= MHei-Medium
JA.CMAPS= aj16 aj20
JA.SERIF.GENERIC= Ryumin-Light
JA.SERIF.GENERIC_SUBST= Ryumin-Light
JA.SERIF= Ryumin-Light \
FutoMinA101-Bold \
HeiseiMin-W3
JA.SANSSERIF.GENERIC= GothicBBB-Medium
JA.SANSSERIF.GENERIC_SUBST= GothicBBB-Medium
JA.SANSSERIF= GothicBBB-Medium \
FutoGoB101-Bold \
HeiseiKakuGo-W5 \
HGSSoeiKakugothicUB \
HGPSoeiKakugothicUB
KO.CMAPS= ak12
KO.SERIF.GENERIC= HYSMyeongJo-Medium
KO.SERIF.GENERIC_SUBST= Munhwa-Regular
KO.SERIF= HYSMyeongJo-Medium
KO.SANSSERIF.GENERIC= HYGoThic-Medium
KO.SANSSERIF.GENERIC_SUBST= MunhwaGothic-Regular
KO.SANSSERIF= HYGoThic-Medium
all:
@${MKDIR} CIDFont Font
.for T in ${TEMPLATES_TTF}
@for F in ${${T:U}}; do \
echo "Generating CIDFont/$${F}"; \
sed -e "s,%%FONTNAME%%,$$F,g" \
-e "s,%%GS_FONTDIR%%,${GS_FONTDIR}," \
-e "s,%%GENERICFONTNAME%%,${${T:U}.GENERIC}," \
-e "s,%%GENERICFONTNAME_SUBST%%,${${T:U}.GENERIC_SUBST}," \
< template.ttcidfont > CIDFont/$${F}; \
for D in ${${T:U:C/\.[^.]*$//}.CMAPS}; do \
if [ -d ${CMAPDIR}/$${D}/CMap ]; then \
CMAPS=`cd ${CMAPDIR}/$${D}/CMap; echo *`; \
elif [ -r ${CMAPDIR}/$${D} ]; then \
CMAPS=`basename $${D}`; \
else \
echo "$${D}: not found"; exit 1; \
fi; \
for C in $${CMAPS}; do \
echo "Generating Font/$${F}-$${C}"; \
sed -e "s,%%FONTNAME%%,$$F,g" \
-e "s,%%GS_FONTDIR%%,${GS_FONTDIR}," \
-e "s,%%CMAPNAME%%,$${C}," \
-e "s,%%GENERICFONTNAME%%,${${T:U}.GENERIC}," \
-e "s,%%GENERICFONTNAME_SUBST%%,${${T:U}.GENERIC_SUBST}," \
< template.font > Font/$${F}-$${C}; \
done; \
done; \
done | awk "${PROGRESS}"
.endfor
.for T in ${TEMPLATES_CID}
@for F in ${${T:U}}; do \
echo "Generating CIDFont/$${F}"; \
sed -e "s,%%FONTNAME%%,$$F,g" \
-e "s,%%GS_FONTDIR%%,${GS_FONTDIR}," \
-e "s,%%GENERICFONTNAME%%,${${T:U}.GENERIC}," \
-e "s,%%GENERICFONTNAME_SUBST%%,${${T:U}.GENERIC_SUBST}," \
< template.cidfont > CIDFont/$${F}; \
for D in ${${T:U:C/\.[^.]*$//}.CMAPS}; do \
if [ -d ${CMAPDIR}/$${D}/CMap ]; then \
CMAPS=`cd ${CMAPDIR}/$${D}/CMap; echo *`; \
elif [ -r ${CMAPDIR}/$${D} ]; then \
CMAPS=`basename $${D}`; \
else \
echo "$${D}: not found"; exit 1; \
fi; \
for C in $${CMAPS}; do \
echo "Generating Font/$${F}-$${C}"; \
sed -e "s,%%FONTNAME%%,$$F,g" \
-e "s,%%GS_FONTDIR%%,${GS_FONTDIR}," \
-e "s,%%CMAPNAME%%,$${C}," \
-e "s,%%GENERICFONTNAME%%,${${T:U}.GENERIC}," \
-e "s,%%GENERICFONTNAME_SUBST%%,${${T:U}.GENERIC_SUBST}," \
< template.font > Font/$${F}-$${C}; \
done; \
done; \
done | awk "${PROGRESS}"
.endfor
@echo "Generating virtual fonts...done."
install:
${MKDIR} ${GS_RESCIDFONTDIR}
${INSTALL_DATA} CIDFont/* ${GS_RESCIDFONTDIR}
${MKDIR} ${GS_RESFONTDIR}
${INSTALL_DATA} Font/* ${GS_RESFONTDIR}
${MKDIR} ${GS_RESCMAPDIR}
cd ${GS_RESCMAPDIR} && ${LN} -s -f `${FIND} ${CMAPDIR} -type f` .
.for T in ${TEMPLATES_CID}
cd ${GS_RESCIDFONTDIR} && ${LN} -s -f ${CIDFONTDIR}/${${T:U}.GENERIC_SUBST} ${${T:U}.GENERIC_SUBST}
.endfor