Bug 75908 - New port: misc/thailocale A locale for Thai in Thailand, TIS-620 character set
Summary: New port: misc/thailocale A locale for Thai in Thailand, TIS-620 character set
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-07 07:40 UTC by Thawatchai Piyawat
Modified: 2005-04-25 09:27 UTC (History)
1 user (show)

See Also:


Attachments
thailocale.shar (2.01 KB, text/plain)
2005-01-07 07:40 UTC, Thawatchai Piyawat
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thawatchai Piyawat 2005-01-07 07:40:24 UTC
A locale for Thai in Thailand, TIS-620 character set
Comment 1 Thierry Thomas freebsd_committer freebsd_triage 2005-02-25 23:20:23 UTC
State Changed
From-To: open->feedback


- 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
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2005-04-25 09:27:09 UTC
State Changed
From-To: feedback->closed

Commited with suggested patches.