summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-04-20 12:05:24 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-04-20 12:05:24 +0100
commitda7ae1dd1fccb6b3c0e4763ab983ad96d57bf463 (patch)
tree0a7a1b7b3ad60c3b21c697e75908b256fc9ed6b1 /eclass
parentb6cfc0c19effe2d9f7b8ab303cd00636f16da253 (diff)
gentoo auto-resync : 20:04:2024 - 12:05:23
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin39598 -> 39606 bytes
-rw-r--r--eclass/distutils-r1.eclass49
-rw-r--r--eclass/llvm.org.eclass9
-rw-r--r--eclass/meson.eclass20
4 files changed, 68 insertions, 10 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 9cc87c461ee0..f0277d652357 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 7a314673a90b..a67122a59a33 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -448,6 +448,15 @@ unset -f _distutils_set_globals
# An array containing options to be passed to the build system.
# Supported by a subset of build systems used by the eclass.
#
+# For maturin, the arguments will be passed as `maturin build`
+# arguments.
+#
+# For meson-python, the arguments will be passed as `meson setup`
+# arguments.
+#
+# For scikit-build-core, the arguments will be passed as `cmake`
+# options (e.g. `-DFOO=BAR` form should be used).
+#
# For setuptools, the arguments will be passed as first parameters
# to setup.py invocations (via esetup.py), as well as to the PEP517
# backend. For future compatibility, only global options should be used
@@ -1406,6 +1415,46 @@ distutils_pep517_install() {
EOF
)
;;
+ scikit-build-core)
+ # TODO: split out the config/toolchain logic from cmake.eclass
+ # for now, we copy the most important bits
+ local CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-RelWithDebInfo}
+ cat >> "${BUILD_DIR}"/config.cmake <<- _EOF_ || die
+ set(CMAKE_ASM_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
+ set(CMAKE_ASM-ATT_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
+ set(CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
+ set(CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
+ set(CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
+ set(CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
+ set(CMAKE_MODULE_LINKER_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
+ set(CMAKE_SHARED_LINKER_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
+ set(CMAKE_STATIC_LINKER_FLAGS_${CMAKE_BUILD_TYPE^^} "" CACHE STRING "")
+ _EOF_
+
+ # hack around CMake ignoring CPPFLAGS
+ local -x CFLAGS="${CFLAGS} ${CPPFLAGS}"
+ local -x CXXFLAGS="${CXXFLAGS} ${CPPFLAGS}"
+
+ local cmake_args=(
+ "-C${BUILD_DIR}/config.cmake"
+ "${DISTUTILS_ARGS[@]}"
+ )
+
+ # NB: we need to pass strings for boolean fields
+ # https://github.com/scikit-build/scikit-build-core/issues/707
+ config_settings=$(
+ "${EPYTHON}" - "${cmake_args[@]}" <<-EOF || die
+ import json
+ import sys
+ print(json.dumps({
+ "cmake.args": ";".join(sys.argv[1:]),
+ "cmake.build-type": "${CMAKE_BUILD_TYPE}",
+ "cmake.verbose": "true",
+ "install.strip": "false",
+ }))
+ EOF
+ )
+ ;;
setuptools)
if in_iuse debug && use debug; then
local -x SETUPTOOLS_RUST_CARGO_PROFILE=dev
diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index 731044d59f48..49e600bdaf04 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -72,15 +72,12 @@ if [[ -z ${_LLVM_SOURCE_TYPE+1} ]]; then
_LLVM_SOURCE_TYPE=snapshot
case ${PV} in
+ 19.0.0_pre20240420)
+ EGIT_COMMIT=f03cd2db91956456f1c5e2da86d3c50183eebd28
+ ;;
19.0.0_pre20240410)
EGIT_COMMIT=ee284d2da0720dc21191d6f545504cbfcf5dcbcf
;;
- 19.0.0_pre20240404)
- EGIT_COMMIT=12735916bd3a63aa9f316af8eebfe9420cfec489
- ;;
- 19.0.0_pre20240330)
- EGIT_COMMIT=a8b0ecd2605ff23f495a8af64e06c35f86834e54
- ;;
*)
die "Unknown snapshot: ${PV}"
;;
diff --git a/eclass/meson.eclass b/eclass/meson.eclass
index 9d7f830e58b0..a22a85887584 100644
--- a/eclass/meson.eclass
+++ b/eclass/meson.eclass
@@ -425,7 +425,10 @@ meson_src_configure() {
export -n {C,CPP,CXX,F,OBJC,OBJCXX,LD}FLAGS PKG_CONFIG_{LIBDIR,PATH}
echo meson setup "${MESONARGS[@]}" >&2
meson setup "${MESONARGS[@]}"
- ) || die -n
+ )
+ local rv=$?
+ [[ ${rv} -eq 0 ]] || die -n "configure failed"
+ return ${rv}
}
# @FUNCTION: meson_src_compile
@@ -451,9 +454,12 @@ meson_src_compile() {
set -- meson compile "${mesoncompileargs[@]}"
echo "$@" >&2
- "$@" || die -n "compile failed"
+ "$@"
+ local rv=$?
+ [[ ${rv} -eq 0 ]] || die -n "compile failed"
popd > /dev/null || die
+ return ${rv}
}
# @FUNCTION: meson_src_test
@@ -473,9 +479,12 @@ meson_src_test() {
set -- meson test "${mesontestargs[@]}"
echo "$@" >&2
- "$@" || die -n "tests failed"
+ "$@"
+ local rv=$?
+ [[ ${rv} -eq 0 ]] || die -n "tests failed"
popd > /dev/null || die
+ return ${rv}
}
# @FUNCTION: meson_install
@@ -495,9 +504,12 @@ meson_install() {
set -- meson install "${mesoninstallargs[@]}"
echo "$@" >&2
- "$@" || die -n "install failed"
+ "$@"
+ local rv=$?
+ [[ ${rv} -eq 0 ]] || die -n "install failed"
popd > /dev/null || die
+ return ${rv}
}
# @FUNCTION: meson_src_install