glib2: Use PKGCONFIG_OVERRIDE instead of patching meson.build-s

meson `pkgconfig' module generate pkg-config files during the configure
phase and PKGCONFIG_OVERRIDE can be used in post-configure stage to
avoid directly patching meson.build files.

Discussed with <ryoon>, thanks!
This commit is contained in:
leot 2019-06-16 15:28:11 +00:00
parent c211d709c0
commit fd110682fe
7 changed files with 19 additions and 61 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.252 2019/06/16 01:54:40 ryoon Exp $
# $NetBSD: Makefile,v 1.253 2019/06/16 15:28:11 leot Exp $
.include "Makefile.common"
@ -46,6 +46,17 @@ SUBST_SED.xdg= -e 's,/usr/local/share/:/usr/share/,${PREFIX}/share,'
SUBST_SED.xdg+= -e 's,/etc/xdg,${PKG_SYSCONFDIR}/xdg,'
SUBST_SED.xdg+= -e 's,/usr/share/locale,${PREFIX}/${PKGLOCALEDIR}/locale,'
PKGCONFIG_OVERRIDE+= output/meson-private/gio-2.0.pc
PKGCONFIG_OVERRIDE+= output/meson-private/gio-unix-2.0.pc
PKGCONFIG_OVERRIDE+= output/meson-private/glib-2.0.pc
PKGCONFIG_OVERRIDE+= output/meson-private/gmodule-2.0.pc
PKGCONFIG_OVERRIDE+= output/meson-private/gmodule-export-2.0.pc
PKGCONFIG_OVERRIDE+= output/meson-private/gmodule-no-export-2.0.pc
PKGCONFIG_OVERRIDE+= output/meson-private/gobject-2.0.pc
PKGCONFIG_OVERRIDE+= output/meson-private/gthread-2.0.pc
PKGCONFIG_OVERRIDE_STAGE= post-configure
# to run gdbus-codegen to generate gdbus-daemon-generated.{h,c}
TOOL_DEPENDS+= ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
PYTHON_FOR_BUILD_ONLY= yes

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.245 2019/06/16 01:54:40 ryoon Exp $
$NetBSD: distinfo,v 1.246 2019/06/16 15:28:11 leot Exp $
SHA1 (glib-2.60.4.tar.xz) = f76ef7339fef5784d79520478110caa4c5054806
RMD160 (glib-2.60.4.tar.xz) = e8520dd0da7c37e6bb18b24a3b3ec308a6fa6aa0
@ -11,16 +11,14 @@ SHA1 (patch-gio_gresource-tool.c) = ad0e59f48f5f98ea66be568dbe2e5a5d1ac602fc
SHA1 (patch-gio_gunixcredentialsmessage.c) = c13119ddd6262db7c03e53857e987f0c495d3312
SHA1 (patch-gio_gunixmounts.c) = 13af07fffe898457edd0d8db4296a60fccba913d
SHA1 (patch-gio_inotify_inotify-kernel.c) = 24deec33a1ad5e3c1a4f2d1397440d26b0f23b84
SHA1 (patch-gio_meson.build) = 6382404cda6ca64eac9d5ecee2fde02bd6d93af9
SHA1 (patch-gio_meson.build) = a0dcda4e9d05ed83b7fb11102945821eea27b81d
SHA1 (patch-glib_gmain.c) = 2ab4b59e438d9f764bee62e0c1fa8bbd231b6e8d
SHA1 (patch-glib_meson.build) = 50f7b7dd8e003d1dfd445ba0f515ba51d843e412
SHA1 (patch-glib_meson.build) = 119e48efd8aaabf06b62c6e1897261b470cf7355
SHA1 (patch-gmodule_gmodule-ar.c) = e382a0ada232e083d51cbede7f689a50ebeff4d8
SHA1 (patch-gmodule_gmodule-dl.c) = b678a04debbc79ebb67d91db7716990658e76da4
SHA1 (patch-gmodule_gmodule-dyld.c) = 5adf62970d9cff22d451307aaa0b00d975dab138
SHA1 (patch-gmodule_gmodule-win32.c) = 477a861f8590a62c3dbc0aa4ad728cc86ebb34dd
SHA1 (patch-gmodule_gmodule.c) = 55c5f9d16e3517f3fdc04d40922f50d9c66b0b9a
SHA1 (patch-gmodule_meson.build) = 23ab3a2e3bf460469b8a9ee2221b50b0953f7de1
SHA1 (patch-gobject_glib-mkenums.in) = c177cf9b1ea81542665240678f47f68351a3760d
SHA1 (patch-gobject_meson.build) = 611a04e63df509ae1dd1aa0d83e1e2fb6fe3629a
SHA1 (patch-gthread_meson.build) = 0c58eaed83b8b29169760e5b811d35b509320549
SHA1 (patch-gobject_meson.build) = 58ee162e44047bf20c66067fd3edbe98cc13af50
SHA1 (patch-meson.build) = b2e1139f4606870b117fd6ff35d7832b35ea1126

View file

@ -1,4 +1,4 @@
$NetBSD: patch-gio_meson.build,v 1.3 2019/06/16 01:54:40 ryoon Exp $
$NetBSD: patch-gio_meson.build,v 1.4 2019/06/16 15:28:12 leot Exp $
Don't build tests, as have strong dependency on libdl.
Disable inotify on SunOS.
@ -14,14 +14,6 @@ Disable inotify on SunOS.
subdir('inotify')
internal_deps += [ inotify_lib ]
internal_objects += [inotify_lib.extract_all_objects()]
@@ -823,6 +823,7 @@ endif
schemas_subdir = join_paths('glib-2.0', 'schemas')
pkg.generate(libgio,
+ libraries : ['-Wl,-rpath${libdir}'],
libraries_private : [osx_ldflags],
requires : ['glib-2.0', 'gobject-2.0'],
variables : ['datadir=' + join_paths('${prefix}', get_option('datadir')),
@@ -994,4 +995,3 @@ if enable_systemtap
endif

View file

@ -1,4 +1,4 @@
$NetBSD: patch-glib_meson.build,v 1.2 2019/06/16 01:54:40 ryoon Exp $
$NetBSD: patch-glib_meson.build,v 1.3 2019/06/16 15:28:12 leot Exp $
- Don't bother with gtester as it's slated for deprecation anyway:
https://gitlab.gnome.org/GNOME/glib/issues/1441
@ -6,15 +6,6 @@ $NetBSD: patch-glib_meson.build,v 1.2 2019/06/16 01:54:40 ryoon Exp $
--- glib/meson.build.orig 2019-06-10 17:47:20.000000000 +0000
+++ glib/meson.build
@@ -284,7 +284,7 @@ libglib_dep = declare_dependency(
include_directories : [configinc, glibinc])
pkg.generate(libglib,
- libraries : [libintl],
+ libraries : [libintl, '-Wl,-rpath${libdir}'],
libraries_private : [osx_ldflags, win32_ldflags],
subdirs : ['glib-2.0'],
extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags,
@@ -324,24 +324,8 @@ if host_system == 'windows'
include_directories : configinc,
dependencies : [libglib_dep])

View file

@ -1,13 +0,0 @@
$NetBSD: patch-gmodule_meson.build,v 1.1 2019/06/16 01:54:40 ryoon Exp $
--- gmodule/meson.build.orig 2019-06-10 17:47:20.000000000 +0000
+++ gmodule/meson.build
@@ -110,7 +110,7 @@ libgmodule = library('gmodule-2.0',
supported_var = 'gmodule_supported=@0@'.format(g_module_impl != '0')
pkg.generate(libgmodule,
- libraries : [thread_dep],
+ libraries : [thread_dep, '-Wl,-rpath${libdir}'],
requires : ['glib-2.0'],
version : glib_version,
variables : [supported_var],

View file

@ -1,4 +1,4 @@
$NetBSD: patch-gobject_meson.build,v 1.2 2019/06/16 01:54:40 ryoon Exp $
$NetBSD: patch-gobject_meson.build,v 1.3 2019/06/16 15:28:12 leot Exp $
Leave glib-genmarshal and glib-mkenums to devel/glib2-tools.
@ -13,11 +13,3 @@ Leave glib-genmarshal and glib-mkenums to devel/glib2-tools.
install_dir : glib_bindir,
)
@@ -132,6 +132,7 @@ libgobject = library('gobject-2.0',
)
pkg.generate(libgobject,
+ libraries: ['-Wl,-rpath${libdir}'],
requires : ['glib-2.0'],
version : glib_version,
install_dir : glib_pkgconfigreldir,

View file

@ -1,13 +0,0 @@
$NetBSD: patch-gthread_meson.build,v 1.1 2019/06/16 01:54:40 ryoon Exp $
--- gthread/meson.build.orig 2019-06-10 17:47:20.000000000 +0000
+++ gthread/meson.build
@@ -24,7 +24,7 @@ libgthread = library('gthread-2.0',
)
pkg.generate(libgthread,
- libraries : [thread_dep],
+ libraries : [thread_dep, '-Wl,-rpath${libdir}'],
requires : ['glib-2.0'],
version : glib_version,
install_dir : glib_pkgconfigreldir,