From piyawat@planet.mgt.psu.ac.th  Fri Jan  7 07:35:27 2005
Return-Path: <piyawat@planet.mgt.psu.ac.th>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id DA01416A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  7 Jan 2005 07:35:27 +0000 (GMT)
Received: from planet.mgt.psu.ac.th (planet.mgt.psu.ac.th [202.28.96.173])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3DD7243D2D
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  7 Jan 2005 07:35:26 +0000 (GMT)
	(envelope-from piyawat@planet.mgt.psu.ac.th)
Received: from planet.mgt.psu.ac.th (piyawat@localhost [127.0.0.1])
	by planet.mgt.psu.ac.th (8.13.1/8.13.1) with ESMTP id j077Y4hH027383;
	Fri, 7 Jan 2005 14:34:04 +0700 (ICT)
	(envelope-from piyawat@planet.mgt.psu.ac.th)
Received: (from piyawat@localhost)
	by planet.mgt.psu.ac.th (8.13.1/8.13.1/Submit) id j077Y3SP027382;
	Fri, 7 Jan 2005 14:34:03 +0700 (ICT)
	(envelope-from piyawat)
Message-Id: <200501070734.j077Y3SP027382@planet.mgt.psu.ac.th>
Date: Fri, 7 Jan 2005 14:34:03 +0700 (ICT)
From: Thawatchai Piyawat <piyawat@planet.mgt.psu.ac.th>
Reply-To: Thawatchai Piyawat <piyawat@usablelabs.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: piyawat@usablelabs.com
Subject: New port: misc/thailocale A locale for Thai in Thailand, TIS-620 character set
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         75908
>Category:       ports
>Synopsis:       New port: misc/thailocale A locale for Thai in Thailand, TIS-620 character set
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 07 07:40:24 GMT 2005
>Closed-Date:    Mon Apr 25 08:27:24 GMT 2005
>Last-Modified:  Mon Apr 25 08:27:24 GMT 2005
>Originator:     Thawatchai Piyawat
>Release:        FreeBSD 4.10-STABLE i386
>Organization:
UsableLabs
>Environment:
System: FreeBSD freebox.mshome.net 4.10-STABLE FreeBSD 4.10-STABLE #4: Fri Nov 5 22:07:06 ICT 2004 root@freebox.mshome.net:/usr/obj/usr/src/sys/FREEBOX i386


	
>Description:
A locale for Thai in Thailand, TIS-620 character set
	
>How-To-Repeat:
	
>Fix:

	

--- thailocale.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	thailocale
#	thailocale/Makefile
#	thailocale/pkg-descr
#	thailocale/pkg-plist
#	thailocale/distinfo
#
echo c - thailocale
mkdir -p thailocale > /dev/null 2>&1
echo x - thailocale/Makefile
sed 's/^X//' >thailocale/Makefile << 'END-of-thailocale/Makefile'
X# New ports collection makefile for:   thailocale
X# Date created:        5 January 2005
X# Whom:                Thawatchai Piyawat <piyawat@usablelabs.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=		thailocale
XPORTVERSION=	0.11
XCATEGORIES=		misc
XMASTER_SITES=	http://www.usablelabs.com/download/
X
XMAINTAINER=		piyawat@usablelabs.com
XCOMMENT=		A locale for Thai in Thailand, TIS-620 character set
X
X.include <bsd.port.mk>
END-of-thailocale/Makefile
echo x - thailocale/pkg-descr
sed 's/^X//' >thailocale/pkg-descr << 'END-of-thailocale/pkg-descr'
XThis software is a POSIX Thai locale definition (Thai in Thailand) for 
XFreeBSD. It defines data files for the character set TIS 620.2533. 
XOnce installed, it adds a locale 'th_TH.TIS-620' (and an alias 'th_TH') 
Xto your system.
X
XWWW: http://www.usablelabs.com/download/thailocale-0.11.tar.gz
X
XThawatchai Piyawat
Xpiyawat@usablelabs.com
END-of-thailocale/pkg-descr
echo x - thailocale/pkg-plist
sed 's/^X//' >thailocale/pkg-plist << 'END-of-thailocale/pkg-plist'
X@cwd /usr/share/locale
Xth_TH.TIS-620/LC_COLLATE
Xth_TH.TIS-620/LC_CTYPE
Xth_TH.TIS-620/LC_MESSAGES
Xth_TH.TIS-620/LC_MONETARY
Xth_TH.TIS-620/LC_NUMERIC
Xth_TH.TIS-620/LC_TIME
X@exec ln -sf %D/th_TH.TIS-620 %D/th_TH
X@dirrm th_TH.TIS-620
X@unexec rm -f %D/th_TH
END-of-thailocale/pkg-plist
echo x - thailocale/distinfo
sed 's/^X//' >thailocale/distinfo << 'END-of-thailocale/distinfo'
XMD5 (thailocale-0.11.tar.gz) = 32f909128dc7dad672e2ef3fcd22e8aa
XSIZE (thailocale-0.11.tar.gz) = 6154
END-of-thailocale/distinfo
exit
--- thailocale.shar ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: thierry 
State-Changed-When: Fri Feb 25 23:20:23 GMT 2005 
State-Changed-Why:  

- IMHO, it is not a good idea to install this locale as a port: 
. it desserves to be included in the base system; 
. ports should not write under /usr/share/locale. 

- Then I think it would be better to submit another PR in the 
"misc" category for inclusion in the base system and close 
this one. 

