diff options
author | Karlson2k (Evgeny Grin) <k2k@narod.ru> | 2021-03-25 16:36:24 +0300 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-03-26 15:54:45 +0000 |
commit | d5a533d08c969e1f0d40013216d509ce36849fce (patch) | |
tree | dc341f78cafa09b94b0485938056714081dedd74 /x11-libs | |
parent | dev-libs/libpfm: x86 stable wrt bug #773208 (diff) | |
download | gentoo-d5a533d08c969e1f0d40013216d509ce36849fce.tar.gz gentoo-d5a533d08c969e1f0d40013216d509ce36849fce.tar.bz2 gentoo-d5a533d08c969e1f0d40013216d509ce36849fce.zip |
x11-libs/libva-intel-media-driver: new '_pre' version
Dropped unneeded dependency.
New 'custom-cflags' patch. '-msse4.1' is not needed anymore and handled
correctly by upstream.
Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru>
Closes: https://github.com/gentoo/gentoo/pull/20113
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'x11-libs')
4 files changed, 154 insertions, 4 deletions
diff --git a/x11-libs/libva-intel-media-driver/Manifest b/x11-libs/libva-intel-media-driver/Manifest index 072e9605b897..847748bc1d02 100644 --- a/x11-libs/libva-intel-media-driver/Manifest +++ b/x11-libs/libva-intel-media-driver/Manifest @@ -1,3 +1,4 @@ DIST intel-media-20.1.1.tar.gz 21788401 BLAKE2B 53f2ebf5941c487253d02d0e23229cd408eb3b53ef37cfdefb1a874e5a6c9b051b69ccda513c2d1d9bb9cc03814bc3db40a40241eb3c7a0a78edba3ba7e9bf01 SHA512 696f3b82d155e472285150b476daf9195ec6cbad0526f017fd0c57c1fb02618210b3e96eb13351ee286f3502df4970a22a940c3476877fa1f5c23dc85a646c25 DIST intel-media-20.2.0.tar.gz 21860711 BLAKE2B df5ebb4ec603902dd34aca6915dab5bec4ad6237e5810d0e04349f7269adf62505afaed8456d1ad6a3544525bdb2012294e6b92e68dc3f0338f6fab54aa934bd SHA512 0f4817b66f4e2d752d5a34cc1c8974dd09b4fe4f6d8bf3df896887542c229088edc406a9b2a68a9b353214aa7ffa4cd8917cdb6695dbe2e316af6c444822b15b DIST intel-media-20.4.5.tar.gz 22437981 BLAKE2B 136be5280b463879e47ce8a1dae1befbe3907a2429b799b972dffbdcb8b21512e3161dc209abf7b4dfb0d3695512963c40cdd85fb6fb2f3158bee12e8e42ddcd SHA512 dfd70dc83eae181830844f9055ad728d91a51a55ea29ea5d272b154f16a92dfba86568d9b4e8f8c56d500582056b73602c999d2e877386fcf46df1633fc5e2ea +DIST intel-media-21.1.2.tar.gz 22487027 BLAKE2B 819b7c4a4fc9295034af77f1e95d4b23ca974629f0ff70f14d84c881fa8ae2558708878e045b700fef30bb28a1af9ec61306854e91d0df4881e7d9dc229715b2 SHA512 046942ebedad2e40de3c592ed92bd7d266402f1f94d30ee7674adcb147774f6d90af18c56a19a8d16465144a7bded9cc7b6eeefdeb50f349c7d3ef6840c30ea4 diff --git a/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-21.1.2_custom_cflags.patch b/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-21.1.2_custom_cflags.patch new file mode 100644 index 000000000000..4aebd7cdc032 --- /dev/null +++ b/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-21.1.2_custom_cflags.patch @@ -0,0 +1,87 @@ + Prevent overriding of user-defined CFLAGS. + + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -52,6 +52,8 @@ option (BUILD_CMRTLIB "Build and Install cmrtlib together with media driver" ON) + + option (ENABLE_PRODUCTION_KMD "Enable Production KMD header files" OFF) + ++option (OVERRIDE_COMPILER_FLAGS "Override user compiler FLAGS and use lib defaults" ON) ++ + include(GNUInstallDirs) + + if (BUILD_CMRTLIB) +--- a/cmrtlib/linux/CMakeLists.txt ++++ b/cmrtlib/linux/CMakeLists.txt +@@ -33,15 +33,19 @@ endif() + + # Set up compile options that will be used for the Linux build + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CPP_STANDARD_OPTION} -fPIC -fpermissive -fstack-protector-all -Werror") ++if (OVERRIDE_COMPILER_FLAGS) + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1") + endif() ++endif(OVERRIDE_COMPILER_FLAGS) + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-strict-aliasing -D_FORTIFY_SOURCE=2") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -D__DEBUG -O0") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CPP_STANDARD_OPTION} -fPIC -fpermissive -fstack-protector-all -Werror") ++if (OVERRIDE_COMPILER_FLAGS) + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.1") + endif() ++endif(OVERRIDE_COMPILER_FLAGS) + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fno-strict-aliasing -D_FORTIFY_SOURCE=2") + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -D__DEBUG -O0") + +--- a/media_driver/cmake/linux/media_compile_flags_linux.cmake ++++ b/media_driver/cmake/linux/media_compile_flags_linux.cmake +@@ -51,16 +51,26 @@ set(MEDIA_COMPILER_FLAGS_COMMON + -fdata-sections + -ffunction-sections + -Wl,--gc-sections ++) + ++if (OVERRIDE_COMPILER_FLAGS) ++ list (APPEND MEDIA_COMPILER_FLAGS_COMMON + # -m32 or -m64 + -m${ARCH} ++) ++endif(OVERRIDE_COMPILER_FLAGS) + ++list (APPEND MEDIA_COMPILER_FLAGS_COMMON + # Global defines + -DLINUX=1 + -DLINUX + -DNO_RTTI + -DNO_EXCEPTION_HANDLING + -DINTEL_NOT_PUBLIC ++) ++ ++if (OVERRIDE_COMPILER_FLAGS) ++ list (APPEND MEDIA_COMPILER_FLAGS_COMMON + -g + ) + +@@ -73,6 +83,7 @@ if(${UFO_MARCH} STREQUAL "slm") + -mtune=atom + ) + endif() ++endif(OVERRIDE_COMPILER_FLAGS) + + if(${ARCH} STREQUAL "64") + set(MEDIA_COMPILER_FLAGS_COMMON +@@ -189,9 +200,11 @@ include(${MEDIA_EXT_CMAKE}/ext/linux/media_compile_flags_linux_ext.cmake OPTIONA + if(${PLATFORM} STREQUAL "linux") + #set predefined compiler flags set + add_compile_options("${MEDIA_COMPILER_FLAGS_COMMON}") ++if (OVERRIDE_COMPILER_FLAGS) + add_compile_options("$<$<CONFIG:Debug>:${MEDIA_COMPILER_FLAGS_DEBUG}>") + add_compile_options("$<$<CONFIG:Release>:${MEDIA_COMPILER_FLAGS_RELEASE}>") + add_compile_options("$<$<CONFIG:ReleaseInternal>:${MEDIA_COMPILER_FLAGS_RELEASEINTERNAL}>") ++endif(OVERRIDE_COMPILER_FLAGS) + + foreach (flag ${MEDIA_COMPILER_CXX_FLAGS_COMMON}) + SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}") + + diff --git a/x11-libs/libva-intel-media-driver/libva-intel-media-driver-21.1.2_pre.ebuild b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-21.1.2_pre.ebuild new file mode 100644 index 000000000000..d8a7364723b3 --- /dev/null +++ b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-21.1.2_pre.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +if [[ ${PV} == *9999 ]] ; then + : ${EGIT_REPO_URI:="https://github.com/intel/media-driver"} + if [[ ${PV%9999} != "" ]] ; then + : ${EGIT_BRANCH:="release/${PV%.9999}"} + fi + inherit git-r3 +else + MY_PV="${PV%_pre}" + SRC_URI="https://github.com/intel/media-driver/archive/intel-media-${MY_PV}.tar.gz" + S="${WORKDIR}/media-driver-intel-media-${MY_PV}" + KEYWORDS="~amd64" +fi + +DESCRIPTION="Intel Media Driver for VAAPI (iHD)" +HOMEPAGE="https://github.com/intel/media-driver" + +LICENSE="MIT BSD" +SLOT="0" +IUSE="+custom-cflags set-as-default test X" + +RESTRICT="!test? ( test )" + +DEPEND=">=media-libs/gmmlib-20.4.1 + >=x11-libs/libva-2.10.0[X?] +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-20.2.0_x11_optional.patch + "${FILESDIR}"/${PN}-21.1.2_custom_cflags.patch + "${FILESDIR}"/${PN}-20.4.5_testing_in_src_test.patch +) + +src_configure() { + local mycmakeargs=( + -DMEDIA_BUILD_FATAL_WARNINGS=OFF + -DMEDIA_RUN_TEST_SUITE=$(usex test) + -DBUILD_TYPE=Release + -DPLATFORM=linux + -DUSE_X11=$(usex X) + -DLATEST_CPP_NEEDED=ON # Seems to be the best option for now + -DOVERRIDE_COMPILER_FLAGS=$(usex !custom-cflags) + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + if use set-as-default ; then + echo 'LIBVA_DRIVER_NAME="iHD"' > "${T}/55libva-intel-media-driver" || die + doenvd "${T}/55libva-intel-media-driver" + fi +} diff --git a/x11-libs/libva-intel-media-driver/libva-intel-media-driver-9999.ebuild b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-9999.ebuild index 33551ed4938f..d8a7364723b3 100644 --- a/x11-libs/libva-intel-media-driver/libva-intel-media-driver-9999.ebuild +++ b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-9999.ebuild @@ -12,8 +12,9 @@ if [[ ${PV} == *9999 ]] ; then fi inherit git-r3 else - SRC_URI="https://github.com/intel/media-driver/archive/intel-media-${PV}.tar.gz" - S="${WORKDIR}/media-driver-intel-media-${PV}" + MY_PV="${PV%_pre}" + SRC_URI="https://github.com/intel/media-driver/archive/intel-media-${MY_PV}.tar.gz" + S="${WORKDIR}/media-driver-intel-media-${MY_PV}" KEYWORDS="~amd64" fi @@ -28,13 +29,12 @@ RESTRICT="!test? ( test )" DEPEND=">=media-libs/gmmlib-20.4.1 >=x11-libs/libva-2.10.0[X?] - >=x11-libs/libpciaccess-0.13.1-r1:= " RDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}"/${PN}-20.2.0_x11_optional.patch - "${FILESDIR}"/${PN}-20.4.5_custom_cflags.patch + "${FILESDIR}"/${PN}-21.1.2_custom_cflags.patch "${FILESDIR}"/${PN}-20.4.5_testing_in_src_test.patch ) |