pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/gnustep-base Work around an issue regarding GNUs...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e8cbe125892d
branches:  trunk
changeset: 770291:e8cbe125892d
user:      pho <pho%pkgsrc.org@localhost>
date:      Sun Nov 28 18:38:22 2021 +0000

description:
Work around an issue regarding GNUstep and locale

diffstat:

 devel/gnustep-base/Makefile                             |   5 +-
 devel/gnustep-base/distinfo                             |   3 +-
 devel/gnustep-base/patches/patch-Source_NSProcessInfo.m |  30 +++++++++++++++++
 3 files changed, 34 insertions(+), 4 deletions(-)

diffs (62 lines):

diff -r 3afef5e2f1e4 -r e8cbe125892d devel/gnustep-base/Makefile
--- a/devel/gnustep-base/Makefile       Sun Nov 28 18:26:13 2021 +0000
+++ b/devel/gnustep-base/Makefile       Sun Nov 28 18:38:22 2021 +0000
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.95 2021/09/29 19:00:31 adam Exp $
+# $NetBSD: Makefile,v 1.96 2021/11/28 18:38:22 pho Exp $
 
 DISTNAME=      gnustep-base-1.27.0
-#PKGREVISION=  1
-PKGREVISION=   6
+PKGREVISION=   7
 CATEGORIES=    devel gnustep
 MASTER_SITES=  ${MASTER_SITE_GNUSTEP:=core/}
 
diff -r 3afef5e2f1e4 -r e8cbe125892d devel/gnustep-base/distinfo
--- a/devel/gnustep-base/distinfo       Sun Nov 28 18:26:13 2021 +0000
+++ b/devel/gnustep-base/distinfo       Sun Nov 28 18:38:22 2021 +0000
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.37 2021/10/26 10:14:43 nia Exp $
+$NetBSD: distinfo,v 1.38 2021/11/28 18:38:22 pho Exp $
 
 BLAKE2s (gnustep-base-1.27.0.tar.gz) = 940cd837efce21f2b78f2167808fa0371d235075bc8ae645a1b65089a18d9acc
 SHA512 (gnustep-base-1.27.0.tar.gz) = bbdf45379dbb684f6bdb507b645e0f611cefb05caadff1bf620c2e85f104396cf91782bcce05ff2173078603b76b8a0ba2ea3b71bc56a84c220310910dbcb705
 Size (gnustep-base-1.27.0.tar.gz) = 4141163 bytes
+SHA1 (patch-Source_NSProcessInfo.m) = 398c03b9b4a6a97bcd0c13215d444cc4a94ecb19
 SHA1 (patch-Source_common.h) = ed8a68a023b01b1562793678b7ddbd641e3a40d8
 SHA1 (patch-aa) = 5b2b61058fcc8f4c8073598d61cccb3c23429a7c
 SHA1 (patch-ab) = 1eb9746ae2cb8ba9c02d6131c4d797b210318851
diff -r 3afef5e2f1e4 -r e8cbe125892d devel/gnustep-base/patches/patch-Source_NSProcessInfo.m
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gnustep-base/patches/patch-Source_NSProcessInfo.m   Sun Nov 28 18:38:22 2021 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-Source_NSProcessInfo.m,v 1.1 2021/11/28 18:38:22 pho Exp $
+
+Work around an issue regarding GNUstep and locale. GNUstep hijacks
+application main() with its own function to setup some global
+variables before the actual main() is called. _gnu_process_args(),
+called by the fake main(), eventually calls nl_langinfo(CODESET) via
+GSPrivateICUCStringEncoding() to determine the locale charset but
+without initializing the locale. When this happens on NetBSD,
+nl_langinfo(CODESET) returns "646" regardless of the actual locale and
+ICU (correctly) interprets this as US-ASCII. This causes all the
+subsequent calls to -[NSString fileSystemRepresentation] to fail for
+any non-ASCII file paths. Applications usually call setlocale(LC_ALL,
+"") in their main() but it's too late at that point because the
+previous value is cached forever.
+
+This is a dirty hack on top of a dirty hack and I'm obvisouly not
+happy with this, but if the dirty hack is broken we still have to fix
+it.
+
+--- Source/NSProcessInfo.m.orig        2020-04-05 18:00:40.000000000 +0000
++++ Source/NSProcessInfo.m
+@@ -979,6 +979,8 @@ int gnustep_base_user_main (int argc, ch
+ }
+ int main(int argc, char *argv[], char *env[])
+ {
++  setlocale(LC_ALL, "");
++
+ #ifdef NeXT_RUNTIME
+   /* This memcpy has to be done before the first message is sent to any
+      constant string object. See Apple Radar 2870817 */



Home | Main Index | Thread Index | Old Index