diff options
Diffstat (limited to 'libre/glib2-static')
-rw-r--r-- | libre/glib2-static/0001-docs-Fix-building-with-meson.patch | 85 | ||||
-rw-r--r-- | libre/glib2-static/0001-meson-Build-with-static-linkage.patch | 126 | ||||
-rw-r--r-- | libre/glib2-static/0001-meson-Fix-GDB-scripts-install_dir-for-nix.patch | 50 | ||||
-rw-r--r-- | libre/glib2-static/0001-meson-Fix-libmount-support.patch | 41 | ||||
-rw-r--r-- | libre/glib2-static/0001-meson-Fix-permissions-of-installed-scripts.patch | 50 | ||||
-rw-r--r-- | libre/glib2-static/PKGBUILD | 122 | ||||
-rw-r--r-- | libre/glib2-static/gio-querymodules.hook | 11 | ||||
-rw-r--r-- | libre/glib2-static/glib-compile-schemas.hook | 12 | ||||
-rw-r--r-- | libre/glib2-static/libs.diff | 110 | ||||
-rw-r--r-- | libre/glib2-static/noisy-glib-compile-schemas.diff | 24 | ||||
-rw-r--r-- | libre/glib2-static/revert-warn-glib-compile-schemas.patch | 33 |
11 files changed, 602 insertions, 62 deletions
diff --git a/libre/glib2-static/0001-docs-Fix-building-with-meson.patch b/libre/glib2-static/0001-docs-Fix-building-with-meson.patch new file mode 100644 index 000000000..02f69b700 --- /dev/null +++ b/libre/glib2-static/0001-docs-Fix-building-with-meson.patch @@ -0,0 +1,85 @@ +From a7cbd565aad04f92cbd9ac36696a9d033ae6bcc0 Mon Sep 17 00:00:00 2001 +From: Armin K <krejzi@email.com> +Date: Fri, 25 Aug 2017 13:36:23 +0200 +Subject: [PATCH] docs: Fix building with meson + +This fixes {gio,gobject}-doc ninja targets as well as +install process when gtk-doc is enabled +--- + docs/reference/gio/meson.build | 15 ++++++++++++++- + docs/reference/gobject/meson.build | 13 ++++++++++++- + 2 files changed, 26 insertions(+), 2 deletions(-) + +diff --git a/docs/reference/gio/meson.build b/docs/reference/gio/meson.build +index 7f0467726..8f8dc7ce5 100644 +--- a/docs/reference/gio/meson.build ++++ b/docs/reference/gio/meson.build +@@ -52,9 +52,12 @@ if get_option('with-docs') != 'no' + 'gnetworkmonitorbase.h', + 'gnetworkmonitornetlink.h', + 'gnetworkmonitornm.h', ++ 'gnetworkmonitorportal.h', + 'gnotificationbackend.h', + 'gnotification-private.h', ++ 'gosxappinfo.h', + 'gpollfilemonitor.h', ++ 'gproxyresolverportal.h', + 'gregistrysettingsbackend.h', + 'gresourcefile.h', + 'gsettingsbackendinternal.h', +@@ -95,12 +98,22 @@ if get_option('with-docs') != 'no' + configuration: version_conf + ) + ++ # Meson uses paths relative to meson.source_root() in dependencies, ++ # which is invalid relative to current_source_dir(), so the compile ++ # process fails to find glib headers ++ top_build_dir = meson.build_root() ++ top_source_dir = meson.source_root() ++ glib_top_build_dir = join_paths(top_build_dir, 'glib') ++ glib_top_source_dir = join_paths(top_source_dir, 'glib') ++ ++ scan_dep = declare_dependency(include_directories : [ top_source_dir, glib_top_build_dir, glib_top_source_dir ]) ++ + gnome.gtkdoc('gio', + main_xml : 'gio-docs.xml', + namespace : 'g', + gobject_typesfile : 'gio.types', + mode : 'none', +- dependencies : [libgio_dep, libgobject_dep, libglib_dep], ++ dependencies : [libgio_dep, libgobject_dep, libglib_dep, scan_dep], + src_dir : 'gio', + scan_args : [ + '--rebuild-types', +diff --git a/docs/reference/gobject/meson.build b/docs/reference/gobject/meson.build +index 1025e174f..9ec1f9123 100644 +--- a/docs/reference/gobject/meson.build ++++ b/docs/reference/gobject/meson.build +@@ -17,12 +17,23 @@ if get_option('with-docs') != 'no' + configuration: version_conf + ) + ++ # Meson uses paths relative to meson.source_root() in dependencies, ++ # which is invalid relative to current_source_dir(), so the compile ++ # process fails to find glib headers ++ doc_source_dir = meson.current_source_dir() ++ top_build_dir = meson.build_root() ++ top_source_dir = meson.source_root() ++ glib_top_build_dir = join_paths(top_build_dir, 'glib') ++ glib_top_source_dir = join_paths(top_source_dir, 'glib') ++ ++ scan_dep = declare_dependency(include_directories : [ doc_source_dir, top_source_dir, glib_top_build_dir, glib_top_source_dir ]) ++ + gnome.gtkdoc('gobject', + main_xml : 'gobject-docs.xml', + namespace : 'g', + gobject_typesfile : join_paths(meson.current_source_dir(), 'gobject.types'), + mode : 'none', +- dependencies : [libgobject_dep, libglib_dep], ++ dependencies : [libgobject_dep, libglib_dep, scan_dep], + src_dir : 'gobject', + scan_args : [ + '--deprecated-guards=G_DISABLE_DEPRECATED', +-- +2.14.1 + diff --git a/libre/glib2-static/0001-meson-Build-with-static-linkage.patch b/libre/glib2-static/0001-meson-Build-with-static-linkage.patch new file mode 100644 index 000000000..d7fa59bfa --- /dev/null +++ b/libre/glib2-static/0001-meson-Build-with-static-linkage.patch @@ -0,0 +1,126 @@ +From 241041b0b38e5851bb1a166cbd9393bbdd6eea06 Mon Sep 17 00:00:00 2001 +From: Luke Shumaker <lukeshu@lukeshu.com> +Date: Sun, 24 Dec 2017 03:42:06 -0500 +Subject: [PATCH] meson: Build with static linkage. + +This switches all libraries from using shared_library() to +static_library(). For some reason, switching them to just library() (which +should obey default_library) doesn't allow -Ddefault_library=static to set +most of them to static. I suspect it's a bug in meson 0.44.0-1. + +This also amends libglib_dep to include the pkg-config's Libs.private. +--- + gio/meson.build | 2 +- + gio/tests/gdbus-object-manager-example/meson.build | 2 +- + gio/tests/modules/meson.build | 4 ++-- + glib/meson.build | 3 ++- + gmodule/meson.build | 2 +- + gobject/meson.build | 2 +- + gthread/meson.build | 2 +- + 7 files changed, 9 insertions(+), 8 deletions(-) + +diff --git a/gio/meson.build b/gio/meson.build +index d7030aa29..b904841b2 100644 +--- a/gio/meson.build ++++ b/gio/meson.build +@@ -711,7 +711,7 @@ else + gio_dtrace_hdr = [] + endif + +-libgio = shared_library('gio-2.0', ++libgio = static_library('gio-2.0', + gioenumtypes_h, gioenumtypes_c, gnetworking_h, gio_sources, + gio_dtrace_hdr, gio_dtrace_obj, + version : library_version, +diff --git a/gio/tests/gdbus-object-manager-example/meson.build b/gio/tests/gdbus-object-manager-example/meson.build +index 630357378..b92d6ea9d 100644 +--- a/gio/tests/gdbus-object-manager-example/meson.build ++++ b/gio/tests/gdbus-object-manager-example/meson.build +@@ -14,7 +14,7 @@ gdbus_example_objectmanager_generated = custom_target('gdbus-example-objectmanag + '--generate-docbook', 'gdbus-example-objectmanager-generated', + '@INPUT@']) + +-libgdbus_example_objectmanager = shared_library('libgdbus-example-objectmanager', ++libgdbus_example_objectmanager = static_library('libgdbus-example-objectmanager', + gdbus_example_objectmanager_generated, + c_args : ['-DHAVE_CONFIG_H=1'] + gio_c_args, + dependencies : [libglib_dep, libgmodule_dep, libgobject_dep, libgio_dep], +diff --git a/gio/tests/modules/meson.build b/gio/tests/modules/meson.build +index c219015d3..21a43c5ee 100644 +--- a/gio/tests/modules/meson.build ++++ b/gio/tests/modules/meson.build +@@ -1,10 +1,10 @@ +-libtestmodulea = shared_library('testmodulea', 'test-module-a.c', ++libtestmodulea = static_library('testmodulea', 'test-module-a.c', + install : false, + dependencies : [libglib_dep, libgobject_dep, libgmodule_dep, libgio_dep], + c_args : [ ] + ) + +-libtestmoduleb = shared_library('testmoduleb', 'test-module-b.c', ++libtestmoduleb = static_library('testmoduleb', 'test-module-b.c', + install : false, + dependencies : [libglib_dep, libgobject_dep, libgmodule_dep, libgio_dep], + c_args : [ ] +diff --git a/glib/meson.build b/glib/meson.build +index e46d2deb6..371e5bfbf 100644 +--- a/glib/meson.build ++++ b/glib/meson.build +@@ -220,7 +220,7 @@ if use_pcre_static_flag + pcre_static_args = ['-DPCRE_STATIC'] + endif + +-libglib = shared_library('glib-2.0', ++libglib = static_library('glib-2.0', + glib_dtrace_obj, glib_dtrace_hdr, + sources : [deprecated_sources, glib_sources, thread_src, plat_src], + version : library_version, +@@ -235,6 +235,7 @@ libglib = shared_library('glib-2.0', + ) + + libglib_dep = declare_dependency(link_with : libglib, ++ dependencies : [pcre, thread_dep, libintl, librt] + libiconv + platform_deps, + # We sadly need to export configinc here because everyone includes <glib/*.h> + include_directories : [configinc, glibinc]) + +diff --git a/gmodule/meson.build b/gmodule/meson.build +index fd0219d92..841fc1e91 100644 +--- a/gmodule/meson.build ++++ b/gmodule/meson.build +@@ -87,7 +87,7 @@ gmoduleconf_h = configure_file(input : 'gmoduleconf.h.in', + + install_headers(['gmodule.h'], subdir : 'glib-2.0') + +-libgmodule = shared_library('gmodule-2.0', ++libgmodule = static_library('gmodule-2.0', + sources : ['gmodule.c'], + version : library_version, + soversion : soversion, +diff --git a/gobject/meson.build b/gobject/meson.build +index 9c722ce30..feac8fa92 100644 +--- a/gobject/meson.build ++++ b/gobject/meson.build +@@ -53,7 +53,7 @@ else + gobject_dtrace_hdr = [] + endif + +-libgobject = shared_library('gobject-2.0', ++libgobject = static_library('gobject-2.0', + gobject_dtrace_obj, gobject_dtrace_hdr, + sources : [gobject_c_sources], + version : library_version, +diff --git a/gthread/meson.build b/gthread/meson.build +index 2d5913a91..63e6dd86b 100644 +--- a/gthread/meson.build ++++ b/gthread/meson.build +@@ -1,6 +1,6 @@ + # Just a skeleton lib for backwards compatibility since all the functionaliy + # has been moved into glib now +-libgthread = shared_library('gthread-2.0', ++libgthread = static_library('gthread-2.0', + sources : [ 'gthread-impl.c' ], + version : library_version, + soversion : soversion, +-- +2.15.1 + diff --git a/libre/glib2-static/0001-meson-Fix-GDB-scripts-install_dir-for-nix.patch b/libre/glib2-static/0001-meson-Fix-GDB-scripts-install_dir-for-nix.patch new file mode 100644 index 000000000..10c85a3f4 --- /dev/null +++ b/libre/glib2-static/0001-meson-Fix-GDB-scripts-install_dir-for-nix.patch @@ -0,0 +1,50 @@ +From b454a60bf154332bd5961880700b7d08aec98995 Mon Sep 17 00:00:00 2001 +Message-Id: <b454a60bf154332bd5961880700b7d08aec98995.1508856243.git.jan.steffens@gmail.com> +From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> +Date: Tue, 24 Oct 2017 16:29:49 +0200 +Subject: [PATCH] meson: Fix GDB scripts install_dir for *nix + +Disable installation on Windows for now as this would use a colon in the +directory name. + +https://bugzilla.gnome.org/show_bug.cgi?id=788772 +--- + glib/meson.build | 5 +++-- + gobject/meson.build | 5 +++-- + 2 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/glib/meson.build b/glib/meson.build +index 1da0bcd3cc601b9e..33ece2d0221c1850 100644 +--- a/glib/meson.build ++++ b/glib/meson.build +@@ -283,8 +283,9 @@ configure_file( + input: 'libglib-gdb.py.in', + output: 'libglib-2.0.so.@0@-gdb.py'.format(library_version), + configuration: gdb_conf, +- install: true, +- install_dir: join_paths(get_option('datadir'), 'gdb/auto-load' + get_option('libdir')) ++ # FIXME: Figure out how to install this on Windows ++ install: host_system != 'windows', ++ install_dir: join_paths(glib_datadir, 'gdb', 'auto-load', './' + glib_libdir) + ) + + if enable_systemtap +diff --git a/gobject/meson.build b/gobject/meson.build +index 5a8289e6f054818e..0c8c0cb26f053d1c 100644 +--- a/gobject/meson.build ++++ b/gobject/meson.build +@@ -100,8 +100,9 @@ configure_file( + input: 'libgobject-gdb.py.in', + output: 'libgobject-2.0.so.@0@-gdb.py'.format(library_version), + configuration: gdb_conf, +- install: true, +- install_dir: join_paths(get_option('datadir'), 'gdb/auto-load/' + get_option('libdir')) ++ # FIXME: Figure out how to install this on Windows ++ install: host_system != 'windows', ++ install_dir: join_paths(glib_datadir, 'gdb', 'auto-load', './' + glib_libdir) + ) + + if enable_systemtap +-- +2.14.2 + diff --git a/libre/glib2-static/0001-meson-Fix-libmount-support.patch b/libre/glib2-static/0001-meson-Fix-libmount-support.patch new file mode 100644 index 000000000..c85f047c0 --- /dev/null +++ b/libre/glib2-static/0001-meson-Fix-libmount-support.patch @@ -0,0 +1,41 @@ +From c93756c8f066a1e35fa2f46b231771d78e292600 Mon Sep 17 00:00:00 2001 +Message-Id: <c93756c8f066a1e35fa2f46b231771d78e292600.1509419562.git.jan.steffens@gmail.com> +From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> +Date: Tue, 31 Oct 2017 04:11:42 +0100 +Subject: [PATCH] meson: Fix libmount support + +The define was still missing. +--- + config.h.meson | 3 +++ + meson.build | 1 + + 2 files changed, 4 insertions(+) + +diff --git a/config.h.meson b/config.h.meson +index c67e1792f4af1ada..3f310b3c960fcb29 100644 +--- a/config.h.meson ++++ b/config.h.meson +@@ -247,6 +247,9 @@ + /* Define if libelf is available */ + #mesondefine HAVE_LIBELF + ++/* Define if libmount is available */ ++#mesondefine HAVE_LIBMOUNT ++ + /* Define to 1 if you have the <linux/magic.h> header file. */ + #mesondefine HAVE_LINUX_MAGIC_H + +diff --git a/meson.build b/meson.build +index 208c23087627de1e..cd9cbf2ce10595c2 100644 +--- a/meson.build ++++ b/meson.build +@@ -1535,6 +1535,7 @@ if use_system_pcre + endif + if libmount_dep.length() == 1 and libmount_dep[0].found() + glib_conf.set('LIBMOUNT_LIBS', '-lmount') ++ glib_conf.set('HAVE_LIBMOUNT', 1) + endif + glib_conf.set('GIO_MODULE_DIR', '${libdir}/gio/modules') + # FIXME: Missing: +-- +2.15.0 + diff --git a/libre/glib2-static/0001-meson-Fix-permissions-of-installed-scripts.patch b/libre/glib2-static/0001-meson-Fix-permissions-of-installed-scripts.patch new file mode 100644 index 000000000..d89868acf --- /dev/null +++ b/libre/glib2-static/0001-meson-Fix-permissions-of-installed-scripts.patch @@ -0,0 +1,50 @@ +From e36f79439be76f125b67081eb4605b377d738cca Mon Sep 17 00:00:00 2001 +Message-Id: <e36f79439be76f125b67081eb4605b377d738cca.1505389490.git.jan.steffens@gmail.com> +From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> +Date: Thu, 14 Sep 2017 07:36:37 +0200 +Subject: [PATCH] meson: Fix permissions of installed scripts + +configure_file preserves the attributes, so the templates need to be +executable for the (installed) outputs to be executable. +--- + gio/gdbus-2.0/codegen/gdbus-codegen.in | 0 + gio/gdbus-2.0/codegen/meson.build | 1 - + glib-gettextize.in | 0 + gobject/meson.build | 1 - + 4 files changed, 2 deletions(-) + mode change 100644 => 100755 gio/gdbus-2.0/codegen/gdbus-codegen.in + mode change 100644 => 100755 glib-gettextize.in + +diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in +old mode 100644 +new mode 100755 +diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build +index 0e9ffbdfade70779..93d9106adba17a89 100644 +--- a/gio/gdbus-2.0/codegen/meson.build ++++ b/gio/gdbus-2.0/codegen/meson.build +@@ -13,7 +13,6 @@ gdbus_codegen_conf.set('VERSION', glib_version) + gdbus_codegen_conf.set('PYTHON', python.path()) + + # Install gdbus-codegen executable +-# FIXME: Set permissions + gdbus_codegen = configure_file(input : 'gdbus-codegen.in', + output : 'gdbus-codegen', + install : true, +diff --git a/glib-gettextize.in b/glib-gettextize.in +old mode 100644 +new mode 100755 +diff --git a/gobject/meson.build b/gobject/meson.build +index 0d39f2bbc36f816e..01f37a33a623f4b8 100644 +--- a/gobject/meson.build ++++ b/gobject/meson.build +@@ -76,7 +76,6 @@ python_tools_conf.set('VERSION', glib_version) + python_tools_conf.set('PYTHON', python.path()) + + foreach tool: python_tools +- # FIXME: Ensure we set the appropriate permissions + tool_bin = configure_file( + input : tool + '.in', + output : tool, +-- +2.14.1 + diff --git a/libre/glib2-static/PKGBUILD b/libre/glib2-static/PKGBUILD index 71e1fc1d3..585082103 100644 --- a/libre/glib2-static/PKGBUILD +++ b/libre/glib2-static/PKGBUILD @@ -1,19 +1,45 @@ -# Maintainer: Márcio Silva <coadde@hyperbola.info> -# based of glib2 +# Maintainer (Arch:glib2) Jan de Groot <jgc@archlinux.org> +# Maintainer: Luke Shumaker <lukeshu@parabola.nu> +# Contributor: Márcio Silva <coadde@hyperbola.info> + +# glib 2.54 added meson as the preferred build system, and core/glib2 +# switched to that. However, the meson build doesn't support static +# linkage, so we're stuck with the old autotools build system. -pkgbase=glib2 pkgname=glib2-static -pkgver=2.50.2 -pkgrel=1 -pkgdesc="Low level core library (static libraries only)" -url="http://www.gtk.org/" -arch=(i686 x86_64 armv7h) -makedepends=(python git) -_commit=224f8171dceca920cfd8a4b446726b7610cdafd9 # tags/2.50.2^0 -source=("git://git.gnome.org/glib#commit=$_commit" - revert-warn-glib-compile-schemas.patch) +pkgver=2.54.2 +pkgrel=2.parabola2 +pkgdesc="Low level core library" +url="https://wiki.gnome.org/Projects/GLib" +license=(LGPL2.1) +arch=(x86_64) +arch+=(i686 armv7h) +depends=(pcre libffi libutil-linux zlib) +_depends=(pcre-static libffi-static libutil-linux-static zlib) +makedepends=(gettext gtk-doc shared-mime-info python libelf git util-linux meson dbus) +makedepends+=("${_depends[@]}") +checkdepends=(desktop-file-utils) +optdepends=('python: for gdbus-codegen and gtester-report' + 'libelf: gresource inspection tool') +options=(!emptydirs) +_commit=52b3e434d849e2b0233d6d3d663b5dda82ab263e # tags/2.54.2^0 +source=("git+https://git.gnome.org/browse/glib#commit=$_commit" + 0001-docs-Fix-building-with-meson.patch + 0001-meson-Fix-permissions-of-installed-scripts.patch + 0001-meson-Fix-GDB-scripts-install_dir-for-nix.patch + 0001-meson-Fix-libmount-support.patch + libs.diff + noisy-glib-compile-schemas.diff + glib-compile-schemas.hook gio-querymodules.hook) sha256sums=('SKIP' - '049240975cd2f1c88fbe7deb28af14d4ec7d2640495f7ca8980d873bb710cc97') + '8b289f3e1a5a3b29d310d45610468199acfe6f2b38a0d1be38c9224437a0e40c' + '12b1a2f4e304e4c03e48ae9564d73ae38619bbb7711a013138939ff8e5cc2327' + 'f53d5acfda4b7141a4813f1e49610e9176dc5bdf8e867d88290e34d91a40ebcb' + '14c0dcfb4efb690f7cb44673faf31f5eb40ac68c01974eddb53d5aa7ae366629' + '2fb828f51727bd9c8b48cfd9d6833c8b4ff82803331f6e2340b0ec8edfe57c52' + '81a4df0b638730cffb7fa263c04841f7ca6b9c9578ee5045db6f30ff0c3fc531' + 'e1123a5d85d2445faac33f6dae1085fdd620d83279a4e130a83fe38db52b62b3' + '5ba204a2686304b1454d401a39a9d27d09dd25e4529664e3fd565be3d439f8b6') pkgver() { cd glib @@ -21,34 +47,72 @@ pkgver() { } prepare() { + mkdir -p build glib2-docs/usr/share cd glib - patch -Rp1 -i ../revert-warn-glib-compile-schemas.patch + + # https://bugzilla.gnome.org/show_bug.cgi?id=786796 + patch -Np1 -i ../0001-docs-Fix-building-with-meson.patch + + # https://bugzilla.gnome.org/show_bug.cgi?id=787671 + patch -Np1 -i ../0001-meson-Fix-permissions-of-installed-scripts.patch + + # https://bugzilla.gnome.org/show_bug.cgi?id=788772 + patch -Np1 -i ../0001-meson-Fix-GDB-scripts-install_dir-for-nix.patch + + # https://bugzilla.gnome.org/show_bug.cgi?id=789681 + patch -Np1 -i ../0001-meson-Fix-libmount-support.patch + + # https://bugzilla.gnome.org/show_bug.cgi?id=788773 + patch -Np1 -i ../libs.diff + + # Suppress noise from glib-compile-schemas.hook + patch -Np1 -i ../noisy-glib-compile-schemas.diff + NOCONFIGURE=1 ./autogen.sh } - + build() { - cd glib - ./configure --prefix=/usr --libdir=/usr/lib \ - --disable-fam --enable-static - sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + cd build + ../glib/configure --prefix=/usr --libdir=/usr/lib \ + --sysconfdir=/etc \ + --with-pcre=system \ + --disable-fam \ + --disable-gtk-doc \ + --disable-shared --enable-static \ + $(check_option debug y && echo --enable-debug=yes) make } -check() { - cd glib - # Takes an effing long time - #make -k check || : +_check() { + cd build + rm -rf "$srcdir/test-home" + mkdir "$srcdir/test-home" + HOME="$srcdir/test-home" make -j1 check } package() { + pkgdesc+=" (static libraries)" depends=(glib2) + optdepends=() options=(staticlibs) - license=(LGPL) - cd glib - make completiondir=/usr/share/bash-completion/completions DESTDIR="$pkgdir" install + cd build + make DESTDIR="$pkgdir" install + + rm -vr -- \ + "$pkgdir"/usr/bin/ \ + "$pkgdir"/usr/include/ \ + "$pkgdir"/usr/lib/glib-*/ \ + "$pkgdir"/usr/lib/pkgconfig/ \ + "$pkgdir"/usr/share/ +} + +package_glib2-docs() { + pkgdesc="Documentation for GLib" + depends=() + optdepends=() + license+=(custom) - # remove conflicting files - rm -vr ${pkgdir}/usr/{bin,lib/{glib-*,pkgconfig},include,share} - rm -v ${pkgdir}/usr/lib/lib*.so* + mv glib2-docs/* "$pkgdir" + install -Dt "$pkgdir/usr/share/licenses/glib2-docs" -m644 glib/docs/reference/COPYING } diff --git a/libre/glib2-static/gio-querymodules.hook b/libre/glib2-static/gio-querymodules.hook new file mode 100644 index 000000000..193233398 --- /dev/null +++ b/libre/glib2-static/gio-querymodules.hook @@ -0,0 +1,11 @@ +[Trigger] +Type = File +Operation = Install +Operation = Upgrade +Operation = Remove +Target = usr/lib/gio/modules/*.so + +[Action] +Description = Updating GIO module cache... +When = PostTransaction +Exec = /usr/bin/gio-querymodules /usr/lib/gio/modules diff --git a/libre/glib2-static/glib-compile-schemas.hook b/libre/glib2-static/glib-compile-schemas.hook new file mode 100644 index 000000000..04dc59b1a --- /dev/null +++ b/libre/glib2-static/glib-compile-schemas.hook @@ -0,0 +1,12 @@ +[Trigger] +Type = File +Operation = Install +Operation = Upgrade +Operation = Remove +Target = usr/share/glib-2.0/schemas/*.gschema.xml +Target = usr/share/glib-2.0/schemas/*.gschema.override + +[Action] +Description = Compiling GSettings XML schema files... +When = PostTransaction +Exec = /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas diff --git a/libre/glib2-static/libs.diff b/libre/glib2-static/libs.diff new file mode 100644 index 000000000..eef85b814 --- /dev/null +++ b/libre/glib2-static/libs.diff @@ -0,0 +1,110 @@ +diff --git i/gio/meson.build w/gio/meson.build +index 4a10d49d7eb3229c..77537a77a26dcb5b 100644 +--- i/gio/meson.build ++++ w/gio/meson.build +@@ -741,7 +741,7 @@ libgio = shared_library('gio-2.0', + libgobject_dep, libgmodule_dep] + platform_deps + network_libs, + c_args : gio_c_args, + # intl.lib is not compatible with SAFESEH +- link_args : noseh_link_args, ++ link_args : noseh_link_args + library_link_args, + ) + + libgio_dep = declare_dependency(link_with : libgio, +diff --git i/glib/meson.build w/glib/meson.build +index f12a8b45bbbfec8f..2a505b3dd79ef163 100644 +--- i/glib/meson.build ++++ w/glib/meson.build +@@ -227,7 +227,7 @@ libglib = shared_library('glib-2.0', + soversion : soversion, + install : true, + # intl.lib is not compatible with SAFESEH +- link_args : noseh_link_args, ++ link_args : noseh_link_args + library_link_args, + include_directories : configinc, + link_with : [charset_lib, gnulib_lib], + dependencies : [pcre, thread_dep, libintl, librt] + libiconv + platform_deps, +diff --git i/gmodule/meson.build w/gmodule/meson.build +index 191bca2446f9977e..fd0219d9225f2f3f 100644 +--- i/gmodule/meson.build ++++ w/gmodule/meson.build +@@ -37,7 +37,7 @@ elif cc.has_function('NSLinkModule') + elif cc.links(dlopen_dlsym_test_code, args : '-ldl', name : 'dlopen() and dlsym() in libdl') + g_module_impl = 'G_MODULE_IMPL_DL' + libdl_dep = cc.find_library('dl') +- g_module_lib_args = '-ldl' ++ g_module_lib_args = ['-ldl'] + endif + + # additional checks for G_MODULE_IMPL_DL +@@ -72,25 +72,29 @@ if g_module_impl == '' + message('WARNING: No suitable GModule implementation found!') + endif + ++# For pc files ++glib_conf.set('G_MODULE_SUPPORTED', g_module_impl == '0' ? 'false' : 'true') ++glib_conf.set('G_MODULE_LIBS', ' '.join(g_module_lib_args)) ++ + gmoduleconf_conf.set('G_MODULE_IMPL', g_module_impl) +-gmoduleconf_conf.set('G_MODULE_SUPPORTED', g_module_impl != '0') + gmoduleconf_conf.set('G_MODULE_HAVE_DLERROR', g_module_have_dlerror) + gmoduleconf_conf.set('G_MODULE_NEED_USCORE', g_module_need_uscore) + gmoduleconf_conf.set('G_MODULE_BROKEN_RTLD_GLOBAL', g_module_broken_rtld_global) + + gmoduleconf_h = configure_file(input : 'gmoduleconf.h.in', + output : 'gmoduleconf.h', + configuration : gmoduleconf_conf) + + install_headers(['gmodule.h'], subdir : 'glib-2.0') + + libgmodule = shared_library('gmodule-2.0', + sources : ['gmodule.c'], + version : library_version, + soversion : soversion, + install : true, + include_directories : [configinc, gmoduleinc], + dependencies : [libdl_dep, libglib_dep], ++ link_args : library_link_args, + c_args : ['-DG_LOG_DOMAIN="GModule"', '-DG_DISABLE_DEPRECATED'] + glib_hidden_visibility_args) + + libgmodule_dep = declare_dependency(link_with : libgmodule, +diff --git i/gobject/meson.build w/gobject/meson.build +index 65ffef0697b3bad4..32f6f91db12f29b6 100644 +--- i/gobject/meson.build ++++ w/gobject/meson.build +@@ -61,6 +61,7 @@ libgobject = shared_library('gobject-2.0', + install : true, + include_directories : [configinc], + dependencies : [libintl, libffi_dep, libglib_dep], ++ link_args : library_link_args, + c_args : ['-DG_LOG_DOMAIN="GLib-GObject"', '-DGOBJECT_COMPILATION'] + glib_hidden_visibility_args) + + libgobject_dep = declare_dependency(link_with : libgobject, +diff --git i/gthread/meson.build w/gthread/meson.build +index 8ccac3369894bda4..2d5913a91525460f 100644 +--- i/gthread/meson.build ++++ w/gthread/meson.build +@@ -6,4 +6,5 @@ libgthread = shared_library('gthread-2.0', + soversion : soversion, + install : true, + dependencies : [libglib_dep], ++ link_args : library_link_args, + c_args : ['-DG_LOG_DOMAIN="GThread"' ] + glib_hidden_visibility_args) +diff --git i/meson.build w/meson.build +index 208c23087627de1e..dd860592b26c9973 100644 +--- i/meson.build ++++ w/meson.build +@@ -1541,6 +1541,13 @@ glib_conf.set('GIO_MODULE_DIR', '${libdir}/gio/modules') + # @G_MODULE_LIBS@ @SELINUX_LIBS@ @COCOA_LIBS@ @CARBON_LIBS@ @G_LIBS_EXTRA@ + # @PCRE_REQUIRES@ @GLIB_EXTRA_CFLAGS@ @G_THREAD_CFLAGS@ + ++# HACK ++glib_conf.set('G_THREAD_LIBS', '-pthread') ++glib_conf.set('G_THREAD_CFLAGS', '-pthread') ++glib_conf.set('G_MODULE_LDFLAGS', '-Wl,--export-dynamic') ++glib_conf.set('PCRE_REQUIRES', 'libpcre') ++library_link_args = [ '-Wl,-z,nodelete' ] ++ + # Tracing: dtrace + want_dtrace = get_option('enable-dtrace') + enable_dtrace = false diff --git a/libre/glib2-static/noisy-glib-compile-schemas.diff b/libre/glib2-static/noisy-glib-compile-schemas.diff new file mode 100644 index 000000000..f5f2d9482 --- /dev/null +++ b/libre/glib2-static/noisy-glib-compile-schemas.diff @@ -0,0 +1,24 @@ +diff --git i/gio/glib-compile-schemas.c w/gio/glib-compile-schemas.c +index b8de0907248f6860..130f89b1728f7932 100644 +--- i/gio/glib-compile-schemas.c ++++ w/gio/glib-compile-schemas.c +@@ -1219,19 +1219,6 @@ parse_state_start_schema (ParseState *state, + return; + } + +- if (path && (g_str_has_prefix (path, "/apps/") || +- g_str_has_prefix (path, "/desktop/") || +- g_str_has_prefix (path, "/system/"))) +- { +- gchar *message = NULL; +- message = g_strdup_printf (_("Warning: Schema “%s” has path “%s”. " +- "Paths starting with " +- "“/apps/”, “/desktop/” or “/system/” are deprecated."), +- id, path); +- g_printerr ("%s\n", message); +- g_free (message); +- } +- + state->schema_state = schema_state_new (path, gettext_domain, + extends, extends_name, list_of); + diff --git a/libre/glib2-static/revert-warn-glib-compile-schemas.patch b/libre/glib2-static/revert-warn-glib-compile-schemas.patch deleted file mode 100644 index 75b05103c..000000000 --- a/libre/glib2-static/revert-warn-glib-compile-schemas.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 6560b37450cd19c4a7c7b690e279fe97b7bfdcaa Mon Sep 17 00:00:00 2001 -From: Ryan Lortie <desrt@desrt.ca> -Date: Thu, 12 Apr 2012 23:55:34 +0000 -Subject: glib-compile-schemas: warn about bad dconf paths - -For quite some time the recommended usage of GSettings and dconf has -been to use paths like /org/gnome/example/. Use of /apps/ has spilled -over from GConf and is continuing to make its way into a number of -applications as they port. - -glib-compile-schemas will now warn about these types of paths being -used. This generates a lot of noise, but hopefully it will reduce the -number of ported applications making this mistake. ---- -diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c -index cf02389..27d0181 100644 ---- a/gio/glib-compile-schemas.c -+++ b/gio/glib-compile-schemas.c -@@ -1204,6 +1204,12 @@ parse_state_start_schema (ParseState *state, - return; - } - -+ if (path && (g_str_has_prefix (path, "/apps/") || -+ g_str_has_prefix (path, "/desktop/") || -+ g_str_has_prefix (path, "/system/"))) -+ g_printerr ("warning: Schema '%s' has path '%s'. Paths starting with " -+ "'/apps/', '/desktop/' or '/system/' are deprecated.\n", id, path); -+ - state->schema_state = schema_state_new (path, gettext_domain, - extends, extends_name, list_of); - --- -cgit v0.9.0.2 |