pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/py-meson py-meson: Identify GCC on SunOS and beh...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8973ca235f5e
branches:  trunk
changeset: 380382:8973ca235f5e
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Tue May 15 09:04:36 2018 +0000

description:
py-meson: Identify GCC on SunOS and behave accordingly.

Fixes build of devel/dconf.  Bump PKGREVISION.

diffstat:

 devel/py-meson/Makefile                                           |   4 +-
 devel/py-meson/distinfo                                           |   6 +-
 devel/py-meson/patches/patch-mesonbuild_compilers_____init____.py |  22 +++
 devel/py-meson/patches/patch-mesonbuild_compilers_compilers.py    |  57 ++++++++++
 devel/py-meson/patches/patch-mesonbuild_environment.py            |  23 +++-
 5 files changed, 105 insertions(+), 7 deletions(-)

diffs (151 lines):

diff -r 644a7965541f -r 8973ca235f5e devel/py-meson/Makefile
--- a/devel/py-meson/Makefile   Tue May 15 08:58:39 2018 +0000
+++ b/devel/py-meson/Makefile   Tue May 15 09:04:36 2018 +0000
@@ -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 -r 644a7965541f -r 8973ca235f5e devel/py-meson/distinfo
--- a/devel/py-meson/distinfo   Tue May 15 08:58:39 2018 +0000
+++ b/devel/py-meson/distinfo   Tue May 15 09:04:36 2018 +0000
@@ -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 -r 644a7965541f -r 8973ca235f5e devel/py-meson/patches/patch-mesonbuild_compilers_____init____.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/py-meson/patches/patch-mesonbuild_compilers_____init____.py Tue May 15 09:04:36 2018 +0000
@@ -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 -r 644a7965541f -r 8973ca235f5e devel/py-meson/patches/patch-mesonbuild_compilers_compilers.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/py-meson/patches/patch-mesonbuild_compilers_compilers.py    Tue May 15 09:04:36 2018 +0000
@@ -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 -r 644a7965541f -r 8973ca235f5e devel/py-meson/patches/patch-mesonbuild_environment.py
--- a/devel/py-meson/patches/patch-mesonbuild_environment.py    Tue May 15 08:58:39 2018 +0000
+++ b/devel/py-meson/patches/patch-mesonbuild_environment.py    Tue May 15 09:04:36 2018 +0000
@@ -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)



Home | Main Index | Thread Index | Old Index