diff options
author | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2022-11-21 12:04:52 +0100 |
---|---|---|
committer | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2022-12-06 19:00:31 +0100 |
commit | 93eeaafc69b6f4b7b62c329d2f86ef0b54eae7e3 (patch) | |
tree | 0250bac247beb3c1a2d373cafb4edff63b166bfa /media-libs/oneVPL-cpu | |
parent | media-libs/oneVPL: new package, add 2022.2.5 (diff) | |
download | gentoo-93eeaafc69b6f4b7b62c329d2f86ef0b54eae7e3.tar.gz gentoo-93eeaafc69b6f4b7b62c329d2f86ef0b54eae7e3.tar.bz2 gentoo-93eeaafc69b6f4b7b62c329d2f86ef0b54eae7e3.zip |
media-libs/oneVPL-cpu: new package, add 2022.2.5
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'media-libs/oneVPL-cpu')
5 files changed, 138 insertions, 0 deletions
diff --git a/media-libs/oneVPL-cpu/Manifest b/media-libs/oneVPL-cpu/Manifest new file mode 100644 index 000000000000..de3a169e49f9 --- /dev/null +++ b/media-libs/oneVPL-cpu/Manifest @@ -0,0 +1 @@ +DIST oneVPL-cpu-2022.2.5.tar.gz 9917180 BLAKE2B 8e0beebc226a0984474ca6822769736c78e80959bd2df9fd4a34014a31e3439cd42b9a104dfefaa70043df03834246c973e1ba29cea3a9af94a48c2b1d08edcc SHA512 e79b0f396bfcdb7156f8ec5b3008ddd813a0a01ade8e319f78afd3c9d862b111531c42a65ba19ea396b51d3e298608da271894867297dc95f51e4bcc19e9029e diff --git a/media-libs/oneVPL-cpu/files/oneVPL-cpu-2022.2.5-respect-user-flags.patch b/media-libs/oneVPL-cpu/files/oneVPL-cpu-2022.2.5-respect-user-flags.patch new file mode 100644 index 000000000000..59aad21af7f3 --- /dev/null +++ b/media-libs/oneVPL-cpu/files/oneVPL-cpu-2022.2.5-respect-user-flags.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 981574e..7bdf346 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -72,8 +72,6 @@ set(CMAKE_POSITION_INDEPENDENT_CODE true) + # Keep executable bits on shared objects when installing regardless of distro + set(CMAKE_INSTALL_SO_NO_EXE 0) + +-include(cmake/CompileOptions.cmake) +- + if(NOT BUILD_GPL_X264) + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(BUILD_OPENH264 ON) diff --git a/media-libs/oneVPL-cpu/files/oneVPL-cpu-2022.2.5-use-system-libs.patch b/media-libs/oneVPL-cpu/files/oneVPL-cpu-2022.2.5-use-system-libs.patch new file mode 100644 index 000000000000..aa9363a65e83 --- /dev/null +++ b/media-libs/oneVPL-cpu/files/oneVPL-cpu-2022.2.5-use-system-libs.patch @@ -0,0 +1,49 @@ +diff --git a/cpu/ext/ffmpeg-codecs/CMakeLists.txt b/cpu/ext/ffmpeg-codecs/CMakeLists.txt +index 7bde28b..c8067c4 100644 +--- a/cpu/ext/ffmpeg-codecs/CMakeLists.txt ++++ b/cpu/ext/ffmpeg-codecs/CMakeLists.txt +@@ -38,9 +38,9 @@ endif() + + # Set basic FFmpeg and codec libs + if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8") +- set(SVTHEVCENC_LIB ${VPL_DEP_DIR}/lib/libSvtHevcEnc.a) +- set(SVTAV1ENC_LIB ${VPL_DEP_DIR}/lib/libSvtAv1Enc.a) +- set(DAV1D_LIB ${VPL_DEP_DIR}/lib/libdav1d.a) ++ set(SVTHEVCENC_LIB ${VPL_DEP_DIR}/lib64/libSvtHevcEnc.so) ++ set(SVTAV1ENC_LIB ${VPL_DEP_DIR}/lib64/libSvtAv1Enc.so) ++ set(DAV1D_LIB ${VPL_DEP_DIR}/lib64/libdav1d.so) + + if(NOT EXISTS ${SVTHEVCENC_LIB} + OR NOT EXISTS ${SVTAV1ENC_LIB} +@@ -49,10 +49,10 @@ if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8") + endif() + endif() + +-set(AVCODEC_LIB ${VPL_DEP_DIR}/lib/libavcodec.a) +-set(AVUTIL_LIB ${VPL_DEP_DIR}/lib/libavutil.a) +-set(AVFILTER_LIB ${VPL_DEP_DIR}/lib/libavfilter.a) +-set(SWSCALE_LIB ${VPL_DEP_DIR}/lib/libswscale.a) ++set(AVCODEC_LIB ${VPL_DEP_DIR}/lib64/libavcodec.so) ++set(AVUTIL_LIB ${VPL_DEP_DIR}/lib64/libavutil.so) ++set(AVFILTER_LIB ${VPL_DEP_DIR}/lib64/libavfilter.so) ++set(SWSCALE_LIB ${VPL_DEP_DIR}/lib64/libswscale.so) + + if(NOT EXISTS ${AVCODEC_LIB} + OR NOT EXISTS ${AVUTIL_LIB} +@@ -135,14 +135,14 @@ endif() + + # Set AVC encoder lib name + if(BUILD_GPL_X264) +- set(H264_ENC_LIB ${VPL_DEP_DIR}/lib/libx264.a) ++ set(H264_ENC_LIB ${VPL_DEP_DIR}/lib64/libx264.so) + if(NOT EXISTS ${H264_ENC_LIB}) + message(FATAL_ERROR "Could not find x264 libraries") + else() + message(STATUS "Building with GPL x264 for AVC implementation") + endif() + elseif(BUILD_OPENH264) +- set(H264_ENC_LIB ${VPL_DEP_DIR}/lib/libopenh264.a) ++ set(H264_ENC_LIB ${VPL_DEP_DIR}/lib64/libopenh264.so) + if(NOT EXISTS ${H264_ENC_LIB}) + message(FATAL_ERROR "Could not find openh264 libraries") + else() diff --git a/media-libs/oneVPL-cpu/metadata.xml b/media-libs/oneVPL-cpu/metadata.xml new file mode 100644 index 000000000000..d738daf38bf1 --- /dev/null +++ b/media-libs/oneVPL-cpu/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>media-video@gentoo.org</email> + </maintainer> + <maintainer type="person"> + <email>andrewammerlaan@gentoo.org</email> + <name>Andrew Ammerlaan</name> + </maintainer> + <upstream> + <remote-id type="github">oneapi-src/oneVPL-cpu</remote-id> + </upstream> + <use> + <flag name="experimental">Enable experimental API</flag> + <flag name="openh264">Use <pkg>media-libs/openh264</pkg> instead of <pkg>media-libs/x264</pkg></flag> + </use> +</pkgmetadata> diff --git a/media-libs/oneVPL-cpu/oneVPL-cpu-2022.2.5.ebuild b/media-libs/oneVPL-cpu/oneVPL-cpu-2022.2.5.ebuild new file mode 100644 index 000000000000..8243f74846b0 --- /dev/null +++ b/media-libs/oneVPL-cpu/oneVPL-cpu-2022.2.5.ebuild @@ -0,0 +1,57 @@ +# Copyright 2022 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 +} |