summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/oneVPL-cpu/oneVPL-cpu-2023.2.0.ebuild')
-rw-r--r--media-libs/oneVPL-cpu/oneVPL-cpu-2023.2.0.ebuild57
1 files changed, 57 insertions, 0 deletions
diff --git a/media-libs/oneVPL-cpu/oneVPL-cpu-2023.2.0.ebuild b/media-libs/oneVPL-cpu/oneVPL-cpu-2023.2.0.ebuild
new file mode 100644
index 000000000000..513675dc8a74
--- /dev/null
+++ b/media-libs/oneVPL-cpu/oneVPL-cpu-2023.2.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="oneAPI Video Processing Library CPU implementation"
+HOMEPAGE="https://github.com/oneapi-src/oneVPL-cpu"
+SRC_URI="https://github.com/oneapi-src/oneVPL-cpu/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT x264? ( GPL-2 )"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="experimental openh264 test +x264"
+REQUIRED_USE="^^ ( openh264 x264 )"
+# RESTRICT="!test? ( test )"
+# Tests fail
+RESTRICT="test"
+
+BDEPEND="virtual/pkgconfig"
+DEPEND="
+ media-libs/dav1d
+ media-libs/oneVPL[experimental?]
+ media-libs/svt-av1
+ media-libs/svt-hevc
+ media-video/ffmpeg
+ x264? ( media-libs/x264 )
+ openh264? ( media-libs/openh264 )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2022.2.5-use-system-libs.patch"
+ "${FILESDIR}/${PN}-2022.2.5-respect-user-flags.patch"
+)
+
+src_configure() {
+ # Use system libraries
+ export VPL_BUILD_DEPENDENCIES="${ESYSROOT}/usr"
+ local mycmakeargs=(
+ -DUSE_EXPERIMENTAL_API="$(usex experimental)"
+ -DBUILD_OPENH264="$(usex openh264)"
+ -DBUILD_TESTS="$(usex test)"
+ -DBUILD_GPL_X264="$(usex x264)"
+ # Use FHS instead
+ -DUSE_ONEAPI_INSTALL_LAYOUT=NO
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ # Remove these license files
+ rm -r "${ED}/usr/share/oneVPL-cpu/licensing" || die
+}