sci-libs/poselib: new package, add 2.0.4

Signed-off-by: Mårten Wadenbäck <marten@wadenback.se>
This commit is contained in:
Mårten Wadenbäck
2025-06-26 15:48:10 +02:00
parent d66ca967f0
commit 95582a7e42
3 changed files with 56 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST poselib-2.0.4.tar.gz 198206 BLAKE2B 483af5c2d4c825cb8d49e5f98df9a679de0e52f7e43fb0b87ae0f26f0b4f4373cbe0e252d68df0fcf4071b5384e80f45e2d28f48562250ca006caa5b92933601 SHA512 adc43c4f0fd8544d2c7ef05538696a8ae614837f5e90c31b8b9c8f4b5a11eb773229c22444e01482de697a0f5b3137d4a63a24ba9fcc72b366a347252d3c16b1

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>spamfilter-1@wadenback.se</email>
<name>Mårten Wadenbäck</name>
</maintainer>
<use>
<flag name="benchmark">Build the benchmark binary.</flag>
</use>
<upstream>
<remote-id type="github">PoseLib/PoseLib</remote-id>
</upstream>
</pkgmetadata>

View File

@@ -0,0 +1,41 @@
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
MY_PN="PoseLib"
DESCRIPTION="Minimal solvers for calibrated camera pose estimation "
HOMEPAGE="https://github.com/PoseLib/PoseLib"
SRC_URI="https://github.com/PoseLib/PoseLib/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${MY_PN}-${PV}"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="benchmark"
BDEPEND="dev-build/cmake"
DEPEND="dev-cpp/eigen"
RDEPEND="${DEPEND}"
src_configure() {
local mycmakeargs=(
-DCMAKE_SKIP_RPATH=ON
-DWITH_BENCHMARK=$(usex benchmark)
)
cmake_src_configure
}
src_install() {
cmake_src_install
if use benchmark; then
# As "benchmark" is a too generic name, let's make it more specific.
mv "${D}/usr/bin/benchmark" "${D}/usr/bin/poselib-benchmark" \
|| die "Failed to rename benchmark binary"
fi
}