mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-21 00:25:50 +00:00
- Stage support
- Move obsolete pkg-req to inside pkg-install/pkg-deinstall
This commit is contained in:
parent
3b91c295e9
commit
24054bf9f8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=344383
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= kanji
|
||||
PORTVERSION?= 1.0
|
||||
PORTREVISION?= 4
|
||||
PORTREVISION?= 5
|
||||
CATEGORIES= japanese x11-fonts
|
||||
MASTER_SITES= ${MASTER_SITE_PORTS_JP}
|
||||
MASTER_SITE_SUBDIR= ${DISTNAME}
|
||||
@ -16,16 +16,15 @@ COMMENT= X11 ${PKGNAMESUFFIX}-dot Kanji font
|
||||
|
||||
EXTRACT_DEPENDS= gunshar:${PORTSDIR}/archivers/sharutils
|
||||
BUILD_DEPENDS= mkbold:${PORTSDIR}/x11-fonts/mkbold-mkitalic \
|
||||
bdftopcf:${PORTSDIR}/x11-fonts/bdftopcf \
|
||||
mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir \
|
||||
mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale
|
||||
RUN_DEPENDS= mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir
|
||||
|
||||
DIST_SUBDIR= ${DISTNAME}
|
||||
FONTSDIR= lib/X11/fonts/local
|
||||
NO_WRKSUBDIR= yes
|
||||
|
||||
NO_STAGE= yes
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
EXTRACT_CMD= ${GZCAT}
|
||||
EXTRACT_BEFORE_ARGS=
|
||||
EXTRACT_AFTER_ARGS= | ${AWK} '/bin\/sh/{P=1} {if (P==1) print;}' | \
|
||||
@ -38,6 +37,8 @@ README_FILE?= 573.z
|
||||
RESIZESED_FILE?= 18to16.sed
|
||||
RESIZED_ALIAS_FILE?= kanji16.alias
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
post-extract:
|
||||
@(cd $(WRKSRC); ${CAT} ${DISTNAME}.?? | uudecode)
|
||||
@${CP} -p ${FILESDIR}/Makefile.in ${WRKDIR}/Makefile
|
||||
@ -54,18 +55,12 @@ pre-install:
|
||||
-e 's,%%LOCALBASE%%,${LOCALBASE},g' \
|
||||
< ${FILESDIR}/$${file}.tmpl > ${WRKSRC}/$${file}; \
|
||||
done
|
||||
@${SETENV} PKG_PREFIX=${PREFIX} \
|
||||
${SH} ${PKGREQ} ${PKGNAME} INSTALL
|
||||
|
||||
post-install:
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${PREFIX}/share/doc/${DISTNAME}
|
||||
@${INSTALL_DATA} ${WRKSRC}/${RESIZESED_FILE} ${PREFIX}/share/doc/${DISTNAME}/
|
||||
@${INSTALL_DATA} ${WRKSRC}/README.${DISTNAME} ${PREFIX}/share/doc/${DISTNAME}/
|
||||
@${INSTALL_DATA} ${WRKSRC}/${RESIZED_ALIAS_FILE} ${PREFIX}/share/doc/${DISTNAME}/
|
||||
@${INSTALL_DATA} ${WRKSRC}/${DISTNAME}.alias ${PREFIX}/share/doc/${DISTNAME}/
|
||||
.endif
|
||||
@${SETENV} PKG_PREFIX=${PREFIX} \
|
||||
${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
@${MKDIR} ${STAGEDIR}${PREFIX}/share/doc/${DISTNAME}
|
||||
${INSTALL_DATA} ${WRKSRC}/${RESIZESED_FILE} ${STAGEDIR}${PREFIX}/share/doc/${DISTNAME}
|
||||
${INSTALL_DATA} ${WRKSRC}/README.${DISTNAME} ${STAGEDIR}${PREFIX}/share/doc/${DISTNAME}
|
||||
${INSTALL_DATA} ${WRKSRC}/${RESIZED_ALIAS_FILE} ${STAGEDIR}${PREFIX}/share/doc/${DISTNAME}
|
||||
${INSTALL_DATA} ${WRKSRC}/${DISTNAME}.alias ${STAGEDIR}${PREFIX}/share/doc/${DISTNAME}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,7 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
grepv() {
|
||||
awk -v SRC=$1 'BEGIN{while (getline < SRC) {ENTRY[$0]=1}} (ENTRY[$0] != 1) {print}' $2
|
||||
}
|
||||
|
||||
if [ "x$2" = "xPOST-DEINSTALL" ]; then
|
||||
FONTDIR=${PKG_PREFIX}/%%FONTSDIR%%
|
||||
cd ${PKG_PREFIX}/%%FONTSDIR%%; %%LOCALBASE%%/bin/mkfontdir
|
||||
|
||||
# font alias entry here!
|
||||
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"
|
||||
cd ${FONTDIR}
|
||||
touch fonts.alias
|
||||
cp fonts.alias fonts.alias.orig
|
||||
grepv ${TMPFILE} fonts.alias.orig > fonts.alias
|
||||
if [ ! -s fonts.alias ]; then rm -f fonts.alias; fi
|
||||
rm -f fonts.alias.orig ${TMPFILE}
|
||||
|
||||
%%LOCALBASE%%/bin/xset fp rehash ||
|
||||
(
|
||||
echo "**********************************************************"
|
||||
@ -13,3 +47,5 @@ if [ "x$2" = "xPOST-DEINSTALL" ]; then
|
||||
rm -f ${PKG_PREFIX}/%%FONTSDIR%%/fonts.dir
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
@ -1,7 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
grepv() {
|
||||
awk -v SRC=$1 'BEGIN{while (getline < SRC) {ENTRY[$0]=1}} (ENTRY[$0] != 1) {print}' $2
|
||||
}
|
||||
|
||||
if [ "x$2" = "xPOST-INSTALL" ]; then
|
||||
FONTDIR=${PKG_PREFIX}/%%FONTSDIR%%
|
||||
cd ${PKG_PREFIX}/%%FONTSDIR%%; %%LOCALBASE%%/bin/mkfontdir
|
||||
|
||||
# font alias entry here!
|
||||
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"
|
||||
cd ${FONTDIR}
|
||||
touch fonts.alias
|
||||
cp fonts.alias fonts.alias.orig
|
||||
(grepv ${TMPFILE} fonts.alias.orig ; cat ${TMPFILE}) > fonts.alias
|
||||
rm -f fonts.alias.orig ${TMPFILE}
|
||||
|
||||
%%LOCALBASE%%/bin/xset fp rehash ||
|
||||
(
|
||||
echo "**********************************************************"
|
||||
@ -10,3 +43,4 @@ if [ "x$2" = "xPOST-INSTALL" ]; then
|
||||
echo "**********************************************************"
|
||||
)
|
||||
fi
|
||||
|
||||
|
@ -27,8 +27,8 @@ ${PCF_ALL}: ${.TARGET:S/.pcf.gz/.bdf/}
|
||||
bdftopcf $> | ${GZIP_CMD} -c > $@
|
||||
|
||||
install:
|
||||
mkdir -p ${PREFIX}/${FONTSDIR}
|
||||
${BSD_INSTALL_DATA} ${PCF_ALL} ${PREFIX}/${FONTSDIR}
|
||||
mkdir -p ${DESTDIR}${PREFIX}/${FONTSDIR}
|
||||
${BSD_INSTALL_DATA} ${PCF_ALL} ${DESTDIR}${PREFIX}/${FONTSDIR}
|
||||
|
||||
clean::
|
||||
rm ${MADE_BOLD} ${MADE_ITALIC} ${PCF_ALL}
|
||||
|
@ -1,4 +1,3 @@
|
||||
%%FONTSDIR%%/fonts.alias
|
||||
%%FONTSDIR%%/kanji18.pcf.gz
|
||||
%%FONTSDIR%%/kanji18b.pcf.gz
|
||||
%%FONTSDIR%%/kanji18bi.pcf.gz
|
||||
@ -8,4 +7,3 @@
|
||||
%%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
|
||||
|
@ -1,64 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "x$1" = "x" ]; then
|
||||
exit 1;
|
||||
fi
|
||||
if [ "x$2" != "xINSTALL" -a "x$2" != "xDEINSTALL" ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
export FONTDIR; FONTDIR=${PKG_PREFIX}/lib/X11/fonts/local
|
||||
|
||||
if [ "$2x" = "INSTALLx" -a ! -d ${FONTDIR} ]; then
|
||||
echo '**********************************************************************'
|
||||
echo "****** ${FONTDIR}/ doesn't exist."
|
||||
echo "****** Creating ${FONTDIR}/"
|
||||
echo '****** Please upgrade your XFree86 to 3.3.3 or upper,'
|
||||
echo "****** or add this directory to your /etc/XF86Config's FontPath entry."
|
||||
echo '**********************************************************************'
|
||||
mkdir ${FONTDIR}
|
||||
fi
|
||||
|
||||
grepv() {
|
||||
awk -v SRC=$1 'BEGIN{while (getline < SRC) {ENTRY[$0]=1}} (ENTRY[$0] != 1) {print}' $2
|
||||
}
|
||||
|
||||
# font alias entry here!
|
||||
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"
|
||||
cd ${FONTDIR}
|
||||
touch fonts.alias
|
||||
cp fonts.alias fonts.alias.orig
|
||||
if [ "$2" = "INSTALL" ] ; then
|
||||
(grepv ${TMPFILE} fonts.alias.orig ; \
|
||||
cat ${TMPFILE}) > fonts.alias
|
||||
elif [ "$2" = "DEINSTALL" ] ; then
|
||||
grepv ${TMPFILE} fonts.alias.orig > fonts.alias
|
||||
fi
|
||||
rm -f fonts.alias.orig ${TMPFILE}
|
||||
|
||||
echo "**********************************************************"
|
||||
echo "You should restart X server or do 'xset fp rehash' command"
|
||||
echo "to enable this update."
|
||||
echo "**********************************************************"
|
||||
|
||||
exit 0;
|
@ -13,5 +13,4 @@ README_FILE?= 793.gz
|
||||
RESIZESED_FILE?= 26to24.sed
|
||||
RESIZED_ALIAS_FILE?= kanji24.alias
|
||||
|
||||
NO_STAGE= yes
|
||||
.include "${MASTERDIR}/Makefile"
|
||||
|
@ -1,7 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
grepv() {
|
||||
awk -v SRC=$1 'BEGIN{while (getline < SRC) {ENTRY[$0]=1}} (ENTRY[$0] != 1) {print}' $2
|
||||
}
|
||||
|
||||
if [ "x$2" = "xPOST-DEINSTALL" ]; then
|
||||
FONTDIR=${PKG_PREFIX}/%%FONTSDIR%%
|
||||
cd ${PKG_PREFIX}/%%FONTSDIR%%; %%LOCALBASE%%/bin/mkfontdir
|
||||
|
||||
# font alias entry here!
|
||||
TMPFILE=/tmp/install-fonts-alias-$$
|
||||
cat <<- EOF > ${TMPFILE}
|
||||
kanji26 -jis-mincho-medium-r-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
kanji26b -jis-mincho-bold-r-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
kanji26i -jis-mincho-medium-i-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
kanji26bi -jis-mincho-bold-i-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-fixed-medium-r-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-medium-r-normal--26-190-100-100-c-260-jisx0208.1983-0
|
||||
-jis-fixed-bold-r-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-bold-r-normal--26-190-100-100-c-260-jisx0208.1983-0
|
||||
-jis-fixed-medium-i-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-medium-i-normal--26-190-100-100-c-260-jisx0208.1983-0
|
||||
-jis-fixed-bold-i-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-bold-i-normal--26-190-100-100-c-260-jisx0208.1983-0
|
||||
-jis-fixed-medium-r-normal--26-250-75-75-c-260-jisx0208.1983-0 -jis-mincho-medium-r-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-fixed-bold-r-normal--26-250-75-75-c-260-jisx0208.1983-0 -jis-mincho-bold-r-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-fixed-medium-i-normal--26-250-75-75-c-260-jisx0208.1983-0 -jis-mincho-medium-i-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-fixed-bold-i-normal--26-250-75-75-c-260-jisx0208.1983-0 -jis-mincho-bold-i-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-mincho-medium-r-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-medium-r-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-mincho-bold-r-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-bold-r-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-mincho-medium-i-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-medium-i-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-mincho-bold-i-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-bold-i-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
EOF
|
||||
echo "Updating ${FONTDIR}/fonts.alias"
|
||||
cd ${FONTDIR}
|
||||
touch fonts.alias
|
||||
cp fonts.alias fonts.alias.orig
|
||||
grepv ${TMPFILE} fonts.alias.orig > fonts.alias
|
||||
if [ ! -s fonts.alias ]; then rm -f fonts.alias; fi
|
||||
rm -f fonts.alias.orig ${TMPFILE}
|
||||
|
||||
%%LOCALBASE%%/bin/xset fp rehash ||
|
||||
(
|
||||
echo "**********************************************************"
|
||||
@ -13,3 +47,5 @@ if [ "x$2" = "xPOST-DEINSTALL" ]; then
|
||||
rm -f ${PKG_PREFIX}/%%FONTSDIR%%/fonts.dir
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
@ -1,7 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
grepv() {
|
||||
awk -v SRC=$1 'BEGIN{while (getline < SRC) {ENTRY[$0]=1}} (ENTRY[$0] != 1) {print}' $2
|
||||
}
|
||||
|
||||
if [ "x$2" = "xPOST-INSTALL" ]; then
|
||||
FONTDIR=${PKG_PREFIX}/%%FONTSDIR%%
|
||||
cd ${PKG_PREFIX}/%%FONTSDIR%%; %%LOCALBASE%%/bin/mkfontdir
|
||||
|
||||
# font alias entry here!
|
||||
TMPFILE=/tmp/install-fonts-alias-$$
|
||||
cat <<- EOF > ${TMPFILE}
|
||||
kanji26 -jis-mincho-medium-r-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
kanji26b -jis-mincho-bold-r-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
kanji26i -jis-mincho-medium-i-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
kanji26bi -jis-mincho-bold-i-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-fixed-medium-r-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-medium-r-normal--26-190-100-100-c-260-jisx0208.1983-0
|
||||
-jis-fixed-bold-r-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-bold-r-normal--26-190-100-100-c-260-jisx0208.1983-0
|
||||
-jis-fixed-medium-i-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-medium-i-normal--26-190-100-100-c-260-jisx0208.1983-0
|
||||
-jis-fixed-bold-i-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-bold-i-normal--26-190-100-100-c-260-jisx0208.1983-0
|
||||
-jis-fixed-medium-r-normal--26-250-75-75-c-260-jisx0208.1983-0 -jis-mincho-medium-r-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-fixed-bold-r-normal--26-250-75-75-c-260-jisx0208.1983-0 -jis-mincho-bold-r-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-fixed-medium-i-normal--26-250-75-75-c-260-jisx0208.1983-0 -jis-mincho-medium-i-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-fixed-bold-i-normal--26-250-75-75-c-260-jisx0208.1983-0 -jis-mincho-bold-i-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-mincho-medium-r-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-medium-r-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-mincho-bold-r-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-bold-r-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-mincho-medium-i-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-medium-i-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-mincho-bold-i-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-bold-i-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
EOF
|
||||
echo "Updating ${FONTDIR}/fonts.alias"
|
||||
cd ${FONTDIR}
|
||||
touch fonts.alias
|
||||
cp fonts.alias fonts.alias.orig
|
||||
(grepv ${TMPFILE} fonts.alias.orig ; cat ${TMPFILE}) > fonts.alias
|
||||
rm -f fonts.alias.orig ${TMPFILE}
|
||||
|
||||
%%LOCALBASE%%/bin/xset fp rehash ||
|
||||
(
|
||||
echo "**********************************************************"
|
||||
@ -10,3 +43,4 @@ if [ "x$2" = "xPOST-INSTALL" ]; then
|
||||
echo "**********************************************************"
|
||||
)
|
||||
fi
|
||||
|
||||
|
@ -27,8 +27,8 @@ ${PCF_ALL}: ${.TARGET:S/.pcf.gz/.bdf/}
|
||||
bdftopcf $> | ${GZIP_CMD} -c > $@
|
||||
|
||||
install:
|
||||
mkdir -p ${PREFIX}/${FONTSDIR}
|
||||
${BSD_INSTALL_DATA} ${PCF_ALL} ${PREFIX}/${FONTSDIR}
|
||||
mkdir -p ${DESTDIR}${PREFIX}/${FONTSDIR}
|
||||
${BSD_INSTALL_DATA} ${PCF_ALL} ${DESTDIR}${PREFIX}/${FONTSDIR}
|
||||
|
||||
clean::
|
||||
rm ${MADE_BOLD} ${MADE_ITALIC} ${PCF_ALL}
|
||||
|
@ -7,4 +7,3 @@
|
||||
%%PORTDOCS%%share/doc/kanji26/kanji24.alias
|
||||
%%PORTDOCS%%share/doc/kanji26/kanji26.alias
|
||||
%%PORTDOCS%%@dirrm share/doc/kanji26
|
||||
@unexec if [ ! -s %D/%%FONTSDIR%%/fonts.alias ]; then rm -f %D/%%FONTSDIR%%/fonts.alias; fi
|
||||
|
@ -1,64 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "x$1" = "x" ]; then
|
||||
exit 1;
|
||||
fi
|
||||
if [ "x$2" != "xINSTALL" -a "x$2" != "xDEINSTALL" ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
export FONTDIR; FONTDIR=${PKG_PREFIX}/lib/X11/fonts/local
|
||||
|
||||
if [ "$2x" = "INSTALLx" -a ! -d ${FONTDIR} ]; then
|
||||
echo '**********************************************************************'
|
||||
echo "****** ${FONTDIR}/ doesn't exist."
|
||||
echo "****** Creating ${FONTDIR}/"
|
||||
echo '****** Please upgrade your XFree86 to 3.3.3 or upper,'
|
||||
echo "****** or add this directory to your /etc/XF86Config's FontPath entry."
|
||||
echo '**********************************************************************'
|
||||
mkdir ${FONTDIR}
|
||||
fi
|
||||
|
||||
grepv() {
|
||||
awk -v SRC=$1 'BEGIN{while (getline < SRC) {ENTRY[$0]=1}} (ENTRY[$0] != 1) {print}' $2
|
||||
}
|
||||
|
||||
# font alias entry here!
|
||||
TMPFILE=/tmp/install-fonts-alias-$$
|
||||
cat << EOF > ${TMPFILE}
|
||||
kanji26 -jis-mincho-medium-r-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
kanji26b -jis-mincho-bold-r-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
kanji26i -jis-mincho-medium-i-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
kanji26bi -jis-mincho-bold-i-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-fixed-medium-r-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-medium-r-normal--26-190-100-100-c-260-jisx0208.1983-0
|
||||
-jis-fixed-bold-r-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-bold-r-normal--26-190-100-100-c-260-jisx0208.1983-0
|
||||
-jis-fixed-medium-i-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-medium-i-normal--26-190-100-100-c-260-jisx0208.1983-0
|
||||
-jis-fixed-bold-i-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-bold-i-normal--26-190-100-100-c-260-jisx0208.1983-0
|
||||
-jis-fixed-medium-r-normal--26-250-75-75-c-260-jisx0208.1983-0 -jis-mincho-medium-r-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-fixed-bold-r-normal--26-250-75-75-c-260-jisx0208.1983-0 -jis-mincho-bold-r-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-fixed-medium-i-normal--26-250-75-75-c-260-jisx0208.1983-0 -jis-mincho-medium-i-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-fixed-bold-i-normal--26-250-75-75-c-260-jisx0208.1983-0 -jis-mincho-bold-i-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-mincho-medium-r-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-medium-r-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-mincho-bold-r-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-bold-r-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-mincho-medium-i-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-medium-i-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
-jis-mincho-bold-i-normal--26-190-100-100-c-260-jisx0208.1983-0 -jis-mincho-bold-i-normal--26-250-75-75-c-260-jisx0208.1983-0
|
||||
EOF
|
||||
|
||||
echo "Updating ${FONTDIR}/fonts.alias"
|
||||
cd ${FONTDIR}
|
||||
touch fonts.alias
|
||||
cp fonts.alias fonts.alias.orig
|
||||
if [ "$2" = "INSTALL" ] ; then
|
||||
(grepv ${TMPFILE} fonts.alias.orig ; \
|
||||
cat ${TMPFILE}) > fonts.alias
|
||||
elif [ "$2" = "DEINSTALL" ] ; then
|
||||
grepv ${TMPFILE} fonts.alias.orig > fonts.alias
|
||||
fi
|
||||
rm -f fonts.alias.orig ${TMPFILE}
|
||||
|
||||
echo "**********************************************************"
|
||||
echo "You should restart X server or do 'xset fp rehash' command"
|
||||
echo "to enable this update."
|
||||
echo "**********************************************************"
|
||||
|
||||
exit 0;
|
Loading…
Reference in New Issue
Block a user