Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Feb 2014 09:00:50 +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: r344332 - head/japanese/elisa8x8
Message-ID:  <201402150900.s1F90oOx015332@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: antoine
Date: Sat Feb 15 09:00:50 2014
New Revision: 344332
URL: http://svnweb.freebsd.org/changeset/ports/344332
QAT: https://qat.redports.org/buildarchive/r344332/

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

Added:
  head/japanese/elisa8x8/pkg-deinstall
     - copied, changed from r344328, head/japanese/elisa8x8/pkg-req
  head/japanese/elisa8x8/pkg-install
     - copied, changed from r344328, head/japanese/elisa8x8/pkg-req
Deleted:
  head/japanese/elisa8x8/pkg-req
Modified:
  head/japanese/elisa8x8/Makefile
  head/japanese/elisa8x8/pkg-plist

Modified: head/japanese/elisa8x8/Makefile
==============================================================================
--- head/japanese/elisa8x8/Makefile	Sat Feb 15 09:00:19 2014	(r344331)
+++ head/japanese/elisa8x8/Makefile	Sat Feb 15 09:00:50 2014	(r344332)
@@ -3,7 +3,7 @@
 
 PORTNAME=	elisa8x8
 PORTVERSION=	1.0
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	japanese x11-fonts
 MASTER_SITES=	http://www.bsdbbq.org/~toshi/distfiles/
 DISTNAME=	elisat10
@@ -15,9 +15,6 @@ BUILD_DEPENDS=	bdftopcf:${PORTSDIR}/x11-
 		mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir \
 		mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale
 
-NO_STAGE=	yes
-.include <bsd.port.pre.mk>
-
 NO_WRKSUBDIR=	yes
 
 BDFTOPCF_CMD=	${PREFIX}/bin/bdftopcf
@@ -27,6 +24,8 @@ INSTALLDIR=	${PREFIX}/${FONTSDIR}
 MYPORTDOCS=	elisa100.doc elisat10.doc elisat10.html
 PLIST_SUB=	FONTSDIR=${FONTSDIR}
 
+OPTIONS_DEFINE=	DOCS
+
 do-build:
 	@(cd ${WRKDIR}; \
 	${BDFTOPCF_CMD} elisat10.bdf   | ${GZIP_CMD} -c > elisat10.pcf.gz ;\
@@ -34,23 +33,16 @@ do-build:
 	${BDFTOPCF_CMD} jpnhn4-iso.bdf | ${GZIP_CMD} -c > jpnhn4-iso.pcf.gz ;\
 	)
 
-pre-install:
-	@${SETENV} PKG_PREFIX=${PREFIX} \
-		${SH} ${PKGREQ} ${PKGNAME} INSTALL
-
 do-install:
-	@${MKDIR} ${INSTALLDIR}
-	@(cd ${WRKSRC} ;\
-	${INSTALL_DATA} elisat10.pcf.gz ${INSTALLDIR} ;\
-	${INSTALL_DATA} jpnhn4-jis.pcf.gz ${INSTALLDIR} ;\
-	${INSTALL_DATA} jpnhn4-iso.pcf.gz ${INSTALLDIR} ;\
+	@${MKDIR} ${STAGEDIR}${INSTALLDIR}
+	(cd ${WRKSRC} ;\
+	${INSTALL_DATA} elisat10.pcf.gz ${STAGEDIR}${INSTALLDIR} ;\
+	${INSTALL_DATA} jpnhn4-jis.pcf.gz ${STAGEDIR}${INSTALLDIR} ;\
+	${INSTALL_DATA} jpnhn4-iso.pcf.gz ${STAGEDIR}${INSTALLDIR} ;\
 	)
 
 post-install:
-	@(cd ${PREFIX}/${FONTSDIR} ; mkfontdir)
-.if !defined(NOPORTDOCS)
-	@${MKDIR} ${DOCSDIR}
-	@cd ${WRKSRC} && ${INSTALL_DATA} ${MYPORTDOCS} ${DOCSDIR}
-.endif
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${MYPORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Copied and modified: head/japanese/elisa8x8/pkg-deinstall (from r344328, head/japanese/elisa8x8/pkg-req)
==============================================================================
--- head/japanese/elisa8x8/pkg-req	Sat Feb 15 08:05:55 2014	(r344328, copy source)
+++ head/japanese/elisa8x8/pkg-deinstall	Sat Feb 15 09:00:50 2014	(r344332)
@@ -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
@@ -36,12 +23,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 "**********************************************************"
@@ -49,4 +32,4 @@ echo "You should restart X server or do 
 echo "to enable this update."
 echo "**********************************************************"
 
-exit 0;
+exit 0

Copied and modified: head/japanese/elisa8x8/pkg-install (from r344328, head/japanese/elisa8x8/pkg-req)
==============================================================================
--- head/japanese/elisa8x8/pkg-req	Sat Feb 15 08:05:55 2014	(r344328, copy source)
+++ head/japanese/elisa8x8/pkg-install	Sat Feb 15 09:00:50 2014	(r344332)
@@ -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
@@ -36,12 +23,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 "**********************************************************"
@@ -49,4 +31,4 @@ echo "You should restart X server or do 
 echo "to enable this update."
 echo "**********************************************************"
 
-exit 0;
+exit 0

Modified: head/japanese/elisa8x8/pkg-plist
==============================================================================
--- head/japanese/elisa8x8/pkg-plist	Sat Feb 15 09:00:19 2014	(r344331)
+++ head/japanese/elisa8x8/pkg-plist	Sat Feb 15 09:00:50 2014	(r344332)
@@ -1,4 +1,3 @@
-%%FONTSDIR%%/fonts.alias
 %%FONTSDIR%%/elisat10.pcf.gz
 %%FONTSDIR%%/jpnhn4-jis.pcf.gz
 %%FONTSDIR%%/jpnhn4-iso.pcf.gz
@@ -8,5 +7,4 @@
 @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
 %%PORTDOCS%%@dirrm %%DOCSDIR%%



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