Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Feb 2014 08:52:17 +0000 (UTC)
From:      Antoine Brodin <antoine@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r344329 - in head/japanese/k10: . files
Message-ID:  <201402150852.s1F8qHiD011601@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: antoine
Date: Sat Feb 15 08:52:16 2014
New Revision: 344329
URL: http://svnweb.freebsd.org/changeset/ports/344329
QAT: https://qat.redports.org/buildarchive/r344329/

Log:
  - Stage support
  - Convert obsolete pkg-req to pkg-install/pkg-deinstall

Added:
  head/japanese/k10/pkg-deinstall
     - copied, changed from r344328, head/japanese/k10/pkg-req
  head/japanese/k10/pkg-install
     - copied, changed from r344328, head/japanese/k10/pkg-req
Deleted:
  head/japanese/k10/pkg-req
Modified:
  head/japanese/k10/Makefile
  head/japanese/k10/files/Makefile.in
  head/japanese/k10/pkg-plist

Modified: head/japanese/k10/Makefile
==============================================================================
--- head/japanese/k10/Makefile	Sat Feb 15 08:05:55 2014	(r344328)
+++ head/japanese/k10/Makefile	Sat Feb 15 08:52:16 2014	(r344329)
@@ -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-fo
 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>

Modified: head/japanese/k10/files/Makefile.in
==============================================================================
--- head/japanese/k10/files/Makefile.in	Sat Feb 15 08:05:55 2014	(r344328)
+++ head/japanese/k10/files/Makefile.in	Sat Feb 15 08:52:16 2014	(r344329)
@@ -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}

Copied and modified: head/japanese/k10/pkg-deinstall (from r344328, head/japanese/k10/pkg-req)
==============================================================================
--- head/japanese/k10/pkg-req	Sat Feb 15 08:05:55 2014	(r344328, copy source)
+++ head/japanese/k10/pkg-deinstall	Sat Feb 15 08:52:16 2014	(r344329)
@@ -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 
 echo "to enable this update."
 echo "**********************************************************"
 
-exit 0;
+exit 0

Copied and modified: head/japanese/k10/pkg-install (from r344328, head/japanese/k10/pkg-req)
==============================================================================
--- head/japanese/k10/pkg-req	Sat Feb 15 08:05:55 2014	(r344328, copy source)
+++ head/japanese/k10/pkg-install	Sat Feb 15 08:52:16 2014	(r344329)
@@ -1,23 +1,10 @@
 #!/bin/sh
 
-if [ "x$1" = "x" ]; then
-	exit 1;
+if [ "$2" != "POST-INSTALL" ]; 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,7 @@ 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 ; cat ${TMPFILE}) > fonts.alias
 rm -f fonts.alias.orig ${TMPFILE}
 
 echo "**********************************************************"
@@ -57,4 +39,4 @@ echo "You should restart X server or do 
 echo "to enable this update."
 echo "**********************************************************"
 
-exit 0;
+exit 0

Modified: head/japanese/k10/pkg-plist
==============================================================================
--- head/japanese/k10/pkg-plist	Sat Feb 15 08:05:55 2014	(r344328)
+++ head/japanese/k10/pkg-plist	Sat Feb 15 08:52:16 2014	(r344329)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402150852.s1F8qHiD011601>