[dev-db/mongodb] clang stuff

This commit is contained in:
Robert Förster 2024-09-05 20:25:52 +02:00
parent 602417250d
commit 5d71012c2d
2 changed files with 34 additions and 6 deletions

View File

@ -3,6 +3,9 @@
EAPI=8 EAPI=8
LLVM_COMPAT=( 18 )
LLVM_OPTIONAL=1
PYTHON_COMPAT=( python3_{10..12} ) PYTHON_COMPAT=( python3_{10..12} )
SCONS_MIN_VERSION="3.3.1" SCONS_MIN_VERSION="3.3.1"
@ -10,7 +13,7 @@ CHECKREQS_DISK_BUILD="2400M"
CHECKREQS_DISK_USR="512M" CHECKREQS_DISK_USR="512M"
CHECKREQS_MEMORY="1024M" CHECKREQS_MEMORY="1024M"
inherit check-reqs flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs inherit check-reqs flag-o-matic llvm-r1 multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs
MY_PV=r${PV/_rc/-rc} MY_PV=r${PV/_rc/-rc}
MY_P=mongo-${MY_PV} MY_P=mongo-${MY_PV}
@ -24,7 +27,7 @@ LICENSE="Apache-2.0 SSPL-1"
SLOT="0" SLOT="0"
KEYWORDS="~amd64 ~arm64 -riscv" KEYWORDS="~amd64 ~arm64 -riscv"
CPU_FLAGS="cpu_flags_x86_avx" CPU_FLAGS="cpu_flags_x86_avx"
IUSE="debug kerberos mongosh ssl +tools ${CPU_FLAGS}" IUSE="debug clang kerberos mongosh ssl +tools ${CPU_FLAGS}"
# https://github.com/mongodb/mongo/wiki/Test-The-Mongodb-Server # https://github.com/mongodb/mongo/wiki/Test-The-Mongodb-Server
# resmoke needs python packages not yet present in Gentoo # resmoke needs python packages not yet present in Gentoo
@ -40,6 +43,11 @@ RDEPEND="acct-group/mongodb
dev-libs/snowball-stemmer:= dev-libs/snowball-stemmer:=
net-misc/curl net-misc/curl
>=sys-libs/zlib-1.2.12:= >=sys-libs/zlib-1.2.12:=
clang? (
$(llvm_gen_dep "
sys-devel/llvm:\${LLVM_SLOT}
")
)
kerberos? ( dev-libs/cyrus-sasl[kerberos] ) kerberos? ( dev-libs/cyrus-sasl[kerberos] )
ssl? ( ssl? (
>=dev-libs/openssl-1.0.1g:0= >=dev-libs/openssl-1.0.1g:0=
@ -77,7 +85,6 @@ PATCHES=(
"${FILESDIR}/${PN}-4.4.29-no-enterprise.patch" "${FILESDIR}/${PN}-4.4.29-no-enterprise.patch"
"${FILESDIR}/${PN}-5.0.26-boost-1.85.patch" "${FILESDIR}/${PN}-5.0.26-boost-1.85.patch"
"${FILESDIR}/${PN}-5.0.26-boost-1.85-extra.patch" "${FILESDIR}/${PN}-5.0.26-boost-1.85-extra.patch"
"${FILESDIR}/${PN}-5.0.29-clang.patch"
) )
python_check_deps() { python_check_deps() {
@ -107,6 +114,13 @@ pkg_pretend() {
fi fi
} }
pkg_setup() {
if tc-is-clang; then
llvm-r1_pkg_setup
llvm_fix_tool_path CC CXX
fi
}
src_prepare() { src_prepare() {
default default

View File

@ -3,6 +3,9 @@
EAPI=8 EAPI=8
LLVM_COMPAT=( 18 )
LLVM_OPTIONAL=1
PYTHON_COMPAT=( python3_{10..12} ) PYTHON_COMPAT=( python3_{10..12} )
SCONS_MIN_VERSION="3.3.1" SCONS_MIN_VERSION="3.3.1"
@ -10,7 +13,7 @@ CHECKREQS_DISK_BUILD="2400M"
CHECKREQS_DISK_USR="512M" CHECKREQS_DISK_USR="512M"
CHECKREQS_MEMORY="1024M" CHECKREQS_MEMORY="1024M"
inherit check-reqs flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd tmpfiles toolchain-funcs inherit check-reqs flag-o-matic llvm-r1 multiprocessing pax-utils python-any-r1 scons-utils systemd tmpfiles toolchain-funcs
MY_PV=r${PV/_rc/-rc} MY_PV=r${PV/_rc/-rc}
MY_P=mongo-${MY_PV} MY_P=mongo-${MY_PV}
@ -24,7 +27,7 @@ LICENSE="Apache-2.0 SSPL-1"
SLOT="0" SLOT="0"
KEYWORDS="~amd64 ~arm64 -riscv" KEYWORDS="~amd64 ~arm64 -riscv"
CPU_FLAGS="cpu_flags_x86_avx" CPU_FLAGS="cpu_flags_x86_avx"
IUSE="debug kerberos mongosh ssl +tools ${CPU_FLAGS}" IUSE="clang debug kerberos mongosh ssl +tools ${CPU_FLAGS}"
# https://github.com/mongodb/mongo/wiki/Test-The-Mongodb-Server # https://github.com/mongodb/mongo/wiki/Test-The-Mongodb-Server
# resmoke needs python packages not yet present in Gentoo # resmoke needs python packages not yet present in Gentoo
@ -40,6 +43,11 @@ RDEPEND="acct-group/mongodb
dev-libs/snowball-stemmer:= dev-libs/snowball-stemmer:=
net-misc/curl net-misc/curl
>=sys-libs/zlib-1.2.12:= >=sys-libs/zlib-1.2.12:=
clang? (
$(llvm_gen_dep "
sys-devel/llvm:\${LLVM_SLOT}
")
)
kerberos? ( dev-libs/cyrus-sasl[kerberos] ) kerberos? ( dev-libs/cyrus-sasl[kerberos] )
ssl? ( ssl? (
>=dev-libs/openssl-1.0.1g:0= >=dev-libs/openssl-1.0.1g:0=
@ -78,7 +86,6 @@ PATCHES=(
"${FILESDIR}/${PN}-4.4.29-no-enterprise.patch" "${FILESDIR}/${PN}-4.4.29-no-enterprise.patch"
"${FILESDIR}/${PN}-5.0.26-boost-1.85.patch" "${FILESDIR}/${PN}-5.0.26-boost-1.85.patch"
"${FILESDIR}/${PN}-6.0.17-boost-1.85.patch" "${FILESDIR}/${PN}-6.0.17-boost-1.85.patch"
"${FILESDIR}/${PN}-5.0.29-clang.patch"
) )
python_check_deps() { python_check_deps() {
@ -91,6 +98,13 @@ python_check_deps() {
python_has_version -b "dev-python/typing-extensions[${PYTHON_USEDEP}]" python_has_version -b "dev-python/typing-extensions[${PYTHON_USEDEP}]"
} }
pkg_setup() {
if tc-is-clang; then
llvm-r1_pkg_setup
llvm_fix_tool_path CC CXX
fi
}
pkg_pretend() { pkg_pretend() {
# Bug 809692 + 890294 # Bug 809692 + 890294
if use amd64 && ! use cpu_flags_x86_avx; then if use amd64 && ! use cpu_flags_x86_avx; then