sci-physics/mumax - 3.11.1 (stuff)

Search

Install

Install this version:

emerge -a =sci-physics/mumax-3.11.1

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

autounmask =sci-physics/mumax-3.11.1

Or alternatively:

emerge --autounmask-write -a =sci-physics/mumax-3.11.1

Package Information

Description:
GPU-accelerated micromagnetic simulator
Homepage:
http://mumax.github.io/
License:
GPL-3

Ebuild Details

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

EAPI=8

inherit go-module

DESCRIPTION="GPU-accelerated micromagnetic simulator"
HOMEPAGE="http://mumax.github.io/"
SRC_URI="https://github.com/${PN}/3/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

S="${WORKDIR}/3-${PV}"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"

DEPEND=">=dev-util/nvidia-cuda-toolkit-7.5.18-r2"
RDEPEND="${DEPEND}"

src_prepare() {
	default

	# CUDA 13 promoted cuCtxCreate to cuCtxCreate_v4, which takes an
	# extra CUctxCreateParams* second arg. The legacy 3-arg
	# cuCtxCreate_v2 is gated behind __CUDA_API_VERSION_INTERNAL and
	# isn't reachable from cgo. Detect the new typedef in the
	# installed cuda.h and pass NULL for the new arg only then; on
	# CUDA 12 the original 3-arg signature works unchanged.
	if grep -q '\bCUctxCreateParams\b' \
			"${ESYSROOT}"/opt/cuda/include/cuda.h 2>/dev/null; then
		eapply "${FILESDIR}/mumax-cuda13-cuCtxCreate.patch"
	fi
}

src_compile() {
	ego build -o mumax3 ./cmd/mumax3
}

src_install() {
	dobin mumax3
	einstalldocs
}

Inherited Eclasses

Dependencies

DEPEND

>=dev-util/nvidia-cuda-toolkit-7.5.18-r2

RDEPEND

>=dev-util/nvidia-cuda-toolkit-7.5.18-r2

Manifest for 3.11.1

Type File Size Source URLs
DIST mumax-3.11.1.tar.gz 1360801 bytes https://github.com/mumax/3/archive/refs/tags/v3.11.1.tar.gz