diff options
author | Arsen Arsenović <arsen@aarsen.me> | 2024-04-19 15:02:16 +0200 |
---|---|---|
committer | Arsen Arsenović <arsen@aarsen.me> | 2024-04-19 22:32:24 +0200 |
commit | 86318c1e02adf7abaf367bb50d33dae0075f26a2 (patch) | |
tree | 0991cf616ff5df5f3b3170bf018f40aa841ab958 /net-im | |
parent | net-im/conduit: new package, add 0.6.0 (diff) | |
download | arsen-86318c1e02adf7abaf367bb50d33dae0075f26a2.tar.gz arsen-86318c1e02adf7abaf367bb50d33dae0075f26a2.tar.bz2 arsen-86318c1e02adf7abaf367bb50d33dae0075f26a2.zip |
Signed-off-by: Arsen Arsenović <arsen@aarsen.me>
Diffstat (limited to 'net-im')
-rw-r--r-- | net-im/conduit/conduit-9999.ebuild | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/net-im/conduit/conduit-9999.ebuild b/net-im/conduit/conduit-9999.ebuild new file mode 100644 index 0000000..b5129dc --- /dev/null +++ b/net-im/conduit/conduit-9999.ebuild @@ -0,0 +1,89 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Autogenerated by pycargoebuild 0.13.2 + +EAPI=8 + +inherit cargo systemd + +DESCRIPTION="A Matrix homeserver written in Rust" +HOMEPAGE="https://conduit.rs" + +if [[ ${PV} = 9999 ]]; then + EGIT_REPO_URI="https://gitlab.com/famedly/${PN}.git" + inherit git-r3 +else + SRC_URI=" + https://gitlab.com/famedly/${PN}/-/archive/v${PV}/${PN}-v${PV}.tar.bz2 + ${CARGO_CRATE_URIS} + " + KEYWORDS="~amd64 ~arm64" + S="${WORKDIR}/${PN}-v${PV}" +fi + +LICENSE="Apache-2.0" +# Manually inspected crate licenses +LICENSE+=" + ISC openssl MIT +" +# Dependent crate licenses +LICENSE+=" + Apache-2.0 BSD-2 BSD CC0-1.0 ISC MIT MPL-2.0 Unicode-DFS-2016 ZLIB +" +SLOT="0" + +IUSE="+rocksdb" + +BDEPEND=" + virtual/rust + rocksdb? ( + virtual/pkgconfig + sys-devel/clang + ) +" +DEPEND=" + rocksdb? ( dev-libs/rocksdb ) +" +RDEPEND="${DEPEND}" + +src_unpack() { + if [[ ${PV} = 9999 ]]; then + git-r3_src_unpack + cargo_live_src_unpack + else + cargo_src_unpack + fi +} + +src_configure() { + # See https://wiki.gentoo.org/wiki/Writing_Rust_ebuilds#Unbundling_C_libraries + local ld="${ESYSROOT}/usr/$(get_libdir)" + export PKG_CONFIG_ALLOW_CROSS=1 + + # This mess seems to be required based on librocksdb-sys' build.rs. + export ROCKSDB_LIB_DIR="${ld}" + export SNAPPY_LIB_DIR="${ld}" + export LZ4_LIB_DIR="${ld}" + export Z_LIB_DIR="${ld}" + export BZ2_LIB_DIR="${ld}" + export ZSTD_LIB_DIR="${ld}" + export ZSTD_SYS_USE_PKG_CONFIG=1 + + local myfeatures=( + backend_sqlite + systemd + conduit_bin + persy + $(usev rocksdb backend_rocksdb) + ) + cargo_src_configure --no-default-features +} + +src_install() { + local target_dir="$(usex debug debug release)" + dobin target/"${target_dir}"/conduit + + systemd_dounit "${FILESDIR}"/matrix-conduit.service + dodoc README.md LICENSE conduit-example.toml +} |