ports/75908: New port: misc/thailocale A locale for Thai in Thailand, TIS-620 character set
Thierry Thomas
thierry at FreeBSD.org
Fri Feb 25 23:33:10 UTC 2005
Synopsis: New port: misc/thailocale A locale for Thai in Thailand, TIS-620 character set
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 at usablelabs.com
-COMMENT= A locale for Thai in Thailand, TIS-620 character set
+MAINTAINER= piyawat at 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 @@
- at 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
- at exec ln -sf %D/th_TH.TIS-620 %D/th_TH
- at dirrm th_TH.TIS-620
- at 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
+ at exec ln -sf %D/share/locale/th_TH.TIS-620 %D/share/locale/th_TH
+ at dirrm share/locale/th_TH.TIS-620
+ at unexec rm -f %D/share/locale/th_TH
http://www.freebsd.org/cgi/query-pr.cgi?pr=75908
More information about the freebsd-ports-bugs
mailing list