diff options
author | Hajimu UMEMOTO <ume@FreeBSD.org> | 2019-11-17 08:05:03 +0000 |
---|---|---|
committer | Hajimu UMEMOTO <ume@FreeBSD.org> | 2019-11-17 08:05:03 +0000 |
commit | 2497569155e63e39d9c9a2220406c8e15c688458 (patch) | |
tree | 4e7540c450b4a2c369d93703ccb93bd7e6d06f00 /japanese/font-hackgen | |
parent | 26571a2a3b84b0bf185030a1f32e229c9815c63f (diff) | |
download | ports-2497569155e63e39d9c9a2220406c8e15c688458.tar.gz ports-2497569155e63e39d9c9a2220406c8e15c688458.zip |
New port japanese/font-hackgen
HackGen is a composite font of Hack and GenJyuu-Gothic
Notes
Notes:
svn path=/head/; revision=517807
Diffstat (limited to 'japanese/font-hackgen')
-rw-r--r-- | japanese/font-hackgen/Makefile | 75 | ||||
-rw-r--r-- | japanese/font-hackgen/distinfo | 3 | ||||
-rw-r--r-- | japanese/font-hackgen/files/20-unhint-hackgen.conf | 48 | ||||
-rw-r--r-- | japanese/font-hackgen/files/62-fonts-hackgen.conf | 22 | ||||
-rw-r--r-- | japanese/font-hackgen/files/pkg-install.in | 105 | ||||
-rw-r--r-- | japanese/font-hackgen/pkg-descr | 3 | ||||
-rw-r--r-- | japanese/font-hackgen/pkg-plist | 16 |
7 files changed, 272 insertions, 0 deletions
diff --git a/japanese/font-hackgen/Makefile b/japanese/font-hackgen/Makefile new file mode 100644 index 000000000000..af7f7cfe95e9 --- /dev/null +++ b/japanese/font-hackgen/Makefile @@ -0,0 +1,75 @@ +# $FreeBSD$ + +PORTNAME= hackgen +PORTVERSION= 1.3.1 +#PORTREVISION= 0 +CATEGORIES= japanese x11-fonts +MASTER_SITES= https://github.com/yuru7/HackGen/releases/download/v${PORTVERSION}/ +PKGNAMEPREFIX= ja-font- +DISTNAME= HackGen_v${DISTVERSION} + +MAINTAINER= ume@FreeBSD.org +COMMENT= HackGen is a composite font of Hack and GenJyuu-Gothic + +LICENSE= OFL11 + +USES= fonts:fc zip +NO_ARCH= yes +NO_BUILD= yes +PKGINSTALL= ${WRKDIR}/pkg-install +PKGDEINSTALL= ${WRKDIR}/pkg-install +SUB_FILES= pkg-install +WRKSRC= ${WRKDIR}/${DISTNAME} + +OPTIONS_MULTI= FONT_FAMILY +OPTIONS_MULTI_FONT_FAMILY= HACKGEN HACKGEN_CONS HACKGEN_CONS_PL \ + HACKGEN35 HACKGEN35_CONS HACKGEN35_CONS_PL +OPTIONS_DEFAULT= HACKGEN HACKGEN_CONS HACKGEN_CONS_PL \ + HACKGEN35 HACKGEN35_CONS HACKGEN35_CONS_PL +OPTIONS_SUB= yes +HACKGEN_DESC= HackGen +HACKGEN_CONS_DESC= HackGen Console +HACKGEN_CONS_PL_DESC= HackGen Console for Powerline +HACKGEN35_DESC= HackGen35 +HACKGEN35_CONS_DESC= HackGen35 Console +HACKGEN35_CONS_PL_DESC= HackGen35 Console for Powerline + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MHACKGEN} +HACKGEN_FONTS+= HackGen-Regular HackGen-Bold +.endif +.if ${PORT_OPTIONS:MHACKGEN_CONS} +HACKGEN_FONTS+= HackGenConsole-Regular HackGenConsole-Bold +.endif +.if ${PORT_OPTIONS:MHACKGEN_CONS_PL} +HACKGEN_FONTS+= HackGenConsole-Regular-forPowerline \ + HackGenConsole-Bold-forPowerline +.endif +.if ${PORT_OPTIONS:MHACKGEN35} +HACKGEN_FONTS+= HackGen35-Regular HackGen35-Bold +.endif +.if ${PORT_OPTIONS:MHACKGEN35_CONS} +HACKGEN_FONTS+= HackGen35Console-Regular HackGen35Console-Bold +.endif +.if ${PORT_OPTIONS:MHACKGEN35_CONS_PL} +HACKGEN_FONTS+= HackGen35Console-Regular-forPowerline \ + HackGen35Console-Bold-forPowerline +.endif + +do-install: + ${MKDIR} ${STAGEDIR}${FONTSDIR} +.for FONT in ${HACKGEN_FONTS} + ${INSTALL_DATA} ${WRKSRC}/${FONT}.ttf ${STAGEDIR}${FONTSDIR} +.endfor + ${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 + +.include <bsd.port.mk> diff --git a/japanese/font-hackgen/distinfo b/japanese/font-hackgen/distinfo new file mode 100644 index 000000000000..2d1616767c85 --- /dev/null +++ b/japanese/font-hackgen/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1573968933 +SHA256 (HackGen_v1.3.1.zip) = bc38c06ba7717deb3b986b47d072bcff74b7c127f276fd7d4fd733f3000ae8b5 +SIZE (HackGen_v1.3.1.zip) = 60823745 diff --git a/japanese/font-hackgen/files/20-unhint-hackgen.conf b/japanese/font-hackgen/files/20-unhint-hackgen.conf new file mode 100644 index 000000000000..68ad6255330c --- /dev/null +++ b/japanese/font-hackgen/files/20-unhint-hackgen.conf @@ -0,0 +1,48 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- $FreeBSD$ --> +<fontconfig> + <match target="font"> + <or> + <test name="family"> + <string>HackGen-Regular</string> + </test> + <test name="family"> + <string>HackGen-Bold</string> + </test> + <test name="family"> + <string>HackGenConsole-Regular</string> + </test> + <test name="family"> + <string>HackGenConsole-Bold</string> + </test> + <test name="family"> + <string>HackGenConsole-Regular-forPowerline</string> + </test> + <test name="family"> + <string>HackGenConsole-Bold-forPowerline</string> + </test> + <test name="family"> + <string>HackGen35-Regular</string> + </test> + <test name="family"> + <string>HackGen35-Bold</string> + </test> + <test name="family"> + <string>HackGen35Console-Regular</string> + </test> + <test name="family"> + <string>HackGen35Console-Bold</string> + </test> + <test name="family"> + <string>HackGen35Console-Regular-forPowerline</string> + </test> + <test name="family"> + <string>HackGen35Console-Bold-forPowerline</string> + </test> + </or> + <edit name="autohint"> + <bool>false</bool> + </edit> + </match> +</fontconfig> diff --git a/japanese/font-hackgen/files/62-fonts-hackgen.conf b/japanese/font-hackgen/files/62-fonts-hackgen.conf new file mode 100644 index 000000000000..47f5deffbcfd --- /dev/null +++ b/japanese/font-hackgen/files/62-fonts-hackgen.conf @@ -0,0 +1,22 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- $FreeBSD$ --> +<fontconfig> + <alias> + <family>monospace</family> + <prefer> + <family>HackGen-Regular</family> + <family>HackGen-Bold</family> + <family>HackGenConsole-Regular</family> + <family>HackGenConsole-Bold</family> + <family>HackGenConsole-Regular-forPowerline</family> + <family>HackGenConsole-Bold-forPowerline</family> + <family>HackGen35-Regular</family> + <family>HackGen35-Bold</family> + <family>HackGen35Console-Regular</family> + <family>HackGen35Console-Bold</family> + <family>HackGen35Console-Regular-forPowerline</family> + <family>HackGen35Console-Bold-forPowerline</family> + </prefer> + </alias> +</fontconfig> diff --git a/japanese/font-hackgen/files/pkg-install.in b/japanese/font-hackgen/files/pkg-install.in new file mode 100644 index 000000000000..ecc37fb4d192 --- /dev/null +++ b/japanese/font-hackgen/files/pkg-install.in @@ -0,0 +1,105 @@ +#!/bin/sh +# $FreeBSD$ + +catfontsdir() +{ + while read _IN + do + case "${_IN}" in + *-misc-hackgen*-*|[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,^:,,' +} + +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 HackGen-Regular.ttf misc "hackgen" m medium + make_xlfd $ENC HackGen-Bold.ttf misc "hackgen" m bold + make_xlfd $ENC HackGenConsole-Regular.ttf misc "hackgenconsole" m medium + make_xlfd $ENC HackGenConsole-Bold.ttf misc "hackgenconsole" m bold + make_xlfd $ENC HackGen35-Regular.ttf misc "hackgen35" m medium + make_xlfd $ENC HackGen35-Bold.ttf misc "hackgen35" m bold + make_xlfd $ENC HackGen35Console-Regular.ttf misc "hackgen35console" m medium + make_xlfd $ENC HackgEn35Console-Bold.ttf misc "hackgen35console" m 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 diff --git a/japanese/font-hackgen/pkg-descr b/japanese/font-hackgen/pkg-descr new file mode 100644 index 000000000000..410ed6f27d2e --- /dev/null +++ b/japanese/font-hackgen/pkg-descr @@ -0,0 +1,3 @@ +HackGen is a composite font of Hack and GenJyuu-Gothic. + +WWW: https://github.com/yuru7/HackGen diff --git a/japanese/font-hackgen/pkg-plist b/japanese/font-hackgen/pkg-plist new file mode 100644 index 000000000000..76b8fb4e47a7 --- /dev/null +++ b/japanese/font-hackgen/pkg-plist @@ -0,0 +1,16 @@ +etc/fonts/conf.avail/20-unhint-hackgen.conf +etc/fonts/conf.avail/62-fonts-hackgen.conf +etc/fonts/conf.d/20-unhint-hackgen.conf +etc/fonts/conf.d/62-fonts-hackgen.conf +%%HACKGEN%%%%FONTSDIR%%/HackGen-Regular.ttf +%%HACKGEN%%%%FONTSDIR%%/HackGen-Bold.ttf +%%HACKGEN_CONS%%%%FONTSDIR%%/HackGenConsole-Regular.ttf +%%HACKGEN_CONS%%%%FONTSDIR%%/HackGenConsole-Bold.ttf +%%HACKGEN_CONS_PL%%%%FONTSDIR%%/HackGenConsole-Regular-forPowerline.ttf +%%HACKGEN_CONS_PL%%%%FONTSDIR%%/HackGenConsole-Bold-forPowerline.ttf +%%HACKGEN35%%%%FONTSDIR%%/HackGen35-Regular.ttf +%%HACKGEN35%%%%FONTSDIR%%/HackGen35-Bold.ttf +%%HACKGEN35_CONS%%%%FONTSDIR%%/HackGen35Console-Regular.ttf +%%HACKGEN35_CONS%%%%FONTSDIR%%/HackGen35Console-Bold.ttf +%%HACKGEN35_CONS_PL%%%%FONTSDIR%%/HackGen35Console-Regular-forPowerline.ttf +%%HACKGEN35_CONS_PL%%%%FONTSDIR%%/HackGen35Console-Bold-forPowerline.ttf |