aboutsummaryrefslogtreecommitdiffstats
path: root/japanese
diff options
context:
space:
mode:
authormarino <marino@FreeBSD.org>2014-07-27 20:52:21 +0800
committermarino <marino@FreeBSD.org>2014-07-27 20:52:21 +0800
commit44c045f9a476bd3c3814fbaa6005744b8fc6f6f8 (patch)
tree285a4ec09652644cdac01d55e8880491768d8ea4 /japanese
parentb48f566d321ffbd0792cc50d127b4980df7bd2e6 (diff)
downloadfreebsd-ports-gnome-44c045f9a476bd3c3814fbaa6005744b8fc6f6f8.tar.gz
freebsd-ports-gnome-44c045f9a476bd3c3814fbaa6005744b8fc6f6f8.tar.zst
freebsd-ports-gnome-44c045f9a476bd3c3814fbaa6005744b8fc6f6f8.zip
Stage japanese/marumoji-fonts
* Use pkg-install / pkg-deinstall instead of pkg-req * Adjust pkg-plist accordingly * Adjust RUN_DEPENDS accordingly PR: 190072 Submitted by: COG00620 (nifty.ne.jp)
Diffstat (limited to 'japanese')
-rw-r--r--japanese/marumoji-fonts/Makefile18
-rw-r--r--japanese/marumoji-fonts/files/Makefile.in4
-rw-r--r--japanese/marumoji-fonts/pkg-deinstall (renamed from japanese/marumoji-fonts/pkg-req)29
-rw-r--r--japanese/marumoji-fonts/pkg-install48
-rw-r--r--japanese/marumoji-fonts/pkg-plist10
5 files changed, 65 insertions, 44 deletions
diff --git a/japanese/marumoji-fonts/Makefile b/japanese/marumoji-fonts/Makefile
index e49dca799e86..c66b4f1c7873 100644
--- a/japanese/marumoji-fonts/Makefile
+++ b/japanese/marumoji-fonts/Makefile
@@ -3,7 +3,7 @@
PORTNAME= marumoji-fonts
PORTVERSION= 1.0
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= japanese x11-fonts
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= yoichi
@@ -19,15 +19,11 @@ COMMENT= Japanese marumoji fonts
BUILD_DEPENDS= mkbold:${PORTSDIR}/x11-fonts/mkbold-mkitalic \
bdftopcf:${PORTSDIR}/x11-fonts/bdftopcf
-RUN_DEPENDS= mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir \
- mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale
+RUN_DEPENDS= mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir
NO_WRKSUBDIR= yes
FONTSDIR= lib/X11/fonts/local
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
-
EXTRACT_CMD= ${CP}
EXTRACT_BEFORE_ARGS= -p
EXTRACT_AFTER_ARGS= ${WRKDIR}
@@ -43,13 +39,9 @@ post-extract:
pre-build:
@(cd ${WRKDIR}; ${SED} -f m18to16.sed < maru18.bdf > maru16.bdf)
-pre-su-install:
- @${SETENV} PKG_PREFIX=${PREFIX} \
- ${SH} ${PKGREQ} ${PKGNAME} INSTALL
post-install:
- @(cd ${PREFIX}/${FONTSDIR}; mkfontdir)
- ${MKDIR} ${PREFIX}/share/doc/marumoji-fonts
- ${INSTALL_DATA} ${FILESDIR}/LICENSE ${PREFIX}/share/doc/marumoji-fonts
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${FILESDIR}/LICENSE ${STAGEDIR}${DOCSDIR}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/japanese/marumoji-fonts/files/Makefile.in b/japanese/marumoji-fonts/files/Makefile.in
index 286cb1e269b7..a5a966153847 100644
--- a/japanese/marumoji-fonts/files/Makefile.in
+++ b/japanese/marumoji-fonts/files/Makefile.in
@@ -29,8 +29,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/marumoji-fonts/pkg-req b/japanese/marumoji-fonts/pkg-deinstall
index ee2393c0a2fa..b09929c2a327 100644
--- a/japanese/marumoji-fonts/pkg-req
+++ b/japanese/marumoji-fonts/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
@@ -50,12 +37,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 "**********************************************************"
@@ -63,4 +46,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/marumoji-fonts/pkg-install b/japanese/marumoji-fonts/pkg-install
new file mode 100644
index 000000000000..b7ba26d53c05
--- /dev/null
+++ b/japanese/marumoji-fonts/pkg-install
@@ -0,0 +1,48 @@
+#!/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}
+maru14 -misc-marumoji-medium-r-normal--14-130-75-75-c-140-jisx0208.1983-0
+maru16 -misc-marumoji-medium-r-normal--16-150-75-75-c-160-jisx0208.1983-0
+maru18 -misc-marumoji-medium-r-normal--18-170-75-75-c-180-jisx0208.1983-0
+7x14rkmaru -misc-marumoji-medium-r-normal--14-130-75-75-c-70-jisx0201.1976-0
+7x14maru -misc-marumoji-medium-r-normal--14-130-75-75-c-70-iso8859-1
+8x16rkmr -misc-marumoji-medium-r-normal--16-150-75-75-c-80-jisx0201.1976-0
+8x16maru -misc-marumoji-medium-r-normal--16-150-75-75-c-80-iso8859-1
+9x18rkmr -misc-marumoji-medium-r-normal--18-170-75-75-c-90-jisx0201.1976-0
+9x18maru -misc-marumoji-medium-r-normal--18-170-75-75-c-90-iso8859-1
+-misc-marumoji-medium-r-normal--14-100-100-100-c-70-iso8859-1 -misc-marumoji-medium-r-normal--14-130-75-75-c-70-iso8859-1
+-misc-marumoji-medium-r-normal--14-100-100-100-c-70-jisx0201.1976-0 -misc-marumoji-medium-r-normal--14-130-75-75-c-70-jisx0201.1976-0
+-misc-marumoji-medium-r-normal--14-100-100-100-c-140-jisx0208.1983-0 -misc-marumoji-medium-r-normal--14-130-75-75-c-140-jisx0208.1983-0
+-misc-marumoji-medium-r-normal--16-120-100-100-c-80-iso8859-1 -misc-marumoji-medium-r-normal--16-150-75-75-c-80-iso8859-1
+-misc-marumoji-medium-r-normal--16-120-100-100-c-80-jisx0201.1976-0 -misc-marumoji-medium-r-normal--16-150-75-75-c-80-jisx0201.1976-0
+-misc-marumoji-medium-r-normal--16-120-100-100-c-160-jisx0208.1983-0 -misc-marumoji-medium-r-normal--16-150-75-75-c-160-jisx0208.1983-0
+-misc-marumoji-medium-r-normal--18-130-100-100-c-90-iso8859-1 -misc-marumoji-medium-r-normal--18-170-75-75-c-90-iso8859-1
+-misc-marumoji-medium-r-normal--18-130-100-100-c-90-jisx0201.1976-0 -misc-marumoji-medium-r-normal--18-170-75-75-c-90-jisx0201.1976-0
+-misc-marumoji-medium-r-normal--18-130-100-100-c-180-jisx0208.1983-0 -misc-marumoji-medium-r-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}
+
+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/marumoji-fonts/pkg-plist b/japanese/marumoji-fonts/pkg-plist
index 55ed66100aa3..c61d3066d103 100644
--- a/japanese/marumoji-fonts/pkg-plist
+++ b/japanese/marumoji-fonts/pkg-plist
@@ -1,4 +1,3 @@
-%%FONTSDIR%%/fonts.alias
%%FONTSDIR%%/7x14maru.pcf.gz
%%FONTSDIR%%/7x14marub.pcf.gz
%%FONTSDIR%%/7x14marubi.pcf.gz
@@ -35,9 +34,8 @@
%%FONTSDIR%%/maru18b.pcf.gz
%%FONTSDIR%%/maru18bi.pcf.gz
%%FONTSDIR%%/maru18i.pcf.gz
-share/doc/marumoji-fonts/LICENSE
-@dirrm share/doc/marumoji-fonts
-@exec cd %D/%%FONTSDIR%% ; %D/bin/mkfontdir
-@unexec cd %D/%%FONTSDIR%% ; %D/bin/mkfontdir
+%%DOCSDIR%%/LICENSE
+@exec cd %D/%%FONTSDIR%% ; mkfontdir
+@unexec cd %D/%%FONTSDIR%% ; 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
+@dirrm %%DOCSDIR%%