share/ctype: Improved makefile allows symlinks to be removed
authorJohn Marino <draco@marino.st>
Sun, 13 Sep 2015 15:56:35 +0000 (17:56 +0200)
committerJohn Marino <draco@marino.st>
Sun, 13 Sep 2015 16:01:10 +0000 (18:01 +0200)
The makefile, which is generated, now can generate all LC_CTYPE
output files without the use of symlinks and still manages to avoid
source file duplication.  The symlinks might cause issues for
repositories cloned to a MS Windows system.

Requested-by: bapt@FreeBSD.org

17 files changed:
share/ctypedef/Makefile
share/ctypedef/en_US.ISO8859-1.src [deleted symlink]
share/ctypedef/en_US.US-ASCII.src [deleted symlink]
share/ctypedef/ja_JP.eucJP.src [deleted symlink]
share/ctypedef/lv_LV.ISO8859-13.src [deleted symlink]
share/ctypedef/ru_RU.CP1251.src [deleted symlink]
share/ctypedef/ru_RU.CP866.src [deleted symlink]
share/ctypedef/ru_RU.ISO8859-5.src [deleted symlink]
share/ctypedef/ru_RU.KOI8-R.src [deleted symlink]
share/ctypedef/sr_Latn_RS.ISO8859-2.src [deleted symlink]
share/ctypedef/tr_TR.ISO8859-9.src [deleted symlink]
share/ctypedef/uk_UA.ISO8859-5.src [deleted symlink]
share/ctypedef/uk_UA.KOI8-U.src [deleted symlink]
share/ctypedef/zh_Hans_CN.GB2312.src [deleted symlink]
share/ctypedef/zh_Hans_CN.GBK.src [deleted symlink]
share/ctypedef/zh_Hans_CN.eucCN.src [deleted symlink]
share/ctypedef/zh_Hant_TW.Big5.src [deleted symlink]

