diff options
author | jperkin <jperkin@pkgsrc.org> | 2018-05-15 09:04:36 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2018-05-15 09:04:36 +0000 |
commit | 7dd7c0e2de2283f1e7c9253209b23220015deb93 (patch) | |
tree | b6e089281dfe2f72c125ed9c2284669ca3ed9e22 /devel | |
parent | 229b9535677651960fce169faae7038b18d87694 (diff) | |
download | pkgsrc-7dd7c0e2de2283f1e7c9253209b23220015deb93.tar.gz |
py-meson: Identify GCC on SunOS and behave accordingly.
Fixes build of devel/dconf. Bump PKGREVISION.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/py-meson/Makefile | 4 | ||||
-rw-r--r-- | devel/py-meson/distinfo | 6 | ||||
-rw-r--r-- | devel/py-meson/patches/patch-mesonbuild_compilers_____init____.py | 22 | ||||
-rw-r--r-- | devel/py-meson/patches/patch-mesonbuild_compilers_compilers.py | 57 | ||||
-rw-r--r-- | devel/py-meson/patches/patch-mesonbuild_environment.py | 23 |
5 files changed, 105 insertions, 7 deletions
diff --git a/devel/py-meson/Makefile b/devel/py-meson/Makefile index 263fb7e30de..5ec4d9243e5 100644 --- a/devel/py-meson/Makefile +++ b/devel/py-meson/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.10 2018/05/14 09:43:15 jperkin Exp $ +# $NetBSD: Makefile,v 1.11 2018/05/15 09:04:36 jperkin Exp $ DISTNAME= meson-0.44.1 PKGNAME= ${PYPKGPREFIX}-${DISTNAME} -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= devel python MASTER_SITES= ${MASTER_SITE_PYPI:=m/meson/} diff --git a/devel/py-meson/distinfo b/devel/py-meson/distinfo index a0d1ef436b5..5b134705053 100644 --- a/devel/py-meson/distinfo +++ b/devel/py-meson/distinfo @@ -1,8 +1,10 @@ -$NetBSD: distinfo,v 1.8 2018/05/14 09:43:15 jperkin Exp $ +$NetBSD: distinfo,v 1.9 2018/05/15 09:04:36 jperkin Exp $ SHA1 (meson-0.44.1.tar.gz) = 7ac668ee883c4075aa5348e5daedf4c737a6925d RMD160 (meson-0.44.1.tar.gz) = 1257a3e2b5f6837a59ef4cdf632a00bba1ff601d SHA512 (meson-0.44.1.tar.gz) = 3c350d1752ae4463ec47060e051d79cc0855385e9552deff34fad8431175fb5d0f04b51a242f8f8f737726d06e504339d6b02a5aa9558ee673fb867dbb4e5b2d Size (meson-0.44.1.tar.gz) = 1136337 bytes -SHA1 (patch-mesonbuild_environment.py) = e560b77dde989639ef54281fcdd402cfd9eb2d64 +SHA1 (patch-mesonbuild_compilers_____init____.py) = b893759a6fa135f2da606ea487848701dbba037d +SHA1 (patch-mesonbuild_compilers_compilers.py) = 8e86265c2db294846582ce92d91c220761a82853 +SHA1 (patch-mesonbuild_environment.py) = 08957ccc7ee55f9d5b7f965309bbe5ad38aa23ce SHA1 (patch-mesonbuild_scripts_meson__install.py) = 2a3185ac5814a23040ebe44b21c45c0115daa7ed diff --git a/devel/py-meson/patches/patch-mesonbuild_compilers_____init____.py b/devel/py-meson/patches/patch-mesonbuild_compilers_____init____.py new file mode 100644 index 00000000000..19ac1f521c7 --- /dev/null +++ b/devel/py-meson/patches/patch-mesonbuild_compilers_____init____.py @@ -0,0 +1,22 @@ +$NetBSD: patch-mesonbuild_compilers_____init____.py,v 1.1 2018/05/15 09:04:37 jperkin Exp $ + +Support SunOS-specific GCC behaviour. + +--- mesonbuild/compilers/__init__.py.orig 2017-07-21 20:07:34.000000000 +0000 ++++ mesonbuild/compilers/__init__.py +@@ -20,6 +20,7 @@ __all__ = [ + 'GCC_CYGWIN', + 'GCC_MINGW', + 'GCC_OSX', ++ 'GCC_SUNOS', + 'GCC_STANDARD', + 'ICC_OSX', + 'ICC_STANDARD', +@@ -84,6 +85,7 @@ __all__ = [ + # Bring symbols from each module into compilers sub-package namespace + from .compilers import ( + GCC_OSX, ++ GCC_SUNOS, + GCC_MINGW, + GCC_CYGWIN, + GCC_STANDARD, diff --git a/devel/py-meson/patches/patch-mesonbuild_compilers_compilers.py b/devel/py-meson/patches/patch-mesonbuild_compilers_compilers.py new file mode 100644 index 00000000000..dc68469c973 --- /dev/null +++ b/devel/py-meson/patches/patch-mesonbuild_compilers_compilers.py @@ -0,0 +1,57 @@ +$NetBSD: patch-mesonbuild_compilers_compilers.py,v 1.1 2018/05/15 09:04:37 jperkin Exp $ + +Support SunOS-specific GCC behaviour. +Limit GNU ld options correctly. + +--- mesonbuild/compilers/compilers.py.orig 2018-02-20 21:48:57.000000000 +0000 ++++ mesonbuild/compilers/compilers.py +@@ -134,6 +134,14 @@ gnulike_buildtype_linker_args = {'plain' + 'minsize': [], + } + ++sunos_buildtype_linker_args = {'plain': [], ++ 'debug': [], ++ 'debugoptimized': [], ++ 'release': [], ++ 'minsize': [], ++ } ++ ++ + msvc_buildtype_linker_args = {'plain': [], + 'debug': [], + 'debugoptimized': [], +@@ -853,7 +861,7 @@ class Compiler: + else: + paths = paths + ':' + padding + args = ['-Wl,-rpath,' + paths] +- if get_compiler_is_linuxlike(self): ++ if get_compiler_uses_gnuld(self): + # Rpaths to use while linking must be absolute. These are not + # written to the binary. Needed only with GNU ld: + # https://sourceware.org/bugzilla/show_bug.cgi?id=16936 +@@ -876,6 +884,7 @@ GCC_STANDARD = 0 + GCC_OSX = 1 + GCC_MINGW = 2 + GCC_CYGWIN = 3 ++GCC_SUNOS = 4 + + CLANG_STANDARD = 0 + CLANG_OSX = 1 +@@ -891,7 +900,7 @@ def get_gcc_soname_args(gcc_type, prefix + sostr = '' + else: + sostr = '.' + soversion +- if gcc_type in (GCC_STANDARD, GCC_MINGW, GCC_CYGWIN): ++ if gcc_type in (GCC_STANDARD, GCC_MINGW, GCC_CYGWIN, GCC_SUNOS): + # Might not be correct for mingw but seems to work. + return ['-Wl,-soname,%s%s.%s%s' % (prefix, shlib_name, suffix, sostr)] + elif gcc_type == GCC_OSX: +@@ -1023,6 +1032,8 @@ class GnuCompiler: + def get_buildtype_linker_args(self, buildtype): + if self.gcc_type == GCC_OSX: + return apple_buildtype_linker_args[buildtype] ++ elif self.gcc_type == GCC_SUNOS: ++ return sunos_buildtype_linker_args[buildtype] + return gnulike_buildtype_linker_args[buildtype] + + def get_pch_suffix(self): diff --git a/devel/py-meson/patches/patch-mesonbuild_environment.py b/devel/py-meson/patches/patch-mesonbuild_environment.py index a9a28067ef9..ca99f12230d 100644 --- a/devel/py-meson/patches/patch-mesonbuild_environment.py +++ b/devel/py-meson/patches/patch-mesonbuild_environment.py @@ -1,10 +1,27 @@ -$NetBSD: patch-mesonbuild_environment.py,v 1.1 2018/05/14 09:43:15 jperkin Exp $ +$NetBSD: patch-mesonbuild_environment.py,v 1.2 2018/05/15 09:04:37 jperkin Exp $ -Support SunOS ar. +Support SunOS ar and SunOS-specific GCC behaviour. --- mesonbuild/environment.py.orig 2018-02-20 21:48:57.000000000 +0000 +++ mesonbuild/environment.py -@@ -779,6 +779,8 @@ class Environment: +@@ -29,6 +29,7 @@ from .compilers import ( + GCC_CYGWIN, + GCC_MINGW, + GCC_OSX, ++ GCC_SUNOS, + GCC_STANDARD, + ICC_STANDARD, + is_assembly, +@@ -409,6 +410,8 @@ class Environment: + # Detect GCC type (Apple, MinGW, Cygwin, Unix) + if '__APPLE__' in defines: + return GCC_OSX ++ elif '__sun' in defines: ++ return GCC_SUNOS + elif '__MINGW32__' in defines or '__MINGW64__' in defines: + return GCC_MINGW + elif '__CYGWIN__' in defines: +@@ -779,6 +782,8 @@ class Environment: return ArLinker(linker) if p.returncode == 1 and err.startswith('usage'): # OSX return ArLinker(linker) |