# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 CRATES=" " RUST_MIN_VER="1.94.0" inherit cargo DESCRIPTION="A scalable distributed MQTT broker" HOMEPAGE="https://github.com/rmqtt/rmqtt" SRC_URI="https://github.com/rmqtt/rmqtt/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" SRC_URI+=" https://share.terinstock.com/${P}-vendor.tar.xz" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~arm64" BDEPEND="virtual/pkgconfig" RDEPEND=" dev-libs/openssl:= app-arch/zstd:= virtual/zlib:= " DEPEND="${RDEPEND}" src_unpack() { cargo_src_unpack ln -s "${WORKDIR}/vendor/"* "${CARGO_HOME}/gentoo/" || die } src_configure() { cargo_gen_config cargo_src_configure --locked --no-default-features --bin rmqttd } src_prepare() { default export PKG_CONFIG_ALLOW_CROSS=1 export OPENSSL_NO_VENDOR=1 export ZSTD_SYS_USE_PKG_CONFIG=1 } src_install() { dobin "$(cargo_target_dir)/rmqttd" }