Sun Jun 16 15:28:12 2019 UTC ()
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!


(leot)
diff -r1.252 -r1.253 pkgsrc/devel/glib2/Makefile
diff -r1.245 -r1.246 pkgsrc/devel/glib2/distinfo
diff -r1.3 -r1.4 pkgsrc/devel/glib2/patches/patch-gio_meson.build
diff -r1.2 -r1.3 pkgsrc/devel/glib2/patches/patch-glib_meson.build
diff -r1.2 -r1.3 pkgsrc/devel/glib2/patches/patch-gobject_meson.build
diff -r1.1 -r0 pkgsrc/devel/glib2/patches/patch-gmodule_meson.build
diff -r1.1 -r0 pkgsrc/devel/glib2/patches/patch-gthread_meson.build

cvs diff -r1.252 -r1.253 pkgsrc/devel/glib2/Makefile (expand / switch to unified diff)

--- pkgsrc/devel/glib2/Makefile 2019/06/16 01:54:40 1.252
+++ pkgsrc/devel/glib2/Makefile 2019/06/16 15:28:11 1.253
@@ -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
5PKGREVISION= 1 5PKGREVISION= 1
6CATEGORIES= devel gnome 6CATEGORIES= devel gnome
7COMMENT= Some useful routines for C programming (glib2) 7COMMENT= Some useful routines for C programming (glib2)
8 8
9.include "options.mk" 9.include "options.mk"
10 10
11MESON_ARGS+= -Dinstalled_tests=false 11MESON_ARGS+= -Dinstalled_tests=false
12# Avoid linux dependency on libmount-dev 12# Avoid linux dependency on libmount-dev
13MESON_ARGS+= -Dlibmount=false 13MESON_ARGS+= -Dlibmount=false
14 14
@@ -36,26 +36,37 @@ SUBST_STAGE.dbusdb= pre-configure @@ -36,26 +36,37 @@ SUBST_STAGE.dbusdb= pre-configure
36SUBST_FILES.dbusdb= gio/gdbusconnection.c 36SUBST_FILES.dbusdb= gio/gdbusconnection.c
37SUBST_FILES.dbusdb+= gio/gdbusprivate.c 37SUBST_FILES.dbusdb+= gio/gdbusprivate.c
38SUBST_FILES.dbusdb+= po/*.po 38SUBST_FILES.dbusdb+= po/*.po
39SUBST_SED.dbusdb= -e 's,/var/lib/dbus,${VARBASE}/db/dbus,g' 39SUBST_SED.dbusdb= -e 's,/var/lib/dbus,${VARBASE}/db/dbus,g'
40 40
41SUBST_CLASSES+= xdg 41SUBST_CLASSES+= xdg
42SUBST_MESSAGE.xdg= Adjust XDG_DATA_DIRS so schemas and pixbuf loaders are found 42SUBST_MESSAGE.xdg= Adjust XDG_DATA_DIRS so schemas and pixbuf loaders are found
43SUBST_STAGE.xdg= pre-configure 43SUBST_STAGE.xdg= pre-configure
44SUBST_FILES.xdg= glib/gcharset.c glib/gutils.c gio/xdgmime/xdgmime.c 44SUBST_FILES.xdg= glib/gcharset.c glib/gutils.c gio/xdgmime/xdgmime.c
45SUBST_SED.xdg= -e 's,/usr/local/share/:/usr/share/,${PREFIX}/share,' 45SUBST_SED.xdg= -e 's,/usr/local/share/:/usr/share/,${PREFIX}/share,'
46SUBST_SED.xdg+= -e 's,/etc/xdg,${PKG_SYSCONFDIR}/xdg,' 46SUBST_SED.xdg+= -e 's,/etc/xdg,${PKG_SYSCONFDIR}/xdg,'
47SUBST_SED.xdg+= -e 's,/usr/share/locale,${PREFIX}/${PKGLOCALEDIR}/locale,' 47SUBST_SED.xdg+= -e 's,/usr/share/locale,${PREFIX}/${PKGLOCALEDIR}/locale,'
48 48
 49PKGCONFIG_OVERRIDE+= output/meson-private/gio-2.0.pc
 50PKGCONFIG_OVERRIDE+= output/meson-private/gio-unix-2.0.pc
 51PKGCONFIG_OVERRIDE+= output/meson-private/glib-2.0.pc
 52PKGCONFIG_OVERRIDE+= output/meson-private/gmodule-2.0.pc
 53PKGCONFIG_OVERRIDE+= output/meson-private/gmodule-export-2.0.pc
 54PKGCONFIG_OVERRIDE+= output/meson-private/gmodule-no-export-2.0.pc
 55PKGCONFIG_OVERRIDE+= output/meson-private/gobject-2.0.pc
 56PKGCONFIG_OVERRIDE+= output/meson-private/gthread-2.0.pc
 57
 58PKGCONFIG_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}
50TOOL_DEPENDS+= ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat 61TOOL_DEPENDS+= ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
51PYTHON_FOR_BUILD_ONLY= yes 62PYTHON_FOR_BUILD_ONLY= yes
52 63
53.include "../../mk/bsd.prefs.mk" 64.include "../../mk/bsd.prefs.mk"
54PLIST_VARS+= nococoa 65PLIST_VARS+= nococoa
55.if ${OPSYS} != "Darwin" 66.if ${OPSYS} != "Darwin"
56PLIST.nococoa= yes 67PLIST.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"

cvs diff -r1.245 -r1.246 pkgsrc/devel/glib2/distinfo (expand / switch to unified diff)

--- pkgsrc/devel/glib2/distinfo 2019/06/16 01:54:40 1.245
+++ pkgsrc/devel/glib2/distinfo 2019/06/16 15:28:11 1.246
@@ -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
3SHA1 (glib-2.60.4.tar.xz) = f76ef7339fef5784d79520478110caa4c5054806 3SHA1 (glib-2.60.4.tar.xz) = f76ef7339fef5784d79520478110caa4c5054806
4RMD160 (glib-2.60.4.tar.xz) = e8520dd0da7c37e6bb18b24a3b3ec308a6fa6aa0 4RMD160 (glib-2.60.4.tar.xz) = e8520dd0da7c37e6bb18b24a3b3ec308a6fa6aa0
5SHA512 (glib-2.60.4.tar.xz) = 614d25652ec9e8387f7865777e128b7f6fd68ff4a1a000868117cbcf5210b5f6aa476eb2b795a6dde56b997906aeb2157c83308f1421a27c4e379522d0ed0afc 5SHA512 (glib-2.60.4.tar.xz) = 614d25652ec9e8387f7865777e128b7f6fd68ff4a1a000868117cbcf5210b5f6aa476eb2b795a6dde56b997906aeb2157c83308f1421a27c4e379522d0ed0afc
6Size (glib-2.60.4.tar.xz) = 4589384 bytes 6Size (glib-2.60.4.tar.xz) = 4589384 bytes
7SHA1 (patch-gio_gcredentialsprivate.h) = dab92e07f8357a7dc1a569e37f65f9b199aee281 7SHA1 (patch-gio_gcredentialsprivate.h) = dab92e07f8357a7dc1a569e37f65f9b199aee281
8SHA1 (patch-gio_gdbus-2.0_codegen_meson.build) = 21c806f1a9884000b6a1683bc2fd1276b3c3544f 8SHA1 (patch-gio_gdbus-2.0_codegen_meson.build) = 21c806f1a9884000b6a1683bc2fd1276b3c3544f
9SHA1 (patch-gio_giomodule.c) = 0715e77fa97f90631c77e9a2cfd54b74698522e2 9SHA1 (patch-gio_giomodule.c) = 0715e77fa97f90631c77e9a2cfd54b74698522e2
10SHA1 (patch-gio_gresource-tool.c) = ad0e59f48f5f98ea66be568dbe2e5a5d1ac602fc 10SHA1 (patch-gio_gresource-tool.c) = ad0e59f48f5f98ea66be568dbe2e5a5d1ac602fc
11SHA1 (patch-gio_gunixcredentialsmessage.c) = c13119ddd6262db7c03e53857e987f0c495d3312 11SHA1 (patch-gio_gunixcredentialsmessage.c) = c13119ddd6262db7c03e53857e987f0c495d3312
12SHA1 (patch-gio_gunixmounts.c) = 13af07fffe898457edd0d8db4296a60fccba913d 12SHA1 (patch-gio_gunixmounts.c) = 13af07fffe898457edd0d8db4296a60fccba913d
13SHA1 (patch-gio_inotify_inotify-kernel.c) = 24deec33a1ad5e3c1a4f2d1397440d26b0f23b84 13SHA1 (patch-gio_inotify_inotify-kernel.c) = 24deec33a1ad5e3c1a4f2d1397440d26b0f23b84
14SHA1 (patch-gio_meson.build) = 6382404cda6ca64eac9d5ecee2fde02bd6d93af9 14SHA1 (patch-gio_meson.build) = a0dcda4e9d05ed83b7fb11102945821eea27b81d
15SHA1 (patch-glib_gmain.c) = 2ab4b59e438d9f764bee62e0c1fa8bbd231b6e8d 15SHA1 (patch-glib_gmain.c) = 2ab4b59e438d9f764bee62e0c1fa8bbd231b6e8d
16SHA1 (patch-glib_meson.build) = 50f7b7dd8e003d1dfd445ba0f515ba51d843e412 16SHA1 (patch-glib_meson.build) = 119e48efd8aaabf06b62c6e1897261b470cf7355
17SHA1 (patch-gmodule_gmodule-ar.c) = e382a0ada232e083d51cbede7f689a50ebeff4d8 17SHA1 (patch-gmodule_gmodule-ar.c) = e382a0ada232e083d51cbede7f689a50ebeff4d8
18SHA1 (patch-gmodule_gmodule-dl.c) = b678a04debbc79ebb67d91db7716990658e76da4 18SHA1 (patch-gmodule_gmodule-dl.c) = b678a04debbc79ebb67d91db7716990658e76da4
19SHA1 (patch-gmodule_gmodule-dyld.c) = 5adf62970d9cff22d451307aaa0b00d975dab138 19SHA1 (patch-gmodule_gmodule-dyld.c) = 5adf62970d9cff22d451307aaa0b00d975dab138
20SHA1 (patch-gmodule_gmodule-win32.c) = 477a861f8590a62c3dbc0aa4ad728cc86ebb34dd 20SHA1 (patch-gmodule_gmodule-win32.c) = 477a861f8590a62c3dbc0aa4ad728cc86ebb34dd
21SHA1 (patch-gmodule_gmodule.c) = 55c5f9d16e3517f3fdc04d40922f50d9c66b0b9a 21SHA1 (patch-gmodule_gmodule.c) = 55c5f9d16e3517f3fdc04d40922f50d9c66b0b9a
22SHA1 (patch-gmodule_meson.build) = 23ab3a2e3bf460469b8a9ee2221b50b0953f7de1 
23SHA1 (patch-gobject_glib-mkenums.in) = c177cf9b1ea81542665240678f47f68351a3760d 22SHA1 (patch-gobject_glib-mkenums.in) = c177cf9b1ea81542665240678f47f68351a3760d
24SHA1 (patch-gobject_meson.build) = 611a04e63df509ae1dd1aa0d83e1e2fb6fe3629a 23SHA1 (patch-gobject_meson.build) = 58ee162e44047bf20c66067fd3edbe98cc13af50
25SHA1 (patch-gthread_meson.build) = 0c58eaed83b8b29169760e5b811d35b509320549 
26SHA1 (patch-meson.build) = b2e1139f4606870b117fd6ff35d7832b35ea1126 24SHA1 (patch-meson.build) = b2e1139f4606870b117fd6ff35d7832b35ea1126

cvs diff -r1.3 -r1.4 pkgsrc/devel/glib2/patches/patch-gio_meson.build (expand / switch to unified diff)

--- pkgsrc/devel/glib2/patches/patch-gio_meson.build 2019/06/16 01:54:40 1.3
+++ pkgsrc/devel/glib2/patches/patch-gio_meson.build 2019/06/16 15:28:12 1.4
@@ -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
3Don't build tests, as have strong dependency on libdl. 3Don't build tests, as have strong dependency on libdl.
4Disable inotify on SunOS. 4Disable 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')

cvs diff -r1.2 -r1.3 pkgsrc/devel/glib2/patches/patch-glib_meson.build (expand / switch to unified diff)

--- pkgsrc/devel/glib2/patches/patch-glib_meson.build 2019/06/16 01:54:40 1.2
+++ pkgsrc/devel/glib2/patches/patch-glib_meson.build 2019/06/16 15:28:12 1.3
@@ -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)

cvs diff -r1.2 -r1.3 pkgsrc/devel/glib2/patches/patch-gobject_meson.build (expand / switch to unified diff)

--- pkgsrc/devel/glib2/patches/patch-gobject_meson.build 2019/06/16 01:54:40 1.2
+++ pkgsrc/devel/glib2/patches/patch-gobject_meson.build 2019/06/16 15:28:12 1.3
@@ -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
3Leave glib-genmarshal and glib-mkenums to devel/glib2-tools. 3Leave 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, 

File Deleted: pkgsrc/devel/glib2/patches/Attic/patch-gmodule_meson.build

File Deleted: pkgsrc/devel/glib2/patches/Attic/patch-gthread_meson.build