pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/meson



Module Name:    pkgsrc
Committed By:   gutteridge
Date:           Sun Sep 24 18:54:06 UTC 2023

Modified Files:
        pkgsrc/devel/meson: Makefile distinfo
        pkgsrc/devel/meson/patches: patch-mesonbuild_compilers_detect.py

Log Message:
meson: fix non-default Python sandboxed builds with py-cython

Since Meson is not Python versioned, but Cython is, we previously
ended up with a situation where builds of Cython-using packages
would fail. Instead of the Makefile kludge where it would simply
force the default Python version associated with Cython, use a
different hack that will search for all (presently) possible versions.

This is not an ideal solution, but is being committed to fix build
breakage in the lead up to branching pkgsrc 2023Q3. Other solutions
would be to go back to Python versioned Meson, or getting Meson to
handle multi-Python environments more cleanly.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 pkgsrc/devel/meson/Makefile
cvs rdiff -u -r1.49 -r1.50 pkgsrc/devel/meson/distinfo
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/devel/meson/patches/patch-mesonbuild_compilers_detect.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/meson/Makefile
diff -u pkgsrc/devel/meson/Makefile:1.56 pkgsrc/devel/meson/Makefile:1.57
--- pkgsrc/devel/meson/Makefile:1.56    Thu Sep 21 01:44:06 2023
+++ pkgsrc/devel/meson/Makefile Sun Sep 24 18:54:06 2023
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.56 2023/09/21 01:44:06 gutteridge Exp $
+# $NetBSD: Makefile,v 1.57 2023/09/24 18:54:06 gutteridge Exp $
 
 DISTNAME=      meson-1.2.1
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=m/meson/}
 
@@ -27,16 +27,6 @@ SUBST_FILES.man+=    setup.py
 SUBST_STAGE.man=       pre-configure
 SUBST_MESSAGE.man=     Fixing man page installation path.
 
-# XXX this isn't an entirely correct approach, as this package is not
-# Python-versioned, while py-cython is. This means in bulk builds, any
-# Python packages that use meson and cython will fail with a mismatch
-# for non-default Python versions, e.g., py-pandas and py-scipy.
-SUBST_CLASSES+=                cython
-SUBST_STAGE.cython=    pre-configure
-SUBST_MESSAGE.cython=  Fixing cython binary name.
-SUBST_FILES.cython=    mesonbuild/compilers/detect.py
-SUBST_SED.cython=      -e "s,'cython3','cython-${PYVERSSUFFIX}',"
-
 REPLACE_PYTHON+=       ghwt.py
 REPLACE_PYTHON+=       meson.py
 REPLACE_PYTHON+=       mesonbuild/rewriter.py

Index: pkgsrc/devel/meson/distinfo
diff -u pkgsrc/devel/meson/distinfo:1.49 pkgsrc/devel/meson/distinfo:1.50
--- pkgsrc/devel/meson/distinfo:1.49    Tue Aug  8 21:34:11 2023
+++ pkgsrc/devel/meson/distinfo Sun Sep 24 18:54:06 2023
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.49 2023/08/08 21:34:11 adam Exp $
+$NetBSD: distinfo,v 1.50 2023/09/24 18:54:06 gutteridge Exp $
 
 BLAKE2s (meson-1.2.1.tar.gz) = cb57477f193d3151058dc9cbaae4c1e8bdf7c7efd21a241360bad4e1860f9d67
 SHA512 (meson-1.2.1.tar.gz) = 6221a14a6046aaba2c6eb601a9a5b928308bbd9da813ccec16b8f7578296b27d741e30e9343723770c3c7825c86b53193b41b9672dd17468d06d3b8d743bf52e
 Size (meson-1.2.1.tar.gz) = 2182126 bytes
-SHA1 (patch-mesonbuild_compilers_detect.py) = 44b3a70a127824808c8a05226a546988c6a1339f
+SHA1 (patch-mesonbuild_compilers_detect.py) = 378283e53e61e93af15dbf0b0fb9e9bda198fd82
 SHA1 (patch-mesonbuild_compilers_mixins_gnu.py) = 34c2f6f215d5aed1d6c422187f733d0d488ebb4f
 SHA1 (patch-mesonbuild_dependencies_dev.py) = 2165f1ee4ad5d9689eb2fb7e94841503336070b9
 SHA1 (patch-mesonbuild_linkers_linkers.py) = 4ca793f71aac2119f94464bb2beb83ed3da3e9a0

Index: pkgsrc/devel/meson/patches/patch-mesonbuild_compilers_detect.py
diff -u pkgsrc/devel/meson/patches/patch-mesonbuild_compilers_detect.py:1.3 pkgsrc/devel/meson/patches/patch-mesonbuild_compilers_detect.py:1.4
--- pkgsrc/devel/meson/patches/patch-mesonbuild_compilers_detect.py:1.3 Mon Aug 15 08:19:39 2022
+++ pkgsrc/devel/meson/patches/patch-mesonbuild_compilers_detect.py     Sun Sep 24 18:54:06 2023
@@ -1,4 +1,4 @@
-$NetBSD: patch-mesonbuild_compilers_detect.py,v 1.3 2022/08/15 08:19:39 adam Exp $
+$NetBSD: patch-mesonbuild_compilers_detect.py,v 1.4 2023/09/24 18:54:06 gutteridge Exp $
 
 Specify c++ language when making CXX parse standard input.
 Fixes problem where graphics/MesaLib fails to build due to:
@@ -6,9 +6,20 @@ Fixes problem where graphics/MesaLib fai
 > clang++ -std=c++14 -dM -E -
 > error: invalid argument '-std=c++14' not allowed with 'C'
 
---- mesonbuild/compilers/detect.py.orig        2022-08-13 08:48:46.000000000 +0000
+Also account for multiple versions of cython in pkgsrc.
+
+--- mesonbuild/compilers/detect.py.orig        2023-07-21 20:36:13.000000000 +0000
 +++ mesonbuild/compilers/detect.py
-@@ -1231,7 +1231,10 @@ def _get_gnu_compiler_defines(compiler: 
+@@ -80,7 +80,7 @@ defaults['cuda'] = ['nvcc']
+ defaults['rust'] = ['rustc']
+ defaults['swift'] = ['swiftc']
+ defaults['vala'] = ['valac']
+-defaults['cython'] = ['cython', 'cython3'] # Official name is cython, but Debian renamed it to cython3.
++defaults['cython'] = ['cython', 'cython-3.11', 'cython-3.10', 'cython-3.9', 'cython-3.8'] # Handle pkgsrc multi-versions.
+ defaults['static_linker'] = ['ar', 'gar']
+ defaults['strip'] = ['strip']
+ defaults['vs_static_linker'] = ['lib']
+@@ -1318,7 +1318,10 @@ def _get_gnu_compiler_defines(compiler: 
      """
      # Arguments to output compiler pre-processor defines to stdout
      # gcc, g++, and gfortran all support these arguments
@@ -20,7 +31,7 @@ Fixes problem where graphics/MesaLib fai
      mlog.debug(f'Running command: {join_args(args)}')
      p, output, error = Popen_safe(args, write='', stdin=subprocess.PIPE)
      if p.returncode != 0:
-@@ -1258,7 +1261,10 @@ def _get_clang_compiler_defines(compiler
+@@ -1345,7 +1348,10 @@ def _get_clang_compiler_defines(compiler
      """
      Get the list of Clang pre-processor defines
      """



Home | Main Index | Thread Index | Old Index