- Stage support
- Move obsolete pkg-req to pkg-install/pkg-deinstall
This commit is contained in:
parent
dec18385bb
commit
65ec1c02c9
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=344385
6 changed files with 63 additions and 62 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
PORTNAME= k20fonts
|
||||
PORTVERSION= 0.396
|
||||
PORTREVISION= 5
|
||||
PORTREVISION= 6
|
||||
CATEGORIES= japanese x11-fonts
|
||||
MASTER_SITES= ${MASTER_SITE_NETBSD:S/$/:kappa20/:S/%SUBDIR%/LOCAL_PORTS/} \
|
||||
http://downloads.sourceforge.jp/x-tt/8412/:ayu20
|
||||
|
@ -24,15 +24,13 @@ BUILD_DEPENDS= mkitalic:${PORTSDIR}/x11-fonts/mkbold-mkitalic \
|
|||
RUN_DEPENDS= mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir \
|
||||
mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale
|
||||
|
||||
NO_STAGE= yes
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
FONTSDIR= lib/X11/fonts/local
|
||||
MAKE_ENV= INSTALL_DATA="${INSTALL_DATA}"
|
||||
MAKE_ARGS= FONTSDIR="${FONTSDIR}"
|
||||
PLIST_SUB= FONTSDIR=${FONTSDIR}
|
||||
DOCSDIR= ${PREFIX}/share/doc/ja/${PORTNAME}
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
post-extract:
|
||||
(cd ${WRKSRC} ; ${TAR} xpzf ${DISTDIR}/${AYUDISTNAME}${AYU_SUFFIX})
|
||||
(cd ${WRKSRC} ; ${MV} Makefile Makefile.dist)
|
||||
|
@ -43,14 +41,8 @@ pre-build:
|
|||
(cd ${WRKSRC} ; ${SH} makebdf.sh)
|
||||
|
||||
pre-install:
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/fonts.alias ${DOCSDIR}
|
||||
@${CAT} ${WRKSRC}/fonts.alias >> ${PREFIX}/${FONTSDIR}/fonts.alias
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/README.euc-jp
|
||||
.endif
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/fonts.alias ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}/README.euc-jp
|
||||
|
||||
post-install:
|
||||
@(cd ${PREFIX}/${FONTSDIR} ; mkfontdir)
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -55,8 +55,8 @@ fonts.alias: Makefile.dist
|
|||
${CAT} fonts.alias.ayu >> $@
|
||||
|
||||
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}
|
||||
|
|
27
japanese/kappa20/pkg-deinstall
Normal file
27
japanese/kappa20/pkg-deinstall
Normal file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$2" != "DEINSTALL" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
FONTDIR=${PKG_PREFIX}/lib/X11/fonts/local
|
||||
FAFILE=${PKG_PREFIX}/share/doc/ja/k20fonts/fonts.alias
|
||||
|
||||
grepv() {
|
||||
awk -v SRC=$1 'BEGIN{while (getline < SRC) {ENTRY[$0]=1}} (ENTRY[$0] != 1) {print}' $2
|
||||
}
|
||||
|
||||
echo "Updating ${FONTDIR}/fonts.alias"
|
||||
cd ${FONTDIR}
|
||||
touch fonts.alias
|
||||
cp fonts.alias fonts.alias.orig
|
||||
grepv ${FAFILE} fonts.alias.orig > fonts.alias
|
||||
if [ ! -s fonts.alias ]; then rm -f fonts.alias; fi
|
||||
rm -f fonts.alias.orig
|
||||
|
||||
echo "**********************************************************"
|
||||
echo "You should restart X server or do 'xset fp rehash' command"
|
||||
echo "to enable this update."
|
||||
echo "**********************************************************"
|
||||
|
||||
exit 0
|
26
japanese/kappa20/pkg-install
Normal file
26
japanese/kappa20/pkg-install
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$2" != "POST-INSTALL" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
FONTDIR=${PKG_PREFIX}/lib/X11/fonts/local
|
||||
FAFILE=${PKG_PREFIX}/share/doc/ja/k20fonts/fonts.alias
|
||||
|
||||
grepv() {
|
||||
awk -v SRC=$1 'BEGIN{while (getline < SRC) {ENTRY[$0]=1}} (ENTRY[$0] != 1) {print}' $2
|
||||
}
|
||||
|
||||
echo "Updating ${FONTDIR}/fonts.alias"
|
||||
cd ${FONTDIR}
|
||||
touch fonts.alias
|
||||
cp fonts.alias fonts.alias.orig
|
||||
(grepv ${FAFILE} fonts.alias.orig ; cat ${FAFILE}) > fonts.alias
|
||||
rm -f fonts.alias.orig
|
||||
|
||||
echo "**********************************************************"
|
||||
echo "You should restart X server or do 'xset fp rehash' command"
|
||||
echo "to enable this update."
|
||||
echo "**********************************************************"
|
||||
|
||||
exit 0
|
|
@ -1,4 +1,3 @@
|
|||
%%FONTSDIR%%/fonts.alias
|
||||
%%FONTSDIR%%/10x20L10b.pcf.gz
|
||||
%%FONTSDIR%%/10x20L10bi.pcf.gz
|
||||
%%FONTSDIR%%/10x20L10m.pcf.gz
|
||||
|
@ -65,9 +64,7 @@
|
|||
%%FONTSDIR%%/vk20mi.pcf.gz
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README.euc-jp
|
||||
%%PORTDOCS%%%%DOCSDIR%%/fonts.alias
|
||||
@dirrm %%DOCSDIR%%
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
@exec cd %D/%%FONTSDIR%% ; %D/bin/mkfontdir
|
||||
@exec cat %D/%%DOCSDIR%%/fonts.alias >> %D/%%FONTSDIR%%/fonts.alias
|
||||
@unexec cd %D/%%FONTSDIR%% ; %D/bin/mkfontdir
|
||||
@unexec if [ `wc -c %D/%%FONTSDIR%%/fonts.dir | awk '{print $1}'` = 2 ]; then rm -f %D/%%FONTSDIR%%/fonts.dir; fi
|
||||
@unexec if [ ! -s %D/%%FONTSDIR%%/fonts.alias ]; then rm -f %D/%%FONTSDIR%%/fonts.alias; fi
|
||||
|
|
|
@ -1,41 +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
|
||||
}
|
||||
|
||||
if [ "$2" = "DEINSTALL" ] ; then
|
||||
FAFILE=${PKG_PREFIX}/share/doc/ja/k20fonts/fonts.alias
|
||||
echo "Updating ${FONTDIR}/fonts.alias"
|
||||
cd ${FONTDIR}
|
||||
touch fonts.alias
|
||||
cp fonts.alias fonts.alias.orig
|
||||
grepv ${FAFILE} fonts.alias.orig > fonts.alias
|
||||
rm -f fonts.alias.orig
|
||||
fi
|
||||
|
||||
echo "**********************************************************"
|
||||
echo "You should restart X server or do 'xset fp rehash' command"
|
||||
echo "to enable this update."
|
||||
echo "**********************************************************"
|
||||
|
||||
exit 0;
|
Loading…
Reference in a new issue