games-engines/libultraship - 2.0.0.0 (tatsh-overlay)

Search

Install

Install this version:

emerge -a =games-engines/libultraship-2.0.0.0

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

autounmask =games-engines/libultraship-2.0.0.0

Or alternatively:

emerge --autounmask-write -a =games-engines/libultraship-2.0.0.0

Package Information

Description:
Cross-platform runtime for Nintendo 64 game ports.
Homepage:
https://github.com/Kenix3/libultraship
License:
MIT

Ebuild Details

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

EAPI=8

inherit cmake

# Upstream pulls every one of these with FetchContent at configure time, which
# is not allowed here, so they are fetched as distfiles and redirected with
# FETCHCONTENT_SOURCE_DIR_*. StormLib and tinycc are only used when
# INCLUDE_MPQ_SUPPORT or ENABLE_SCRIPTING are on, and libgfxd only when
# GFX_DEBUG_DISASSEMBLER is, so none of the three are needed here.
IMGUI_PV="1.91.9b-docking"
MONOCYPHER_COMMIT="0d85f98c9d9b0227e42cf795cb527dff372b40a4"
PRISM_COMMIT="1de054450e7b3c5f777d2e3dfcb228ad120c329d"
STB_COMMIT="0bc88af4de5fb022db643c2d8e549a0927749354"
THREADPOOL_PV="4.1.0"

DESCRIPTION="Cross-platform runtime for Nintendo 64 game ports."
HOMEPAGE="https://github.com/Kenix3/libultraship"
SRC_URI="https://github.com/Kenix3/${PN}/archive/refs/tags/${PV}.tar.gz
	-> ${P}.tar.gz
	https://github.com/ocornut/imgui/archive/refs/tags/v${IMGUI_PV}.tar.gz
	-> imgui-${IMGUI_PV}.tar.gz
	https://github.com/bshoshany/thread-pool/archive/refs/tags/v${THREADPOOL_PV}.tar.gz
	-> thread-pool-${THREADPOOL_PV}.tar.gz
	https://github.com/KiritoDv/prism-processor/archive/${PRISM_COMMIT}.tar.gz
	-> prism-processor-${PRISM_COMMIT}.tar.gz
	https://github.com/LoupVaillant/Monocypher/archive/${MONOCYPHER_COMMIT}.tar.gz
	-> monocypher-${MONOCYPHER_COMMIT}.tar.gz
	https://github.com/nothings/stb/raw/${STB_COMMIT}/stb_image.h
	-> stb_image.h-${STB_COMMIT}"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"

RDEPEND="
	dev-cpp/nlohmann_json
	dev-libs/libzip:=
	dev-libs/spdlog:=
	dev-libs/tinyxml2:=
	media-libs/libglvnd
	media-libs/libsdl3
"
DEPEND="${RDEPEND}"
BDEPEND="dev-lang/python:*"

PATCHES=( "${FILESDIR}/${PN}-shared-install.patch" )

src_prepare() {
	# FETCHCONTENT_SOURCE_DIR_* skips the patch step, so apply upstream's own
	# ImGui patch here instead.
	pushd "${WORKDIR}/imgui-${IMGUI_PV}" >/dev/null || die
	eapply "${S}/cmake/dependencies/patches/imgui-fixes-and-config.patch"
	popd >/dev/null || die

	# One dependency is a plain header fetched with file(DOWNLOAD). Unlike
	# DOWNLOAD, COPY_FILE does not create the destination directory.
	sed -i -e "s|file(DOWNLOAD \"https://github.com/nothings/stb/raw/[^\"]*\" |file(MAKE_DIRECTORY \"\${STB_DIR}\")\nfile(COPY_FILE \"${DISTDIR}/stb_image.h-${STB_COMMIT}\" |" \
		cmake/dependencies/common.cmake || die
	grep -q 'file(COPY_FILE' cmake/dependencies/common.cmake ||
		die "failed to redirect the stb_image.h download"

	cmake_src_prepare
}

src_configure() {
	local mycmakeargs=(
		-DBUILD_SHARED_LIBS=ON
		# The bundled ImGui, stb and monocypher stay static and are linked
		# into the shared library, so they have to be position independent.
		-DCMAKE_POSITION_INDEPENDENT_CODE=ON
		-DFETCHCONTENT_FULLY_DISCONNECTED=ON
		-DFETCHCONTENT_SOURCE_DIR_IMGUI="${WORKDIR}/imgui-${IMGUI_PV}"
		-DFETCHCONTENT_SOURCE_DIR_MONOCYPHER="${WORKDIR}/Monocypher-${MONOCYPHER_COMMIT}"
		-DFETCHCONTENT_SOURCE_DIR_PRISM="${WORKDIR}/prism-processor-${PRISM_COMMIT}"
		-DFETCHCONTENT_SOURCE_DIR_THREADPOOL="${WORKDIR}/thread-pool-${THREADPOOL_PV}"
		-DLUS_BUILD_TESTS=OFF
	)

	cmake_src_configure
}

Inherited Eclasses

Dependencies

DEPEND

	dev-cpp/nlohmann_json
	dev-libs/libzip:=
	dev-libs/spdlog:=
	dev-libs/tinyxml2:=
	media-libs/libglvnd
	media-libs/libsdl3

RDEPEND

	dev-cpp/nlohmann_json
	dev-libs/libzip:=
	dev-libs/spdlog:=
	dev-libs/tinyxml2:=
	media-libs/libglvnd
	media-libs/libsdl3

BDEPEND

dev-lang/python:*

Manifest for 2.0.0.0

Type File Size Source URLs
DIST imgui-1.91.9b-docking.tar.gz 2006500 bytes https://github.com/ocornut/imgui/archive/refs/tags/v1.91.9b-docking.tar.gz
DIST libultraship-2.0.0.0.tar.gz 689737 bytes https://github.com/Kenix3/libultraship/archive/refs/tags/2.0.0.0.tar.gz
DIST monocypher-0d85f98c9d9b0227e42cf795cb527dff372b40a4.tar.gz 358396 bytes https://github.com/LoupVaillant/Monocypher/archive/0d85f98c9d9b0227e42cf795cb527dff372b40a4.tar.gz
DIST prism-processor-1de054450e7b3c5f777d2e3dfcb228ad120c329d.tar.gz 22315 bytes https://github.com/KiritoDv/prism-processor/archive/1de054450e7b3c5f777d2e3dfcb228ad120c329d.tar.gz
DIST stb_image.h-0bc88af4de5fb022db643c2d8e549a0927749354 282848 bytes https://github.com/nothings/stb/raw/0bc88af4de5fb022db643c2d8e549a0927749354/stb_image.h
DIST thread-pool-4.1.0.tar.gz 82513 bytes https://github.com/bshoshany/thread-pool/archive/refs/tags/v4.1.0.tar.gz