Skip to content

Commit

Permalink
Merge branch 'jb48614' into 'master'
Browse files Browse the repository at this point in the history
Update to 2.62.4.

See merge request mer-core/glib2!11
  • Loading branch information
Matti Kosola committed Jan 28, 2020
2 parents 2db1d5a + 720463b commit a36c2f7
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
@@ -1,3 +1,3 @@
[submodule "upstream"]
path = upstream
url = https://git.merproject.org/mirror/glib.git
url = https://git.sailfishos.org/mirror/glib.git
10 changes: 5 additions & 5 deletions rpm/0001-glib2-detect-removable-storage-properly.-JB-48442.patch
@@ -1,7 +1,7 @@
From ace4b91d16db30d658756e3367674f206d21e10d Mon Sep 17 00:00:00 2001
From 7686cc0a857ffd11c06698fce56413439a8bf701 Mon Sep 17 00:00:00 2001
From: Frajo Haider <f_haider@gmx.at>
Date: Wed, 15 Jan 2020 15:06:05 +0000
Subject: [PATCH 1/1] [glib2] detect removable storage properly. JB#48442
Subject: [PATCH] detect removable storage properly. JB#48442

This is needed for Tracker to detect removable storage properly. Upstream
by default already moved to libmount, but that seems to have problems with
Expand All @@ -16,10 +16,10 @@ properly.
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c
index 0035d57..9afe957 100644
index cbf2ee9..2fe361d 100644
--- a/gio/gunixmounts.c
+++ b/gio/gunixmounts.c
@@ -1048,8 +1048,11 @@ _g_get_unix_mount_points (void)
@@ -1087,8 +1087,11 @@ _g_get_unix_mount_points (void)
char *read_file;
GUnixMountPoint *mount_point;
GList *return_list;
Expand All @@ -32,7 +32,7 @@ index 0035d57..9afe957 100644

file = setmntent (read_file, "r");
if (file == NULL)
@@ -1105,6 +1108,15 @@ _g_get_unix_mount_points (void)
@@ -1144,6 +1147,15 @@ _g_get_unix_mount_points (void)
)
is_user_mountable = TRUE;

Expand Down
4 changes: 2 additions & 2 deletions rpm/glib-replace-some-criticals-with-warnings.patch
@@ -1,8 +1,8 @@
diff --git a/glib/gmain.c b/glib/gmain.c
index 227168a0f..850638735 100644
index af979c8..e7db171 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -2349,7 +2349,7 @@ g_source_remove (guint tag)
@@ -2352,7 +2352,7 @@ g_source_remove (guint tag)
if (source)
g_source_destroy (source);
else
Expand Down
113 changes: 62 additions & 51 deletions rpm/glib2.spec
Expand Up @@ -3,9 +3,8 @@ Name: glib2
%define keepstatic 1

Summary: A library of handy utility functions
Version: 2.56.1
Version: 2.62.4
Release: 1
Group: System/Libraries
License: LGPLv2+
URL: http://www.gtk.org
Source0: %{name}-%{version}.tar.xz
Expand All @@ -16,13 +15,21 @@ Patch1: 0001-glib2-detect-removable-storage-properly.-JB-48442.patch
Patch2: glib-replace-some-criticals-with-warnings.patch
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRequires: pkgconfig(libpcre)
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(libffi)
BuildRequires: gettext
BuildRequires: glibc-devel
BuildRequires: libattr-devel
BuildRequires: python >= 2.5
BuildRequires: chrpath
BuildRequires: gettext
BuildRequires: perl
# for sys/inotify.h
BuildRequires: glibc-devel
BuildRequires: libattr-devel
BuildRequires: libselinux-devel
BuildRequires: meson
# for sys/sdt.h
BuildRequires: pkgconfig(libelf)
BuildRequires: pkgconfig(libffi)
BuildRequires: pkgconfig(libpcre)
BuildRequires: pkgconfig(mount)
BuildRequires: pkgconfig(zlib)
BuildRequires: python3-devel

%description
GLib is the low-level core library that forms the basis
Expand All @@ -36,7 +43,6 @@ This package provides version 2 of GLib.

%package static
Summary: A library of handy utility functions
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: %{name}-devel = %{version}

Expand All @@ -47,70 +53,71 @@ of version 2 of the GLib library.

%package devel
Summary: A library of handy utility functions
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: python
Requires: python3-base

%description devel
The glib2-devel package includes the header files for
version 2 of the GLib library.


%prep
%setup -q -n %{name}-%{version}/upstream

