From dc3742d93a480dbd8e8e8eda0a53b1254bffdb28 Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Tue, 21 Mar 2023 09:46:44 +0100 Subject: media-libs/oneVPL: add multilib support Signed-off-by: Andrew Ammerlaan --- media-libs/oneVPL/oneVPL-2023.1.3-r1.ebuild | 82 +++++++++++++++++++++++++++++ media-libs/oneVPL/oneVPL-2023.1.3.ebuild | 79 --------------------------- 2 files changed, 82 insertions(+), 79 deletions(-) create mode 100644 media-libs/oneVPL/oneVPL-2023.1.3-r1.ebuild delete mode 100644 media-libs/oneVPL/oneVPL-2023.1.3.ebuild (limited to 'media-libs/oneVPL') diff --git a/media-libs/oneVPL/oneVPL-2023.1.3-r1.ebuild b/media-libs/oneVPL/oneVPL-2023.1.3-r1.ebuild new file mode 100644 index 000000000000..0758b6389a95 --- /dev/null +++ b/media-libs/oneVPL/oneVPL-2023.1.3-r1.ebuild @@ -0,0 +1,82 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib optfeature + +DESCRIPTION="oneAPI Video Processing Library, dispatcher, tools, and examples" +HOMEPAGE="https://github.com/oneapi-src/oneVPL" +SRC_URI="https://github.com/oneapi-src/oneVPL/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="dri drm examples experimental tools test vaapi wayland X" +RESTRICT="!test? ( test )" +# Tools fails to compile on 32-bit +REQUIRED_USE=" + dri? ( X drm ) + X? ( vaapi ) + wayland? ( drm ) + abi_x86_32? ( !tools ) + abi_x86_x32? ( !tools ) +" + +RDEPEND=" + x11-libs/libpciaccess[${MULTILIB_USEDEP}] + vaapi? ( media-libs/libva[X?,wayland?,drm(+)?,${MULTILIB_USEDEP}] ) + drm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] ) + wayland? ( + dev-libs/wayland[${MULTILIB_USEDEP}] + ) + X? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libxcb[${MULTILIB_USEDEP}] + ) +" +DEPEND="${RDEPEND} + wayland? ( + dev-libs/wayland-protocols + ) +" +BDEPEND="virtual/pkgconfig" + +multilib_src_configure() { + local mycmakeargs=( + -DBUILD_SHARED_LIBS=ON + -DBUILD_DISPATCHER=ON + # Headers, cmake and pkgconfig files + -DBUILD_DEV=ON + -DBUILD_EXAMPLES="$(usex examples)" + -DINSTALL_EXAMPLE_CODE="$(usex examples)" + -DBUILD_PREVIEW="$(usex experimental)" + -DBUILD_DISPATCHER_ONEVPL_EXPERIMENTAL="$(usex experimental)" + # Fails to build with experimental tools off if tools on + -DBUILD_TOOLS_ONEVPL_EXPERIMENTAL="$(usex tools)" + -DBUILD_TESTS="$(usex test)" + -DBUILD_TOOLS="$(usex tools)" + -DENABLE_WAYLAND="$(usex wayland)" + -DENABLE_X11="$(usex X)" + -DENABLE_DRI3="$(usex dri)" + -DENABLE_VA="$(usex vaapi)" + -DENABLE_DRM="$(usex drm)" + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc" + ) + cmake_src_configure +} + +multilib_src_install() { + cmake_src_install + # Remove these license files + rm -r "${ED}/usr/share/vpl/licensing" || die +} + +pkg_postinst() { + optfeature_header "This package provides only the dispatcher, to use it install one or more implementations" + optfeature "CPUs" media-libs/oneVPL-cpu + optfeature "Intel GPUs newer then, and including, Intel Xe" media-libs/oneVPL-intel-gpu + optfeature "Intel GPUs older then Intel Xe" media-libs/intel-mediasdk +} diff --git a/media-libs/oneVPL/oneVPL-2023.1.3.ebuild b/media-libs/oneVPL/oneVPL-2023.1.3.ebuild deleted file mode 100644 index 223184c18698..000000000000 --- a/media-libs/oneVPL/oneVPL-2023.1.3.ebuild +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright 2022-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake optfeature - -DESCRIPTION="oneAPI Video Processing Library, dispatcher, tools, and examples" -HOMEPAGE="https://github.com/oneapi-src/oneVPL" -SRC_URI="https://github.com/oneapi-src/oneVPL/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64" - -IUSE="dri drm examples experimental +tools test vaapi wayland X" -RESTRICT="!test? ( test )" -# Most of these flags only have an effect on the tools -REQUIRED_USE=" - dri? ( X drm ) - drm? ( tools ) - X? ( tools vaapi ) - wayland? ( tools drm ) - vaapi? ( tools ) -" - -BDEPEND="virtual/pkgconfig" -DEPEND=" - x11-libs/libpciaccess - vaapi? ( media-libs/libva[X?,wayland?,drm(+)?] ) - drm? ( x11-libs/libdrm ) - wayland? ( - dev-libs/wayland - dev-libs/wayland-protocols - ) - X? ( - x11-libs/libX11 - x11-libs/libxcb - ) -" -RDEPEND="${DEPEND}" - -src_configure() { - local mycmakeargs=( - -DBUILD_SHARED_LIBS=ON - -DBUILD_DISPATCHER=ON - # Headers, cmake and pkgconfig files - -DBUILD_DEV=ON - -DBUILD_EXAMPLES="$(usex examples)" - -DINSTALL_EXAMPLE_CODE="$(usex examples)" - -DBUILD_PREVIEW="$(usex experimental)" - -DBUILD_DISPATCHER_ONEVPL_EXPERIMENTAL="$(usex experimental)" - # Fails to build with experimental tools off if tools on - -DBUILD_TOOLS_ONEVPL_EXPERIMENTAL="$(usex tools)" - -DBUILD_TESTS="$(usex test)" - -DBUILD_TOOLS="$(usex tools)" - -DENABLE_WAYLAND="$(usex wayland)" - -DENABLE_X11="$(usex X)" - -DENABLE_DRI3="$(usex dri)" - -DENABLE_VA="$(usex vaapi)" - -DENABLE_DRM="$(usex drm)" - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" - -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc" - ) - cmake_src_configure -} - -src_install() { - cmake_src_install - # Remove these license files - rm -r "${ED}/usr/share/vpl/licensing" || die -} - -pkg_postinst() { - optfeature_header "This package provides only the dispatcher, to use it install one or more implementations" - optfeature "CPUs" media-libs/oneVPL-cpu - optfeature "Intel GPUs newer then, and including, Intel Xe" media-libs/oneVPL-intel-gpu - optfeature "Intel GPUs older then Intel Xe" media-libs/intel-mediasdk -} -- cgit v1.2.3-65-gdbad