media-video/clivcut - 0.3.0 (vespa)

Search

Install

Install this version:

emerge -a =media-video/clivcut-0.3.0

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

autounmask =media-video/clivcut-0.3.0

Or alternatively:

emerge --autounmask-write -a =media-video/clivcut-0.3.0

Package Information

Description:
Open-source, cross-platform video editor
Homepage:
https://github.com/thiagovespa/clivcut
License:
GPL-3+ onnx? ( MIT ) whisper? ( MIT )

Ebuild Details

Version EAPI Keywords Slot
0.3.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 xdg

WHISPER_PV=1.9.4
ORT_PV=1.30.0

DESCRIPTION="Open-source, cross-platform video editor"
HOMEPAGE="https://github.com/thiagovespa/clivcut"

if [[ ${PV} == 9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/thiagovespa/clivcut.git"
else
	SRC_URI="https://github.com/thiagovespa/clivcut/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="~amd64"
fi
# The build would download these itself; Portage fetches them instead.
SRC_URI+="
	whisper? (
		https://github.com/ggml-org/whisper.cpp/archive/refs/tags/v${WHISPER_PV}.tar.gz
			-> whisper-cpp-${WHISPER_PV}.tar.gz
	)
	onnx? (
		https://github.com/microsoft/onnxruntime/releases/download/v${ORT_PV}/onnxruntime-linux-x64-${ORT_PV}.tgz
	)
"

LICENSE="GPL-3+ onnx? ( MIT ) whisper? ( MIT )"
SLOT="0"
IUSE="+onnx vulkan +whisper"
REQUIRED_USE="
	vulkan? ( whisper )
"
# The test suite needs a GPU (or Xvfb with Mesa) and generates media with ffmpeg.
RESTRICT="test"

RDEPEND="
	>=dev-qt/qtbase-6.7:6[concurrent,gui,network]
	>=dev-qt/qtdeclarative-6.7:6
	>=dev-qt/qtsvg-6.7:6
	media-libs/libsdl2
	media-video/ffmpeg:=
	vulkan? ( media-libs/vulkan-loader )
"
DEPEND="
	${RDEPEND}
	>=dev-qt/qtshadertools-6.7:6
	vulkan? ( dev-util/vulkan-headers )
"
BDEPEND="
	>=dev-qt/qtshadertools-6.7:6
	dev-qt/qttools:6[linguist]
	virtual/pkgconfig
	onnx? ( dev-util/patchelf )
	vulkan? ( media-libs/shaderc )
"

# Official ONNX Runtime binaries (the build only links against them).
QA_PREBUILT="usr/lib*/${PN}/libonnxruntime.so*"

src_unpack() {
	if [[ ${PV} == 9999 ]]; then
		git-r3_src_unpack
	fi
	default
}

src_configure() {
	local mycmakeargs=(
		-DCLIVCUT_BUILD_TESTS=OFF
		-DCLIVCUT_WITH_WHISPER=$(usex whisper)
		-DCLIVCUT_WITH_ONNX=$(usex onnx)
		-DFETCHCONTENT_FULLY_DISCONNECTED=ON
	)
	if use whisper; then
		mycmakeargs+=(
			-DFETCHCONTENT_SOURCE_DIR_WHISPER="${WORKDIR}/whisper.cpp-${WHISPER_PV}"
			-DCLIVCUT_WHISPER_VULKAN=$(usex vulkan)
			# CFLAGS already carry -march; do not let ggml add its own.
			-DGGML_NATIVE=OFF
		)
	fi
	if use onnx; then
		mycmakeargs+=(
			-DCLIVCUT_ONNXRUNTIME_ROOT="${WORKDIR}/onnxruntime-linux-x64-${ORT_PV}"
		)
	fi
	cmake_src_configure
}

src_install() {
	cmake_src_install

	if use onnx; then
		# Keep the bundled ONNX Runtime private, so it never clashes with a system copy.
		local libdir=/usr/$(get_libdir)/${PN}
		rm "${ED}"/usr/$(get_libdir)/libonnxruntime.so* || die
		insinto ${libdir}
		doins "${WORKDIR}"/onnxruntime-linux-x64-${ORT_PV}/lib/libonnxruntime.so.${ORT_PV}
		dosym libonnxruntime.so.${ORT_PV} ${libdir}/libonnxruntime.so.1
		local exe
		for exe in clivcut clivcut-render; do
			patchelf --set-rpath "${EPREFIX}${libdir}" "${ED}"/usr/bin/${exe} || die
		done
	fi
}

pkg_postinst() {
	xdg_pkg_postinst
	if use onnx || use whisper; then
		elog "The AI models are downloaded from inside the app the first time each"
		elog "feature is used, into ~/.local/share/clivcut/models."
	fi
}

USE Flags

Manage flags for this package: euse -i <flag> -p media-video/clivcut | euse -E <flag> -p media-video/clivcut | euse -D <flag> -p media-video/clivcut

Global/Standard Flags

onnx
❓ Default: Enabled (+)
whisper
❓ Default: Enabled (+)

Inherited Eclasses

xdg

Dependencies

DEPEND

	
	>=dev-qt/qtbase-6.7:6[concurrent,gui,network]
	>=dev-qt/qtdeclarative-6.7:6
	>=dev-qt/qtsvg-6.7:6
	media-libs/libsdl2
	media-video/ffmpeg:=
	vulkan? ( media-libs/vulkan-loader )

	>=dev-qt/qtshadertools-6.7:6
	vulkan? ( dev-util/vulkan-headers )

RDEPEND

	>=dev-qt/qtbase-6.7:6[concurrent,gui,network]
	>=dev-qt/qtdeclarative-6.7:6
	>=dev-qt/qtsvg-6.7:6
	media-libs/libsdl2
	media-video/ffmpeg:=
	vulkan? ( media-libs/vulkan-loader )

BDEPEND

	>=dev-qt/qtshadertools-6.7:6
	dev-qt/qttools:6[linguist]
	virtual/pkgconfig
	onnx? ( dev-util/patchelf )
	vulkan? ( media-libs/shaderc )

Manifest for 0.3.0

Type File Size Source URLs
DIST clivcut-0.3.0.tar.gz 5178990 bytes https://github.com/thiagovespa/clivcut/archive/refs/tags/v0.3.0.tar.gz
DIST onnxruntime-linux-x64-1.30.0.tgz 11306877 bytes https://github.com/microsoft/onnxruntime/releases/download/v1.30.0/onnxruntime-linux-x64-1.30.0.tgz
DIST whisper-cpp-1.9.4.tar.gz 9353438 bytes https://github.com/ggml-org/whisper.cpp/archive/refs/tags/v1.9.4.tar.gz