commit:     6a8f51284ca0c8da27639e46a3c47dd0bd5ef097
Author:     Filip Kobierski <fkobi <AT> pm <DOT> me>
AuthorDate: Sat Dec 14 15:01:47 2024 +0000
Commit:     Nowa Ammerlaan <nowa <AT> gentoo <DOT> org>
CommitDate: Thu Dec 19 15:07:05 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a8f5128

media-libs/libvpl: add 2.13.0-r1 that does not fortify source

Signed-off-by: Filip Kobierski <fkobi <AT> pm.me>
Signed-off-by: Nowa Ammerlaan <nowa <AT> gentoo.org>

 .../libvpl-2.13.0_do-not-fortify-source.patch      | 23 ++++++++++
 media-libs/libvpl/libvpl-2.13.0-r1.ebuild          | 53 ++++++++++++++++++++++
 2 files changed, 76 insertions(+)

diff --git a/media-libs/libvpl/files/libvpl-2.13.0_do-not-fortify-source.patch 
b/media-libs/libvpl/files/libvpl-2.13.0_do-not-fortify-source.patch
new file mode 100644
index 000000000000..94fd05d1a7e8
--- /dev/null
+++ b/media-libs/libvpl/files/libvpl-2.13.0_do-not-fortify-source.patch
@@ -0,0 +1,23 @@
+From: Filip Kobierski <[email protected]>
+
+---
+ cmake/CompileOptions.cmake | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/cmake/CompileOptions.cmake b/cmake/CompileOptions.cmake
+index 02926c4..bba557d 100644
+--- a/cmake/CompileOptions.cmake
++++ b/cmake/CompileOptions.cmake
+@@ -51,9 +51,6 @@ else()
+   add_compile_options("-Werror=format-security")
+   if(NOT MINGW)
+     string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
+-    if(NOT CMAKE_BUILD_TYPE MATCHES debug)
+-      add_definitions("-D_FORTIFY_SOURCE=2")
+-    endif()
+   endif()
+   if(NOT MINGW)
+     add_compile_options("-fstack-protector-strong")
+-- 
+2.45.2
+

diff --git a/media-libs/libvpl/libvpl-2.13.0-r1.ebuild 
b/media-libs/libvpl/libvpl-2.13.0-r1.ebuild
new file mode 100644
index 000000000000..78694b54c476
--- /dev/null
+++ b/media-libs/libvpl/libvpl-2.13.0-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib optfeature flag-o-matic
+
+DESCRIPTION="Intel Video Processing Library dispatcher"
+HOMEPAGE="https://github.com/intel/libvpl";
+SRC_URI="https://github.com/intel/libvpl/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/2"
+KEYWORDS="~amd64"
+
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       x11-libs/libpciaccess[${MULTILIB_USEDEP}]
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.13.0_do-not-fortify-source.patch )
+
+src_prepare() {
+       filter-lto
+       cmake_src_prepare
+}
+
+multilib_src_configure() {
+       local mycmakeargs=(
+               -DBUILD_SHARED_LIBS=ON
+               -DBUILD_TESTS="$(usex test)"
+               -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/vpl-gpu-rt
+       optfeature "Intel GPUs older then Intel Xe" media-libs/intel-mediasdk
+}

Reply via email to