Skip to content

Commit

Permalink
glib: update to 2.54.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Pyhalov committed Feb 19, 2018
1 parent 9d6d6c8 commit 73b8a75
Show file tree
Hide file tree
Showing 21 changed files with 368 additions and 506 deletions.
32 changes: 21 additions & 11 deletions components/library/glib/Makefile
Expand Up @@ -15,23 +15,24 @@

include ../../../make-rules/shared-macros.mk

COMPONENT_NAME= glib
COMPONENT_VERSION= 2.46.2
COMPONENT_REVISION= 1
COMPONENT_NAME= glib
COMPONENT_MJR_VERSION= 2.54
COMPONENT_MNR_VERSION= 3
COMPONENT_VERSION= $(COMPONENT_MJR_VERSION).$(COMPONENT_MNR_VERSION)
COMPONENT_SUMMARY= GNOME core libraries
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
COMPONENT_ARCHIVE_HASH= \
sha256:5031722e37036719c1a09163cc6cf7c326e4c4f1f1e074b433c156862bd733db
sha256:963fdc6685dc3da8e5381dfb9f15ca4b5709b28be84d9d05a9bb8e446abac0a8
COMPONENT_ARCHIVE_URL= \
http://ftp.gnome.org/pub/GNOME/sources/$(COMPONENT_NAME)/2.46/$(COMPONENT_ARCHIVE)
http://ftp.gnome.org/pub/GNOME/sources/$(COMPONENT_NAME)/$(COMPONENT_MJR_VERSION)/$(COMPONENT_ARCHIVE)
COMPONENT_PROJECT_URL = https://www.gtk.org/

include $(WS_TOP)/make-rules/prep.mk
include $(WS_TOP)/make-rules/configure.mk
include $(WS_TOP)/make-rules/ips.mk
include $(WS_MAKE_RULES)/prep.mk
include $(WS_MAKE_RULES)/configure.mk
include $(WS_MAKE_RULES)/ips.mk

PATH=/usr/gnu/bin:/usr/bin
PATH=$(PATH.gnu)

LDFLAGS += -lsocket -lsecdb -lnsl

Expand All @@ -42,7 +43,8 @@ COMPONENT_PRE_CONFIGURE_ACTION = ( cp -a $(SOURCE_DIR)/* $(@D))
CONFIGURE_SCRIPT = $(@D)/configure

# GCC 6
CFLAGS += -std=gnu89 -Wno-error=format-nonliteral
CFLAGS += -Wno-error=format-nonliteral
CPPFLAGS += $(CPP_XPG6MODE)

CONFIGURE_OPTIONS.32 = --sysconfdir=/etc
CONFIGURE_OPTIONS.64 = --sysconfdir=/etc/$(MACH64)
Expand All @@ -52,22 +54,30 @@ CONFIGURE_OPTIONS += --enable-shared

CONFIGURE_ENV += PERL=$(PERL)
CONFIGURE_ENV += PYTHON=$(PYTHON)
CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)"

DFLAGS.64 = -64
COMPONENT_BUILD_ENV += DFLAGS=$(DFLAGS.$(BITS))

# Otherwise tests fail
ENV = /usr/bin/env -i

COMPONENT_TEST_TRANSFORMS += \
'-n ' \
'-e "/^FAIL:/p" ' \
'-e "/^ERROR:/p" ' \
'-e "/^\#/p" ' \

build: $(BUILD_32_and_64)

install: $(INSTALL_32_and_64)

# Failed tests: gdatetime, convert, strfuncs, string, timer
test: $(TEST_32_and_64)

REQUIRED_PACKAGES += library/file-monitor/gamin
REQUIRED_PACKAGES += library/libffi
REQUIRED_PACKAGES += library/pcre
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += runtime/perl-522
REQUIRED_PACKAGES += runtime/python-27
Expand Down
179 changes: 60 additions & 119 deletions components/library/glib/glib2.p5m

Large diffs are not rendered by default.

161 changes: 59 additions & 102 deletions components/library/glib/manifests/sample-manifest.p5m

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions components/library/glib/patches/01-fix-default-path.patch
Expand Up @@ -8,13 +8,13 @@ this behavior (bugzilla bug 317945), but this change is safe. This
code only gets executed when the user's PATH is unset, which should
be never. Safer to avoid adding "." to PATH.

--- glib-2.44.0/glib/gspawn.c Sat Feb 7 07:32:45 2015
+++ glib-2.44.0/glib/gspawn.c Sun Apr 19 12:24:39 2015
@@ -1708,7 +1708,12 @@
--- glib-2.55.2/glib/gspawn.c.~1~ 2018-01-09 00:34:19.000000000 +0000
+++ glib-2.55.2/glib/gspawn.c 2018-02-16 11:31:49.253694209 +0000
@@ -1761,7 +1761,12 @@
* what to search if PATH is unset. POSIX may, dunno.
*/

+#ifdef sun
+#ifdef __sun
+ /* bin is a symlink to usr/bin on Solaris */
+ path = "/usr/bin";
+#else
Expand All @@ -23,14 +23,13 @@ be never. Safer to avoid adding "." to PATH.
}

