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: Support NetBSD aarch64 and earm.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1b9501a17716
branches:  trunk
changeset: 338388:1b9501a17716
user:      nia <nia%pkgsrc.org@localhost>
date:      Fri Aug 23 15:21:59 2019 +0000

description:
py-meson: Support NetBSD aarch64 and earm.

Thanks Robert Swindells for testing this.

diffstat:

 devel/py-meson/Makefile                                |   4 +-
 devel/py-meson/distinfo                                |   4 +-
 devel/py-meson/patches/patch-mesonbuild_environment.py |  50 ++++++++++++++++-
 3 files changed, 50 insertions(+), 8 deletions(-)

diffs (97 lines):

diff -r 394047b825d6 -r 1b9501a17716 devel/py-meson/Makefile
--- a/devel/py-meson/Makefile   Fri Aug 23 15:18:39 2019 +0000
+++ b/devel/py-meson/Makefile   Fri Aug 23 15:21:59 2019 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.28 2019/08/23 11:07:00 nia Exp $
+# $NetBSD: Makefile,v 1.29 2019/08/23 15:21:59 nia Exp $
 
 DISTNAME=      meson-0.51.1
-PKGREVISION=   3
+PKGREVISION=   4
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=m/meson/}
diff -r 394047b825d6 -r 1b9501a17716 devel/py-meson/distinfo
--- a/devel/py-meson/distinfo   Fri Aug 23 15:18:39 2019 +0000
+++ b/devel/py-meson/distinfo   Fri Aug 23 15:21:59 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.25 2019/08/23 11:07:00 nia Exp $
+$NetBSD: distinfo,v 1.26 2019/08/23 15:21:59 nia Exp $
 
 SHA1 (meson-0.51.1.tar.gz) = 157c6924fdade6827a6cb7cdf9ab978e0ae249fa
 RMD160 (meson-0.51.1.tar.gz) = 3a07dff3ee59890cdbb05773e5ebcd776ee775db
@@ -7,5 +7,5 @@
 SHA1 (patch-mesonbuild_compilers_compilers.py) = 08404a441ec8ba37c780af4fba44492021f858dd
 SHA1 (patch-mesonbuild_dependencies_dev.py) = 068b7e6a105eec694c469f0bf50324385900f91f
 SHA1 (patch-mesonbuild_envconfig.py) = 82199f5ed59d368b76c932112da7d42e2f32001a
-SHA1 (patch-mesonbuild_environment.py) = 7df96002a8b625cfa08b88cfa4f0cf4d5b76cf64
+SHA1 (patch-mesonbuild_environment.py) = cede400a52da51ac2d8a9b8cfc28142e7228cc31
 SHA1 (patch-mesonbuild_scripts_depfixer.py) = 6ed6fdfd7454b517ad5d1ebd1c387ebd73437d4b
diff -r 394047b825d6 -r 1b9501a17716 devel/py-meson/patches/patch-mesonbuild_environment.py
--- a/devel/py-meson/patches/patch-mesonbuild_environment.py    Fri Aug 23 15:18:39 2019 +0000
+++ b/devel/py-meson/patches/patch-mesonbuild_environment.py    Fri Aug 23 15:21:59 2019 +0000
@@ -1,10 +1,52 @@
-$NetBSD: patch-mesonbuild_environment.py,v 1.4 2019/07/06 22:42:25 adam Exp $
+$NetBSD: patch-mesonbuild_environment.py,v 1.5 2019/08/23 15:21:59 nia Exp $
+
+Support NetBSD aarch64 and earm.
 
 Support SunOS ar and SunOS-specific GCC behaviour.
 
---- mesonbuild/environment.py.orig     2019-06-16 18:54:18.000000000 +0000
+--- mesonbuild/environment.py.orig     2019-07-09 16:34:42.000000000 +0000
 +++ mesonbuild/environment.py
-@@ -613,6 +613,8 @@ class Environment:
+@@ -215,6 +215,10 @@ def detect_cpu_family(compilers: Compile
+     """
+     if mesonlib.is_windows():
+         trial = detect_windows_arch(compilers)
++    elif platform.system() == 'NetBSD':
++        # platform.machine() returns the "machine type" on NetBSD, not CPU
++        # family, e.g. 'evbarm' is returned on aarch64.
++        trial = platform.processor().lower()
+     else:
+         trial = platform.machine().lower()
+     if trial.startswith('i') and trial.endswith('86'):
+@@ -224,7 +228,7 @@ def detect_cpu_family(compilers: Compile
+     # OpenBSD's 64 bit arm architecute identifies as 'arm64'
+     elif trial == 'arm64':
+         trial = 'aarch64'
+-    elif trial.startswith('arm'):
++    elif trial.startswith('arm') or trial.startswith('earm'):
+         trial = 'arm'
+     elif trial.startswith('ppc64'):
+         trial = 'ppc64'
+@@ -271,6 +275,10 @@ def detect_cpu_family(compilers: Compile
+ def detect_cpu(compilers: CompilersDict):
+     if mesonlib.is_windows():
+         trial = detect_windows_arch(compilers)
++    elif platform.system() == 'NetBSD':
++        # platform.machine() returns the "machine type" on NetBSD, not CPU
++        # family, e.g. 'evbarm' is returned on aarch64.
++        trial = platform.processor().lower()
+     else:
+         trial = platform.machine().lower()
+     if trial in ('amd64', 'x64'):
+@@ -283,6 +291,8 @@ def detect_cpu(compilers: CompilersDict)
+         # Same check as above for cpu_family
+         if any_compiler_has_define(compilers, '__arm__'):
+             trial = 'arm'
++    elif trial.startswith('earm'):
++            trial = 'arm'
+     elif trial == 'e2k':
+         # Make more precise CPU detection for Elbrus platform.
+         trial = platform.processor().lower()
+@@ -613,6 +623,8 @@ class Environment:
              return CompilerType.GCC_MINGW
          elif '__CYGWIN__' in defines:
              return CompilerType.GCC_CYGWIN
@@ -13,7 +55,7 @@
          return CompilerType.GCC_STANDARD
  
      def _get_compilers(self, lang, for_machine):
-@@ -1220,6 +1222,8 @@ class Environment:
+@@ -1220,6 +1232,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