aboutsummaryrefslogtreecommitdiff
path: root/japanese/kanji18
diff options
context:
space:
mode:
authorSADA Kenji <sada@FreeBSD.org>2002-01-20 23:14:24 +0000
committerSADA Kenji <sada@FreeBSD.org>2002-01-20 23:14:24 +0000
commite72e92318b22bf31c929c711dec3030c4a112035 (patch)
treea5d4644092babdacd3ec5eecbdc901723f4d3971 /japanese/kanji18
parent9c7dc35f2c5c67394d66a71fa8c65988b2c375ed (diff)
downloadports-e72e92318b22bf31c929c711dec3030c4a112035.tar.gz
ports-e72e92318b22bf31c929c711dec3030c4a112035.zip
Notes
Diffstat (limited to 'japanese/kanji18')
-rw-r--r--japanese/kanji18/Makefile23
-rw-r--r--japanese/kanji18/files/DEINSTALL.tmpl8
-rw-r--r--japanese/kanji18/files/INSTALL.tmpl4
-rw-r--r--japanese/kanji18/files/Makefile.in32
-rw-r--r--japanese/kanji18/pkg-plist13
-rw-r--r--japanese/kanji18/pkg-req12
6 files changed, 70 insertions, 22 deletions
diff --git a/japanese/kanji18/Makefile b/japanese/kanji18/Makefile
index 400f1da87723..1cf2281c6f70 100644
--- a/japanese/kanji18/Makefile
+++ b/japanese/kanji18/Makefile
@@ -7,16 +7,19 @@
PORTNAME= kanji
PORTVERSION?= 1.0
-PKGNAMESUFFIX?= 18
+PORTREVISION?= 1
CATEGORIES= japanese x11-fonts
MASTER_SITES= ${MASTER_SITE_PORTS_JP}
MASTER_SITE_SUBDIR= ${DISTNAME}
+PKGNAMESUFFIX?= 18
DISTNAME= ${PORTNAME}${PKGNAMESUFFIX}
DISTFILES?= 573.z 574.z 575.z 576.z 577.z 578.z 579.z 580.z 581.z
MAINTAINER= sanpei@FreeBSD.org
-BUILD_DEPENDS= gunshar:${PORTSDIR}/archivers/gshar+gunshar
+BUILD_DEPENDS= gunshar:${PORTSDIR}/archivers/gshar+gunshar \
+ mkbold:${PORTSDIR}/x11-fonts/mkbold \
+ mkitalic:${PORTSDIR}/x11-fonts/mkitalic
DIST_SUBDIR= ${DISTNAME}
FONTSDIR= lib/X11/fonts/local
@@ -35,6 +38,7 @@ EXTRACT_BEFORE_ARGS=
EXTRACT_AFTER_ARGS= | gunshar -d $(WRKDIR)
PKGINSTALL= ${WRKSRC}/INSTALL
PKGDEINSTALL= ${WRKSRC}/DEINSTALL
+MAKE_ENV= FONTSDIR=${FONTSDIR}
PLIST_SUB= FONTSDIR=${FONTSDIR}
README_FILE?= 573.z
RESIZESED_FILE?= 18to16.sed
@@ -42,27 +46,24 @@ RESIZED_ALIAS_FILE?= kanji16.alias
post-extract:
@(cd $(WRKSRC); ${CAT} ${DISTNAME}.?? | uudecode)
+ @${CP} -p ${FILESDIR}/Makefile.in ${WRKDIR}/Makefile
+ @${GUNZIP_CMD} ${WRKDIR}/*.Z
post-patch:
- @(cd $(WRKSRC); zcat ${DISTNAME}.bdf.Z \
- | bdftopcf -i | ${GZIP_CMD} > ${DISTNAME}.pcf.gz )
@(${GZCAT} ${DISTDIR}/${DIST_SUBDIR}/${README_FILE} \
| ${AWK} '/^#! \/bin\/sh/{i=1} i==0{print}' \
> ${WRKSRC}/README.${DISTNAME})
-do-build:
+pre-install:
@for file in INSTALL DEINSTALL; do \
${SED} -e 's,%%FONTSDIR%%,${FONTSDIR},g' \
+ -e 's,%%X11BASE%%,${X11BASE},g' \
< ${FILESDIR}/$${file}.tmpl > ${WRKSRC}/$${file}; \
done
-
-pre-install:
@${SETENV} PKG_PREFIX=${PREFIX} \
${SH} ${PKGREQ} ${PKGNAME} INSTALL
-do-install:
- @${INSTALL_DATA} ${WRKSRC}/${DISTNAME}.pcf.gz ${PREFIX}/lib/X11/fonts/local/
- @(cd ${PREFIX}/${FONTSDIR} ; mkfontdir)
+post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${PREFIX}/share/doc/${DISTNAME}
@${INSTALL_DATA} ${WRKSRC}/${RESIZESED_FILE} ${PREFIX}/share/doc/${DISTNAME}/
@@ -70,8 +71,6 @@ do-install:
@${INSTALL_DATA} ${WRKSRC}/${RESIZED_ALIAS_FILE} ${PREFIX}/share/doc/${DISTNAME}/
@${INSTALL_DATA} ${WRKSRC}/${DISTNAME}.alias ${PREFIX}/share/doc/${DISTNAME}/
.endif
-
-post-install:
@${SETENV} PKG_PREFIX=${PREFIX} \
${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
diff --git a/japanese/kanji18/files/DEINSTALL.tmpl b/japanese/kanji18/files/DEINSTALL.tmpl
index 5acdd065022e..e31f7ece328d 100644
--- a/japanese/kanji18/files/DEINSTALL.tmpl
+++ b/japanese/kanji18/files/DEINSTALL.tmpl
@@ -1,13 +1,15 @@
#!/bin/sh
if [ "x$2" = "xPOST-DEINSTALL" ]; then
- cd ${PKG_PREFIX}/%%FONTSDIR%%; ${PKG_PREFIX}/bin/mkfontdir
- ${PKG_PREFIX}/bin/xset fp rehash ||
+ cd ${PKG_PREFIX}/%%FONTSDIR%%; %%X11BASE%%/bin/mkfontdir
+ %%X11BASE%%/bin/xset fp rehash ||
(
echo "**********************************************************"
echo "You should restart X server or do 'xset fp rehash' command"
echo "to enable this update."
echo "**********************************************************"
)
- [ `wc -c ${PKG_PREFIX}/%%FONTSDIR%%/fonts.dir | awk '{print $1}'` = 2 ] && rm -f ${PKG_PREFIX}/%%FONTSDIR%%/fonts.dir
+ if [ "`wc -c ${PKG_PREFIX}/%%FONTSDIR%%/fonts.dir | awk '{print $1}'`" = 2 ]; then
+ rm -f ${PKG_PREFIX}/%%FONTSDIR%%/fonts.dir
+ fi
fi
diff --git a/japanese/kanji18/files/INSTALL.tmpl b/japanese/kanji18/files/INSTALL.tmpl
index 77be2d3b8f9e..c10a3d81cef2 100644
--- a/japanese/kanji18/files/INSTALL.tmpl
+++ b/japanese/kanji18/files/INSTALL.tmpl
@@ -1,8 +1,8 @@
#!/bin/sh
if [ "x$2" = "xPOST-INSTALL" ]; then
- cd ${PKG_PREFIX}/%%FONTSDIR%%; ${PKG_PREFIX}/bin/mkfontdir
- ${PKG_PREFIX}/bin/xset fp rehash ||
+ cd ${PKG_PREFIX}/%%FONTSDIR%%; %%X11BASE%%/bin/mkfontdir
+ %%X11BASE%%/bin/xset fp rehash ||
(
echo "**********************************************************"
echo "You should restart X server or do 'xset fp rehash' command"
diff --git a/japanese/kanji18/files/Makefile.in b/japanese/kanji18/files/Makefile.in
new file mode 100644
index 000000000000..c030bc549f16
--- /dev/null
+++ b/japanese/kanji18/files/Makefile.in
@@ -0,0 +1,32 @@
+GZIP_CMD?= gzip
+MKBOLD_CMD?= mkbold
+MKITALIC_CMD?= mkitalic
+
+DIST_ALL= kanji18.bdf
+
+DIST_NOBOLD= ${DIST_ALL}
+MADE_BOLD= ${DIST_NOBOLD:S/.bdf/b.bdf/g}
+
+DIST_NOITALIC= ${DIST_ALL} ${MADE_BOLD}
+MADE_ITALIC= ${DIST_NOITALIC:S/.bdf/i.bdf/g}
+
+BDF_ALL= ${DIST_ALL} ${MADE_BOLD} ${MADE_ITALIC}
+PCF_ALL= ${BDF_ALL:S/.bdf/.pcf.gz/g}
+
+all: ${PCF_ALL}
+
+${MADE_BOLD}: ${.TARGET:S/b.bdf/.bdf/}
+ ${MKBOLD_CMD} $> > $@
+
+${MADE_ITALIC}: ${.TARGET:S/i.bdf/.bdf/}
+ ${MKITALIC_CMD} $> > $@
+
+${PCF_ALL}: ${.TARGET:S/.pcf.gz/.bdf/}
+ bdftopcf $> | ${GZIP_CMD} -c > $@
+
+install:
+ mkdir -p ${PREFIX}/${FONTSDIR}
+ ${BSD_INSTALL_DATA} ${PCF_ALL} ${PREFIX}/${FONTSDIR}
+
+clean::
+ rm ${MADE_BOLD} ${MADE_ITALIC} ${PCF_ALL}
diff --git a/japanese/kanji18/pkg-plist b/japanese/kanji18/pkg-plist
index cb2db49e39f9..41f4a7053f2b 100644
--- a/japanese/kanji18/pkg-plist
+++ b/japanese/kanji18/pkg-plist
@@ -1,7 +1,10 @@
%%FONTSDIR%%/kanji18.pcf.gz
-share/doc/kanji18/18to16.sed
-share/doc/kanji18/README.kanji18
-share/doc/kanji18/kanji16.alias
-share/doc/kanji18/kanji18.alias
+%%FONTSDIR%%/kanji18b.pcf.gz
+%%FONTSDIR%%/kanji18bi.pcf.gz
+%%FONTSDIR%%/kanji18i.pcf.gz
+%%PORTDOCS%%share/doc/kanji18/18to16.sed
+%%PORTDOCS%%share/doc/kanji18/README.kanji18
+%%PORTDOCS%%share/doc/kanji18/kanji16.alias
+%%PORTDOCS%%share/doc/kanji18/kanji18.alias
+%%PORTDOCS%%@dirrm share/doc/kanji18
@unexec if [ ! -s %D/%%FONTSDIR%%/fonts.alias ]; then rm -f %D/%%FONTSDIR%%/fonts.alias; fi
-@dirrm share/doc/kanji18
diff --git a/japanese/kanji18/pkg-req b/japanese/kanji18/pkg-req
index 42c523b16967..c9dab0d38cba 100644
--- a/japanese/kanji18/pkg-req
+++ b/japanese/kanji18/pkg-req
@@ -23,9 +23,21 @@ fi
TMPFILE=/tmp/install-fonts-alias-$$
cat << EOF > ${TMPFILE}
kanji18 -jis-gothic-medium-r-normal--18-170-75-75-c-180-jisx0208.1983-0
+kanji18b -jis-gothic-bold-r-normal--18-170-75-75-c-180-jisx0208.1983-0
+kanji18i -jis-gothic-medium-i-normal--18-170-75-75-c-180-jisx0208.1983-0
+kanji18bi -jis-gothic-bold-i-normal--18-170-75-75-c-180-jisx0208.1983-0
-jis-fixed-medium-r-normal--18-130-100-100-c-180-jisx0208.1983-0 -jis-gothic-medium-r-normal--18-130-100-100-c-180-jisx0208.1983-0
+-jis-fixed-bold-r-normal--18-130-100-100-c-180-jisx0208.1983-0 -jis-gothic-bold-r-normal--18-130-100-100-c-180-jisx0208.1983-0
+-jis-fixed-medium-i-normal--18-130-100-100-c-180-jisx0208.1983-0 -jis-gothic-medium-i-normal--18-130-100-100-c-180-jisx0208.1983-0
+-jis-fixed-bold-i-normal--18-130-100-100-c-180-jisx0208.1983-0 -jis-gothic-bold-i-normal--18-130-100-100-c-180-jisx0208.1983-0
-jis-fixed-medium-r-normal--18-170-75-75-c-180-jisx0208.1983-0 -jis-gothic-medium-r-normal--18-170-75-75-c-180-jisx0208.1983-0
+-jis-fixed-bold-r-normal--18-170-75-75-c-180-jisx0208.1983-0 -jis-gothic-bold-r-normal--18-170-75-75-c-180-jisx0208.1983-0
+-jis-fixed-medium-i-normal--18-170-75-75-c-180-jisx0208.1983-0 -jis-gothic-medium-i-normal--18-170-75-75-c-180-jisx0208.1983-0
+-jis-fixed-bold-i-normal--18-170-75-75-c-180-jisx0208.1983-0 -jis-gothic-bold-i-normal--18-170-75-75-c-180-jisx0208.1983-0
-jis-gothic-medium-r-normal--18-130-100-100-c-180-jisx0208.1983-0 -jis-gothic-medium-r-normal--18-170-75-75-c-180-jisx0208.1983-0
+-jis-gothic-bold-r-normal--18-130-100-100-c-180-jisx0208.1983-0 -jis-gothic-bold-r-normal--18-170-75-75-c-180-jisx0208.1983-0
+-jis-gothic-medium-i-normal--18-130-100-100-c-180-jisx0208.1983-0 -jis-gothic-medium-i-normal--18-170-75-75-c-180-jisx0208.1983-0
+-jis-gothic-bold-i-normal--18-130-100-100-c-180-jisx0208.1983-0 -jis-gothic-bold-i-normal--18-170-75-75-c-180-jisx0208.1983-0
EOF
echo "Updating ${FONTDIR}/fonts.alias"