- If you really prefer include it as a port, it is not necessary 
to install the files under /usr/share/locale: FreeBSD respects 
the environment variable PATH_LOCALE and we could install them 
under ${PREFIX}/share/locale. In this case, please consider the 
following patch: 


diff -urN misc/thailocale.orig/Makefile misc/thailocale/Makefile 
--- misc/thailocale.orig/Makefile	Fri Feb 25 22:56:48 2005 
+++ misc/thailocale/Makefile	Fri Feb 25 23:59:41 2005 
@@ -5,12 +5,25 @@ 
# $FreeBSD$ 
# 

-PORTNAME=		thailocale 
+PORTNAME=	thailocale 
PORTVERSION=	0.11 
-CATEGORIES=		misc 
+CATEGORIES=	misc 
MASTER_SITES=	http://www.usablelabs.com/download/ 

-MAINTAINER=		piyawat@usablelabs.com 
-COMMENT=		A locale for Thai in Thailand, TIS-620 character set 
+MAINTAINER=	piyawat@usablelabs.com 
+COMMENT=	A locale for Thai in Thailand, TIS-620 character set 
+ 
+USE_REINPLACE=	yes 
+ 
+PKGMESSAGE=	${WRKDIR}/pkg-message 
+SUB_FILES=	pkg-message 
+ 
+pre-configure: 
+	${REINPLACE_CMD} -e "s|/usr/share|${PREFIX}/share|" ${WRKSRC}/Makefile 
+ 
+post-install: 
+	@${ECHO_MSG} 
+	@${CAT} ${PKGMESSAGE} 
+	@${ECHO_MSG} 

.include <bsd.port.mk> 
diff -urN misc/thailocale.orig/files/patch-Makefile misc/thailocale/files/patch-Makefile 
--- misc/thailocale.orig/files/patch-Makefile	Thu Jan  1 01:00:00 1970 
+++ misc/thailocale/files/patch-Makefile	Fri Feb 25 23:21:24 2005 
@@ -0,0 +1,25 @@ 
+--- Makefile.orig	Thu Jan  6 06:26:30 2005 
++++ Makefile	Fri Feb 25 23:20:52 2005 
+@@ -45,8 +45,8 @@ 
+ .endif 
+  
+ install: lc_all check 
+-	mkdir ${PATH}	 
+-	cp LC_CTYPE LC_COLLATE LC_MONETARY LC_NUMERIC LC_TIME LC_MESSAGES ${PATH} 
++	mkdir -p ${PATH} 
++	install -m 444 LC_CTYPE LC_COLLATE LC_MONETARY LC_NUMERIC LC_TIME LC_MESSAGES ${PATH} 
+ 	ln -sf ${PATH} ${LPATH} 
+ 	@echo 
+ 	@echo "Installation successfully completed" 
+@@ -67,5 +67,10 @@ 
+ 	@echo 
+  
+ clean: 
+-	-rm LC_CTYPE LC_COLLATE 
++.if exists(LC_CTYPE) 
++	rm LC_CTYPE 
++.endif 
++.if exists(LC_COLLATE) 
++	rm LC_COLLATE 
++.endif 
+  
diff -urN misc/thailocale.orig/files/pkg-message.in misc/thailocale/files/pkg-message.in 
--- misc/thailocale.orig/files/pkg-message.in	Thu Jan  1 01:00:00 1970 
+++ misc/thailocale/files/pkg-message.in	Sat Feb 26 00:02:16 2005 
@@ -0,0 +1,4 @@ 
+Set the variable PATH_LOCALE to %%PREFIX%%/share/locale and export it, 
+e.g.: 
+ 
+export PATH_LOCALE=%%PREFIX%%/share/locale 
diff -urN misc/thailocale.orig/pkg-plist misc/thailocale/pkg-plist 
--- misc/thailocale.orig/pkg-plist	Fri Feb 25 22:56:48 2005 
+++ misc/thailocale/pkg-plist	Fri Feb 25 23:26:17 2005 
@@ -1,10 +1,9 @@ 
-@cwd /usr/share/locale 
-th_TH.TIS-620/LC_COLLATE 
-th_TH.TIS-620/LC_CTYPE 
-th_TH.TIS-620/LC_MESSAGES 
-th_TH.TIS-620/LC_MONETARY 
-th_TH.TIS-620/LC_NUMERIC 
-th_TH.TIS-620/LC_TIME 
-@exec ln -sf %D/th_TH.TIS-620 %D/th_TH 
-@dirrm th_TH.TIS-620 
-@unexec rm -f %D/th_TH 
+share/locale/th_TH.TIS-620/LC_COLLATE 
+share/locale/th_TH.TIS-620/LC_CTYPE 
+share/locale/th_TH.TIS-620/LC_MESSAGES 
+share/locale/th_TH.TIS-620/LC_MONETARY 
+share/locale/th_TH.TIS-620/LC_NUMERIC 
+share/locale/th_TH.TIS-620/LC_TIME 
+@exec ln -sf %D/share/locale/th_TH.TIS-620 %D/share/locale/th_TH 
+@dirrm share/locale/th_TH.TIS-620 
+@unexec rm -f %D/share/locale/th_TH 

http://www.freebsd.org/cgi/query-pr.cgi?pr=75908 
State-Changed-From-To: feedback->closed 
State-Changed-By: edwin 
State-Changed-When: Mon Apr 25 08:27:09 GMT 2005 
State-Changed-Why:  
Commited with suggested patches. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=75908 
>Unformatted:
