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: Exc...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/577e7b6977cb
branches:  trunk
changeset: 444727:577e7b6977cb
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Mon Jan 11 19:15:24 2021 +0000

description:
gobject-introspection: Exclude system paths from LD_LIBRARY_PATH.

During builds, g-ir-scanner sets LD_LIBRARY_PATH in the environment for the C
compiler, with a path set for every -L argument passed to it.  This can cause
problems when system paths are added but the compiler is trying to link against
libraries that have built against pkgsrc libraries, as LD_LIBRARY_PATH has a
higher precedence than the RUNPATH built correctly into the libraries.

Fixes issue seen on SunOS where /usr/lib/libgcc_s.so was selected ahead of the
correct GCC library built into the cairo libraries during a build of pango.

Bump PKGREVISION.

diffstat:

 devel/gobject-introspection/Makefile                             |   8 ++++-
 devel/gobject-introspection/distinfo                             |   3 +-
 devel/gobject-introspection/patches/patch-giscanner_ccompiler.py |  16 ++++++++++
 3 files changed, 25 insertions(+), 2 deletions(-)

diffs (61 lines):

diff -r ca7deb9d07d8 -r 577e7b6977cb devel/gobject-introspection/Makefile
--- a/devel/gobject-introspection/Makefile      Mon Jan 11 18:31:17 2021 +0000
+++ b/devel/gobject-introspection/Makefile      Mon Jan 11 19:15:24 2021 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.74 2020/12/20 22:00:43 prlw1 Exp $
+# $NetBSD: Makefile,v 1.75 2021/01/11 19:15:24 jperkin Exp $
 
 DISTNAME=      gobject-introspection-1.66.1
+PKGREVISION=   1
 CATEGORIES=    devel gnome
 MASTER_SITES=  ${MASTER_SITE_GNOME:=sources/gobject-introspection/${PKGVERSION_NOREV:R}/}
 EXTRACT_SUFX=  .tar.xz
@@ -36,6 +37,11 @@
 SUBST_SED.timet+=      -e 's,@TIMET_CTYPE@,glong,g'
 .endif
 
+SUBST_CLASSES+=                libdirs
+SUBST_STAGE.libdirs=   pre-configure
+SUBST_FILES.libdirs=   giscanner/ccompiler.py
+SUBST_VARS.libdirs=    _OPSYS_LIB_DIRS
+
 MAKE_ENV+=     LD_LIBRARY_PATH=${WRKSRC}/output/girepository
 
 BUILDLINK_API_DEPENDS.glib2+= glib2>=2.58.0
diff -r ca7deb9d07d8 -r 577e7b6977cb devel/gobject-introspection/distinfo
--- a/devel/gobject-introspection/distinfo      Mon Jan 11 18:31:17 2021 +0000
+++ b/devel/gobject-introspection/distinfo      Mon Jan 11 19:15:24 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.39 2020/12/20 22:00:43 prlw1 Exp $
+$NetBSD: distinfo,v 1.40 2021/01/11 19:15:24 jperkin Exp $
 
 SHA1 (gobject-introspection-1.66.1.tar.xz) = c1a9aa497bbe0b639f9ea4505c5fadfd765f9c98
 RMD160 (gobject-introspection-1.66.1.tar.xz) = 6366843cf6c781c32b4d1edf5a4fef82003e2d3c
@@ -6,6 +6,7 @@
 Size (gobject-introspection-1.66.1.tar.xz) = 1012784 bytes
 SHA1 (patch-gir_meson.build) = 428739a91aad88fcc003f0e3aaca68f1f8631a91
 SHA1 (patch-giscanner_ast.py) = 06b3d8903d126028d2d5144c6d6a508209c834b9
+SHA1 (patch-giscanner_ccompiler.py) = f65622421968e9daef19bafc4bd3c3d210546389
 SHA1 (patch-tests_scanner_Regress-1.0-expected.gir) = f6f044a24045d38d78b9c511813be8442ce45b16
 SHA1 (patch-tools_compiler.c) = 799d5a086338e08378b8b249e6808e8b1a8101dc
 SHA1 (patch-tools_generate.c) = 3fa74dd0e2c7658768a4278b984be38bff729d94
diff -r ca7deb9d07d8 -r 577e7b6977cb devel/gobject-introspection/patches/patch-giscanner_ccompiler.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gobject-introspection/patches/patch-giscanner_ccompiler.py  Mon Jan 11 19:15:24 2021 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-giscanner_ccompiler.py,v 1.4 2021/01/11 19:15:24 jperkin Exp $
+
+Exclude system paths from LD_LIBRARY_PATH.
+
+--- giscanner/ccompiler.py.orig        2020-10-03 10:23:41.768748500 +0000
++++ giscanner/ccompiler.py
+@@ -215,7 +215,8 @@ class CCompiler(object):
+                     else:
+                         args.append('-Wl,-rpath,' + library_path)
+ 
+-            runtime_paths.append(library_path)
++            if library_path not in '@_OPSYS_LIB_DIRS@'.split(' '):
++                runtime_paths.append(library_path)
+ 
+         for library in libraries + extra_libraries:
+             if self.check_is_msvc():



Home | Main Index | Thread Index | Old Index