len = strlen (file) + 1;

--- glib-2.44.0/glib/gutils.c Sat Feb 28 17:50:08 2015
+++ glib-2.44.0/glib/gutils.c Sun Apr 19 12:26:11 2015
@@ -379,7 +379,12 @@
* what to search if PATH is unset. POSIX may, dunno.
*/

+#ifdef sun
+#ifdef __sun
+ /* bin is a symlink to usr/bin on Solaris */
+ path = "/usr/bin";
+#else
Expand Down
Expand Up @@ -12,7 +12,7 @@ penalty at startup. Need to file upstream bug for that.
{
gpointer handle;
+
+ #if defined(sun) && defined(__SVR4)
+ #if defined(__sun) && defined(__SVR4)
+ /*
+ * Always use RTLD_LAZY on Solaris; otherwise all relocations are performed
+ * immediately in all dynamic dependencies.
Expand Down
19 changes: 11 additions & 8 deletions components/library/glib/patches/03-dtrace-flags.patch
Expand Up @@ -3,20 +3,23 @@ should force -32 or -64 depending on build.

Not appropriate for upstream.

--- glib-2.46.0/glib/Makefile.am 2015-09-07 12:27:03.000000000 -0700
+++ glib-2.46.0/glib/Makefile.am 2015-09-24 22:24:14.141690708 -0700
@@ -366,15 +366,15 @@
DTCFLAGS = $(patsubst -W%,,$(CFLAGS))
--- glib-2.52.0/glib/Makefile.am 2017-03-23 07:22:53.641866845 -0700
+++ glib-2.52.0/glib/Makefile.am 2017-03-23 07:24:05.626741905 -0700
@@ -365,18 +365,18 @@

if ENABLE_DTRACE
glib_probes.h: glib_probes.d
- $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
+ $(AM_V_GEN) $(DTRACE) $(DFLAGS) -C -h -s $< -o $@.tmp
@$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
@$(SED) \
-e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," \
-e "s,define _SDT_HAS_SEMAPHORES 1,undef _SDT_HAS_SEMAPHORES," \
< $@.tmp > $@ && rm -f $@.tmp

-glib_probes.lo: glib_probes.d
- $(AM_V_GEN) env CC="$(DTCOMPILE)" CFLAGS="$(DTCFLAGS)" $(DTRACE) -G -s $< -o $@
- $(AM_V_GEN) $(LIBTOOL) --mode=compile $(AM_V_lt) --tag=CC $(DTRACE) -G -s $< -o $@
+glib_probes.o: glib_probes.d
+ $(AM_V_GEN) env CC="$(DTCOMPILE)" CFLAGS="$(DTCFLAGS)" $(DTRACE) $(DFLAGS) -G -s $< -o $@
+ $(AM_V_GEN) $(LIBTOOL) --mode=compile $(AM_V_lt) --tag=CC $(DTRACE) $(DFLAGS) -G -s $< -o $@

-BUILT_SOURCES += glib_probes.h glib_probes.lo
+BUILT_SOURCES += glib_probes.h glib_probes.o
Expand All @@ -25,4 +28,4 @@ Not appropriate for upstream.
+libglib_2_0_la_LIBADD += glib_probes.o
endif

if ENABLE_SYSTEMTAP
tapsetdir = @ABS_TAPSET_DIR@
27 changes: 0 additions & 27 deletions components/library/glib/patches/04-ld-nodelete.patch

This file was deleted.

15 changes: 15 additions & 0 deletions components/library/glib/patches/04-xopen-version.patch
@@ -0,0 +1,15 @@
Remove Unix standard settings for Solaris 11.4, so we don't exclude all
features added between XPG2 & XPG7, now that these are exposed by default.

To send upstream, need to adjust to right version for each OS level

--- glib-2.46.0/configure.ac 2015-09-24 23:04:41.862038047 -0700
+++ glib-2.46.0/configure.ac 2015-09-24 23:15:21.170129554 -0700
@@ -1112,7 +1112,5 @@
case $host in
*-*-solaris* )
- AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
- AC_DEFINE(_XOPEN_SOURCE, 2, Needed to get declarations for msg_control and msg_controllen on Solaris)
AC_DEFINE(__EXTENSIONS__, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
;;
esac
15 changes: 0 additions & 15 deletions components/library/glib/patches/05-gvariant-syntax.patch

This file was deleted.

49 changes: 0 additions & 49 deletions components/library/glib/patches/06-python34.patch

This file was deleted.

73 changes: 36 additions & 37 deletions components/library/glib/patches/08-gio-trash-only-home.patch
@@ -1,24 +1,26 @@
--- glib-2.20.1/gio/glocalfile.c.ori 2009-04-15 03:46:56.161574399 +0100
+++ glib-2.20.1/gio/glocalfile.c 2009-04-15 03:48:57.698109713 +0100
@@ -1732,123 +1733,26 @@
--- glib-2.55.2/gio/glocalfile.c.~1~ 2018-01-09 00:34:19.000000000 +0000
+++ glib-2.55.2/gio/glocalfile.c 2018-02-16 12:20:09.786992190 +0000
@@ -1987,6 +1987,7 @@
char *dirname, *globaldir;
GVfsClass *class;
GVfs *vfs;
+ GFile *trash;
int errsv;

if (g_lstat (local->filename, &file_stat) != 0)
@@ -2004,123 +2005,26 @@

is_homedir_trash = FALSE;
trashdir = NULL;
- if (file_stat.st_dev == home_stat.st_dev)
+ /* Always move to .Trash in the user's home directory
+ */
+ is_homedir_trash = TRUE;
+ errno = 0;
+ trashdir = g_build_filename (g_get_user_data_dir (), "Trash", NULL);
+ if (g_mkdir_with_parents (trashdir, 0700) < 0)
{
- {
- is_homedir_trash = TRUE;
- errno = 0;
- trashdir = g_build_filename (g_get_user_data_dir (), "Trash", NULL);
- if (g_mkdir_with_parents (trashdir, 0700) < 0)
- {
- char *display_name;
- int errsv = errno;
- errsv = errno;
-
- display_name = g_filename_display_name (trashdir);
- g_set_error (error, G_IO_ERROR,
Expand All @@ -38,13 +40,13 @@
-
- uid = geteuid ();
- g_snprintf (uid_str, sizeof (uid_str), "%lu", (unsigned long)uid);
-
- topdir = find_topdir_for (local->filename);
-
- topdir = _g_local_file_find_topdir_for (local->filename);
- if (topdir == NULL)
- {
- g_set_error_literal (error, G_IO_ERROR,
- G_IO_ERROR_NOT_SUPPORTED,
- _("Unable to find toplevel directory for trash"));
- g_set_io_error (error,
- _("Unable to find toplevel directory to trash %s"),
- file, G_IO_ERROR_NOT_SUPPORTED);
- return FALSE;
- }
-
Expand Down Expand Up @@ -117,17 +119,25 @@
- }
- }
- }
+ char *display_name;
+ int errsv = errno;

-
- if (trashdir == NULL)
- {
- g_free (topdir);
- g_set_error_literal (error, G_IO_ERROR,
- G_IO_ERROR_NOT_SUPPORTED,
- _("Unable to find or create trash directory"));
- g_set_io_error (error,
- _("Unable to find or create trash directory for %s"),
- file, G_IO_ERROR_NOT_SUPPORTED);
- return FALSE;
- }
+ /* Always move to .Trash in the user's home directory
+ */
+ is_homedir_trash = TRUE;
+ errno = 0;
+ trashdir = g_build_filename (g_get_user_data_dir (), "Trash", NULL);
+ if (g_mkdir_with_parents (trashdir, 0700) < 0)
+ {
+ char *display_name;
+ int errsv = errno;
+
+ display_name = g_filename_display_name (trashdir);
+ g_set_error (error, G_IO_ERROR,
+ g_io_error_from_errno (errsv),
Expand All @@ -141,7 +151,7 @@

/* Trashdir points to the trash dir with the "info" and "files" subdirectories */

@@ -1912,8 +1816,8 @@
@@ -2213,8 +2117,8 @@
trashfile = g_build_filename (filesdir, trashname, NULL);

g_free (filesdir);
Expand All @@ -150,28 +160,17 @@
+ trash = g_file_new_for_path(trashfile);
+ if (!g_file_move (file, trash, 0, cancellable, NULL, NULL, NULL))
{
int errsv = errno;
errsv = errno;

@@ -1921,6 +1825,7 @@
@@ -2223,6 +2127,7 @@
g_free (trashname);
g_free (infofile);
g_free (trashfile);
+ g_object_unref(trash);

if (errsv == EXDEV)
/* The trash dir was actually on another fs anyway!?
diff -ruN glib-2.23.5.orig/gio/glocalfile.c glib-2.23.5/gio/glocalfile.c
--- glib-2.23.5.orig/gio/glocalfile.c 2010-03-12 01:24:16.709204235 +0000
+++ glib-2.23.5/gio/glocalfile.c 2010-03-12 01:25:06.966511383 +0000
@@ -1806,6 +1806,7 @@
char *dirname, *globaldir;
GVfsClass *class;
GVfs *vfs;
+ GFile *trash;

if (g_lstat (local->filename, &file_stat) != 0)
{
@@ -1939,6 +1940,7 @@
@@ -2245,6 +2150,7 @@
class->local_file_moved (vfs, local->filename, trashfile);

g_free (trashfile);
Expand Down

0 comments on commit 73b8a75

Please sign in to comment.