# 0001-glib2-paths-in-run-media-frajo-are-generally-user-mo.patch
%patch1 -p1
# glib-replace-some-criticals-with-warnings.patch
%patch2 -p1
%autosetup -p1 -n %{name}-%{version}/upstream

%build
#
# First, build glib enabled for generating the Profile Guided Optimization
# metadata
#
%autogen \
--enable-static \
--with-pcre=system \
--disable-libmount

make %{?_smp_mflags}

cd tests/gobject

#
# Now run the glib performance tests to create the profile data
#
make performance CFLAGS="$CFLAGS -pg -fprofile-generate"
cd ../..
tests/gobject/performance type-check
rm `find -name "*.lo"`
rm `find -name "*.o"`
#
# And now compile again, using the generated profile data
#
make %{?_smp_mflags} CFLAGS="$CFLAGS -fprofile-use"
# Bug 1324770: Also explicitly remove PCRE sources since we use --with-pcre=system
rm -f glib/pcre/*.[ch]
%meson \
--default-library=both \
-Dlibmount=false

%meson_build

%install
rm -rf %{buildroot}
%make_install
%meson_install
# Since this is a generated .py file, set it to a known timestamp for
# better reproducibility.
# Also copy the timestamp for other .py files, because meson doesn't
# do this, see https://github.com/mesonbuild/meson/issues/5027.
touch -r gio/gdbus-2.0/codegen/config.py.in %{buildroot}%{_datadir}/glib-2.0/codegen/*.py
chrpath --delete %{buildroot}%{_libdir}/*.so

# Perform byte compilation manually to avoid issues with
# irreproducibility of the default invalidation mode, see
# https://www.python.org/dev/peps/pep-0552/ and
# https://bugzilla.redhat.com/show_bug.cgi?id=1686078
export PYTHONHASHSEED=0
%global __python %{__python3} %{buildroot}%{_datadir}

mv %{buildroot}%{_bindir}/gio-querymodules %{buildroot}%{_bindir}/gio-querymodules-%{__isa_bits}

mkdir -p %{buildroot}%{_libdir}/gio/modules
touch %{buildroot}%{_libdir}/gio/modules/giomodule.cache

## glib2.sh and glib2.csh
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d
install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/profile.d

rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{_libdir}/gio/modules/*.{a,la}
rm -f %{buildroot}%{_datadir}/glib-2.0/codegen/*.{pyc,pyo}

# MeeGo does not provide bash completion
rm -rf %{buildroot}%{_sysconfdir}/bash_completion.d
rm -rf %{buildroot}%{_datadir}/bash-completion

%find_lang glib20
mv glib20.lang glib2.lang

%transfiletriggerin -- %{_libdir}/gio/modules
gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules &> /dev/null || :

%transfiletriggerpostun -- %{_libdir}/gio/modules
gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules &> /dev/null || :

%transfiletriggerin -- %{_datadir}/glib-2.0/schemas
glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :

%transfiletriggerpostun -- %{_datadir}/glib-2.0/schemas
glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :

%lang_package

%post -p /sbin/ldconfig
Expand All @@ -126,16 +133,20 @@ mv glib20.lang glib2.lang
%{_libdir}/libgobject-2.0.so.*
%{_libdir}/libgio-2.0.so.*
%{_sysconfdir}/profile.d/*
%dir %{_datadir}/glib-2.0
%dir %{_datadir}/glib-2.0/schemas
%dir %{_libdir}/gio
%dir %{_libdir}/gio/modules
%{_bindir}/gio-querymodules
%ghost %{_libdir}/gio/modules/giomodule.cache
%{_bindir}/gio-querymodules*
%{_bindir}/glib-compile-schemas
%{_bindir}/gsettings
%{_bindir}/gdbus
%{_bindir}/glib-compile-resources
%{_bindir}/gresource
%{_bindir}/gapplication
%{_bindir}/gio
%{_bindir}/gio-launch-desktop
%{_datarootdir}/gettext/its

%files static
Expand All @@ -150,7 +161,7 @@ mv glib20.lang glib2.lang
%{_datadir}/aclocal/*
%{_libdir}/pkgconfig/*
%{_datadir}/glib-2.0
%{_datadir}/gdb/auto-load/usr/lib/*.py*
%{_datadir}/gdb/
%{_bindir}/glib-genmarshal
%{_bindir}/glib-gettextize
%{_bindir}/glib-mkenums
Expand Down
2 changes: 1 addition & 1 deletion upstream
Submodule upstream updated from d0364b to dac69d

0 comments on commit a36c2f7

Please sign in to comment.