pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/x11/gnome-desktop3
Module Name: pkgsrc
Committed By: nia
Date: Wed Nov 4 12:12:48 UTC 2020
Modified Files:
pkgsrc/x11/gnome-desktop3: Makefile PLIST buildlink3.mk distinfo
Added Files:
pkgsrc/x11/gnome-desktop3/patches:
patch-libgnome-desktop_gnome-languages.c
patch-libgnome-desktop_gnome-wall-clock.c patch-tests_wall-clock.c
patch-tests_wallclock-reftest.c
Removed Files:
pkgsrc/x11/gnome-desktop3/patches: patch-aa
Log Message:
gnome-desktop3: Update to 3.38.1.
Based on work by Dan Cîrnaț in pkgsrc-wip.
Changes:
- Add default input source for fr_BE
- Add default keyboard layout for Indonesia
- Add utility function to start a transient systemd scope
- Allow /etc/alternatives in bubblewrap sandbox (#92, Simon McVittie)
- Avoid using g_type_class_add_private()
- Blacklist seccomp on riscv64 architecture as its not supported yet
- Change default Japanish input source to KCC
- Disable gvfs in thumbnailer sandboxes
- Display locale @modifiers properly (#50, Gunnar Hjalmarsson)
- Don't run locale tests at build time (#159, Simon McVittie)
- Fix a compile-time error on x32
- Fix a crash in xkb info handling (#785320)
- Fix a memory leak in the display handling code
- Fix a use-after-free in the thumbnailer
- Fix bubblewrap sandbox on s390x (!82, Simon McVittie)
- Fix crash in idle monitor
- Fix crashes in thumbnailers (#785963)
- Fix detection of builtin display on NVIDIA (Jeremy Soller)
- Fix memory leak
- Fix multiple bugs in sandboxed thumbnailer handling,
- Fix multiple bugs in thumbnailing
- Fix regressions from intltool removal
- Fix regressions introduced by g_autoptr usage
- Fix slow thumbnailer due to missing font cache (#90)
- Fix some thumbnailer sandboxing issues
- Fix time display issue with Japanese translation (Tianhao Chai)
- Fix uninitialized memory in the thumbnailer (#784915)
- Fix various wall clock regressions
- GnomeBGSlideShow filename property replaced with a file property (Marco Trevisan)
- Honor XKB_CONFIG_ROOT environment variable
- Improve error reporting in thumbnailers
- Miscellaneous improvements to the thumbnailer code
- Modernize autotools configuration a bit
- Port buildsystem to meson
- Remove some obsolete API's in thumbnailer
- Remove unused API not compatible with wayland
- Remove unused gnome_desktop_thumbnail_has_uri()
- Replace GdkColor methods with GdkRGBA methods
- Require gio-unix-2.0
- Several fixes for compilation warnings
- Support common_name in ISO 639 (#49, Gunnar Hjalmarsson)
- Thumbnailers are now sandboxed (#7744970, #785197)
- Translation updates
- Use GLib fixed-width types (#168, Christopher Chavez)
- Use LC_TIME for time format string translations
- gnome-bg: Handle exif orientations (#516177)
- gnome-languages: Use uselocale to avoid threadsafety issues (#105)
- gnome_bg_slide_show_get_current_slide: add NULL check (#169, Mike Gorse)
- idle-monitor fixes
- languages: Fix encoding issue when translating locale modifiers (#156)
- remove unused direct x11 dependency
- rr: add color transform functions
- systemd: Change naming scheme to conform to systemd convention
- systemd: Default to garbage collect failed scopes
- tests/wall*: Do not fail if some of the locales is missing
- thumbnail: Update documentation
- thumbnailer: Correctly cleanup stale thumbnailer directories
- thumbnailer: fix incomplete TIOCSTI filtering (#112)
- thumbnails: keep the orignal file name (#154)
- wall-clock: Immediately react to show-weekday changes
- wall-clock: Tweak the clock format
- wall-clock: respect new clock-show-weekday setting
- wallclock: am/pm is always available now (#780877)
- wallclock: don't update needlessly (#780861)
To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 pkgsrc/x11/gnome-desktop3/Makefile
cvs rdiff -u -r1.7 -r1.8 pkgsrc/x11/gnome-desktop3/PLIST
cvs rdiff -u -r1.32 -r1.33 pkgsrc/x11/gnome-desktop3/buildlink3.mk
cvs rdiff -u -r1.15 -r1.16 pkgsrc/x11/gnome-desktop3/distinfo
cvs rdiff -u -r1.6 -r0 pkgsrc/x11/gnome-desktop3/patches/patch-aa
cvs rdiff -u -r0 -r1.1 \
pkgsrc/x11/gnome-desktop3/patches/patch-libgnome-desktop_gnome-languages.c \
pkgsrc/x11/gnome-desktop3/patches/patch-libgnome-desktop_gnome-wall-clock.c \
pkgsrc/x11/gnome-desktop3/patches/patch-tests_wall-clock.c \
pkgsrc/x11/gnome-desktop3/patches/patch-tests_wallclock-reftest.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/x11/gnome-desktop3/Makefile
diff -u pkgsrc/x11/gnome-desktop3/Makefile:1.39 pkgsrc/x11/gnome-desktop3/Makefile:1.40
--- pkgsrc/x11/gnome-desktop3/Makefile:1.39 Mon Aug 17 20:17:50 2020
+++ pkgsrc/x11/gnome-desktop3/Makefile Wed Nov 4 12:12:48 2020
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.39 2020/08/17 20:17:50 leot Exp $
+# $NetBSD: Makefile,v 1.40 2020/11/04 12:12:48 nia Exp $
-DISTNAME= gnome-desktop-3.24.2
+DISTNAME= gnome-desktop-3.38.1
PKGNAME= ${DISTNAME:S/desktop/desktop3/}
-PKGREVISION= 9
CATEGORIES= x11 gnome
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/gnome-desktop/${PKGVERSION_NOREV:R}/}
EXTRACT_SUFX= .tar.xz
@@ -12,32 +11,30 @@ HOMEPAGE= https://www.gnome.org/
COMMENT= GNOME3 desktop-wide documents and libgnome-desktop library
LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2 AND gnu-fdl-v1.1
-GNU_CONFIGURE= yes
-USE_LIBTOOL= yes
-USE_TOOLS+= gmake intltool msgfmt pkg-config
+USE_TOOLS+= pkg-config xgettext
USE_PKGLOCALEDIR= yes
PKGCONFIG_OVERRIDE+= libgnome-desktop/gnome-desktop-3.0.pc.in
-CONFIGURE_ARGS+= --with-gnome-distributor="The NetBSD Foundation"
-CONFIGURE_ARGS+= --disable-date-in-gnome-version
-CONFIGURE_ARGS+= --disable-desktop-docs
-CONFIGURE_ARGS+= --disable-gtk-doc
-CONFIGURE_ARGS+= --disable-debug-tools
-CONFIGURE_ARGS+= --disable-udev
-
-BUILD_DEPENDS+= itstool-[0-9]*:../../textproc/itstool
+MESON_ARGS+= -Dsystemd=disabled
+MESON_ARGS+= -Dudev=disabled
+MESON_ARGS+= -Ddistributor="The NetBSD Foundation"
+MESON_ARGS+= -Ddate_in_gnome_version=false
+MESON_ARGS+= -Ddesktop_docs=false
+MESON_ARGS+= -Dgtk_doc=false
+MESON_ARGS+= -Ddebug_tools=false
BUILDLINK_API_DEPENDS.glib2+= glib2>=2.44.0
.include "../../devel/glib2/buildlink3.mk"
.include "../../devel/gobject-introspection/buildlink3.mk"
BUILDLINK_API_DEPENDS.gdk-pixbuf2+= gdk-pixbuf2>=2.36.5
.include "../../graphics/gdk-pixbuf2/buildlink3.mk"
-BUILDLINK_API_DEPENDS.gsettings-desktop-schemas+= gsettings-desktop-schemas>=3.5.91
+BUILDLINK_API_DEPENDS.gsettings-desktop-schemas+= gsettings-desktop-schemas>=3.27.0
.include "../../sysutils/gsettings-desktop-schemas/buildlink3.mk"
.include "../../textproc/iso-codes/buildlink3.mk"
.include "../../x11/gtk3/buildlink3.mk"
.include "../../x11/libxkbfile/buildlink3.mk"
.include "../../x11/xkeyboard-config/buildlink3.mk"
+.include "../../devel/meson/build.mk"
.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/x11/gnome-desktop3/PLIST
diff -u pkgsrc/x11/gnome-desktop3/PLIST:1.7 pkgsrc/x11/gnome-desktop3/PLIST:1.8
--- pkgsrc/x11/gnome-desktop3/PLIST:1.7 Wed Aug 30 08:00:16 2017
+++ pkgsrc/x11/gnome-desktop3/PLIST Wed Nov 4 12:12:48 2020
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.7 2017/08/30 08:00:16 prlw1 Exp $
+@comment $NetBSD: PLIST,v 1.8 2020/11/04 12:12:48 nia Exp $
include/gnome-desktop-3.0/libgnome-desktop/gnome-bg-crossfade.h
include/gnome-desktop-3.0/libgnome-desktop/gnome-bg-slide-show.h
include/gnome-desktop-3.0/libgnome-desktop/gnome-bg.h
@@ -8,41 +8,16 @@ include/gnome-desktop-3.0/libgnome-deskt
include/gnome-desktop-3.0/libgnome-desktop/gnome-pnp-ids.h
include/gnome-desktop-3.0/libgnome-desktop/gnome-rr-config.h
include/gnome-desktop-3.0/libgnome-desktop/gnome-rr.h
+include/gnome-desktop-3.0/libgnome-desktop/gnome-systemd.h
include/gnome-desktop-3.0/libgnome-desktop/gnome-wall-clock.h
include/gnome-desktop-3.0/libgnome-desktop/gnome-xkb-info.h
lib/girepository-1.0/GnomeDesktop-3.0.typelib
-lib/libgnome-desktop-3.la
+lib/libgnome-desktop-3.so
+lib/libgnome-desktop-3.so.19
+lib/libgnome-desktop-3.so.19.0.9
lib/pkgconfig/gnome-desktop-3.0.pc
share/gir-1.0/GnomeDesktop-3.0.gir
share/gnome/gnome-version.xml
-share/gtk-doc/html/gnome-desktop3/GnomeDesktopThumbnailFactory.html
-share/gtk-doc/html/gnome-desktop3/GnomeIdleMonitor.html
-share/gtk-doc/html/gnome-desktop3/GnomeWallClock.html
-share/gtk-doc/html/gnome-desktop3/GnomeXkbInfo.html
-share/gtk-doc/html/gnome-desktop3/annotation-glossary.html
-share/gtk-doc/html/gnome-desktop3/background.html
-share/gtk-doc/html/gnome-desktop3/gnome-desktop3-Language-Utilities.html
-share/gtk-doc/html/gnome-desktop3/gnome-desktop3-gnome-bg.html
-share/gtk-doc/html/gnome-desktop3/gnome-desktop3-gnome-pnp-ids.html
-share/gtk-doc/html/gnome-desktop3/gnome-desktop3-gnome-rr-config.html
-share/gtk-doc/html/gnome-desktop3/gnome-desktop3-gnome-rr.html
-share/gtk-doc/html/gnome-desktop3/gnome-desktop3.devhelp2
-share/gtk-doc/html/gnome-desktop3/home.png
-share/gtk-doc/html/gnome-desktop3/idle-monitor.html
-share/gtk-doc/html/gnome-desktop3/index.html
-share/gtk-doc/html/gnome-desktop3/intro.html
-share/gtk-doc/html/gnome-desktop3/languages.html
-share/gtk-doc/html/gnome-desktop3/left-insensitive.png
-share/gtk-doc/html/gnome-desktop3/left.png
-share/gtk-doc/html/gnome-desktop3/randr.html
-share/gtk-doc/html/gnome-desktop3/right-insensitive.png
-share/gtk-doc/html/gnome-desktop3/right.png
-share/gtk-doc/html/gnome-desktop3/style.css
-share/gtk-doc/html/gnome-desktop3/thumbnail.html
-share/gtk-doc/html/gnome-desktop3/up-insensitive.png
-share/gtk-doc/html/gnome-desktop3/up.png
-share/gtk-doc/html/gnome-desktop3/wall-clock.html
-share/gtk-doc/html/gnome-desktop3/xkb-info.html
share/locale/af/LC_MESSAGES/gnome-desktop-3.0.mo
share/locale/am/LC_MESSAGES/gnome-desktop-3.0.mo
share/locale/an/LC_MESSAGES/gnome-desktop-3.0.mo
@@ -59,6 +34,7 @@ share/locale/br/LC_MESSAGES/gnome-deskto
share/locale/bs/LC_MESSAGES/gnome-desktop-3.0.mo
share/locale/ca/LC_MESSAGES/gnome-desktop-3.0.mo
share/locale/ca@valencia/LC_MESSAGES/gnome-desktop-3.0.mo
+share/locale/ckb/LC_MESSAGES/gnome-desktop-3.0.mo
share/locale/crh/LC_MESSAGES/gnome-desktop-3.0.mo
share/locale/cs/LC_MESSAGES/gnome-desktop-3.0.mo
share/locale/csb/LC_MESSAGES/gnome-desktop-3.0.mo
@@ -110,6 +86,7 @@ share/locale/lv/LC_MESSAGES/gnome-deskto
share/locale/mai/LC_MESSAGES/gnome-desktop-3.0.mo
share/locale/mg/LC_MESSAGES/gnome-desktop-3.0.mo
share/locale/mi/LC_MESSAGES/gnome-desktop-3.0.mo
+share/locale/mjw/LC_MESSAGES/gnome-desktop-3.0.mo
share/locale/mk/LC_MESSAGES/gnome-desktop-3.0.mo
share/locale/ml/LC_MESSAGES/gnome-desktop-3.0.mo
share/locale/mn/LC_MESSAGES/gnome-desktop-3.0.mo
Index: pkgsrc/x11/gnome-desktop3/buildlink3.mk
diff -u pkgsrc/x11/gnome-desktop3/buildlink3.mk:1.32 pkgsrc/x11/gnome-desktop3/buildlink3.mk:1.33
--- pkgsrc/x11/gnome-desktop3/buildlink3.mk:1.32 Mon Aug 17 20:17:50 2020
+++ pkgsrc/x11/gnome-desktop3/buildlink3.mk Wed Nov 4 12:12:48 2020
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.32 2020/08/17 20:17:50 leot Exp $
+# $NetBSD: buildlink3.mk,v 1.33 2020/11/04 12:12:48 nia Exp $
BUILDLINK_TREE+= gnome-desktop3
@@ -6,12 +6,14 @@ BUILDLINK_TREE+= gnome-desktop3
GNOME_DESKTOP3_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.gnome-desktop3+= gnome-desktop3>=3.4.2
-BUILDLINK_ABI_DEPENDS.gnome-desktop3+= gnome-desktop3>=3.24.2nb9
+BUILDLINK_ABI_DEPENDS.gnome-desktop3+= gnome-desktop3>=3.36
BUILDLINK_PKGSRCDIR.gnome-desktop3?= ../../x11/gnome-desktop3
-BUILDLINK_API_DEPENDS.gsettings-desktop-schemas+= gsettings-desktop-schemas>=3.5.91
+BUILDLINK_API_DEPENDS.gsettings-desktop-schemas+= gsettings-desktop-schemas>=3.27.0
.include "../../sysutils/gsettings-desktop-schemas/buildlink3.mk"
.include "../../x11/gtk3/buildlink3.mk"
+.include "../../x11/xkeyboard-config/buildlink3.mk"
+.include "../../textproc/iso-codes/buildlink3.mk"
.endif
BUILDLINK_TREE+= -gnome-desktop3
Index: pkgsrc/x11/gnome-desktop3/distinfo
diff -u pkgsrc/x11/gnome-desktop3/distinfo:1.15 pkgsrc/x11/gnome-desktop3/distinfo:1.16
--- pkgsrc/x11/gnome-desktop3/distinfo:1.15 Sun Jun 7 16:28:49 2020
+++ pkgsrc/x11/gnome-desktop3/distinfo Wed Nov 4 12:12:48 2020
@@ -1,7 +1,10 @@
-$NetBSD: distinfo,v 1.15 2020/06/07 16:28:49 rillig Exp $
+$NetBSD: distinfo,v 1.16 2020/11/04 12:12:48 nia Exp $
-SHA1 (gnome-desktop-3.24.2.tar.xz) = 7675064d9b2ba9be8ae7ebabd9648a2b38375a45
-RMD160 (gnome-desktop-3.24.2.tar.xz) = 8d6ef31299ed4e7bd5b20c74e31ee6e718697006
-SHA512 (gnome-desktop-3.24.2.tar.xz) = 691817fda97fc1c560c72213668eb4c2a8d03cc2433470a78149b3f785e95d9b4b681bceb733a67e1bfda649a6aed7ca4569b4891ee89f824a28d7a95f2782c2
-Size (gnome-desktop-3.24.2.tar.xz) = 1064808 bytes
-SHA1 (patch-aa) = a48ffa33fe2a786694af7b7df705ff2b3ae5d260
+SHA1 (gnome-desktop-3.38.1.tar.xz) = 9c7253916b789f09a803ee7b7d71484786547f0c
+RMD160 (gnome-desktop-3.38.1.tar.xz) = 2b43a70d3255fb9400300a90f03f12cc174e0c12
+SHA512 (gnome-desktop-3.38.1.tar.xz) = b3927f0b8571d2ecb528dbe3e096e816e4e90333ce4f1ab8682c8682bbaaf5fc3484dc0944a9437aca40036d29b0feace8ed3954fb17c0bfd7ce503c99af830b
+Size (gnome-desktop-3.38.1.tar.xz) = 745400 bytes
+SHA1 (patch-libgnome-desktop_gnome-languages.c) = 88878085009e36be056b90cce43019095e6d9ddf
+SHA1 (patch-libgnome-desktop_gnome-wall-clock.c) = fb8da1dcb408a78cbc427c69d510eaf2ca8a2fe7
+SHA1 (patch-tests_wall-clock.c) = c3f4cd354538ea4f549f87762b333cb00a92d18d
+SHA1 (patch-tests_wallclock-reftest.c) = 53cee07db779808b0d9b31f64529ee48c2252bda
Added files:
Index: pkgsrc/x11/gnome-desktop3/patches/patch-libgnome-desktop_gnome-languages.c
diff -u /dev/null pkgsrc/x11/gnome-desktop3/patches/patch-libgnome-desktop_gnome-languages.c:1.1
--- /dev/null Wed Nov 4 12:12:48 2020
+++ pkgsrc/x11/gnome-desktop3/patches/patch-libgnome-desktop_gnome-languages.c Wed Nov 4 12:12:48 2020
@@ -0,0 +1,120 @@
+$NetBSD: patch-libgnome-desktop_gnome-languages.c,v 1.1 2020/11/04 12:12:48 nia Exp $
+
+Replace usage of uselocale() - not available on NetBSD
+
+--- libgnome-desktop/gnome-languages.c.orig 2020-10-05 19:11:19.070822700 +0000
++++ libgnome-desktop/gnome-languages.c
+@@ -303,16 +303,13 @@ language_name_get_codeset_details (const
+ gboolean *is_utf8)
+ {
+ locale_t locale;
+- locale_t old_locale;
+ const char *codeset = NULL;
+
+ locale = newlocale (LC_CTYPE_MASK, language_name, (locale_t) 0);
+ if (locale == (locale_t) 0)
+ return;
+
+- old_locale = uselocale (locale);
+-
+- codeset = nl_langinfo (CODESET);
++ codeset = nl_langinfo_l (CODESET, locale);
+
+ if (pcodeset != NULL) {
+ *pcodeset = g_strdup (codeset);
+@@ -324,7 +321,6 @@ language_name_get_codeset_details (const
+ *is_utf8 = strcmp (normalized_codeset, "UTF-8") == 0;
+ }
+
+- uselocale (old_locale);
+ freelocale (locale);
+ }
+
+@@ -703,14 +699,11 @@ get_translated_language (const char *cod
+ name = NULL;
+ if (language != NULL) {
+ const char *translated_name;
+- locale_t loc = 0;
+- locale_t old_locale = 0;
++ g_autofree char *old_locale = NULL;
+
+ if (locale != NULL) {
+- loc = newlocale (LC_MESSAGES_MASK, locale, (locale_t) 0);
+- if (loc == (locale_t) 0)
+- return NULL;
+- old_locale = uselocale (loc);
++ old_locale = g_strdup (setlocale (LC_MESSAGES, NULL));
++ setlocale (LC_MESSAGES, locale);
+ }
+
+ if (is_fallback_language (code)) {
+@@ -723,8 +716,7 @@ get_translated_language (const char *cod
+ }
+
+ if (locale != NULL) {
+- uselocale (old_locale);
+- freelocale (loc);
++ setlocale (LC_MESSAGES, locale);
+ }
+ }
+
+@@ -761,15 +753,12 @@ get_translated_territory (const char *co
+ name = NULL;
+ if (territory != NULL) {
+ const char *translated_territory;
+- locale_t loc;
+- locale_t old_locale = 0;
++ g_autofree char *old_locale = NULL;
+ g_autofree char *tmp = NULL;
+
+ if (locale != NULL) {
+- loc = newlocale (LC_MESSAGES_MASK, locale, (locale_t) 0);
+- if (loc == (locale_t) 0)
+- return NULL;
+- old_locale = uselocale (loc);
++ old_locale = g_strdup (setlocale(LC_MESSAGES, NULL));
++ setlocale(LC_MESSAGES, locale);
+ }
+
+ translated_territory = dgettext ("iso_3166", territory);
+@@ -777,8 +766,7 @@ get_translated_territory (const char *co
+ name = capitalize_utf8_string (tmp);
+
+ if (locale != NULL) {
+- uselocale (old_locale);
+- freelocale (loc);
++ setlocale (LC_MESSAGES, old_locale);
+ }
+ }
+
+@@ -1358,17 +1346,13 @@ gnome_get_translated_modifier (const cha
+ {
+ char *retval;
+ GHashTable *modifiers_map;
+- locale_t loc;
+- locale_t old_locale;
++ g_autofree char *old_locale = NULL;
+
+ g_return_val_if_fail (modifier != NULL, NULL);
+
+ if (translation != NULL) {
+- loc = newlocale (LC_MESSAGES_MASK, translation, (locale_t) 0);
+- if (loc == (locale_t) 0) {
+- return NULL;
+- }
+- old_locale = uselocale (loc);
++ old_locale = g_strdup (setlocale (LC_MESSAGES, NULL));
++ setlocale (LC_MESSAGES, translation);
+ }
+
+ /* Modifiers as listed in glibc's SUPPORTED file:
+@@ -1408,8 +1392,7 @@ gnome_get_translated_modifier (const cha
+ g_hash_table_destroy (modifiers_map);
+
+ if (translation != NULL) {
+- uselocale (old_locale);
+- freelocale (loc);
++ setlocale (LC_MESSAGES, old_locale);
+ }
+
+ return retval;
Index: pkgsrc/x11/gnome-desktop3/patches/patch-libgnome-desktop_gnome-wall-clock.c
diff -u /dev/null pkgsrc/x11/gnome-desktop3/patches/patch-libgnome-desktop_gnome-wall-clock.c:1.1
--- /dev/null Wed Nov 4 12:12:48 2020
+++ pkgsrc/x11/gnome-desktop3/patches/patch-libgnome-desktop_gnome-wall-clock.c Wed Nov 4 12:12:48 2020
@@ -0,0 +1,37 @@
+$NetBSD: patch-libgnome-desktop_gnome-wall-clock.c,v 1.1 2020/11/04 12:12:48 nia Exp $
+
+Replace usage of uselocale() - not available on NetBSD
+
+--- libgnome-desktop/gnome-wall-clock.c.orig 2020-04-29 01:53:29.076934000 +0000
++++ libgnome-desktop/gnome-wall-clock.c
+@@ -279,22 +279,19 @@ translate_time_format_string (const char
+ const char *locale = g_getenv ("LC_TIME");
+ const char *res;
+ char *sep;
+- locale_t old_loc;
+- locale_t loc = (locale_t)0;
++ g_autofree char *old_locale = NULL;
+
+- if (locale)
+- loc = newlocale (LC_MESSAGES_MASK, locale, (locale_t)0);
+-
+- old_loc = uselocale (loc);
++ if (locale) {
++ old_locale = g_strdup (setlocale (LC_MESSAGES, NULL));
++ setlocale (LC_MESSAGES, locale);
++ }
+
+ sep = strchr (str, '\004');
+ res = g_dpgettext (GETTEXT_PACKAGE, str, sep ? sep - str + 1 : 0);
+
+- uselocale (old_loc);
+-
+- if (loc != (locale_t)0)
+- freelocale (loc);
+-
++ if (locale)
++ setlocale (LC_MESSAGES, old_locale);
++
+ return res;
+ }
+
Index: pkgsrc/x11/gnome-desktop3/patches/patch-tests_wall-clock.c
diff -u /dev/null pkgsrc/x11/gnome-desktop3/patches/patch-tests_wall-clock.c:1.1
--- /dev/null Wed Nov 4 12:12:48 2020
+++ pkgsrc/x11/gnome-desktop3/patches/patch-tests_wall-clock.c Wed Nov 4 12:12:48 2020
@@ -0,0 +1,111 @@
+$NetBSD: patch-tests_wall-clock.c,v 1.1 2020/11/04 12:12:48 nia Exp $
+
+Disable tests that rely on uselocale()
+
+--- tests/wall-clock.c.orig 2020-10-05 19:11:19.000000000 +0000
++++ tests/wall-clock.c
+@@ -23,6 +23,9 @@
+ #include <libgnome-desktop/gnome-wall-clock.h>
+ #include <locale.h>
+ #include <string.h>
++#ifdef __APPLE__
++#include <xlocale.h>
++#endif
+
+ #define COLON ":"
+ #define RATIO "∶"
+@@ -36,8 +39,7 @@ test_utf8_character (const char *utf8_ch
+ {
+ GDateTime *datetime;
+ GnomeWallClock *clock;
+- locale_t locale;
+- locale_t save_locale;
++ g_autofree char *save_locale;
+ const char *str;
+
+ /* When testing that UTF8 locales don't use double spaces
+@@ -47,9 +49,9 @@ test_utf8_character (const char *utf8_ch
+
+ /* In the C locale, make sure the time string is formatted with regular
+ * colons */
+- locale = newlocale (LC_ALL_MASK, "C", (locale_t) 0);
+- g_assert_true (locale != (locale_t)0);
+- save_locale = uselocale (locale);
++ save_locale = setlocale (LC_ALL_MASK, NULL);
++ g_assert_true (save_locale != NULL);
++ setlocale (LC_ALL_MASK, "C");
+ clock = gnome_wall_clock_new ();
+ str = gnome_wall_clock_string_for_datetime (clock,
+ datetime,
+@@ -60,13 +62,7 @@ test_utf8_character (const char *utf8_ch
+ g_object_unref (clock);
+
+ /* In a UTF8 locale, we want ratio characters and no colons. */
+- locale = newlocale (LC_ALL_MASK, "en_US.utf8", locale);
+- if (locale == (locale_t)0) {
+- g_test_message ("en_US.utf8 locale not found");
+- g_test_fail ();
+- return;
+- }
+- uselocale (locale);
++ setlocale (LC_ALL_MASK, "en_US.utf8");
+ clock = gnome_wall_clock_new ();
+ str = gnome_wall_clock_string_for_datetime (clock,
+ datetime,
+@@ -78,13 +74,7 @@ test_utf8_character (const char *utf8_ch
+
+ /* ... and same thing with an RTL locale: should be formatted with
+ * ratio characters */
+- locale = newlocale (LC_ALL_MASK, "he_IL.utf8", locale);
+- if (locale == (locale_t)0) {
+- g_test_message ("he_IL.utf8 locale not found");
+- g_test_fail ();
+- return;
+- }
+- uselocale (locale);
++ setlocale (LC_ALL_MASK, "he_IL.utf8");
+ clock = gnome_wall_clock_new ();
+ str = gnome_wall_clock_string_for_datetime (clock,
+ datetime,
+@@ -97,8 +87,7 @@ test_utf8_character (const char *utf8_ch
+ g_date_time_unref (datetime);
+
+ /* Restore previous locale */
+- uselocale (save_locale);
+- freelocale (locale);
++ setlocale (LC_ALL_MASK, save_locale);
+ }
+
+ static void
+@@ -197,6 +186,7 @@ test_notify_clock (void)
+ g_object_unref (settings);
+ }
+
++#if !defined(__NetBSD__)
+ static void
+ test_weekday_setting (void)
+ {
+@@ -248,6 +238,7 @@ test_weekday_setting (void)
+ uselocale (save_locale);
+ freelocale (locale);
+ }
++#endif
+
+ int
+ main (int argc,
+@@ -257,11 +248,15 @@ main (int argc,
+
+ g_test_init (&argc, &argv, NULL);
+
++#if !defined(__NetBSD__)
+ g_test_add_func ("/wall-clock/colon-vs-ratio", test_colon_vs_ratio);
+ g_test_add_func ("/wall-clock/space-vs-en-space", test_space_vs_en_space);
+ g_test_add_func ("/wall-clock/24h-clock-format", test_clock_format_setting);
++#endif
+ g_test_add_func ("/wall-clock/notify-clock", test_notify_clock);
++#if !defined(__NetBSD__)
+ g_test_add_func ("/wall-clock/weekday-setting", test_weekday_setting);
++#endif
+
+ return g_test_run ();
+ }
Index: pkgsrc/x11/gnome-desktop3/patches/patch-tests_wallclock-reftest.c
diff -u /dev/null pkgsrc/x11/gnome-desktop3/patches/patch-tests_wallclock-reftest.c:1.1
--- /dev/null Wed Nov 4 12:12:48 2020
+++ pkgsrc/x11/gnome-desktop3/patches/patch-tests_wallclock-reftest.c Wed Nov 4 12:12:48 2020
@@ -0,0 +1,57 @@
+$NetBSD: patch-tests_wallclock-reftest.c,v 1.1 2020/11/04 12:12:48 nia Exp $
+
+Disable tests that rely on uselocale()
+
+--- tests/wallclock-reftest.c.orig 2020-10-05 19:11:19.000000000 +0000
++++ tests/wallclock-reftest.c
+@@ -26,6 +26,9 @@
+ #include <gtk/gtk.h>
+ #define GNOME_DESKTOP_USE_UNSTABLE_API 1
+ #include <libgnome-desktop/gnome-wall-clock.h>
++#ifdef __APPLE__
++#include <xlocale.h>
++#endif
+
+ static const char *output_dir = NULL;
+
+@@ -439,21 +442,15 @@ test_ui_file (GFile *file,
+ GnomeWallClock *clock;
+ GDateTime *datetime;
+ char *str;
+- locale_t loc, previous_locale;
++ g_autofree char *previous_locale;
+
+ ui_file = g_file_get_path (file);
+
+ locale = get_locale_for_file (ui_file);
+ g_assert (locale);
+- loc = newlocale (LC_ALL_MASK, locale, (locale_t) 0);
+- if (loc == (locale_t)0)
+- {
+- g_test_message ("locale '%s' not found", locale);
+- g_test_fail();
+- return;
+- }
+- previous_locale = uselocale (loc);
+- g_assert_true (previous_locale != (locale_t) 0);
++ previous_locale = g_strdup (setlocale (LC_ALL_MASK, NULL));
++ g_assert_true (previous_locale != NULL);
++ setlocale (LC_ALL_MASK, locale);
+
+ clock = gnome_wall_clock_new ();
+ datetime = g_date_time_new_local (2014, 5, 28, 23, 59, 59);
+@@ -465,8 +462,7 @@ test_ui_file (GFile *file,
+ g_date_time_unref (datetime);
+ g_object_unref (clock);
+
+- uselocale (previous_locale);
+- freelocale (loc);
++ setlocale (LC_ALL_MASK, previous_locale);
+
+ provider = add_extra_css (ui_file, ".css");
+
+@@ -616,3 +612,4 @@ main (int argc, char **argv)
+
+ return g_test_run ();
+ }
++
Home |
Main Index |
Thread Index |
Old Index