diff options
author | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2013-06-29 03:13:13 +0800 |
---|---|---|
committer | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2013-06-29 03:13:13 +0800 |
commit | 6082eee5b4eb0829395734c9ba3eb7b1de94ff29 (patch) | |
tree | 18258c8a7163dd02e005cbba843fa93483687e50 | |
parent | c74aff62476975c1258c270860e9b97b2bf7fb43 (diff) | |
download | marcuscom-ports-6082eee5b4eb0829395734c9ba3eb7b1de94ff29.tar marcuscom-ports-6082eee5b4eb0829395734c9ba3eb7b1de94ff29.tar.gz marcuscom-ports-6082eee5b4eb0829395734c9ba3eb7b1de94ff29.tar.bz2 marcuscom-ports-6082eee5b4eb0829395734c9ba3eb7b1de94ff29.tar.lz marcuscom-ports-6082eee5b4eb0829395734c9ba3eb7b1de94ff29.tar.xz marcuscom-ports-6082eee5b4eb0829395734c9ba3eb7b1de94ff29.tar.zst marcuscom-ports-6082eee5b4eb0829395734c9ba3eb7b1de94ff29.zip |
Don't confuse clang and cl (MS pre-processor) [1] also fix another instance of this.
While here make sure we default to the standard compiler cc and not accidently
use gcc.
Obtained from: GNOME git [1]
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@18603 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r-- | devel/gobject-introspection/Makefile | 8 | ||||
-rw-r--r-- | devel/gobject-introspection/files/patch-giscanner_dumper.py | 14 | ||||
-rw-r--r-- | devel/gobject-introspection/files/patch-giscanner_sourcescanner.py | 14 |
3 files changed, 34 insertions, 2 deletions
diff --git a/devel/gobject-introspection/Makefile b/devel/gobject-introspection/Makefile index 7366af636..792656a61 100644 --- a/devel/gobject-introspection/Makefile +++ b/devel/gobject-introspection/Makefile @@ -4,6 +4,7 @@ PORTNAME= gobject-introspection PORTVERSION= 1.36.0 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= GNOME DIST_SUBDIR= gnome3 @@ -24,13 +25,16 @@ USE_PYTHON= -2.7 USE_AUTOTOOLS= libtool USE_LDCONFIG= yes MAKE_JOBS_UNSAFE=yes -CPPFLAGS+= -I${LOCALBASE}/include +CPPFLAGS+= -I${LOCALBASE}/include -Wnocast-align LDFLAGS+= -L${LOCALBASE}/lib -CONFIGURE_ARGS= --disable-tests # Force it to put the .cache in ${WRKSRC} instead of ~/.cache. ports/143260 MAKE_ENV= HOME=${WRKDIR} MAN1= g-ir-compiler.1 g-ir-generate.1 g-ir-scanner.1 +post-patch: + @${REINPLACE_CMD} -e 's|'gcc'|'cc'|g' \ + ${WRKSRC}/giscanner/dumper.py + .include <bsd.port.mk> diff --git a/devel/gobject-introspection/files/patch-giscanner_dumper.py b/devel/gobject-introspection/files/patch-giscanner_dumper.py new file mode 100644 index 000000000..ef8487da9 --- /dev/null +++ b/devel/gobject-introspection/files/patch-giscanner_dumper.py @@ -0,0 +1,14 @@ +--- giscanner/dumper.py.orig 2013-06-28 21:03:54.000000000 +0200 ++++ giscanner/dumper.py 2013-06-28 21:04:31.000000000 +0200 +@@ -90,8 +90,9 @@ + # the Microsoft compiler is used + # (This is the other way to check whether Visual C++ is used subsequently) + printf ("CC", self._compiler_cmd) +- if 'cl' in self._compiler_cmd: +- self._pkgconfig_msvc_flags = '--msvc-syntax' ++ if 'clang' not in self._compiler_cmd: ++ if 'cl' in self._compiler_cmd: ++ self._pkgconfig_msvc_flags = '--msvc-syntax' + self._uninst_srcdir = os.environ.get( + 'UNINSTALLED_INTROSPECTION_SRCDIR') + self._packages = ['gio-2.0 gmodule-2.0'] diff --git a/devel/gobject-introspection/files/patch-giscanner_sourcescanner.py b/devel/gobject-introspection/files/patch-giscanner_sourcescanner.py new file mode 100644 index 000000000..6c85121e2 --- /dev/null +++ b/devel/gobject-introspection/files/patch-giscanner_sourcescanner.py @@ -0,0 +1,14 @@ +--- giscanner/sourcescanner.py.orig 2013-06-28 21:08:22.000000000 +0200 ++++ giscanner/sourcescanner.py 2013-06-28 21:08:54.000000000 +0200 +@@ -281,8 +281,9 @@ + # some help from gcc from MinGW/Cygwin or so. + # Note that the generated dumper program is + # still built and linked by Visual C++. +- if 'cl' in cpp_exec: +- cpp_args = 'gcc'.split() ++ if 'clang' not in cpp_exec: ++ if 'cl' in cpp_exec: ++ cpp_args = 'gcc'.split() + else: + cpp_args = cpp_exec + cpp_args += ['-E', '-C', '-I.', '-'] |