changeset 754:f7b260b91a3d

dev/gobject-introspection: search CC in distutils
author David Demelier <markand@malikania.fr>
date Wed, 07 Aug 2019 21:51:07 +0200
parents cb3df02aede3
children 399b197f0d5d
files dev/gobject-introspection/gobject-introspection.sh dev/gobject-introspection/patch-cc.patch
diffstat 2 files changed, 24 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dev/gobject-introspection/gobject-introspection.sh	Wed Aug 07 21:50:49 2019 +0200
+++ b/dev/gobject-introspection/gobject-introspection.sh	Wed Aug 07 21:51:07 2019 +0200
@@ -33,6 +33,8 @@
 	tar xvf $PKGNAME-$PKGVERSION.tar.xz
 	cd $PKGNAME-$PKGVERSION
 
+	# https://gitlab.gnome.org/markand/gobject-introspection/commit/8342840f2d9d6b57ef673bc5541cacee45432d45
+	patch -p1 < ../patch-cc.patch
 	CC="$CC" \
 	CFLAGS="$CFLAGS" \
 	LDFLAGS="$LDFLAGS" \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dev/gobject-introspection/patch-cc.patch	Wed Aug 07 21:51:07 2019 +0200
@@ -0,0 +1,22 @@
+diff --git a/giscanner/dumper.py b/giscanner/dumper.py
+index 2b851a53c76cb906bb9db50a6f47aef7d9cf767e..888cffcd1651f8a91dcb64c051c1f2143aa93d49 100644
+--- a/giscanner/dumper.py
++++ b/giscanner/dumper.py
+@@ -25,6 +25,7 @@ import shlex
+ import subprocess
+ import tempfile
+ 
++from distutils import sysconfig
+ from .gdumpparser import IntrospectionBinary
+ from . import pkgconfig, utils
+ from .ccompiler import CCompiler
+@@ -94,7 +95,8 @@ class DumpCompiler(object):
+         if self._compiler.check_is_msvc():
+             self._linker_cmd = ['link.exe']
+         else:
+-            self._linker_cmd = shlex.split(os.environ.get('CC', 'cc'))
++            cc = sysconfig.get_config_var('CC')
++            self._linker_cmd = shlex.split(os.environ.get('CC', cc))
+ 
+     # Public API
+