aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2020-07-25 16:44:06 +0200
committerRasmus Thomsen <oss@cogitri.dev>2020-07-29 22:01:34 +0000
commit2dc905dc773cbf7083dad72b33affa8f92f6e6fb (patch)
tree008c3b48226537480c6b83ec3c711667b6050b2b
parentac523a31b6968d6ca5ad45c784dd2997ab34b2ae (diff)
downloadaports-2dc905dc773cbf7083dad72b33affa8f92f6e6fb.tar.gz
aports-2dc905dc773cbf7083dad72b33affa8f92f6e6fb.tar.bz2
aports-2dc905dc773cbf7083dad72b33affa8f92f6e6fb.tar.xz
community/musl-locales: make locale -a list all locales that are supported by glibc
This is required so users of e.g. GNOME/Phosh can select all possible locales for their UIs. Strings from the c stdlib will be in English either way.
-rw-r--r--community/musl-locales/APKBUILD8
-rw-r--r--community/musl-locales/add-all-available-locales.patch24
2 files changed, 29 insertions, 3 deletions
diff --git a/community/musl-locales/APKBUILD b/community/musl-locales/APKBUILD
index 315c58ba1e..951ee7c21a 100644
--- a/community/musl-locales/APKBUILD
+++ b/community/musl-locales/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=musl-locales
pkgver=0_git20200319
-pkgrel=0
+pkgrel=1
_commit="c48b979a4ed2a133e2838753bb8f567c3e0da5a1"
arch="all"
url="https://gitlab.com/rilian-la-te/musl-locales"
@@ -11,7 +11,8 @@ license="LGPL-3.0-only"
options="!check" # No test suite
makedepends="cmake gettext-tiny-dev"
subpackages="$pkgname-lang"
-source="$pkgname-$pkgver.tar.gz::https://gitlab.com/api/v4/projects/rilian-la-te%2Fmusl-locales/repository/archive?sha=$_commit"
+source="$pkgname-$pkgver.tar.gz::https://gitlab.com/api/v4/projects/rilian-la-te%2Fmusl-locales/repository/archive?sha=$_commit
+ add-all-available-locales.patch"
builddir="$srcdir/$pkgname-$_commit-$_commit"
build() {
@@ -35,4 +36,5 @@ lang() {
license="MIT"
}
-sha512sums="e711b42b5d6137aae1d3de0d8183b2c7496189f20f74fd29c7d3860516b4fc5de7144bf49fae8b241baaa1787e1349318ea1bf245f3c5c8202e2b4441bb03ab2 musl-locales-0_git20200319.tar.gz"
+sha512sums="e711b42b5d6137aae1d3de0d8183b2c7496189f20f74fd29c7d3860516b4fc5de7144bf49fae8b241baaa1787e1349318ea1bf245f3c5c8202e2b4441bb03ab2 musl-locales-0_git20200319.tar.gz
+dac294f9e6207686b8dcbedfc71db4e7e8c648ca6e11992dd6b606e0fcefc44d15db192753f8a6c902941a5aa9540e54fac2747bfa59058b087c46c49ac314de add-all-available-locales.patch"
diff --git a/community/musl-locales/add-all-available-locales.patch b/community/musl-locales/add-all-available-locales.patch
new file mode 100644
index 0000000000..fff08c9235
--- /dev/null
+++ b/community/musl-locales/add-all-available-locales.patch
@@ -0,0 +1,24 @@
+Right now we patch e.g. gnome-desktop to list all languages. Musl itself doesn't support
+this localization (so strings from the c lib will always be in English), but at least
+this way users can get translated UIs
+diff --git a/locale.c b/locale.c
+index ede426d..7ae9e67 100644
+--- a/locale.c
++++ b/locale.c
+@@ -107,15 +107,7 @@ static void list_locale()
+ const char *locpath = getenv("MUSL_LOCPATH");
+ printf("C\n");
+ printf("C.UTF-8\n");
+- if(locpath != NULL)
+- {
+- DIR *dir = opendir(locpath);
+- struct dirent *pDir;
+- while ((pDir = readdir(dir)) != NULL){
+- if (strcmp(pDir->d_name,".") && strcmp(pDir->d_name,".."))
+- printf("%s\n",pDir->d_name);
+- }
+- }
++ printf("a_DJ\naa_ER\naa_ET\naf_ZA\nagr_PE\nak_GH\nam_ET\nan_ES\nanp_IN\nar_AE\nar_BH\nar_DZ\nar_EG\nar_IN\nar_IQ\nar_JO\nar_KW\nar_LB\nar_LY\nar_MA\nar_OM\nar_QA\nar_SA\nar_SD\nar_SS\nar_SY\nar_TN\nar_YE\nas_IN\nast_ES\nayc_PE\naz_AZ\naz_IR\nbe_BY\nbem_ZM\nber_DZ\nber_MA\nbg_BG\nbhb_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