$ git diff --patch-with-stat --summary 356e9bc28f594805424fdb237d108bed85e7fdb2..cf6b7095c7c670ef82659f927c3a43ba0bfb66fe
.abf.yml | 2 +-
0001-meson-Run-atomics-test-on-clang-as-well.patch | 29 +++
disable-tests.patch | 194 ++-------------------
glib2.0.spec | 12 +-
4 files changed, 54 insertions(+), 183 deletions(-)
create mode 100644 0001-meson-Run-atomics-test-on-clang-as-well.patch
diff --git a/.abf.yml b/.abf.yml
index 3a34c33..ad7ed72 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,2 +1,2 @@
sources:
- glib-2.66.1.tar.xz: aaaeb5079ef6afa027e28aecd5bb84c6aad14198
+ glib-2.66.4.tar.xz: a45268bb9adeb49563c16978c52b3bd5ac93ae0d
diff --git a/0001-meson-Run-atomics-test-on-clang-as-well.patch b/0001-meson-Run-atomics-test-on-clang-as-well.patch
new file mode 100644
index 0000000..44482dd
--- /dev/null
+++ b/0001-meson-Run-atomics-test-on-clang-as-well.patch
@@ -0,0 +1,29 @@
+From 4b97f457b7b44117e27d2a218c4b68e7fe3fe4ce Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 12 Oct 2019 17:46:26 -0700
+Subject: [PATCH] meson: Run atomics test on clang as well
+
+Fixes
+./glib-2.62.1/glib/gatomic.c:675:2: error: G_ATOMIC_LOCK_FREE defined, but incapable of lock-free atomics.
+^
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index afb6eaa..6aa70f5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1692,7 +1692,7 @@ atomicdefine = '''
+ # We know that we can always use real ("lock free") atomic operations with MSVC
+ if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' or cc.links(atomictest, name : 'atomic ops')
+ have_atomic_lock_free = true
+- if cc.get_id() == 'gcc' and not cc.compiles(atomicdefine, name : 'atomic ops define')
++ if (cc.get_id() == 'gcc' or cc.get_id() == 'clang') and not cc.compiles(atomicdefine, name : 'atomic ops define')
+ # Old gcc release may provide
+ # __sync_bool_compare_and_swap but doesn't define
+ # __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
diff --git a/disable-tests.patch b/disable-tests.patch
index d9fcb9d..d7a5499 100644
--- a/disable-tests.patch
+++ b/disable-tests.patch
@@ -1,180 +1,16 @@
-diff --git a/gio/tests/meson.build b/gio/tests/meson.build
-index 65f43e2..33d103c 100644
---- a/gio/tests/meson.build
-+++ b/gio/tests/meson.build
-@@ -453,175 +453,6 @@ if installed_tests_enabled
- install_data('static-link.py', install_dir : installed_tests_execdir)
- endif
+diff --git a/tests/meson.build b/tests/meson.build
+index 6741f8f..316cf25 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -55,11 +55,6 @@ tests = {
+ 'source': 'module-test.c',
+ 'c_args': ['-DMODULE_TYPE="plugin"'],
+ },
+- 'cxx-test' : {
+- 'source' : 'cxx-test.cpp',
+- 'include_directories' : gmoduleinc,
+- 'dependencies' : [libgio_dep],
+- },
+ }
--if not meson.is_cross_build() or meson.has_exe_wrapper()
--
-- plugin_resources_c = custom_target('plugin-resources.c',
-- input : 'test4.gresource.xml',
-- output : 'plugin-resources.c',
-- command : [glib_compile_resources,
-- '--target=@OUTPUT@',
-- '--sourcedir=' + meson.current_source_dir(),
-- '--generate-source',
-- '--c-name', '_g_plugin',
-- '@INPUT@'])
--
-- shared_module('resourceplugin', 'resourceplugin.c', plugin_resources_c,
-- link_args : export_dynamic_ldflags,
-- dependencies : common_gio_tests_deps,
-- install_dir : installed_tests_execdir,
-- install : installed_tests_enabled
-- )
--
-- # referenced by test2.gresource.xml
-- big_test_resource = custom_target(
-- 'gresource-big-test.txt',
-- input : ['gen-big-test-resource.py'],
-- output : ['gresource-big-test.txt'],
-- command : [python, '@INPUT0@', '@OUTPUT@'])
--
-- test_gresource = custom_target('test.gresource',
-- input : 'test.gresource.xml',
-- output : 'test.gresource',
-- command : [glib_compile_resources,
-- '--target=@OUTPUT@',
-- '--sourcedir=' + meson.current_source_dir(),
-- '--sourcedir=' + meson.current_build_dir(),
-- '@INPUT@'],
-- install_dir : installed_tests_execdir,
-- install : installed_tests_enabled)
--
-- test_resources2_c = custom_target('test_resources2.c',
-- input : 'test3.gresource.xml',
-- output : 'test_resources2.c',
-- command : [glib_compile_resources,
-- '--target=@OUTPUT@',
-- '--sourcedir=' + meson.current_source_dir(),
-- '--generate',
-- '--c-name', '_g_test2',
-- '--manual-register',
-- '@INPUT@'])
--
-- test_resources2_h = custom_target('test_resources2.h',
-- input : 'test3.gresource.xml',
-- output : 'test_resources2.h',
-- command : [glib_compile_resources,
-- '--target=@OUTPUT@',
-- '--sourcedir=' + meson.current_source_dir(),
-- '--generate',
-- '--c-name', '_g_test2',
-- '--manual-register',
-- '@INPUT@'])
--
-- test_resources_c = custom_target('test_resources.c',
-- input : 'test2.gresource.xml',
-- depends : big_test_resource,
-- output : 'test_resources.c',
-- command : [glib_compile_resources,
-- '--target=@OUTPUT@',
-- '--sourcedir=' + meson.current_source_dir(),
-- '--sourcedir=' + meson.current_build_dir(),
-- '--generate-source',
-- '--c-name', '_g_test1',
-- '@INPUT@'])
--
-- digit_test_resources_c = custom_target('digit_test_resources.c',
-- input : '111_digit_test.gresource.xml',
-- output : 'digit_test_resources.c',
-- command : [glib_compile_resources,
-- '--target=@OUTPUT@',
-- '--sourcedir=' + meson.current_source_dir(),
-- '--sourcedir=' + meson.current_build_dir(),
-- '--generate-source',
-- '--manual-register',
-- '@INPUT@'])
--
-- digit_test_resources_h = custom_target('digit_test_resources.h',
-- input : '111_digit_test.gresource.xml',
-- output : 'digit_test_resources.h',
-- command : [glib_compile_resources,
-- '--target=@OUTPUT@',
-- '--sourcedir=' + meson.current_source_dir(),
-- '--generate',
-- '--manual-register',
-- '@INPUT@'])
--
-- # referenced by test.gresource.xml
-- test_generated_txt = configure_file(input : 'test1.txt',
-- output : 'test-generated.txt',
-- copy : true,
-- install : false)
--
-- resources_extra_sources = [
-- test_gresource,
-- test_resources_c,
-- test_resources2_c,
-- test_resources2_h,
-- digit_test_resources_c,
-- digit_test_resources_h,
-- ]
--
-- # Create object file containing resource data for testing the --external-data
-- # option. Currently only GNU ld and GNU objcopy support the right options.
-- # Support for --add-symbol was added to LLVM objcopy in 2019
-- # (https://reviews.llvm.org/D58234). FIXME: This test could be enabled for
-- # LLVM once that support is in a stable release.
-- if build_machine.system() == 'linux' and cc.get_id() == 'gcc'
-- test_gresource_binary = custom_target('test5.gresource',
-- input : 'test5.gresource.xml',
-- output : 'test5.gresource',
-- command : [glib_compile_resources,
-- '--target=@OUTPUT@',
-- '--sourcedir=' + meson.current_source_dir(),
-- '--sourcedir=' + meson.current_build_dir(),
-- '@INPUT@'],
-- install_dir : installed_tests_execdir,
-- install : installed_tests_enabled)
--
-- # Create resource data file
-- test_resources_binary_c = custom_target('test_resources_binary.c',
-- input : 'test5.gresource.xml',
-- output : 'test_resources_binary.c',
-- command : [glib_compile_resources,
-- '--target=@OUTPUT@',
-- '--sourcedir=' + meson.current_source_dir(),
-- '--sourcedir=' + meson.current_build_dir(),
-- '--generate-source',
-- '--external-data',
-- '--c-name', '_g_binary_test1',
-- '@INPUT@'])
--
-- # Create object file containing resource data
-- test_resources_binary = custom_target('test_resources.o',
-- input : test_gresource_binary,
-- output : 'test_resources.o',
-- command : ['ld',
-- '-r',
-- '-b','binary',
-- '@INPUT@',
-- '-o','@OUTPUT@'])
--
-- # Rename symbol to match the one in the C file
-- test_resources_binary2 = custom_target('test_resources2.o',
-- input : test_resources_binary,
-- output : 'test_resources2.o',
-- command : ['objcopy',
-- '--add-symbol','_g_binary_test1_resource_data=.data:0',
-- '@INPUT@',
-- '@OUTPUT@'])
--
-- resources_extra_sources += [
-- test_resources_binary_c,
-- test_resources_binary2,
-- ]
-- endif
--
-- gio_tests += {
-- 'resources' : {
-- 'extra_sources' : resources_extra_sources,
-- },
-- }
--endif
--
- foreach test_name, extra_args : gio_tests
- source = extra_args.get('source', test_name + '.c')
- extra_sources = extra_args.get('extra_sources', [])
+ test_extra_programs = {
diff --git a/glib2.0.spec b/glib2.0.spec
index 0b2c977..1b8dd28 100644
--- a/glib2.0.spec
+++ b/glib2.0.spec
@@ -19,7 +19,8 @@
%bcond_with pgo
# (tpg) optimize it a bit
-%global optflags %optflags -O3
+%define _disable_lto 1
+%global optflags %(echo %{optflags} -O3 | sed 's/-flto//')
%define api 2.0
%define major 0
@@ -47,7 +48,7 @@
Summary: GIMP Toolkit and GIMP Drawing Kit support library
Name: glib%{api}
Epoch: 1
-Version: 2.66.1
+Version: 2.66.4
Release: 1
Group: System/Libraries
License: LGPLv2+
@@ -64,9 +65,11 @@ Patch2: glib-2.64.5-clang.patch
#Patch11: madvise.patch
Patch12: wakeups.patch
Patch13: gerror-return-on-null.patch
+Patch14: 0001-meson-Run-atomics-test-on-clang-as-well.patch
#Patch14: 0001-Remove-debugging-in-gspawn.c.patch
# dont remove it!!!
-#Patch15: disable-tests.patch
+# needed for riscv64
+Patch15: disable-tests.patch
BuildRequires: meson
BuildRequires: cmake
@@ -207,7 +210,10 @@ on the network. For the latter you need to install gvfs.
Summary: Development libraries and header files of %{name}
Group: Development/C
Provides: %{name}-devel = %{EVRD}
+Provides: glib2-devel = %{EVRD}
Requires: glib-gettextize = %{EVRD}
+Provides: %{name}-static-devel = %{EVRD}
+Provides: glib2-static-devel = %{EVRD}
Requires: %{name}-common = %{EVRD}
Requires: %{libname} = %{EVRD}
Requires: %{libgio} = %{EVRD}