pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/gobject-introspection gobject-introspection: fix...
details: https://anonhg.NetBSD.org/pkgsrc/rev/52a068babedd
branches: trunk
changeset: 379232:52a068babedd
user: tnn <tnn%pkgsrc.org@localhost>
date: Fri May 13 12:05:59 2022 +0000
description:
gobject-introspection: fix Python GTK bindings not working correctly on macOS
diffstat:
devel/gobject-introspection/Makefile | 5 +-
devel/gobject-introspection/distinfo | 3 +-
devel/gobject-introspection/patches/patch-girepository_gitypelib.c | 30 ++++++++++
3 files changed, 36 insertions(+), 2 deletions(-)
diffs (70 lines):
diff -r 7c37a9b54b8d -r 52a068babedd devel/gobject-introspection/Makefile
--- a/devel/gobject-introspection/Makefile Fri May 13 11:52:08 2022 +0000
+++ b/devel/gobject-introspection/Makefile Fri May 13 12:05:59 2022 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.80 2022/02/16 12:05:00 wiz Exp $
+# $NetBSD: Makefile,v 1.81 2022/05/13 12:05:59 tnn Exp $
DISTNAME= gobject-introspection-1.70.0
+PKGREVISION= 1
CATEGORIES= devel gnome
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/gobject-introspection/${PKGVERSION_NOREV:R}/}
EXTRACT_SUFX= .tar.xz
@@ -39,7 +40,9 @@
SUBST_CLASSES+= libdirs
SUBST_STAGE.libdirs= pre-configure
SUBST_FILES.libdirs= giscanner/ccompiler.py
+SUBST_FILES.libdirs+= girepository/gitypelib.c
SUBST_VARS.libdirs= _OPSYS_LIB_DIRS
+SUBST_VARS.libdirs+= PREFIX
MAKE_ENV+= LD_LIBRARY_PATH=${WRKSRC}/output/girepository
# For Darwin
diff -r 7c37a9b54b8d -r 52a068babedd devel/gobject-introspection/distinfo
--- a/devel/gobject-introspection/distinfo Fri May 13 11:52:08 2022 +0000
+++ b/devel/gobject-introspection/distinfo Fri May 13 12:05:59 2022 +0000
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.47 2022/02/15 17:34:32 wiz Exp $
+$NetBSD: distinfo,v 1.48 2022/05/13 12:05:59 tnn Exp $
BLAKE2s (gobject-introspection-1.70.0.tar.xz) = 079f927cf357bc24d4df1d8130c61b9a1f3e5249f53bcf7cfe9db0989e28a4ea
SHA512 (gobject-introspection-1.70.0.tar.xz) = 216b376ed423f607e36c723dd6b67975dbfb63c253f2d8bd0b3661e3d69f8c8059cf221db8c5260b0262fad1b7d738f3b2e5fbd51fdbc31e40ccb115c209baf0
Size (gobject-introspection-1.70.0.tar.xz) = 1029372 bytes
+SHA1 (patch-girepository_gitypelib.c) = b5fa0fe0fc22a5dfb2b2916dfbb87e16fc732640
SHA1 (patch-giscanner_ast.py) = 06b3d8903d126028d2d5144c6d6a508209c834b9
SHA1 (patch-giscanner_ccompiler.py) = f65622421968e9daef19bafc4bd3c3d210546389
SHA1 (patch-giscanner_doctemplates_devdocs_meson.build) = d65e229db068a99ecf78e03ff0dfae809e731612
diff -r 7c37a9b54b8d -r 52a068babedd devel/gobject-introspection/patches/patch-girepository_gitypelib.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gobject-introspection/patches/patch-girepository_gitypelib.c Fri May 13 12:05:59 2022 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-girepository_gitypelib.c,v 1.1 2022/05/13 12:05:59 tnn Exp $
+
+Try to look for introspectable libraries in pkgsrc's ${PREFIX}/lib before
+any system default search patchs. Fixes this problem on macOS:
+
+python3.9
+>>> import gi
+>>> from gi.repository import Gtk
+
+WARNING **: 13:46:16.161: Failed to load shared library 'libpango-1.0.0.dylib'
+referenced by the typelib: dlopen(libpango-1.0.0.dylib, 0x0009): tried:
+'libpango-1.0.0.dylib' (no such file),
+'/usr/local/lib/libpango-1.0.0.dylib' (no such file),
+'/usr/lib/libpango-1.0.0.dylib' (no such file)
+
+--- girepository/gitypelib.c.orig 2021-09-17 16:02:42.000000000 +0000
++++ girepository/gitypelib.c
+@@ -2275,6 +2275,12 @@ load_one_shared_library (const char *shl
+ if (m != NULL)
+ return m;
+ }
++ /* try pkgsrc lib dir */
++ char *pkglibpath = g_build_filename ("@PREFIX@/lib", shlib, NULL);
++ m= g_module_open (pkglibpath, G_MODULE_BIND_LAZY);
++ g_free (pkglibpath);
++ if (m != NULL)
++ return m;
+ }
+
+ /* Then try loading from standard paths */
Home |
Main Index |
Thread Index |
Old Index