From 154461d9cc7067730fc01b46e24a9ac6fdff18f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sun, 7 May 2023 21:47:30 -0300 Subject: [PATCH 1/6] python3-contourpy: update to 1.1.1. --- srcpkgs/python3-contourpy/template | 14 +++++++++----- srcpkgs/python3-contourpy/update | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/python3-contourpy/update diff --git a/srcpkgs/python3-contourpy/template b/srcpkgs/python3-contourpy/template index 70e3833c8b55a..bec86f8ee7959 100644 --- a/srcpkgs/python3-contourpy/template +++ b/srcpkgs/python3-contourpy/template @@ -1,9 +1,9 @@ # Template file for 'python3-contourpy' pkgname=python3-contourpy -version=1.0.5 -revision=2 -build_style=python3-module -hostmakedepends="python3-setuptools python3-pybind11" +version=1.1.1 +revision=1 +build_style=python3-pep517 +hostmakedepends="python3-meson-python python3-pybind11" makedepends="python3-pybind11" depends="python3" checkdepends="${depends} python3-pytest-xdist python3-numpy" @@ -11,8 +11,12 @@ short_desc="Python library for calculating contours of 2D quadrilateral grids" maintainer="Alex Childs " license="BSD-3-Clause" homepage="https://github.com/contourpy/contourpy" +changelog="https://raw.githubusercontent.com/contourpy/contourpy/main/docs/changelog.rst" distfiles="${PYPI_SITE}/c/contourpy/contourpy-${version}.tar.gz" -checksum=896631cd40222aef3697e4e51177d14c3709fda49d30983269d584f034acc8a4 +checksum=96ba37c2e24b7212a77da85004c38e7c4d155d3e72a45eeaf22c1f03f607e8ab + +# This test needs `wurlitzer`, not packaged +make_check_args="--deselect=tests/test_internal.py::test_write_cache" # Pulling python3-matplotlib creates a build-time dependency if [ "$XBPS_CHECK_PKGS" = full ]; then diff --git a/srcpkgs/python3-contourpy/update b/srcpkgs/python3-contourpy/update new file mode 100644 index 0000000000000..e299d00ea67cd --- /dev/null +++ b/srcpkgs/python3-contourpy/update @@ -0,0 +1 @@ +ignore="*rc*" From c324df6ee76995e7ce1e932f966e7144201b0ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sun, 7 May 2023 21:56:57 -0300 Subject: [PATCH 2/6] python3-kiwisolver: update to 1.4.5, adopt. --- srcpkgs/python3-kiwisolver/template | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/srcpkgs/python3-kiwisolver/template b/srcpkgs/python3-kiwisolver/template index 3e4e2d55823da..8ebb7358be99e 100644 --- a/srcpkgs/python3-kiwisolver/template +++ b/srcpkgs/python3-kiwisolver/template @@ -1,17 +1,19 @@ # Template file for 'python3-kiwisolver' pkgname=python3-kiwisolver -version=1.3.1 -revision=4 -build_style=python3-module -hostmakedepends="python3-setuptools python3-cppy" +version=1.4.5 +revision=1 +build_style=python3-pep517 +hostmakedepends="python3-setuptools_scm python3-wheel python3-cppy" makedepends="python3-devel python3-cppy" depends="python3" +checkdepends="python3-pytest" short_desc="Fast implementation of the Cassowary constraint solver (Python3)" -maintainer="Orphaned " +maintainer="Gonzalo TornarĂ­a " license="BSD-3-Clause" homepage="https://github.com/nucleic/kiwi" +changelog="https://github.com/nucleic/kiwi/raw/main/releasenotes.rst" distfiles="${PYPI_SITE}/k/kiwisolver/kiwisolver-${version}.tar.gz" -checksum=950a199911a8d94683a6b10321f9345d5a3a8433ec58b217ace979e18f16e248 +checksum=e57e563a57fb22a142da34f38acc2fc1a5c864bc29ca1517a88abc963e60d6ec post_patch() { # When cross building, make sure target cppy headers are used From 2fd25f09f3dfbacc3b899ae59741a5c9e3a876a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sat, 16 Sep 2023 13:15:51 -0300 Subject: [PATCH 3/6] python3-matplotlib: update to 3.8.0. --- srcpkgs/python3-matplotlib/template | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/srcpkgs/python3-matplotlib/template b/srcpkgs/python3-matplotlib/template index e8c3b07f9b9ca..90e899c2b2f52 100644 --- a/srcpkgs/python3-matplotlib/template +++ b/srcpkgs/python3-matplotlib/template @@ -1,11 +1,11 @@ # Template file for 'python3-matplotlib' pkgname=python3-matplotlib -version=3.7.2 +version=3.8.0 revision=1 -build_style=python3-module +build_style=python3-pep517 build_helper="numpy" hostmakedepends="pkg-config python3-setuptools_scm python3-certifi - python3-numpy python3-pybind11" + python3-numpy python3-pybind11 python3-wheel" makedepends="python3-devel freetype-devel libpng-devel libqhull-devel python3-pybind11" depends="python3-cycler fonttools python3-kiwisolver python3-numpy python3-packaging python3-Pillow python3-parsing python3-dateutil @@ -14,8 +14,9 @@ short_desc="Python3 2D/3D plotting library" maintainer="Andrew J. Hesford " license="custom:matplotlib, BSD-3-Clause, MIT" homepage="https://matplotlib.org/" +changelog="https://github.com/matplotlib/matplotlib/releases" distfiles="${PYPI_SITE}/m/matplotlib/matplotlib-${version}.tar.gz" -checksum=a8cdb91dddb04436bd2f098b8fdf4b81352e68cf4d2c6756fcc414791076569b +checksum=df8505e1c19d5c2c26aff3497a7cbd3ccfc2e97043d1e4db3e76afa399164b69 replaces="python3-matplotlib-data>=0" # Comparison of images is too frail for validation make_check="no" @@ -26,6 +27,7 @@ pre_build() { system_freetype = true system_qhull = true EOF + vsed -e "s|'-flto'|'-flto=auto'|" -i setup.py } post_install() { From 089ef376d78871b30133ef125c6266a4a8a1e187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Wed, 20 Sep 2023 00:01:58 -0300 Subject: [PATCH 4/6] python3-contourpy: fix cross build --- common/build-style/python3-pep517.sh | 4 +- .../post-patch/00-create-meson_crossfile.sh | 79 +++++++++++++++++++ srcpkgs/python3-contourpy/template | 5 ++ 3 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 common/hooks/post-patch/00-create-meson_crossfile.sh diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh index 2d5ff7caf34eb..5c067e5a04ac2 100644 --- a/common/build-style/python3-pep517.sh +++ b/common/build-style/python3-pep517.sh @@ -4,8 +4,8 @@ do_build() { : ${make_build_target:=.} - : ${make_build_args:=--no-isolation --wheel} - python3 -m build ${make_build_args} ${make_build_target} + python3 -m build --no-isolation --wheel \ + ${make_build_args} ${make_build_target} } do_check() { diff --git a/common/hooks/post-patch/00-create-meson_crossfile.sh b/common/hooks/post-patch/00-create-meson_crossfile.sh new file mode 100644 index 0000000000000..0291481fc7b64 --- /dev/null +++ b/common/hooks/post-patch/00-create-meson_crossfile.sh @@ -0,0 +1,79 @@ +# This hook creates a meson crossfile in ${meson_crossfile} (if set) + +hook() { + [ ${meson_crossfile} ] || return 0 + + local _MESON_TARGET_ENDIAN=little + # drop the -musl suffix to the target cpu, meson doesn't recognize it + local _MESON_TARGET_CPU=${XBPS_TARGET_MACHINE/-musl/} + local _MESON_CPU_FAMILY=${_MESON_TARGET_CPU} + case "$XBPS_TARGET_MACHINE" in + mips|mips-musl|mipshf-musl) + _MESON_TARGET_ENDIAN=big + _MESON_CPU_FAMILY=mips + ;; + armv*) + _MESON_CPU_FAMILY=arm + ;; + i686*) + _MESON_CPU_FAMILY=x86 + ;; + ppc64le*) + _MESON_CPU_FAMILY=ppc64 + ;; + ppc64*) + _MESON_TARGET_ENDIAN=big + _MESON_CPU_FAMILY=ppc64 + ;; + ppcle*) + _MESON_CPU_FAMILY=ppc + ;; + ppc*) + _MESON_TARGET_ENDIAN=big + _MESON_CPU_FAMILY=ppc + ;; + esac + + local _MESON_EXE_WRAPPER="" + if [[ " $build_helper " = *" qemu "* ]]; then + _MESON_EXE_WRAPPER="exe_wrapper = '/usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static'" + fi + + # Record cross-compiling information in cross file. + # CFLAGS and LDFLAGS must be set as c_args and c_link_args. + mkdir -p $(dirname ${meson_crossfile}) + cat > ${meson_crossfile} <<-EOF + [binaries] + c = '${CC}' + cpp = '${CXX}' + ar = '${XBPS_CROSS_TRIPLET}-gcc-ar' + nm = '${NM}' + ld = '${LD}' + strip = '${STRIP}' + readelf = '${READELF}' + objcopy = '${OBJCOPY}' + pkgconfig = '${PKG_CONFIG}' + rust = ['rustc', '--target', '${RUST_TARGET}' ,'--sysroot', '${XBPS_CROSS_BASE}/usr'] + g-ir-scanner = '${XBPS_CROSS_BASE}/usr/bin/g-ir-scanner' + g-ir-compiler = '${XBPS_CROSS_BASE}/usr/bin/g-ir-compiler' + g-ir-generate = '${XBPS_CROSS_BASE}/usr/bin/g-ir-generate' + llvm-config = '/usr/bin/llvm-config' + cups-config = '${XBPS_CROSS_BASE}/usr/bin/cups-config' + + [properties] + needs_exe_wrapper = true + + [built-in options] + c_args = ['$(echo ${CFLAGS} | sed -r "s/\s+/','/g")'] + c_link_args = ['$(echo ${LDFLAGS} | sed -r "s/\s+/','/g")'] + + cpp_args = ['$(echo ${CXXFLAGS} | sed -r "s/\s+/','/g")'] + cpp_link_args = ['$(echo ${LDFLAGS} | sed -r "s/\s+/','/g")'] + + [host_machine] + system = 'linux' + cpu_family = '${_MESON_CPU_FAMILY}' + cpu = '${_MESON_TARGET_CPU}' + endian = '${_MESON_TARGET_ENDIAN}' + EOF +} diff --git a/srcpkgs/python3-contourpy/template b/srcpkgs/python3-contourpy/template index bec86f8ee7959..1675dadfdea16 100644 --- a/srcpkgs/python3-contourpy/template +++ b/srcpkgs/python3-contourpy/template @@ -15,6 +15,11 @@ changelog="https://raw.githubusercontent.com/contourpy/contourpy/main/docs/chang distfiles="${PYPI_SITE}/c/contourpy/contourpy-${version}.tar.gz" checksum=96ba37c2e24b7212a77da85004c38e7c4d155d3e72a45eeaf22c1f03f607e8ab +if [ $CROSS_BUILD ]; then + meson_crossfile=$wrksrc/xbps_meson.cross + make_build_args="--config-setting=setup-args=--cross-file=$meson_crossfile" +fi + # This test needs `wurlitzer`, not packaged make_check_args="--deselect=tests/test_internal.py::test_write_cache" From d2de647a72c7c65d692b956c66518ce4a8fbcc40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Wed, 20 Sep 2023 00:34:19 -0300 Subject: [PATCH 5/6] python3-kiwisolver: fix cross build --- srcpkgs/python3-kiwisolver/template | 8 -------- 1 file changed, 8 deletions(-) diff --git a/srcpkgs/python3-kiwisolver/template b/srcpkgs/python3-kiwisolver/template index 8ebb7358be99e..ecea82d14e06c 100644 --- a/srcpkgs/python3-kiwisolver/template +++ b/srcpkgs/python3-kiwisolver/template @@ -15,14 +15,6 @@ changelog="https://github.com/nucleic/kiwi/raw/main/releasenotes.rst" distfiles="${PYPI_SITE}/k/kiwisolver/kiwisolver-${version}.tar.gz" checksum=e57e563a57fb22a142da34f38acc2fc1a5c864bc29ca1517a88abc963e60d6ec -post_patch() { - # When cross building, make sure target cppy headers are used - if [ -n "${XBPS_CROSS_BASE}" ]; then - vsed -i setup.py \ - -e "s@cppy.get_include()@&.replace('/usr/', '${XBPS_CROSS_BASE}/usr/')@" - fi -} - post_install() { vlicense LICENSE } From 090d6ef4a114d00cf68cf8dbf77cee4070cdcf0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Wed, 20 Sep 2023 01:37:35 -0300 Subject: [PATCH 6/6] python3-contourpy: fix cross build 32bit --- common/hooks/post-patch/00-create-meson_crossfile.sh | 1 + srcpkgs/python3-contourpy/template | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/common/hooks/post-patch/00-create-meson_crossfile.sh b/common/hooks/post-patch/00-create-meson_crossfile.sh index 0291481fc7b64..b8dad3361db39 100644 --- a/common/hooks/post-patch/00-create-meson_crossfile.sh +++ b/common/hooks/post-patch/00-create-meson_crossfile.sh @@ -44,6 +44,7 @@ hook() { mkdir -p $(dirname ${meson_crossfile}) cat > ${meson_crossfile} <<-EOF [binaries] + ${_MESON_EXE_WRAPPER} c = '${CC}' cpp = '${CXX}' ar = '${XBPS_CROSS_TRIPLET}-gcc-ar' diff --git a/srcpkgs/python3-contourpy/template b/srcpkgs/python3-contourpy/template index 1675dadfdea16..f84f44dd28d27 100644 --- a/srcpkgs/python3-contourpy/template +++ b/srcpkgs/python3-contourpy/template @@ -3,7 +3,7 @@ pkgname=python3-contourpy version=1.1.1 revision=1 build_style=python3-pep517 -hostmakedepends="python3-meson-python python3-pybind11" +hostmakedepends="python3-meson-python python3-pybind11 pkg-config" makedepends="python3-pybind11" depends="python3" checkdepends="${depends} python3-pytest-xdist python3-numpy" @@ -18,6 +18,13 @@ checksum=96ba37c2e24b7212a77da85004c38e7c4d155d3e72a45eeaf22c1f03f607e8ab if [ $CROSS_BUILD ]; then meson_crossfile=$wrksrc/xbps_meson.cross make_build_args="--config-setting=setup-args=--cross-file=$meson_crossfile" + + _pybind11_dir="${py3_sitelib}/pybind11" + export PKG_CONFIG_PATH="${XBPS_CROSS_BASE}/${_pybind11_dir}/share/pkgconfig" + # pybind11 uses a path relative to the pkgconfig file to set $prefix, + # which causes the wrapper to double-include $XBPS_CROSS_BASE; override + # so that the wrapper properly points to the right location + export PKG_CONFIG_PYBIND11_PREFIX="/${_pybind11_dir}" fi # This test needs `wurlitzer`, not packaged