index ad56632..fac59ea 100644 (file)
@@ -182,4 +182,28 @@ SYMLINKS+= ../${f:C/:.*$//}/${FILESNAME} ${LOCALEDIR}/${f:C/^.*://}
 FILESDIR_${f}.LC_CTYPE= ${LOCALEDIR}/${f}
 .endfor
 
+SYMPAIRS+=     be_BY.CP1131.src:ru_RU.CP1251.src
+SYMPAIRS+=     be_BY.CP1131.src:ru_RU.CP866.src
+SYMPAIRS+=     be_BY.CP1131.src:ru_RU.ISO8859-5.src
+SYMPAIRS+=     be_BY.CP1131.src:ru_RU.KOI8-R.src
+SYMPAIRS+=     uk_UA.CP1251.src:uk_UA.ISO8859-5.src
+SYMPAIRS+=     uk_UA.CP1251.src:uk_UA.KOI8-U.src
+SYMPAIRS+=     zh_Hans_CN.GB18030.src:zh_Hans_CN.GB2312.src
+SYMPAIRS+=     zh_Hans_CN.GB18030.src:zh_Hans_CN.GBK.src
+SYMPAIRS+=     zh_Hans_CN.GB18030.src:zh_Hans_CN.eucCN.src
+SYMPAIRS+=     zh_Hant_HK.Big5HKSCS.src:zh_Hant_TW.Big5.src
+SYMPAIRS+=     en_GB.ISO8859-15.src:en_US.ISO8859-1.src
+SYMPAIRS+=     en_GB.ISO8859-15.src:en_US.US-ASCII.src
+SYMPAIRS+=     en_GB.ISO8859-15.src:lv_LV.ISO8859-13.src
+SYMPAIRS+=     en_GB.ISO8859-15.src:sr_Latn_RS.ISO8859-2.src
+SYMPAIRS+=     en_GB.ISO8859-15.src:tr_TR.ISO8859-9.src
+SYMPAIRS+=     ja_JP.SJIS.src:ja_JP.eucJP.src
+
+.for PAIR in ${SYMPAIRS}
+${PAIR:C/^.*://:S/src$/LC_CTYPE/}: ${PAIR:C/:.*//}
+       localedef -D -U -c -w ${MAPLOC}/widths.txt \
+       -f ${MAPLOC}/map.${.TARGET:T:R:C/^.*\.//} \
+       -i ${.ALLSRC} ${.OBJDIR}/${.TARGET:T:R}  || true
+.endfor
+
 .include <bsd.prog.mk>
diff --git a/share/ctypedef/en_US.ISO8859-1.src b/share/ctypedef/en_US.ISO8859-1.src
deleted file mode 120000 (symlink)
index 911a262..0000000
+++ /dev/null
@@ -1 +0,0 @@
-en_GB.ISO8859-15.src
\ No newline at end of file
diff --git a/share/ctypedef/en_US.US-ASCII.src b/share/ctypedef/en_US.US-ASCII.src
deleted file mode 120000 (symlink)
index 911a262..0000000
+++ /dev/null
@@ -1 +0,0 @@
-en_GB.ISO8859-15.src
\ No newline at end of file
diff --git a/share/ctypedef/ja_JP.eucJP.src b/share/ctypedef/ja_JP.eucJP.src
deleted file mode 120000 (symlink)
index fd665f7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ja_JP.SJIS.src
\ No newline at end of file
diff --git a/share/ctypedef/lv_LV.ISO8859-13.src b/share/ctypedef/lv_LV.ISO8859-13.src
deleted file mode 120000 (symlink)
index 911a262..0000000
+++ /dev/null
@@ -1 +0,0 @@
-en_GB.ISO8859-15.src
\ No newline at end of file
diff --git a/share/ctypedef/ru_RU.CP1251.src b/share/ctypedef/ru_RU.CP1251.src
deleted file mode 120000 (symlink)
index 74c5424..0000000
+++ /dev/null
@@ -1 +0,0 @@
-be_BY.CP1131.src
\ No newline at end of file
diff --git a/share/ctypedef/ru_RU.CP866.src b/share/ctypedef/ru_RU.CP866.src
deleted file mode 120000 (symlink)
index 74c5424..0000000
+++ /dev/null
@@ -1 +0,0 @@
-be_BY.CP1131.src
\ No newline at end of file
diff --git a/share/ctypedef/ru_RU.ISO8859-5.src b/share/ctypedef/ru_RU.ISO8859-5.src
deleted file mode 120000 (symlink)
index 74c5424..0000000
+++ /dev/null
@@ -1 +0,0 @@
-be_BY.CP1131.src
\ No newline at end of file
diff --git a/share/ctypedef/ru_RU.KOI8-R.src b/share/ctypedef/ru_RU.KOI8-R.src
deleted file mode 120000 (symlink)
index 74c5424..0000000
+++ /dev/null
@@ -1 +0,0 @@
-be_BY.CP1131.src
\ No newline at end of file
diff --git a/share/ctypedef/sr_Latn_RS.ISO8859-2.src b/share/ctypedef/sr_Latn_RS.ISO8859-2.src
deleted file mode 120000 (symlink)
index 911a262..0000000
+++ /dev/null
@@ -1 +0,0 @@
-en_GB.ISO8859-15.src
\ No newline at end of file
diff --git a/share/ctypedef/tr_TR.ISO8859-9.src b/share/ctypedef/tr_TR.ISO8859-9.src
deleted file mode 120000 (symlink)
index 911a262..0000000
+++ /dev/null
@@ -1 +0,0 @@
-en_GB.ISO8859-15.src
\ No newline at end of file
diff --git a/share/ctypedef/uk_UA.ISO8859-5.src b/share/ctypedef/uk_UA.ISO8859-5.src
deleted file mode 120000 (symlink)
index c8c7ddb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-uk_UA.CP1251.src
\ No newline at end of file
diff --git a/share/ctypedef/uk_UA.KOI8-U.src b/share/ctypedef/uk_UA.KOI8-U.src
deleted file mode 120000 (symlink)
index c8c7ddb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-uk_UA.CP1251.src
\ No newline at end of file
diff --git a/share/ctypedef/zh_Hans_CN.GB2312.src b/share/ctypedef/zh_Hans_CN.GB2312.src
deleted file mode 120000 (symlink)
index c7c81cc..0000000
+++ /dev/null
@@ -1 +0,0 @@
-zh_Hans_CN.GB18030.src
\ No newline at end of file
diff --git a/share/ctypedef/zh_Hans_CN.GBK.src b/share/ctypedef/zh_Hans_CN.GBK.src
deleted file mode 120000 (symlink)
index c7c81cc..0000000
+++ /dev/null
@@ -1 +0,0 @@
-zh_Hans_CN.GB18030.src
\ No newline at end of file
diff --git a/share/ctypedef/zh_Hans_CN.eucCN.src b/share/ctypedef/zh_Hans_CN.eucCN.src
deleted file mode 120000 (symlink)
index c7c81cc..0000000
+++ /dev/null
@@ -1 +0,0 @@
-zh_Hans_CN.GB18030.src
\ No newline at end of file
diff --git a/share/ctypedef/zh_Hant_TW.Big5.src b/share/ctypedef/zh_Hant_TW.Big5.src
deleted file mode 120000 (symlink)
index fe229e3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-zh_Hant_HK.Big5HKSCS.src
\ No newline at end of file