From sada@rr.iij4u.or.jp  Fri Sep 11 07:04:45 1998
Received: from thalamus.my.domain (h221.p060.iij4u.or.jp [210.130.60.221])
          by hub.freebsd.org (8.8.8/8.8.8) with SMTP id HAA04825
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 11 Sep 1998 07:04:43 -0700 (PDT)
          (envelope-from sada@rr.iij4u.or.jp)
Received: (qmail 20905 invoked by uid 1000); 11 Sep 1998 23:04:32 +0900
Message-Id: <19980911140432.20904.qmail@sada.e-mail.ne.jp>
Date: 11 Sep 1998 23:04:32 +0900
From: sada@e-mail.ne.jp
Reply-To: sada@e-mail.ne.jp
To: FreeBSD-gnats-submit@freebsd.org, horikawa@jp.FreeBSD.org
Subject: japanese/man-doc: building on-demand PLIST
X-Send-Pr-Version: 3.2

>Number:         7897
>Category:       ports
>Synopsis:       japanese/man-doc: building on-demand PLIST
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 11 07:10:01 PDT 1998
>Closed-Date:    Thu Oct 1 09:47:26 PDT 1998
>Last-Modified:  Thu Oct  1 09:47:53 PDT 1998
>Originator:     SADA Kenji
>Release:        FreeBSD 2.2.7-RELEASE i386
>Organization:
Nagoya.Aichi.Japan
>Environment:

	FreeBSD 2.2.7-RELEASE i386

>Description:

	Recent japanese/man-doc port has a fixed PLIST,
	and build package would lost some newly added man page files.
	If you create a PLIST at port build time,
	a compete ja-man-doc package could be build.

>How-To-Repeat:
>Fix:

	Apply the patch below.
	'pkg/PLIST' is no more necessary, please remove.

--- Makefile.orig	Mon Apr 27 07:05:15 1998
+++ Makefile	Fri Sep 11 20:29:38 1998
@@ -17,8 +17,8 @@
 NO_CHECKSUM=	yes
 NO_MTREE=	yes
 WRKSRC=		${WRKDIR}/man
+PLIST=		${WRKDIR}/PLIST
 
-LANGNAME=	ja
 MANSECS=	1 5 8
 JAMANDIR?=	/usr/opt/doc/ja/man
 
@@ -37,6 +37,19 @@
 		${CP} -R ${JAMANDIR}/man${sec} ${WRKSRC}/ ; \
 	fi
 .endfor
+
+post-build:
+	@${RM} -f ${PLIST}
+.for sec in ${MANSECS}
+	@if [ -d ${WRKSRC}/man${sec} ]; then \
+		cd ${WRKSRC}; \
+		find man${sec} -name '*.gz' \
+		| ${SED} -e 's;^.*$$;share/man/ja/&;' \
+		| sort >>${PLIST}; \
+	fi
+.endfor
+	@${ECHO} "@exec ln -sf %D/share/man/ja %D/share/man/ja_JP.EUC" >>${PLIST}
+	@${ECHO} "@unexec ${RM} -f %D/share/man/ja_JP.EUC" >>${PLIST}
 
 pre-install:
 .for sec in ${MANSECS}
>Release-Note:
>Audit-Trail:

From: sada@e-mail.ne.jp
To: freebsd-gnats-submit@freebsd.org
Cc:  Subject: Re: ports/7897: japanese/man-doc: building on-demand PLIST
Date: 15 Sep 1998 05:15:54 +0900

   The patch of ports/7897 couldn't perform about hard links of
 man page files.
   I have updated the patch, which had been reviewed by
 the maintainer of the port, Mr.Horikawa.
 
   Please remove pkg/PLIST from original skeleton > Committer
 
 --
 diff -urN man-doc.orig/Makefile man-doc/Makefile
 --- man-doc.orig/Makefile	Mon Apr 27 07:05:15 1998
 +++ man-doc/Makefile	Mon Sep 14 09:17:50 1998
 @@ -17,8 +17,8 @@
  NO_CHECKSUM=	yes
  NO_MTREE=	yes
  WRKSRC=		${WRKDIR}/man
 +PLIST=		${WRKDIR}/PLIST
  
 -LANGNAME=	ja
  MANSECS=	1 5 8
  JAMANDIR?=	/usr/opt/doc/ja/man
  
 @@ -35,8 +35,31 @@
  .for sec in ${MANSECS}
  	@if [ -d ${JAMANDIR}/man${sec} ]; then \
  		${CP} -R ${JAMANDIR}/man${sec} ${WRKSRC}/ ; \
 +		${ECHO} >>${WRKSRC}/man${sec}/Makefile; \
 +		${ECHO} pages-list: >>${WRKSRC}/man${sec}/Makefile; \
 +		${ECHO} "	@\$${ECHO} \$${MAN${sec}} \$${MLINKS}" \
 +			>>${WRKSRC}/man${sec}/Makefile; \
  	fi
  .endfor
 +
 +post-build:
 +	@${RM} -f ${PLIST}
 +	@for sec in ${MANSECS}; do \
 +	 if [ -d ${WRKSRC}/man$${sec} ]; then \
 +		cd ${WRKSRC}/man$${sec}; \
 +		list=`${MAKE} pages-list`; \
 +		set `${ECHO} $$list " "|${SED} 's/\.\([^.]*\) /.\1 \1 /g'`; \
 +		while : ; do \
 +			case $$# in \
 +				0) break;; \
 +				[1]) ${ECHO} "can not happen"; break;; \
 +			esac; \
 +			${ECHO} share/man/ja/man$$2/$$1.gz; shift 2; \
 +		done; \
 +	 fi; \
 +	done|sort|uniq >>${PLIST}
 +	@${ECHO} "@exec ln -sf %D/share/man/ja %D/share/man/ja_JP.EUC" >>${PLIST}
 +	@${ECHO} "@unexec ${RM} -f %D/share/man/ja_JP.EUC" >>${PLIST}
  
  pre-install:
  .for sec in ${MANSECS}
State-Changed-From-To: open->closed 
State-Changed-By: kuriyama 
State-Changed-When: Thu Oct 1 09:47:26 PDT 1998 
State-Changed-Why:  
Committed.  Thanks! 
>Unformatted:
