pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/gobject-introspection



Module Name:    pkgsrc
Committed By:   tnn
Date:           Fri May 13 12:05:59 UTC 2022

Modified Files:
        pkgsrc/devel/gobject-introspection: Makefile distinfo
Added Files:
        pkgsrc/devel/gobject-introspection/patches:
            patch-girepository_gitypelib.c

Log Message:
gobject-introspection: fix Python GTK bindings not working correctly on macOS


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 pkgsrc/devel/gobject-introspection/Makefile
cvs rdiff -u -r1.47 -r1.48 pkgsrc/devel/gobject-introspection/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/devel/gobject-introspection/patches/patch-girepository_gitypelib.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/gobject-introspection/Makefile
diff -u pkgsrc/devel/gobject-introspection/Makefile:1.80 pkgsrc/devel/gobject-introspection/Makefile:1.81
--- pkgsrc/devel/gobject-introspection/Makefile:1.80    Wed Feb 16 12:05:00 2022
+++ pkgsrc/devel/gobject-introspection/Makefile Fri May 13 12:05:59 2022
@@ -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_SED.timet+=     -e 's,@TIMET_CTYPE@,gl
 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

Index: pkgsrc/devel/gobject-introspection/distinfo
diff -u pkgsrc/devel/gobject-introspection/distinfo:1.47 pkgsrc/devel/gobject-introspection/distinfo:1.48
--- pkgsrc/devel/gobject-introspection/distinfo:1.47    Tue Feb 15 17:34:32 2022
+++ pkgsrc/devel/gobject-introspection/distinfo Fri May 13 12:05:59 2022
@@ -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

Added files:

Index: pkgsrc/devel/gobject-introspection/patches/patch-girepository_gitypelib.c
diff -u /dev/null pkgsrc/devel/gobject-introspection/patches/patch-girepository_gitypelib.c:1.1
--- /dev/null   Fri May 13 12:05:59 2022
+++ pkgsrc/devel/gobject-introspection/patches/patch-girepository_gitypelib.c   Fri May 13 12:05:59 2022
@@ -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