mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-21 04:53:07 -04:00
net-im/conduit: use llvm-r2 eclass
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
# Copyright 2023-2024 Gentoo Authors
|
||||
# Copyright 2023-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# Auto-Generated by cargo-ebuild 0.5.4
|
||||
|
||||
EAPI=8
|
||||
|
||||
CRATES="
|
||||
@@ -373,6 +371,8 @@ CRATES="
|
||||
zune-core@0.4.12
|
||||
zune-jpeg@0.4.11
|
||||
"
|
||||
LLVM_COMPAT=( {15..19} )
|
||||
RUST_MIN_VER="1.79.0"
|
||||
|
||||
declare -A GIT_CRATES=(
|
||||
[ruma-appservice-api]='https://github.com/ruma/ruma;c06af4385e0e30c48a8e9ca3d488da32102d0db9;ruma-%commit%/crates/ruma-appservice-api'
|
||||
@@ -390,9 +390,7 @@ declare -A GIT_CRATES=(
|
||||
[ruma]='https://github.com/ruma/ruma;c06af4385e0e30c48a8e9ca3d488da32102d0db9;ruma-%commit%/crates/ruma'
|
||||
)
|
||||
|
||||
RUST_MIN_VER="1.75.0"
|
||||
|
||||
inherit cargo systemd toolchain-funcs
|
||||
inherit cargo llvm-r2 systemd toolchain-funcs
|
||||
|
||||
MY_P="${PN}-v${PV}"
|
||||
DESCRIPTION="Matrix homeserver written in Rust"
|
||||
@@ -430,7 +428,7 @@ IUSE="jemalloc rocksdb system-rocksdb"
|
||||
# - app-arch/lz4 ("lz4-sys" crate doesn't look for system library... ironic)
|
||||
# - dev-db/sqlite:3 ("conduit" pulls "rusqlite[bundled]" explicitly)
|
||||
# - sys-libs/zlib ("rust-librocksdb-sys" pulls "libz-sys[static]" by default)
|
||||
DEPEND="
|
||||
COMMON_DEPEND="
|
||||
jemalloc? ( dev-libs/jemalloc:= )
|
||||
rocksdb? (
|
||||
app-arch/snappy:=
|
||||
@@ -438,13 +436,21 @@ DEPEND="
|
||||
system-rocksdb? ( dev-libs/rocksdb )
|
||||
)
|
||||
"
|
||||
RDEPEND="${DEPEND}
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
acct-user/conduit
|
||||
app-misc/ca-certificates
|
||||
"
|
||||
# clang needed for bindgen
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
rocksdb? (
|
||||
$(llvm_gen_dep '
|
||||
llvm-core/clang:${LLVM_SLOT}
|
||||
llvm-core/llvm:${LLVM_SLOT}
|
||||
')
|
||||
)
|
||||
"
|
||||
BDEPEND="
|
||||
rocksdb? (
|
||||
llvm-core/clang
|
||||
virtual/pkgconfig
|
||||
)
|
||||
"
|
||||
@@ -453,9 +459,12 @@ DOCS=( {APPSERVICES,CODE_OF_CONDUCT,DEPLOY,README,TURN}.md )
|
||||
|
||||
QA_FLAGS_IGNORED="usr/bin/${PN}"
|
||||
|
||||
src_configure() {
|
||||
tc-export AR CC
|
||||
pkg_setup() {
|
||||
use rocksdb && llvm-r2_pkg_setup
|
||||
rust_pkg_setup
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Tracker bug for that Cargo nonsense:
|
||||
# https://bugs.gentoo.org/709568
|
||||
export PKG_CONFIG_ALLOW_CROSS=1
|
||||
@@ -466,6 +475,14 @@ src_configure() {
|
||||
if use system-rocksdb; then
|
||||
export ROCKSDB_INCLUDE_DIR="${ESYSROOT}/usr/include"
|
||||
export ROCKSDB_LIB_DIR="${ESYSROOT}/usr/$(get_libdir)"
|
||||
elif use rocksdb; then
|
||||
# Rust uses 'gcc' or 'clang' (not 'g++' or 'clang++'), so C++ standard
|
||||
# library needs to be linked explicitly.
|
||||
if [[ $(tc-get-cxx-stdlib) == "libstdc++" ]]; then
|
||||
append-ldflags -lstdc++
|
||||
elif [[ $(tc-get-cxx-stdlib) == "libc++" ]]; then
|
||||
append-ldflags -lc++
|
||||
fi
|
||||
fi
|
||||
|
||||
local myfeatures=(
|
||||
|
||||
Reference in New Issue
Block a user