pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/54393: devel/gobject-introspection broken on macos (with devel/glib2 correction)



The following reply was made to PR pkg/54393; it has been noted by GNATS.

From: =?utf-8?Q?cl=C3=A9ment_bouvier?= <clement.bouvier.europe%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: macos-pkg-people%netbsd.org@localhost,
 gnats-admin%netbsd.org@localhost,
 pkgsrc-bugs%netbsd.org@localhost
Subject: Re: pkg/54393: devel/gobject-introspection broken on macos (with
 devel/glib2 correction)
Date: Thu, 25 Jul 2019 20:03:59 +0400

 --Apple-Mail=_719E34F3-8AE8-4261-8F3A-FE20D873F44A
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain;
 	charset=us-ascii
 
 Hi all,
 
 Here the patches modified with the comments by Patrick.
 
 I tried DYLD_LIBRARY_PATH or DYLD_FALLBACK_LIBRARY_PATH variable set by =
 make_env but the build failed with:
 
 [122/125] Generating gir-girepository with a custom command.
 FAILED: gir/GIRepository-2.0.gir=20
 /Users/cbouvier/pkg/bin/python3.7 tools/g-ir-scanner =
 --output=3Dgir/GIRepository-2.0.gir --no-libtool --quiet =
 --reparse-validate --add-include-path =
 /Users/cbouvier/prj/pkgsrc/devel/gobject-introspection/work/gobject-intros=
 pection-1.60.1/output/gir --add-include-path =
 /Users/cbouvier/prj/pkgsrc/devel/gobject-introspection/work/gobject-intros=
 pection-1.60.1/gir --identifier-prefix=3DGI --symbol-prefix=3Dg =
 --symbol-prefix=3Dgi --c-include=3Dgirepository.h =
 --namespace=3DGIRepository --nsversion=3D2.0 --library=3Dgirepository-1.0 =
 --pkg-export=3Dgobject-introspection-1.0 =
 -L/Users/cbouvier/prj/pkgsrc/devel/gobject-introspection/work/gobject-intr=
 ospection-1.60.1/output/gir/../girepository =
 --include-uninstalled=3D/Users/cbouvier/prj/pkgsrc/devel/gobject-introspec=
 tion/work/gobject-introspection-1.60.1/output/gir/GObject-2.0.gir =
 --cflags-begin -I/Users/cbouvier/pkg/include/glib-2.0 =
 -I/Users/cbouvier/pkg/lib/glib-2.0/include =
 -I/Users/cbouvier/prj/pkgsrc/devel/gobject-introspection/work/gobject-intr=
 ospection-1.60.1/gir/../girepository =
 -I/Users/cbouvier/prj/pkgsrc/devel/gobject-introspection/work/gobject-intr=
 ospection-1.60.1/output/gir/../girepository -DGI_COMPILATION =
 --cflags-end ../girepository/giarginfo.c ../girepository/gibaseinfo.c =
 ../girepository/gicallableinfo.c ../girepository/giconstantinfo.c =
 ../girepository/gienuminfo.c ../girepository/gifieldinfo.c =
 ../girepository/gifunctioninfo.c ../girepository/giinterfaceinfo.c =
 ../girepository/giobjectinfo.c ../girepository/gipropertyinfo.c =
 ../girepository/giregisteredtypeinfo.c ../girepository/girepository.c =
 ../girepository/gisignalinfo.c ../girepository/gistructinfo.c =
 ../girepository/gitypeinfo.c ../girepository/giunioninfo.c =
 ../girepository/giversion.c ../girepository/givfuncinfo.c =
 ../girepository/giarginfo.h ../girepository/gibaseinfo.h =
 ../girepository/gicallableinfo.h ../girepository/giconstantinfo.h =
 ../girepository/gienuminfo.h ../girepository/gifieldinfo.h =
 ../girepository/gifunctioninfo.h ../girepository/giinterfaceinfo.h =
 ../girepository/giobjectinfo.h ../girepository/gipropertyinfo.h =
 ../girepository/giregisteredtypeinfo.h ../girepository/girepository.h =
 ../girepository/gisignalinfo.h ../girepository/gistructinfo.h =
 ../girepository/gitypeinfo.h ../girepository/gitypelib.h =
 ../girepository/gitypes.h ../girepository/giunioninfo.h =
 ../girepository/givfuncinfo.h girepository/giversion.h
 dyld: Library not loaded: @rpath/libgirepository-1.0.1.dylib
   Referenced from: =
 /Users/cbouvier/prj/pkgsrc/devel/gobject-introspection/work/gobject-intros=
 pection-1.60.1/output/tmp-introspecttr76is3p/GIRepository-2.0
   Reason: image not found
 Command =
 '['/Users/cbouvier/prj/pkgsrc/devel/gobject-introspection/work/gobject-int=
 rospection-1.60.1/output/tmp-introspecttr76is3p/GIRepository-2.0', =
 '--introspect-dump=3D/Users/cbouvier/prj/pkgsrc/devel/gobject-introspectio=
 n/work/gobject-introspection-1.60.1/output/tmp-introspecttr76is3p/function=
 s.txt,/Users/cbouvier/prj/pkgsrc/devel/gobject-introspection/work/gobject-=
 introspection-1.60.1/output/tmp-introspecttr76is3p/dump.xml']' died with =
 <Signals.SIGABRT: 6>.
 [123/125] Generating gir-gio with a custom command.
 ninja: build stopped: subcommand failed.
 
 So I suppose the solution with compiler is more tricky than just =
 removing the setting of environment variables of the compiler.
 
 I also removed all references at time_t whatever the platform is NetBSD =
 or MirBSD. Is it correct?
 
 Moreover, the install part finished with:
 
 =3D> Checking for work-directory references in =
 gobject-introspection-1.60.1nb2
 WARNING: [check-fakehome.mk] fake home directory not empty:
 	=
 /Users/cbouvier/prj/pkgsrc/devel/gobject-introspection/work/.home
 	=
 /Users/cbouvier/prj/pkgsrc/devel/gobject-introspection/work/.home/.cache
 	=
 /Users/cbouvier/prj/pkgsrc/devel/gobject-introspection/work/.home/.cache/g=
 -ir-scanner
 	=
 /Users/cbouvier/prj/pkgsrc/devel/gobject-introspection/work/.home/.cache/g=
 -ir-scanner/.cache-version
 
 Do we have any clean method to avoid the warning? (Meson configure or =
 something else)?
 
 Devez/glib2 patch has not changed since last time but comments are =
 welcomed.
 
 Cheers,
 Clement.
 
 
 --Apple-Mail=_719E34F3-8AE8-4261-8F3A-FE20D873F44A
 Content-Disposition: attachment;
 	filename=patch-gobject-introspection.diff
 Content-Type: application/octet-stream;
 	x-unix-mode=0644;
 	name="patch-gobject-introspection.diff"
 Content-Transfer-Encoding: 7bit
 
 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/devel/gobject-introspection/Makefile,v
 retrieving revision 1.63
 diff -u -r1.63 Makefile
 --- Makefile	13 Jun 2019 09:43:19 -0000	1.63
 +++ Makefile	25 Jul 2019 15:58:12 -0000
 @@ -1,7 +1,7 @@
  # $NetBSD: Makefile,v 1.63 2019/06/13 09:43:19 wiz Exp $
  
  DISTNAME=	gobject-introspection-1.60.1
 -PKGREVISION=	1
 +PKGREVISION=	2
  CATEGORIES=	devel gnome
  MASTER_SITES=	${MASTER_SITE_GNOME:=sources/gobject-introspection/${PKGVERSION_NOREV:R}/}
  EXTRACT_SUFX=	.tar.xz
 @@ -21,21 +21,6 @@
  PKGCONFIG_OVERRIDE+=	gobject-introspection-1.0.pc.in
  PKGCONFIG_OVERRIDE+=	gobject-introspection-no-export-1.0.pc.in
  
 -SUBST_CLASSES+=		timet
 -SUBST_STAGE.timet=	pre-configure
 -SUBST_FILES.timet=	giscanner/ast.py
 -SUBST_FILES.timet+=	tests/scanner/Regress-1.0-expected.gir
 -.include "../../mk/bsd.prefs.mk"
 -.if !empty(MACHINE_PLATFORM:MNetBSD-5.99.*) || !empty(MACHINE_PLATFORM:MNetBSD-[6-9].*) || !empty(MACHINE_PLATFORM:MMirBSD-*)
 -SUBST_SED.timet=	-e 's,@TIMET_TYPENAME@,TYPE_INT64,g'
 -SUBST_SED.timet+=	-e 's,@TIMET_CTYPE@,gint64,g'
 -.else
 -SUBST_SED.timet=	-e 's,@TIMET_TYPENAME@,TYPE_LONG,g'
 -SUBST_SED.timet+=	-e 's,@TIMET_CTYPE@,glong,g'
 -.endif
 -
 -MAKE_ENV+=	LD_LIBRARY_PATH=${WRKSRC}/output/girepository
 -
  BUILDLINK_API_DEPENDS.glib2+= glib2>=2.58.0
  .include "../../devel/glib2/buildlink3.mk"
  BUILDLINK_API_DEPENDS.libffi+= libffi>=3.0.0
 Index: distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/devel/gobject-introspection/distinfo,v
 retrieving revision 1.32
 diff -u -r1.32 distinfo
 --- distinfo	5 Jun 2019 09:12:32 -0000	1.32
 +++ distinfo	25 Jul 2019 15:58:12 -0000
 @@ -4,12 +4,12 @@
  RMD160 (gobject-introspection-1.60.1.tar.xz) = 71ca6db1b174272525ee991ab723957003f66891
  SHA512 (gobject-introspection-1.60.1.tar.xz) = 01adbeffee08ff6487f11a303fd7a59a99c36714dce21be9bbae7fd2bf8f080665e830bc3a47566140a6081dc74f6c2f8d8232286759b761f70493545a9d90ea
  Size (gobject-introspection-1.60.1.tar.xz) = 1284460 bytes
 -SHA1 (patch-giscanner_ast.py) = 06b3d8903d126028d2d5144c6d6a508209c834b9
 -SHA1 (patch-giscanner_ccompiler.py) = 03faf472ad9384670e7f15a647e069606d44daba
 +SHA1 (patch-gir_meson.build) = 61dfcf565062cca27672a59bbbcd80e5eeb1e247
 +SHA1 (patch-girepository_meson.build) = 5efb55757fc930fe5f56102d655c8acb82a2286e
 +SHA1 (patch-giscanner_ast.py) = 5330a5a97227a4448fc6bb3bd34a9e3b0967ac11
  SHA1 (patch-giscanner_gdumpparser.py) = 83d6c72d070b2e32d90131148b566a1a2fb9aa77
  SHA1 (patch-giscanner_girparser.py) = 1156b7146568667dcb56ae7fecfc0f1be91b78ec
  SHA1 (patch-meson.build) = eb67bfe1a9dd46986b9b6e0d296c385e2924a0e8
 -SHA1 (patch-tests_scanner_Regress-1.0-expected.gir) = f6f044a24045d38d78b9c511813be8442ce45b16
  SHA1 (patch-tools_compiler.c) = 799d5a086338e08378b8b249e6808e8b1a8101dc
  SHA1 (patch-tools_generate.c) = 3fa74dd0e2c7658768a4278b984be38bff729d94
 -SHA1 (patch-tools_meson.build) = 6b9f2f1b11d1eca62fbc136c3ac56692db7cacde
 +SHA1 (patch-tools_meson.build) = 8bb31ad3b55a4ce2f03de43694344044aa26b011
 Index: patches/patch-gir_meson.build
 ===================================================================
 RCS file: patches/patch-gir_meson.build
 diff -N patches/patch-gir_meson.build
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ patches/patch-gir_meson.build	25 Jul 2019 15:58:12 -0000
 @@ -0,0 +1,15 @@
 +$NetBSD$
 +
 +Avoid error about girepository lib not found for g-ir-compiler in using a static version.
 +
 +--- gir/meson.build.orig	2019-04-07 10:09:35.000000000 +0000
 ++++ gir/meson.build
 +@@ -427,7 +427,7 @@ foreach gir : gir_files
 +     input: gir,
 +     output: '@BASENAME@.typelib',
 +     depends: [gobject_gir, ],
 +-    command: [gircompiler, '-o', '@OUTPUT@', '@INPUT@',
 ++    command: [gircompiler_bs, '-o', '@OUTPUT@', '@INPUT@',
 +               '--includedir', meson.current_build_dir(),
 +               '--includedir', meson.current_source_dir(),
 +     ],
 Index: patches/patch-girepository_meson.build
 ===================================================================
 RCS file: patches/patch-girepository_meson.build
 diff -N patches/patch-girepository_meson.build
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ patches/patch-girepository_meson.build	25 Jul 2019 15:58:12 -0000
 @@ -0,0 +1,25 @@
 +$NetBSD$
 +
 +Make a static version of girepository in order to use the executables in workdir.
 +The static version is not installed.
 +
 +--- girepository/meson.build.orig	2019-01-11 14:06:17.000000000 +0000
 ++++ girepository/meson.build
 +@@ -163,6 +163,17 @@ girepo_lib = shared_library('girepositor
 +   install: true,
 + )
 + 
 ++girepo_stlib = static_library('girepository-1.0-st',
 ++  sources: girepo_sources,
 ++  include_directories : configinc,
 ++  c_args: gi_hidden_visibility_cflags + ['-DG_IREPOSITORY_COMPILATION'] +
 ++          custom_c_args,
 ++  dependencies: [glib_dep, gobject_dep, gmodule_dep,
 ++                 gio_dep, girepo_internals_dep],
 ++  version: '1.0.0',
 ++  install: false,
 ++)
 ++
 + # Copy to builddir for use with giscanner/dumper.py when running uninstalled
 + configure_file(input : 'gdump.c',
 +   output : 'gdump.c',
 Index: patches/patch-giscanner_ast.py
 ===================================================================
 RCS file: /cvsroot/pkgsrc/devel/gobject-introspection/patches/patch-giscanner_ast.py,v
 retrieving revision 1.1
 diff -u -r1.1 patch-giscanner_ast.py
 --- patches/patch-giscanner_ast.py	3 Jun 2019 10:47:20 -0000	1.1
 +++ patches/patch-giscanner_ast.py	25 Jul 2019 15:58:12 -0000
 @@ -21,12 +21,3 @@
   # A few additional GLib type aliases
   type_names['guchar'] = TYPE_UINT8
   type_names['gchararray'] = TYPE_STRING
 -@@ -344,7 +353,7 @@ type_names['FILE*'] = TYPE_ANY
 - # integers it's easy enough to expand them.
 - type_names['size_t'] = type_names['gsize']
 - type_names['ssize_t'] = type_names['gssize']
 --type_names['time_t'] = TYPE_LONG
 -+type_names['time_t'] = @TIMET_TYPENAME@
 - type_names['off_t'] = type_names['gsize']
 - type_names['pid_t'] = TYPE_INT
 - type_names['uid_t'] = TYPE_UINT
 Index: patches/patch-giscanner_ccompiler.py
 ===================================================================
 RCS file: patches/patch-giscanner_ccompiler.py
 diff -N patches/patch-giscanner_ccompiler.py
 --- patches/patch-giscanner_ccompiler.py	3 Jun 2019 10:47:20 -0000	1.2
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,20 +0,0 @@
 -$NetBSD: patch-giscanner_ccompiler.py,v 1.2 2019/06/03 10:47:20 prlw1 Exp $
 -
 -Do not set LD_LIBRARY_PATH when calling the compiler.
 -
 ---- giscanner/ccompiler.py.orig	2019-03-02 17:10:05.000000000 +0000
 -+++ giscanner/ccompiler.py
 -@@ -227,13 +227,6 @@ class CCompiler(object):
 -                 else:
 -                     args.append('-l' + library)
 - 
 --        for envvar in runtime_path_envvar:
 --            if envvar in os.environ:
 --                os.environ[envvar] = \
 --                    os.pathsep.join(runtime_paths + [os.environ[envvar]])
 --            else:
 --                os.environ[envvar] = os.pathsep.join(runtime_paths)
 --
 -     def get_external_link_flags(self, args, libraries):
 -         # An "external" link is where the library to be introspected
 -         # is installed on the system; this case is used for the scanning
 Index: patches/patch-tests_scanner_Regress-1.0-expected.gir
 ===================================================================
 RCS file: patches/patch-tests_scanner_Regress-1.0-expected.gir
 diff -N patches/patch-tests_scanner_Regress-1.0-expected.gir
 --- patches/patch-tests_scanner_Regress-1.0-expected.gir	3 Jun 2019 10:47:20 -0000	1.1
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,29 +0,0 @@
 -$NetBSD: patch-tests_scanner_Regress-1.0-expected.gir,v 1.1 2019/06/03 10:47:20 prlw1 Exp $
 -
 -32/64-bit time_t fix
 -
 ---- tests/scanner/Regress-1.0-expected.gir.orig	2019-01-16 18:03:21.000000000 +0000
 -+++ tests/scanner/Regress-1.0-expected.gir
 -@@ -1877,7 +1877,7 @@ uses a C sugar return type.</doc>
 -             <type name="FooObject" c:type="RegressFooObject*"/>
 -           </instance-parameter>
 -           <parameter name="time" transfer-ownership="none">
 --            <type name="glong" c:type="time_t"/>
 -+            <type name="@TIMET_CTYPE@" c:type="time_t"/>
 -           </parameter>
 -         </parameters>
 -       </method>
 -@@ -7975,11 +7975,11 @@ https://bugzilla.gnome.org/show_bug.cgi?
 -     <function name="test_timet" c:identifier="regress_test_timet">
 -       <source-position filename="regress.h" line="94"/>
 -       <return-value transfer-ownership="none">
 --        <type name="glong" c:type="time_t"/>
 -+        <type name="@TIMET_CTYPE@" c:type="time_t"/>
 -       </return-value>
 -       <parameters>
 -         <parameter name="in" transfer-ownership="none">
 --          <type name="glong" c:type="time_t"/>
 -+          <type name="@TIMET_CTYPE@" c:type="time_t"/>
 -         </parameter>
 -       </parameters>
 -     </function>
 Index: patches/patch-tools_meson.build
 ===================================================================
 RCS file: /cvsroot/pkgsrc/devel/gobject-introspection/patches/patch-tools_meson.build,v
 retrieving revision 1.1
 diff -u -r1.1 patch-tools_meson.build
 --- patches/patch-tools_meson.build	3 Jun 2019 10:47:20 -0000	1.1
 +++ patches/patch-tools_meson.build	25 Jul 2019 15:58:12 -0000
 @@ -1,6 +1,8 @@
  $NetBSD: patch-tools_meson.build,v 1.1 2019/06/03 10:47:20 prlw1 Exp $
  
  After testing for the meson_option "python", meson.build then overwrites it.
 +Make a g-ir-compiler not dependent of girepository shared library. Allow custom target for typelib files
 +to be generated during the build. The bootstrap g-ir-compiler is not installed.
  
  --- tools/meson.build.orig	2019-01-11 14:16:09.000000000 +0000
  +++ tools/meson.build
 @@ -13,3 +15,20 @@
   endif
   
   tool_output = []
 +@@ -52,6 +52,16 @@ gircompiler = executable('g-ir-compiler'
 +     girepo_dep,
 +   ],
 +   install: true,
 ++  c_args: custom_c_args
 ++)
 ++
 ++gircompiler_bs = executable('g-ir-compiler-bootstrap', 'compiler.c',
 ++  dependencies: [
 ++    girepo_internals_dep,
 ++    girepo_dep,
 ++  ],
 ++  link_with: girepo_stlib,
 ++  install: false,
 +   c_args: custom_c_args,
 + )
 + 
 
 --Apple-Mail=_719E34F3-8AE8-4261-8F3A-FE20D873F44A
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	charset=us-ascii
 
 
 
 --Apple-Mail=_719E34F3-8AE8-4261-8F3A-FE20D873F44A
 Content-Disposition: attachment;
 	filename=patch-glib2.diff
 Content-Type: application/octet-stream;
 	x-unix-mode=0644;
 	name="patch-glib2.diff"
 Content-Transfer-Encoding: 7bit
 
 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/devel/glib2/Makefile,v
 retrieving revision 1.257
 diff -u -r1.257 Makefile
 --- Makefile	28 Jun 2019 19:42:05 -0000	1.257
 +++ Makefile	25 Jul 2019 15:59:37 -0000
 @@ -2,7 +2,7 @@
  
  .include "Makefile.common"
  
 -PKGREVISION=	5
 +PKGREVISION=	6
  CATEGORIES=	devel gnome
  COMMENT=	Some useful routines for C programming (glib2)
  
 @@ -61,12 +61,6 @@
  TOOL_DEPENDS+=		${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
  PYTHON_FOR_BUILD_ONLY=	yes
  
 -.include "../../mk/bsd.prefs.mk"
 -PLIST_VARS+=	nococoa
 -.if ${OPSYS} != "Darwin"
 -PLIST.nococoa=	yes
 -.endif
 -
  .include "../../converters/libiconv/buildlink3.mk"
  .include "../../devel/gettext-lib/buildlink3.mk"
  .include "../../devel/pcre/buildlink3.mk"
 Index: PLIST
 ===================================================================
 RCS file: /cvsroot/pkgsrc/devel/glib2/PLIST,v
 retrieving revision 1.105
 diff -u -r1.105 PLIST
 --- PLIST	28 Jun 2019 19:42:05 -0000	1.105
 +++ PLIST	25 Jul 2019 15:59:37 -0000
 @@ -1,8 +1,8 @@
  @comment $NetBSD: PLIST,v 1.105 2019/06/28 19:42:05 schmonz Exp $
 -${PLIST.nococoa}bin/gapplication
 +${PLIST.nonative}bin/gapplication
  bin/gdbus
  bin/gio
 -${PLIST.nococoa}bin/gio-launch-desktop
 +${PLIST.nonative}bin/gio-launch-desktop
  bin/gio-querymodules
  bin/glib-compile-resources
  bin/glib-compile-schemas
 @@ -10,7 +10,8 @@
  bin/gobject-query
  bin/gresource
  bin/gsettings
 -include/gio-unix-2.0/gio/gdesktopappinfo.h
 +${PLIST.nonative}include/gio-unix-2.0/gio/gdesktopappinfo.h
 +${PLIST.cocoa}include/glib-2.0/gio/gosxappinfo.h
  include/gio-unix-2.0/gio/gfiledescriptorbased.h
  include/gio-unix-2.0/gio/gunixconnection.h
  include/gio-unix-2.0/gio/gunixcredentialsmessage.h
 Index: PLIST.Darwin
 ===================================================================
 RCS file: PLIST.Darwin
 diff -N PLIST.Darwin
 --- PLIST.Darwin	6 Jun 2019 11:06:51 -0000	1.1
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,2 +0,0 @@
 -@comment $NetBSD: PLIST.Darwin,v 1.1 2019/06/06 11:06:51 adam Exp $
 -include/glib-2.0/gio/gosxappinfo.h
 Index: distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/devel/glib2/distinfo,v
 retrieving revision 1.253
 diff -u -r1.253 distinfo
 --- distinfo	28 Jun 2019 19:42:05 -0000	1.253
 +++ distinfo	25 Jul 2019 15:59:38 -0000
 @@ -6,12 +6,12 @@
  Size (glib-2.60.4.tar.xz) = 4589384 bytes
  SHA1 (patch-gio_gcredentialsprivate.h) = dab92e07f8357a7dc1a569e37f65f9b199aee281
  SHA1 (patch-gio_gdbus-2.0_codegen_meson.build) = 21c806f1a9884000b6a1683bc2fd1276b3c3544f
 -SHA1 (patch-gio_giomodule.c) = 0715e77fa97f90631c77e9a2cfd54b74698522e2
 +SHA1 (patch-gio_giomodule.c) = 1e0e589826c9ed45a70047f5520eb30cb6ddb177
  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) = 56b86a0b8ade34ebd155b2d530a19bf3eac97b76
 +SHA1 (patch-gio_meson.build) = d6131b5f9c9324237f08f0431d807fa461048604
  SHA1 (patch-gio_tests_gdbus-export.c) = 59d85ca079d02b52e33153c7d2ac1cc48c26707a
  SHA1 (patch-glib_gatomic.c) = 875ad9c828dcf2add356d4988d14fb4f1985aef8
  SHA1 (patch-glib_gatomic.h) = 21294cac483c3379198283c54fe6e24af3e630b1
 @@ -28,4 +28,5 @@
  SHA1 (patch-gmodule_gmodule.c) = 55c5f9d16e3517f3fdc04d40922f50d9c66b0b9a
  SHA1 (patch-gobject_glib-mkenums.in) = c177cf9b1ea81542665240678f47f68351a3760d
  SHA1 (patch-gobject_meson.build) = 58ee162e44047bf20c66067fd3edbe98cc13af50
 -SHA1 (patch-meson.build) = 125d98082c9bf2b6403bbda1c12e0fa695031ee6
 +SHA1 (patch-meson.build) = c51e922650e699a877c6b5b3aa31a457c7c27f87
 +SHA1 (patch-meson__options.txt) = 781e0aef012edb9f22402bb16456de02915d326c
 Index: options.mk
 ===================================================================
 RCS file: /cvsroot/pkgsrc/devel/glib2/options.mk,v
 retrieving revision 1.21
 diff -u -r1.21 options.mk
 --- options.mk	3 Jun 2019 09:53:50 -0000	1.21
 +++ options.mk	25 Jul 2019 15:59:38 -0000
 @@ -1,8 +1,15 @@
  # $NetBSD: options.mk,v 1.21 2019/06/03 09:53:50 prlw1 Exp $
  
 -PKG_OPTIONS_VAR=	PKG_OPTIONS.glib2
 -PKG_SUPPORTED_OPTIONS=	fam
 -PKG_SUGGESTED_OPTIONS=
 +.include "../../mk/bsd.prefs.mk"
 +
 +PKG_OPTIONS_VAR=		PKG_OPTIONS.glib2
 +PKG_SUPPORTED_OPTIONS=		fam
 +PKG_OPTIONS_REQUIRED_GROUPS= 	app
 +PKG_OPTIONS_GROUP.app+=		x11
 +.if ${OPSYS} == "Darwin"
 +PKG_OPTIONS_GROUP.app+= native
 +.endif
 +PKG_SUGGESTED_OPTIONS= x11
  
  .include "../../mk/bsd.options.mk"
  
 @@ -12,3 +19,14 @@
  PLIST.fam=	yes
  .include "../../mk/fam.buildlink3.mk"
  .endif
 +
 +PLIST_VARS+=	cocoa
 +PLIST_VARS+=	nonative
 +
 +.if !empty(PKG_OPTIONS:Mnative)
 +MESON_ARGS+=	-Dnative=true
 +PLIST.cocoa=	yes
 +.else
 +MESON_ARGS+=	-Dnative=false
 +PLIST.nonative= yes
 +.endif
 Index: patches/patch-gio_giomodule.c
 ===================================================================
 RCS file: /cvsroot/pkgsrc/devel/glib2/patches/patch-gio_giomodule.c,v
 retrieving revision 1.5
 diff -u -r1.5 patch-gio_giomodule.c
 --- patches/patch-gio_giomodule.c	6 Jun 2019 11:05:12 -0000	1.5
 +++ patches/patch-gio_giomodule.c	25 Jul 2019 15:59:38 -0000
 @@ -1,15 +1,44 @@
  $NetBSD: patch-gio_giomodule.c,v 1.5 2019/06/06 11:05:12 adam Exp $
  
  Disable inotify on SunOS.
 +Let compile-time choice for appinfo implementation on MacOSX
  
 ---- gio/giomodule.c.orig	2019-05-03 13:43:28.000000000 +0000
 +--- gio/giomodule.c.orig	2019-06-10 17:47:20.000000000 +0000
  +++ gio/giomodule.c
 -@@ -1209,7 +1206,7 @@ _g_io_modules_ensure_loaded (void)
 -       /* Initialize types from built-in "modules" */
 -       g_type_ensure (g_null_settings_backend_get_type ());
 -       g_type_ensure (g_memory_settings_backend_get_type ());
 --#if defined(HAVE_INOTIFY_INIT1)
 -+#if defined(HAVE_INOTIFY_INIT1) && !defined(__sun)
 -       g_type_ensure (g_inotify_file_monitor_get_type ());
 +@@ -43,12 +43,13 @@
   #endif
 - #if defined(HAVE_KQUEUE)
 + #include <glib/gstdio.h>
 + 
 +-#if defined(G_OS_UNIX) && !defined(HAVE_COCOA)
 ++#if defined(G_OS_UNIX)
 ++#if !defined(NATIVE_APP_INFO) || !defined(HAVE_COCOA)
 + #include "gdesktopappinfo.h"
 +-#endif
 +-#ifdef HAVE_COCOA
 ++#elif defined(HAVE_COCOA)
 + #include "gosxappinfo.h"
 + #endif
 ++#endif
 + 
 + #ifdef HAVE_COCOA
 + #include <AvailabilityMacros.h>
 +@@ -1084,7 +1085,7 @@ _g_io_modules_ensure_extension_points_re
 +     {
 +       registered_extensions = TRUE;
 +       
 +-#if defined(G_OS_UNIX) && !defined(HAVE_COCOA)
 ++#if defined(G_OS_UNIX) && (!defined(HAVE_COCOA) || !defined(NATIVE_APP_INFO))
 + #if !GLIB_CHECK_VERSION (3, 0, 0)
 +       ep = g_io_extension_point_register (G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME);
 +       G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 +@@ -1225,8 +1226,10 @@ _g_io_modules_ensure_loaded (void)
 + #endif
 + #ifdef HAVE_COCOA
 +       g_type_ensure (g_nextstep_settings_backend_get_type ());
 ++#ifdef NATIVE_APP_INFO
 +       g_type_ensure (g_osx_app_info_get_type ());
 + #endif
 ++#endif
 + #ifdef G_OS_UNIX
 +       g_type_ensure (_g_unix_volume_monitor_get_type ());
 +       g_type_ensure (g_fdo_notification_backend_get_type ());
 Index: patches/patch-gio_meson.build
 ===================================================================
 RCS file: /cvsroot/pkgsrc/devel/glib2/patches/patch-gio_meson.build,v
 retrieving revision 1.5
 diff -u -r1.5 patch-gio_meson.build
 --- patches/patch-gio_meson.build	28 Jun 2019 19:42:05 -0000	1.5
 +++ patches/patch-gio_meson.build	25 Jul 2019 15:59:38 -0000
 @@ -2,19 +2,42 @@
  
  Don't build tests, as have strong dependency on libdl.
  Disable inotify on SunOS.
 -Install gio/gdesktopappinfo.h on OS X.
 +Let compile-time choice for appinfo implementation on MacOSX.
  
  --- gio/meson.build.orig	2019-06-10 17:47:20.000000000 +0000
  +++ gio/meson.build
 -@@ -421,6 +421,7 @@ if host_system != 'windows'
 +@@ -413,14 +413,26 @@ if host_system != 'windows'
 +     'gunixsocketaddress.h',
 +   )
 + 
 +-  if glib_have_cocoa
 ++  if glib_have_cocoa  
 +     settings_sources += files('gnextstepsettingsbackend.m')
 +-    contenttype_sources += files('gosxcontenttype.m')
 +-    appinfo_sources += files('gosxappinfo.m')
 +     if glib_have_os_x_9_or_later
         unix_sources += files('gcocoanotificationbackend.m')
       endif
 -     application_headers += files('gosxappinfo.h')
 +-    application_headers += files('gosxappinfo.h')
 ++    if app_info_is_native
 ++      contenttype_sources += files('gosxcontenttype.m')
 ++      appinfo_sources += files('gosxappinfo.m')
 ++      application_headers += files('gosxappinfo.h')
 ++    else
 ++    contenttype_sources += files('gcontenttype.c')
 ++    appinfo_sources += files('gdesktopappinfo.c')
  +    gio_unix_include_headers += files('gdesktopappinfo.h')
 ++
 ++    executable('gio-launch-desktop', 'gio-launch-desktop.c',
 ++      install : true,
 ++      c_args : gio_c_args,
 ++      # intl.lib is not compatible with SAFESEH
 ++      link_args : noseh_link_args)
 ++    endif
     else
       contenttype_sources += files('gcontenttype.c')
       appinfo_sources += files('gdesktopappinfo.c')
 -@@ -758,7 +759,7 @@ gioenumtypes_c = custom_target('gioenumt
 +@@ -758,7 +770,7 @@ gioenumtypes_c = custom_target('gioenumt
   gioenumtypes_dep = declare_dependency(sources : [gioenumtypes_h, glib_enumtypes_h])
   
   # inotify
 @@ -23,7 +46,16 @@
     subdir('inotify')
     internal_deps += [ inotify_lib ]
     internal_objects += [inotify_lib.extract_all_objects()]
 -@@ -994,4 +995,3 @@ if enable_systemtap
 +@@ -976,7 +988,7 @@ executable('gdbus', 'gdbus-tool.c',
 +   link_args : noseh_link_args,
 +   dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
 + 
 +-if host_system != 'windows' and not glib_have_cocoa
 ++if host_system != 'windows' and (not glib_have_cocoa or not app_info_is_native)
 +   executable('gapplication', 'gapplication-tool.c',
 +     install : true,
 +     c_args : gio_c_args,
 +@@ -994,4 +1006,3 @@ if enable_systemtap
   endif
   
   subdir('fam')
 Index: patches/patch-meson.build
 ===================================================================
 RCS file: /cvsroot/pkgsrc/devel/glib2/patches/patch-meson.build,v
 retrieving revision 1.5
 diff -u -r1.5 patch-meson.build
 --- patches/patch-meson.build	26 Jun 2019 10:42:50 -0000	1.5
 +++ patches/patch-meson.build	25 Jul 2019 15:59:38 -0000
 @@ -14,9 +14,24 @@
  - Ignore __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 as is already done
    for android and linux. PR pkg/54298
  
 +- Let compile-time option for appinfo implementation on MacOSX
 +
  --- meson.build.orig	2019-06-10 17:47:20.000000000 +0000
  +++ meson.build
 -@@ -1570,28 +1570,15 @@ atomictest = '''int main() {
 +@@ -653,6 +653,12 @@ if host_system == 'darwin'
 +   # know which language flags it's going to use to link. Add to both languages
 +   # for now. See https://github.com/mesonbuild/meson/issues/3585.
 +   add_project_link_arguments(osx_ldflags, language : ['objc', 'c'])
 ++
 ++  app_info_is_native = get_option('native')
 ++  if app_info_is_native
 ++    glib_conf.set('NATIVE_APP_INFO', true)
 ++  endif
 ++
 + endif
 + 
 + # Check for futex(2)
 +@@ -1570,28 +1576,15 @@ atomictest = '''int main() {
   }
   '''
   
 @@ -47,7 +62,7 @@
   
   # === Threads ===
   
 -@@ -1696,14 +1683,14 @@ else
 +@@ -1696,14 +1689,14 @@ else
     found_iconv = false
     if iconv_opt == 'libc'
       if cc.has_function('iconv_open')
 @@ -70,7 +85,7 @@
       endif
     elif iconv_opt == 'native'
       if cc.has_header_symbol('iconv.h', 'iconv_open')
 -@@ -1785,7 +1772,7 @@ endif
 +@@ -1785,7 +1778,7 @@ endif
   # proxy-libintl subproject.
   # FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible
   # implementations. This could be extended if issues are found in some platforms.
 @@ -79,7 +94,7 @@
     libintl = []
     have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset')
   else
 -@@ -1836,16 +1823,15 @@ if host_system != 'windows' and get_opti
 +@@ -1836,16 +1829,15 @@ if host_system != 'windows' and get_opti
     if cc.has_function('getxattr') and cc.has_header('sys/xattr.h')
       glib_conf.set('HAVE_SYS_XATTR_H', 1)
       glib_conf_prefix = glib_conf_prefix + '#define @0@ 1\n'.format('HAVE_SYS_XATTR_H')
 @@ -98,7 +113,7 @@
     if cc.compiles(glib_conf_prefix + '''
                    #include <stdio.h>
                    #ifdef HAVE_SYS_TYPES_H
 -@@ -1886,9 +1872,11 @@ elif meson.get_cross_property('have_strl
 +@@ -1886,9 +1878,11 @@ elif meson.get_cross_property('have_strl
     glib_conf.set('HAVE_STRLCPY', 1)
   endif
   
 @@ -113,7 +128,7 @@
   
   python_version = python.language_version()
   python_version_req = '>=3.4'
 -@@ -1897,7 +1885,7 @@ if not python_version.version_compare(py
 +@@ -1897,7 +1891,7 @@ if not python_version.version_compare(py
   endif
   
   # Determine which user environment-dependent files that we want to install
 @@ -122,7 +137,7 @@
   have_sh = find_program('sh', required : false).found() # For glib-gettextize
   
   # Some installed tests require a custom environment
 -@@ -1906,7 +1894,7 @@ env_program = find_program('env', requir
 +@@ -1906,7 +1900,7 @@ env_program = find_program('env', requir
   # FIXME: How to detect Solaris? https://github.com/mesonbuild/meson/issues/1578
   if host_system == 'sunos'
     glib_conf.set('_XOPEN_SOURCE_EXTENDED', 1)
 Index: patches/patch-meson__options.txt
 ===================================================================
 RCS file: patches/patch-meson__options.txt
 diff -N patches/patch-meson__options.txt
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ patches/patch-meson__options.txt	25 Jul 2019 15:59:38 -0000
 @@ -0,0 +1,16 @@
 +$NetBSD$
 +
 +Let compile-time option for appinfo implementation on MacOSX.
 +
 +--- meson_options.txt.orig	2019-06-10 17:47:20.000000000 +0000
 ++++ meson_options.txt
 +@@ -89,3 +89,9 @@ option('nls',
 +        value : 'auto',
 +        yield: true,
 +        description : 'Enable native language support (translations)')
 ++
 ++option('native',
 ++       type : 'boolean',
 ++       value : 'false',
 ++       yield : true,
 ++       description : 'Enable native application information')
 
 --Apple-Mail=_719E34F3-8AE8-4261-8F3A-FE20D873F44A
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	charset=us-ascii
 
 
 
 
 --Apple-Mail=_719E34F3-8AE8-4261-8F3A-FE20D873F44A--
 


Home | Main Index | Thread Index | Old Index