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!diff -r1.252 -r1.253 pkgsrc/devel/glib2/Makefile
(leot)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.252 2019/06/16 01:54:40 ryoon Exp $ | 1 | # $NetBSD: Makefile,v 1.253 2019/06/16 15:28:11 leot Exp $ | |
2 | 2 | |||
3 | .include "Makefile.common" | 3 | .include "Makefile.common" | |
4 | 4 | |||
5 | PKGREVISION= 1 | 5 | PKGREVISION= 1 | |
6 | CATEGORIES= devel gnome | 6 | CATEGORIES= devel gnome | |
7 | COMMENT= Some useful routines for C programming (glib2) | 7 | COMMENT= Some useful routines for C programming (glib2) | |
8 | 8 | |||
9 | .include "options.mk" | 9 | .include "options.mk" | |
10 | 10 | |||
11 | MESON_ARGS+= -Dinstalled_tests=false | 11 | MESON_ARGS+= -Dinstalled_tests=false | |
12 | # Avoid linux dependency on libmount-dev | 12 | # Avoid linux dependency on libmount-dev | |
13 | MESON_ARGS+= -Dlibmount=false | 13 | MESON_ARGS+= -Dlibmount=false | |
14 | 14 | |||
@@ -36,26 +36,37 @@ SUBST_STAGE.dbusdb= pre-configure | @@ -36,26 +36,37 @@ SUBST_STAGE.dbusdb= pre-configure | |||
36 | SUBST_FILES.dbusdb= gio/gdbusconnection.c | 36 | SUBST_FILES.dbusdb= gio/gdbusconnection.c | |
37 | SUBST_FILES.dbusdb+= gio/gdbusprivate.c | 37 | SUBST_FILES.dbusdb+= gio/gdbusprivate.c | |
38 | SUBST_FILES.dbusdb+= po/*.po | 38 | SUBST_FILES.dbusdb+= po/*.po | |
39 | SUBST_SED.dbusdb= -e 's,/var/lib/dbus,${VARBASE}/db/dbus,g' | 39 | SUBST_SED.dbusdb= -e 's,/var/lib/dbus,${VARBASE}/db/dbus,g' | |
40 | 40 | |||
41 | SUBST_CLASSES+= xdg | 41 | SUBST_CLASSES+= xdg | |
42 | SUBST_MESSAGE.xdg= Adjust XDG_DATA_DIRS so schemas and pixbuf loaders are found | 42 | SUBST_MESSAGE.xdg= Adjust XDG_DATA_DIRS so schemas and pixbuf loaders are found | |
43 | SUBST_STAGE.xdg= pre-configure | 43 | SUBST_STAGE.xdg= pre-configure | |
44 | SUBST_FILES.xdg= glib/gcharset.c glib/gutils.c gio/xdgmime/xdgmime.c | 44 | SUBST_FILES.xdg= glib/gcharset.c glib/gutils.c gio/xdgmime/xdgmime.c | |
45 | SUBST_SED.xdg= -e 's,/usr/local/share/:/usr/share/,${PREFIX}/share,' | 45 | SUBST_SED.xdg= -e 's,/usr/local/share/:/usr/share/,${PREFIX}/share,' | |
46 | SUBST_SED.xdg+= -e 's,/etc/xdg,${PKG_SYSCONFDIR}/xdg,' | 46 | SUBST_SED.xdg+= -e 's,/etc/xdg,${PKG_SYSCONFDIR}/xdg,' | |
47 | SUBST_SED.xdg+= -e 's,/usr/share/locale,${PREFIX}/${PKGLOCALEDIR}/locale,' | 47 | SUBST_SED.xdg+= -e 's,/usr/share/locale,${PREFIX}/${PKGLOCALEDIR}/locale,' | |
48 | 48 | |||
49 | PKGCONFIG_OVERRIDE+= output/meson-private/gio-2.0.pc | |||
50 | PKGCONFIG_OVERRIDE+= output/meson-private/gio-unix-2.0.pc | |||
51 | PKGCONFIG_OVERRIDE+= output/meson-private/glib-2.0.pc | |||
52 | PKGCONFIG_OVERRIDE+= output/meson-private/gmodule-2.0.pc | |||
53 | PKGCONFIG_OVERRIDE+= output/meson-private/gmodule-export-2.0.pc | |||
54 | PKGCONFIG_OVERRIDE+= output/meson-private/gmodule-no-export-2.0.pc | |||
55 | PKGCONFIG_OVERRIDE+= output/meson-private/gobject-2.0.pc | |||
56 | PKGCONFIG_OVERRIDE+= output/meson-private/gthread-2.0.pc | |||
57 | ||||
58 | PKGCONFIG_OVERRIDE_STAGE= post-configure | |||
59 | ||||
49 | # to run gdbus-codegen to generate gdbus-daemon-generated.{h,c} | 60 | # to run gdbus-codegen to generate gdbus-daemon-generated.{h,c} | |
50 | TOOL_DEPENDS+= ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat | 61 | TOOL_DEPENDS+= ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat | |
51 | PYTHON_FOR_BUILD_ONLY= yes | 62 | PYTHON_FOR_BUILD_ONLY= yes | |
52 | 63 | |||
53 | .include "../../mk/bsd.prefs.mk" | 64 | .include "../../mk/bsd.prefs.mk" | |
54 | PLIST_VARS+= nococoa | 65 | PLIST_VARS+= nococoa | |
55 | .if ${OPSYS} != "Darwin" | 66 | .if ${OPSYS} != "Darwin" | |
56 | PLIST.nococoa= yes | 67 | PLIST.nococoa= yes | |
57 | .endif | 68 | .endif | |
58 | 69 | |||
59 | .include "../../converters/libiconv/buildlink3.mk" | 70 | .include "../../converters/libiconv/buildlink3.mk" | |
60 | .include "../../devel/gettext-lib/buildlink3.mk" | 71 | .include "../../devel/gettext-lib/buildlink3.mk" | |
61 | .include "../../devel/pcre/buildlink3.mk" | 72 | .include "../../devel/pcre/buildlink3.mk" |
@@ -1,26 +1,24 @@ | @@ -1,26 +1,24 @@ | |||
1 | $NetBSD: distinfo,v 1.245 2019/06/16 01:54:40 ryoon Exp $ | 1 | $NetBSD: distinfo,v 1.246 2019/06/16 15:28:11 leot Exp $ | |
2 | 2 | |||
3 | SHA1 (glib-2.60.4.tar.xz) = f76ef7339fef5784d79520478110caa4c5054806 | 3 | SHA1 (glib-2.60.4.tar.xz) = f76ef7339fef5784d79520478110caa4c5054806 | |
4 | RMD160 (glib-2.60.4.tar.xz) = e8520dd0da7c37e6bb18b24a3b3ec308a6fa6aa0 | 4 | RMD160 (glib-2.60.4.tar.xz) = e8520dd0da7c37e6bb18b24a3b3ec308a6fa6aa0 | |
5 | SHA512 (glib-2.60.4.tar.xz) = 614d25652ec9e8387f7865777e128b7f6fd68ff4a1a000868117cbcf5210b5f6aa476eb2b795a6dde56b997906aeb2157c83308f1421a27c4e379522d0ed0afc | 5 | SHA512 (glib-2.60.4.tar.xz) = 614d25652ec9e8387f7865777e128b7f6fd68ff4a1a000868117cbcf5210b5f6aa476eb2b795a6dde56b997906aeb2157c83308f1421a27c4e379522d0ed0afc | |
6 | Size (glib-2.60.4.tar.xz) = 4589384 bytes | 6 | Size (glib-2.60.4.tar.xz) = 4589384 bytes | |
7 | SHA1 (patch-gio_gcredentialsprivate.h) = dab92e07f8357a7dc1a569e37f65f9b199aee281 | 7 | SHA1 (patch-gio_gcredentialsprivate.h) = dab92e07f8357a7dc1a569e37f65f9b199aee281 | |
8 | SHA1 (patch-gio_gdbus-2.0_codegen_meson.build) = 21c806f1a9884000b6a1683bc2fd1276b3c3544f | 8 | SHA1 (patch-gio_gdbus-2.0_codegen_meson.build) = 21c806f1a9884000b6a1683bc2fd1276b3c3544f | |
9 | SHA1 (patch-gio_giomodule.c) = 0715e77fa97f90631c77e9a2cfd54b74698522e2 | 9 | SHA1 (patch-gio_giomodule.c) = 0715e77fa97f90631c77e9a2cfd54b74698522e2 | |
10 | SHA1 (patch-gio_gresource-tool.c) = ad0e59f48f5f98ea66be568dbe2e5a5d1ac602fc | 10 | SHA1 (patch-gio_gresource-tool.c) = ad0e59f48f5f98ea66be568dbe2e5a5d1ac602fc | |
11 | SHA1 (patch-gio_gunixcredentialsmessage.c) = c13119ddd6262db7c03e53857e987f0c495d3312 | 11 | SHA1 (patch-gio_gunixcredentialsmessage.c) = c13119ddd6262db7c03e53857e987f0c495d3312 | |
12 | SHA1 (patch-gio_gunixmounts.c) = 13af07fffe898457edd0d8db4296a60fccba913d | 12 | SHA1 (patch-gio_gunixmounts.c) = 13af07fffe898457edd0d8db4296a60fccba913d | |
13 | SHA1 (patch-gio_inotify_inotify-kernel.c) = 24deec33a1ad5e3c1a4f2d1397440d26b0f23b84 | 13 | SHA1 (patch-gio_inotify_inotify-kernel.c) = 24deec33a1ad5e3c1a4f2d1397440d26b0f23b84 | |
14 | SHA1 (patch-gio_meson.build) = 6382404cda6ca64eac9d5ecee2fde02bd6d93af9 | 14 | SHA1 (patch-gio_meson.build) = a0dcda4e9d05ed83b7fb11102945821eea27b81d | |
15 | SHA1 (patch-glib_gmain.c) = 2ab4b59e438d9f764bee62e0c1fa8bbd231b6e8d | 15 | SHA1 (patch-glib_gmain.c) = 2ab4b59e438d9f764bee62e0c1fa8bbd231b6e8d | |
16 | SHA1 (patch-glib_meson.build) = 50f7b7dd8e003d1dfd445ba0f515ba51d843e412 | 16 | SHA1 (patch-glib_meson.build) = 119e48efd8aaabf06b62c6e1897261b470cf7355 | |
17 | SHA1 (patch-gmodule_gmodule-ar.c) = e382a0ada232e083d51cbede7f689a50ebeff4d8 | 17 | SHA1 (patch-gmodule_gmodule-ar.c) = e382a0ada232e083d51cbede7f689a50ebeff4d8 | |
18 | SHA1 (patch-gmodule_gmodule-dl.c) = b678a04debbc79ebb67d91db7716990658e76da4 | 18 | SHA1 (patch-gmodule_gmodule-dl.c) = b678a04debbc79ebb67d91db7716990658e76da4 | |
19 | SHA1 (patch-gmodule_gmodule-dyld.c) = 5adf62970d9cff22d451307aaa0b00d975dab138 | 19 | SHA1 (patch-gmodule_gmodule-dyld.c) = 5adf62970d9cff22d451307aaa0b00d975dab138 | |
20 | SHA1 (patch-gmodule_gmodule-win32.c) = 477a861f8590a62c3dbc0aa4ad728cc86ebb34dd | 20 | SHA1 (patch-gmodule_gmodule-win32.c) = 477a861f8590a62c3dbc0aa4ad728cc86ebb34dd | |
21 | SHA1 (patch-gmodule_gmodule.c) = 55c5f9d16e3517f3fdc04d40922f50d9c66b0b9a | 21 | SHA1 (patch-gmodule_gmodule.c) = 55c5f9d16e3517f3fdc04d40922f50d9c66b0b9a | |
22 | SHA1 (patch-gmodule_meson.build) = 23ab3a2e3bf460469b8a9ee2221b50b0953f7de1 | |||
23 | SHA1 (patch-gobject_glib-mkenums.in) = c177cf9b1ea81542665240678f47f68351a3760d | 22 | SHA1 (patch-gobject_glib-mkenums.in) = c177cf9b1ea81542665240678f47f68351a3760d | |
24 | SHA1 (patch-gobject_meson.build) = 611a04e63df509ae1dd1aa0d83e1e2fb6fe3629a | 23 | SHA1 (patch-gobject_meson.build) = 58ee162e44047bf20c66067fd3edbe98cc13af50 | |
25 | SHA1 (patch-gthread_meson.build) = 0c58eaed83b8b29169760e5b811d35b509320549 | |||
26 | SHA1 (patch-meson.build) = b2e1139f4606870b117fd6ff35d7832b35ea1126 | 24 | SHA1 (patch-meson.build) = b2e1139f4606870b117fd6ff35d7832b35ea1126 |
@@ -1,29 +1,21 @@ | @@ -1,29 +1,21 @@ | |||
1 | $NetBSD: patch-gio_meson.build,v 1.3 2019/06/16 01:54:40 ryoon Exp $ | 1 | $NetBSD: patch-gio_meson.build,v 1.4 2019/06/16 15:28:12 leot Exp $ | |
2 | 2 | |||
3 | Don't build tests, as have strong dependency on libdl. | 3 | Don't build tests, as have strong dependency on libdl. | |
4 | Disable inotify on SunOS. | 4 | Disable inotify on SunOS. | |
5 | 5 | |||
6 | --- gio/meson.build.orig 2019-06-10 17:47:20.000000000 +0000 | 6 | --- gio/meson.build.orig 2019-06-10 17:47:20.000000000 +0000 | |
7 | +++ gio/meson.build | 7 | +++ gio/meson.build | |
8 | @@ -758,7 +758,7 @@ gioenumtypes_c = custom_target('gioenumt | 8 | @@ -758,7 +758,7 @@ gioenumtypes_c = custom_target('gioenumt | |
9 | gioenumtypes_dep = declare_dependency(sources : [gioenumtypes_h, glib_enumtypes_h]) | 9 | gioenumtypes_dep = declare_dependency(sources : [gioenumtypes_h, glib_enumtypes_h]) | |
10 | 10 | |||
11 | # inotify | 11 | # inotify | |
12 | -if glib_conf.has('HAVE_SYS_INOTIFY_H') and have_func_inotify_init1 | 12 | -if glib_conf.has('HAVE_SYS_INOTIFY_H') and have_func_inotify_init1 | |
13 | +if glib_conf.has('HAVE_SYS_INOTIFY_H') and have_func_inotify_init1 and host_system != 'sunos' | 13 | +if glib_conf.has('HAVE_SYS_INOTIFY_H') and have_func_inotify_init1 and host_system != 'sunos' | |
14 | subdir('inotify') | 14 | subdir('inotify') | |
15 | internal_deps += [ inotify_lib ] | 15 | internal_deps += [ inotify_lib ] | |
16 | internal_objects += [inotify_lib.extract_all_objects()] | 16 | internal_objects += [inotify_lib.extract_all_objects()] | |
17 | @@ -823,6 +823,7 @@ endif | |||
18 | schemas_subdir = join_paths('glib-2.0', 'schemas') | |||
19 | ||||
20 | pkg.generate(libgio, | |||
21 | + libraries : ['-Wl,-rpath${libdir}'], | |||
22 | libraries_private : [osx_ldflags], | |||
23 | requires : ['glib-2.0', 'gobject-2.0'], | |||
24 | variables : ['datadir=' + join_paths('${prefix}', get_option('datadir')), | |||
25 | @@ -994,4 +995,3 @@ if enable_systemtap | 17 | @@ -994,4 +995,3 @@ if enable_systemtap | |
26 | endif | 18 | endif | |
27 | 19 | |||
28 | subdir('fam') | 20 | subdir('fam') | |
29 | -subdir('tests') | 21 | -subdir('tests') |
@@ -1,30 +1,21 @@ | @@ -1,30 +1,21 @@ | |||
1 | $NetBSD: patch-glib_meson.build,v 1.2 2019/06/16 01:54:40 ryoon Exp $ | 1 | $NetBSD: patch-glib_meson.build,v 1.3 2019/06/16 15:28:12 leot Exp $ | |
2 | 2 | |||
3 | - Don't bother with gtester as it's slated for deprecation anyway: | 3 | - Don't bother with gtester as it's slated for deprecation anyway: | |
4 | https://gitlab.gnome.org/GNOME/glib/issues/1441 | 4 | https://gitlab.gnome.org/GNOME/glib/issues/1441 | |
5 | - Don't build tests | 5 | - Don't build tests | |
6 | 6 | |||
7 | --- glib/meson.build.orig 2019-06-10 17:47:20.000000000 +0000 | 7 | --- glib/meson.build.orig 2019-06-10 17:47:20.000000000 +0000 | |
8 | +++ glib/meson.build | 8 | +++ glib/meson.build | |
9 | @@ -284,7 +284,7 @@ libglib_dep = declare_dependency( | |||
10 | include_directories : [configinc, glibinc]) | |||
11 | ||||
12 | pkg.generate(libglib, | |||
13 | - libraries : [libintl], | |||
14 | + libraries : [libintl, '-Wl,-rpath${libdir}'], | |||
15 | libraries_private : [osx_ldflags, win32_ldflags], | |||
16 | subdirs : ['glib-2.0'], | |||
17 | extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags, | |||
18 | @@ -324,24 +324,8 @@ if host_system == 'windows' | 9 | @@ -324,24 +324,8 @@ if host_system == 'windows' | |
19 | include_directories : configinc, | 10 | include_directories : configinc, | |
20 | dependencies : [libglib_dep]) | 11 | dependencies : [libglib_dep]) | |
21 | endif | 12 | endif | |
22 | -else | 13 | -else | |
23 | - gtester = executable('gtester', 'gtester.c', | 14 | - gtester = executable('gtester', 'gtester.c', | |
24 | - install : true, | 15 | - install : true, | |
25 | - include_directories : configinc, | 16 | - include_directories : configinc, | |
26 | - dependencies : [libglib_dep]) | 17 | - dependencies : [libglib_dep]) | |
27 | endif | 18 | endif | |
28 | 19 | |||
29 | -report_conf = configuration_data() | 20 | -report_conf = configuration_data() | |
30 | -report_conf.set('GLIB_VERSION', glib_version) | 21 | -report_conf.set('GLIB_VERSION', glib_version) |
@@ -1,23 +1,15 @@ | @@ -1,23 +1,15 @@ | |||
1 | $NetBSD: patch-gobject_meson.build,v 1.2 2019/06/16 01:54:40 ryoon Exp $ | 1 | $NetBSD: patch-gobject_meson.build,v 1.3 2019/06/16 15:28:12 leot Exp $ | |
2 | 2 | |||
3 | Leave glib-genmarshal and glib-mkenums to devel/glib2-tools. | 3 | Leave glib-genmarshal and glib-mkenums to devel/glib2-tools. | |
4 | 4 | |||
5 | --- gobject/meson.build.orig 2019-06-10 17:47:20.000000000 +0000 | 5 | --- gobject/meson.build.orig 2019-06-10 17:47:20.000000000 +0000 | |
6 | +++ gobject/meson.build | 6 | +++ gobject/meson.build | |
7 | @@ -75,7 +75,7 @@ foreach tool: python_tools | 7 | @@ -75,7 +75,7 @@ foreach tool: python_tools | |
8 | input : tool + '.in', | 8 | input : tool + '.in', | |
9 | output : tool, | 9 | output : tool, | |
10 | configuration : python_tools_conf, | 10 | configuration : python_tools_conf, | |
11 | - install : true, | 11 | - install : true, | |
12 | + install : false, | 12 | + install : false, | |
13 | install_dir : glib_bindir, | 13 | install_dir : glib_bindir, | |
14 | ) | 14 | ) | |
15 | 15 | |||
16 | @@ -132,6 +132,7 @@ libgobject = library('gobject-2.0', | |||
17 | ) | |||
18 | ||||
19 | pkg.generate(libgobject, | |||
20 | + libraries: ['-Wl,-rpath${libdir}'], | |||
21 | requires : ['glib-2.0'], | |||
22 | version : glib_version, | |||
23 | install_dir : glib_pkgconfigreldir, |