Install this version:
emerge -a =sci-libs/nexus-9999
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =sci-libs/nexus-9999
Or alternatively:
emerge --autounmask-write -a =sci-libs/nexus-9999
| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 9999 | 8 | 0 |
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake flag-o-matic git-r3 java-pkg-opt-2
DESCRIPTION="Data format for neutron and x-ray scattering data"
HOMEPAGE="https://nexusformat.org/"
EGIT_REPO_URI="https://github.com/nexusformat/code.git"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS=""
IUSE="cxx hdf4 +hdf5 java"
REQUIRED_USE="|| ( hdf4 hdf5 )"
RDEPEND="
dev-libs/libxml2
media-libs/libjpeg-turbo:=
sys-libs/readline
hdf4? ( >=sci-libs/hdf-4.4:= )
hdf5? (
sci-libs/hdf5[zlib]
virtual/zlib:=
)
"
DEPEND="${RDEPEND}"
BDEPEND="
app-text/doxygen[dot]
"
pkg_setup() {
java-pkg-opt-2_pkg_setup
}
src_prepare() {
# Upstream master is still the 5b803b3 snapshot the release pins, so the
# live ebuild needs the same fixes. verified 2026-10-07
xzcat "${FILESDIR}/474.patch.xz" > "${T}/474.patch" || die
eapply "${T}/474.patch"
eapply "${FILESDIR}/${PN}-4.4.3-hdf-4.4.patch"
# The C++ wrapper links only HDF5 C/HL; avoid the unnecessary CXX component,
# which conflicts with MPI-enabled HDF5. verified 2026-06-21
sed -e 's/COMPONENTS CXX HL REQUIRED/COMPONENTS C HL REQUIRED/' \
-i CMakeLists.txt || die
# Raise the policy baseline for CMake 4.
sed -i 's/cmake_minimum_required(VERSION 2.8.7)/cmake_minimum_required(VERSION 3.10)/' \
CMakeLists.txt || die
java-pkg-opt-2_src_prepare
cmake_src_prepare
}
src_configure() {
# Pin C++17; this snapshot uses allocator::allocate(n, hint), removed in C++20.
append-cxxflags -std=gnu++17
# Fortran bindings do not compile.
local mycmakeargs=(
-DENABLE_APPS=ON
-DENABLE_CONTRIB=ON
-DENABLE_HDF4=$(usex hdf4)
-DENABLE_HDF5=$(usex hdf5)
-DENABLE_MXML=NO
-DENABLE_CXX=$(usex cxx)
-DENABLE_FORTRAN90=NO
-DENABLE_FORTRAN77=NO
-DENABLE_JAVA=$(usex java)
)
cmake_src_configure
}
Manage flags for this package:
euse -i <flag> -p sci-libs/nexus |
euse -E <flag> -p sci-libs/nexus |
euse -D <flag> -p sci-libs/nexus
dev-libs/libxml2 media-libs/libjpeg-turbo:= sys-libs/readline hdf4? ( >=sci-libs/hdf-4.4:= ) hdf5? ( sci-libs/hdf5[zlib] virtual/zlib:= )
dev-libs/libxml2 media-libs/libjpeg-turbo:= sys-libs/readline hdf4? ( >=sci-libs/hdf-4.4:= ) hdf5? ( sci-libs/hdf5[zlib] virtual/zlib:= )
app-text/doxygen[dot]