diff options
author | antoine <antoine@FreeBSD.org> | 2014-02-15 16:52:16 +0800 |
---|---|---|
committer | antoine <antoine@FreeBSD.org> | 2014-02-15 16:52:16 +0800 |
commit | d17003624252239364b06c1c94185d87da7ede20 (patch) | |
tree | e03e976bd506a64c6b570eaf84d4c1af86f0eaa5 | |
parent | e1949f559a2a10ccce32e2026e232c85dbe818b9 (diff) | |
download | freebsd-ports-gnome-d17003624252239364b06c1c94185d87da7ede20.tar.gz freebsd-ports-gnome-d17003624252239364b06c1c94185d87da7ede20.tar.zst freebsd-ports-gnome-d17003624252239364b06c1c94185d87da7ede20.zip |
- Stage support
- Convert obsolete pkg-req to pkg-install/pkg-deinstall
-rw-r--r-- | japanese/k10/Makefile | 20 | ||||
-rw-r--r-- | japanese/k10/files/Makefile.in | 4 | ||||
-rw-r--r-- | japanese/k10/pkg-deinstall (renamed from japanese/k10/pkg-req) | 29 | ||||
-rw-r--r-- | japanese/k10/pkg-install | 42 | ||||
-rw-r--r-- | japanese/k10/pkg-plist | 2 |
5 files changed, 56 insertions, 41 deletions
diff --git a/japanese/k10/Makefile b/japanese/k10/Makefile index 79326ce927a8..0d0ab51bd794 100644 --- a/japanese/k10/Makefile +++ b/japanese/k10/Makefile @@ -3,7 +3,7 @@ PORTNAME= naga10 PORTVERSION= 1.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= japanese x11-fonts MASTER_SITES= http://hp.vector.co.jp/authors/VA013391/fonts/ DISTNAME= knj10-${PORTVERSION} @@ -16,25 +16,17 @@ BUILD_DEPENDS= mkbold:${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= FONTSDIR=${FONTSDIR} PLIST_SUB= FONTSDIR=${FONTSDIR} +OPTIONS_DEFINE= DOCS + post-extract: ${CP} ${FILESDIR}/Makefile.in ${WRKSRC}/Makefile -pre-install: - @${SETENV} PKG_PREFIX=${PREFIX} \ - ${SH} ${PKGREQ} ${PKGNAME} INSTALL - post-install: - @(cd ${PREFIX}/${FONTSDIR} ; mkfontdir) -.if !defined(NOPORTDOCS) - @${MKDIR} ${PREFIX}/share/doc/naga10 - @${CP} ${WRKSRC}/README ${PREFIX}/share/doc/naga10/ -.endif + @${MKDIR} ${STAGEDIR}${PREFIX}/share/doc/naga10 + ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${PREFIX}/share/doc/naga10/ -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/japanese/k10/files/Makefile.in b/japanese/k10/files/Makefile.in index cabc962b462d..95c43e49d269 100644 --- a/japanese/k10/files/Makefile.in +++ b/japanese/k10/files/Makefile.in @@ -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} diff --git a/japanese/k10/pkg-req b/japanese/k10/pkg-deinstall index 3fcd623e8ccd..ac83eee41ef8 100644 --- a/japanese/k10/pkg-req +++ b/japanese/k10/pkg-deinstall @@ -1,23 +1,10 @@ #!/bin/sh -if [ "x$1" = "x" ]; then - exit 1; +if [ "$2" != "DEINSTALL" ]; then + exit 0 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 +FONTDIR=${PKG_PREFIX}/lib/X11/fonts/local grepv() { awk -v SRC=$1 'BEGIN{while (getline < SRC) {ENTRY[$0]=1}} (ENTRY[$0] != 1) {print}' $2 @@ -44,12 +31,8 @@ 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 +grepv ${TMPFILE} fonts.alias.orig > fonts.alias +if [ ! -s fonts.alias ]; then rm -f fonts.alias; fi rm -f fonts.alias.orig ${TMPFILE} echo "**********************************************************" @@ -57,4 +40,4 @@ echo "You should restart X server or do 'xset fp rehash' command" echo "to enable this update." echo "**********************************************************" -exit 0; +exit 0 diff --git a/japanese/k10/pkg-install b/japanese/k10/pkg-install new file mode 100644 index 000000000000..19b1d654069d --- /dev/null +++ b/japanese/k10/pkg-install @@ -0,0 +1,42 @@ +#!/bin/sh + +if [ "$2" != "POST-INSTALL" ]; then + exit 0 +fi + +FONTDIR=${PKG_PREFIX}/lib/X11/fonts/local + +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} +k10 -misc-fixed-medium-r-normal--10-90-75-75-c-100-jisx0208.1983-0 +k10i -misc-fixed-medium-i-normal--10-90-75-75-c-100-jisx0208.1983-0 +k10b -misc-fixed-bold-r-normal--10-90-75-75-c-100-jisx0208.1983-0 +k10bi -misc-fixed-bold-i-normal--10-90-75-75-c-100-jisx0208.1983-0 +a10 -misc-fixed-medium-r-normal--10-90-75-75-c-50-iso8859-1 +a10i -misc-fixed-medium-i-normal--10-90-75-75-c-50-iso8859-1 +a10b -misc-fixed-bold-r-normal--10-90-75-75-c-50-iso8859-1 +a10bi -misc-fixed-bold-i-normal--10-90-75-75-c-50-iso8859-1 +r10 -misc-fixed-medium-r-normal--10-90-75-75-c-50-jisx0201.1976-0 +r10b -misc-fixed-bold-r-normal--10-90-75-75-c-50-jisx0201.1976-0 +r10i -misc-fixed-medium-i-normal--10-90-75-75-c-50-jisx0201.1976-0 +r10bi -misc-fixed-bold-i-normal--10-90-75-75-c-50-jisx0201.1976-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} + +echo "**********************************************************" +echo "You should restart X server or do 'xset fp rehash' command" +echo "to enable this update." +echo "**********************************************************" + +exit 0 diff --git a/japanese/k10/pkg-plist b/japanese/k10/pkg-plist index 9ef02da9aceb..40d7c9cbd429 100644 --- a/japanese/k10/pkg-plist +++ b/japanese/k10/pkg-plist @@ -1,4 +1,3 @@ -%%FONTSDIR%%/fonts.alias %%FONTSDIR%%/5x10B.pcf.gz %%FONTSDIR%%/5x10a.pcf.gz %%FONTSDIR%%/5x10rk.pcf.gz @@ -16,4 +15,3 @@ @exec cd %D/%%FONTSDIR%% ; %D/bin/mkfontdir @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 |