mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 14:43:52 +02:00
common/build-helper/numpy.sh: only write meson cross-file once
This commit is contained in:
parent
557b4a73cf
commit
174deccefd
1 changed files with 31 additions and 25 deletions
|
@ -11,7 +11,8 @@ if [[ $hostmakedepends != *"python3-numpy"* ]]; then
|
|||
hostmakedepends+=" python3-numpy"
|
||||
fi
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
[ -z "$CROSS_BUILD" ] && return 0
|
||||
|
||||
if [[ $makedepends != *"python3-numpy"* ]]; then
|
||||
makedepends+=" python3-numpy"
|
||||
fi
|
||||
|
@ -37,11 +38,16 @@ if [ "$CROSS_BUILD" ]; then
|
|||
|
||||
# Write a secondary meson cross file for numpy configuration
|
||||
if [[ "${build_helper}" = *meson* ]]; then
|
||||
_npy_meson_cross="${XBPS_WRAPPERDIR}/meson/xbps_numpy.cross"
|
||||
_cross_py_site="${XBPS_CROSS_BASE}/${py3_sitelib}"
|
||||
|
||||
if [ ! -e "${_npy_meson_cross}" ] || [ -n "$XBPS_BUILD_FORCEMODE" ]; then
|
||||
mkdir -p "${XBPS_WRAPPERDIR}/meson"
|
||||
cat > "${XBPS_WRAPPERDIR}/meson/xbps_numpy.cross" <<-EOF
|
||||
cat > "${_npy_meson_cross}" <<-EOF
|
||||
[properties]
|
||||
numpy-include-dir = '${XBPS_CROSS_BASE}/${py3_sitelib}/numpy/core/include'
|
||||
pythran-include-dir = '${XBPS_CROSS_BASE}/${py3_sitelib}/pythran'
|
||||
numpy-include-dir = '${_cross_py_site}/numpy/core/include'
|
||||
pythran-include-dir = '${_cross_py_site}/pythran'
|
||||
EOF
|
||||
fi
|
||||
unset _npy_meson_cross _cross_py_site
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue