sci-libs/ausaxs - 1.3.0 (stuff)

Search

Install

Install this version:

emerge -a =sci-libs/ausaxs-1.3.0

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =sci-libs/ausaxs-1.3.0

Or alternatively:

emerge --autounmask-write -a =sci-libs/ausaxs-1.3.0

Package Information

Description:
Efficient small-angle X-ray scattering (SAXS) fitting and analysis
Homepage:
https://github.com/AUSAXS/AUSAXS
License:
LGPL-3+

Ebuild Details

Version EAPI Keywords Slot
1.3.0 8 ~amd64 ~arm64 0/1.3
View Raw Ebuild
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake

PATCHES=(
	"${FILESDIR}/${P}-tests-no-dlib.patch"
	"${FILESDIR}/${P}-simd-unaligned-access.patch"
)

DESCRIPTION="Efficient small-angle X-ray scattering (SAXS) fitting and analysis"
HOMEPAGE="https://github.com/AUSAXS/AUSAXS"
SRC_URI="https://github.com/AUSAXS/AUSAXS/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
S="${WORKDIR}/AUSAXS-${PV}"

LICENSE="LGPL-3+"
SLOT="0/1.3"
KEYWORDS="~amd64 ~arm64"
IUSE="doc executables test"

# Disable unused dlib minimizers and their unpackageable FetchContent path.
# pyausaxs loads its distinct bundled ABI by absolute path, so it can coexist.
RDEPEND="net-misc/curl:="
DEPEND="
	${RDEPEND}
	dev-cpp/gcem
	dev-cpp/backward-cpp
	dev-cpp/cli11
	dev-cpp/bshoshany-thread-pool
"
BDEPEND="
	doc? ( app-text/doxygen )
	test? ( dev-cpp/catch )
"
RESTRICT="!test? ( test )"

src_prepare() {
	# Use the dynamic toolchain and user flags.
	sed -i \
		-e 's/-static-libgcc//g' \
		-e 's/-static-libstdc++//g' \
		CMakeLists.txt || die
	sed -i \
		-e '/^[[:space:]]*-O3$/d' \
		-e '/^[[:space:]]*-ffast-math$/d' \
		-e '/^[[:space:]]*-pipe$/d' \
		-e '/list(APPEND CompilerFlags ${MARCH_FLAG})/d' \
		cmake/setup_compile_commands.cmake || die
	sed -i \
		-e '/^set(CMAKE_CXX_FLAGS "")/d' \
		-e 's/"-Os /"/' \
		tests/CMakeLists.txt || die

	# Embedded helpers need no racy parallel copies.
	sed -i '/^add_plot_scripts_to_target(/d' \
		executable/CMakeLists.txt || die

	cmake_src_prepare
}

src_configure() {
	local mycmakeargs=(
		-DCMAKE_BUILD_TYPE=Release
		-DGUI=OFF
		-DDLIB=OFF
		-DBUILD_PLOT_EXE=OFF
		-DBUILD_TESTS=$(usex test)
		-DBUILD_EXECUTABLES=$(usex executables)
		-DSTATIC_CURL=OFF
		-DARCH=auto
		-DUSE_SYSTEM_GCEM=ON
		-DUSE_SYSTEM_BACKWARD=ON
		-DUSE_SYSTEM_CLI11=ON
		-DUSE_SYSTEM_THREADPOOL=ON
		-DUSE_SYSTEM_CATCH=ON
		-DFETCHCONTENT_FULLY_DISCONNECTED=ON
	)
	cmake_src_configure
}

src_compile() {
	local targets=( libausaxs )
	use executables && targets+=(
		ausaxs saxs_fitter em_fitter rigidbody_optimizer
	)
	use test && targets+=( tests )
	cmake_src_compile "${targets[@]}"

	use doc && cmake_src_compile doc
}

src_test() {
	cmake_src_test -j 8
}

src_install() {
	cmake_src_install

	if use executables; then
		dobin "${BUILD_DIR}/bin/ausaxs"
		dobin "${BUILD_DIR}/bin/saxs_fitter"
		dobin "${BUILD_DIR}/bin/em_fitter"
		dobin "${BUILD_DIR}/bin/rigidbody_optimizer"
	fi

	# Upstream's install target omits its public headers.
	insinto /usr/include/ausaxs
	doins -r include/api/.
	doins -r include/core/.
	doins -r include/em/.
	doins -r include/math/.
	doins -r include/rigidbody/.

	if use doc; then
		HTML_DOCS=( "${BUILD_DIR}/docs/html/." )
	fi
	einstalldocs
}

USE Flags

Manage flags for this package: euse -i <flag> -p sci-libs/ausaxs | euse -E <flag> -p sci-libs/ausaxs | euse -D <flag> -p sci-libs/ausaxs

Global/Standard Flags

doc

Inherited Eclasses

Dependencies

DEPEND

	net-misc/curl:=
	dev-cpp/gcem
	dev-cpp/backward-cpp
	dev-cpp/cli11
	dev-cpp/bshoshany-thread-pool

RDEPEND

net-misc/curl:=

BDEPEND

	doc? ( app-text/doxygen )
	test? ( dev-cpp/catch )

Manifest for 1.3.0

Type File Size Source URLs
DIST ausaxs-1.3.0.gh.tar.gz 56507740 bytes https://github.com/AUSAXS/AUSAXS/archive/refs/tags/v1.3.0.tar.gz