* [gentoo-commits] repo/gentoo:master commit in: x11-libs/libva-intel-media-driver/files/, x11-libs/libva-intel-media-driver/
@ 2021-01-04 16:59 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2021-01-04 16:59 UTC (permalink / raw
To: gentoo-commits
commit: 77bf88d00121d5d23f550d91b168a0cbc917ec79
Author: Karlson2k (Evgeny Grin) <k2k <AT> narod <DOT> ru>
AuthorDate: Sun Jan 3 19:04:46 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan 4 16:50:50 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77bf88d0
x11-libs/libva-intel-media-driver: added X USE flag
This patch fixes ambiguous usage of X11 in the package.
Before this patch the package tries to autodetect presence
of X11 in the system and tries to use it if found. However,
presence of X11 headers doesn't grantee that required
packages (libva) were installed with X11 support.
Now result of build depends on USE flags instead of
presence/absence of X11 headers on the build system.
Closes: https://bugs.gentoo.org/743625
Signed-off-by: Karlson2k (Evgeny Grin) <k2k <AT> narod.ru>
Closes: https://github.com/gentoo/gentoo/pull/18933
Signed-off-by: Sam James <sam <AT> gentoo.org>
...va-intel-media-driver-20.2.0_x11_optional.patch | 16 ++++++++
.../libva-intel-media-driver-20.1.1-r1.ebuild | 43 +++++++++++++++++++++
.../libva-intel-media-driver-20.2.0-r1.ebuild | 45 ++++++++++++++++++++++
3 files changed, 104 insertions(+)
diff --git a/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-20.2.0_x11_optional.patch b/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-20.2.0_x11_optional.patch
new file mode 100644
index 00000000000..81c80d80f90
--- /dev/null
+++ b/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-20.2.0_x11_optional.patch
@@ -0,0 +1,16 @@
+--- a/media_driver/media_top_cmake.cmake
++++ b/media_driver/media_top_cmake.cmake
+@@ -21,7 +21,12 @@
+ project( media )
+
+ find_package(PkgConfig)
++if(NOT DEFINED USE_X11 OR USE_X11)
+ find_package(X11)
++endif(NOT DEFINED USE_X11 OR USE_X11)
++if(USE_X11 AND NOT X11_FOUND)
++ message(FATAL_ERROR "Usage of X11 is required by USE_X11 variable, but X11 package is not found")
++endif(USE_X11 AND NOT X11_FOUND)
+
+ bs_set_if_undefined(LIB_NAME iHD_drv_video)
+
+
diff --git a/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.1.1-r1.ebuild b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.1.1-r1.ebuild
new file mode 100644
index 00000000000..51a01699873
--- /dev/null
+++ b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.1.1-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils
+
+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
+ SRC_URI="https://github.com/intel/media-driver/archive/intel-media-${PV}.tar.gz"
+ S="${WORKDIR}/media-driver-intel-media-${PV}"
+ KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Intel Media Driver for VAAPI (iHD)"
+HOMEPAGE="https://github.com/intel/media-driver"
+
+LICENSE="MIT BSD"
+SLOT="0"
+IUSE="X"
+
+PATCHES=( "${FILESDIR}"/${PN}-20.2.0_x11_optional.patch )
+
+DEPEND=">=media-libs/gmmlib-${PV}
+ >=x11-libs/libva-2.7.1[X?]
+ >=x11-libs/libpciaccess-0.13.1-r1:=
+"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ local mycmakeargs=(
+ -DMEDIA_BUILD_FATAL_WARNINGS=OFF
+ -DMEDIA_RUN_TEST_SUITE=OFF
+ -DUSE_X11=$(usex X)
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.2.0-r1.ebuild b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.2.0-r1.ebuild
new file mode 100644
index 00000000000..b05c1a2f948
--- /dev/null
+++ b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.2.0-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils
+
+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
+ SRC_URI="https://github.com/intel/media-driver/archive/intel-media-${PV}.tar.gz"
+ S="${WORKDIR}/media-driver-intel-media-${PV}"
+ KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Intel Media Driver for VAAPI (iHD)"
+HOMEPAGE="https://github.com/intel/media-driver"
+
+LICENSE="MIT BSD"
+SLOT="0"
+IUSE="X"
+
+PATCHES=( "${FILESDIR}"/${PN}-20.2.0_x11_optional.patch )
+
+DEPEND=">=media-libs/gmmlib-20.2.2
+ >=x11-libs/libva-2.8.0[X?]
+ >=x11-libs/libpciaccess-0.13.1-r1:=
+"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ local mycmakeargs=(
+ -DMEDIA_BUILD_FATAL_WARNINGS=OFF
+ -DMEDIA_RUN_TEST_SUITE=OFF
+ -DBUILD_TYPE=release
+ -DPLATFORM=linux
+ -DUSE_X11=$(usex X)
+ )
+
+ cmake-utils_src_configure
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-libs/libva-intel-media-driver/files/, x11-libs/libva-intel-media-driver/
@ 2021-01-11 20:13 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2021-01-11 20:13 UTC (permalink / raw
To: gentoo-commits
commit: fb33477161d568cc01a892ef5e5a1925903cf50e
Author: Karlson2k (Evgeny Grin) <k2k <AT> narod <DOT> ru>
AuthorDate: Fri Jan 8 13:04:50 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan 11 20:13:24 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb334771
x11-libs/libva-intel-media-driver: fixed tests
Signed-off-by: Karlson2k (Evgeny Grin) <k2k <AT> narod.ru>
Closes: https://github.com/gentoo/gentoo/pull/18955
Signed-off-by: Sam James <sam <AT> gentoo.org>
...el-media-driver-20.4.5_tesing_in_src_test.patch | 46 ++++++++++++++++++++++
.../libva-intel-media-driver-20.4.5.ebuild | 7 +++-
.../libva-intel-media-driver-9999.ebuild | 7 +++-
3 files changed, 56 insertions(+), 4 deletions(-)
diff --git a/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-20.4.5_tesing_in_src_test.patch b/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-20.4.5_tesing_in_src_test.patch
new file mode 100644
index 00000000000..5c40f59fc4d
--- /dev/null
+++ b/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-20.4.5_tesing_in_src_test.patch
@@ -0,0 +1,46 @@
+Run tests in src_test() instead of src_compile() and src_install()
+
+---- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -37,6 +37,8 @@ if("${os_name}" STREQUAL "clear-linux-os")
+ set(CMAKE_INSTALL_SYSCONFDIR "usr/share/defaults/etc")
+ endif()
+
++include(CTest)
++
+ include(CMakeDependentOption)
+
+ option (ENABLE_KERNELS "Build driver with shaders (kernels) support" ON)
+--- a/media_driver/linux/ult/CMakeLists.txt
++++ b/media_driver/linux/ult/CMakeLists.txt
+@@ -52,9 +52,3 @@ endif ()
+ add_subdirectory(libdrm_mock)
+ add_subdirectory(ult_app)
+
+-enable_testing()
+-add_test(NAME test_devult COMMAND devult ${UMD_PATH})
+-set_tests_properties(test_devult
+- PROPERTIES PASS_REGULAR_EXPRESSION "PASS")
+-set_tests_properties(test_devult
+- PROPERTIES FAIL_REGULAR_EXPRESSION "FAIL")
+--- a/media_driver/linux/ult/ult_app/CMakeLists.txt
++++ b/media_driver/linux/ult/ult_app/CMakeLists.txt
+@@ -68,13 +68,11 @@ if (DEFINED BYPASS_MEDIA_ULT AND "${BYPASS_MEDIA_ULT}" STREQUAL "yes")
+ message("-- media -- BYPASS_MEDIA_ULT = ${BYPASS_MEDIA_ULT}")
+ else ()
+ if (ENABLE_NONFREE_KERNELS)
+- add_custom_target(RunULT ALL DEPENDS ${LIB_NAME} devult)
+
+- add_custom_command(
+- TARGET RunULT
+- POST_BUILD
+- COMMAND LD_PRELOAD=../libdrm_mock/libdrm_mock.so ./devult ../../../${LIB_NAME}.so
++ add_test(
++ NAME RunULT
++ COMMAND "${CMAKE_COMMAND}" -E env "LD_PRELOAD=${CMAKE_CURRENT_BINARY_DIR}/../libdrm_mock/libdrm_mock.so" "${CMAKE_CURRENT_BINARY_DIR}/devult" "${CMAKE_CURRENT_BINARY_DIR}/../../../${LIB_NAME}.so"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+- COMMENT "Running devult...")
++ )
+ endif ()
+ endif ()
+
diff --git a/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.4.5.ebuild b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.4.5.ebuild
index 6952394b5eb..c43c51fa3c7 100644
--- a/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.4.5.ebuild
+++ b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.4.5.ebuild
@@ -22,11 +22,14 @@ HOMEPAGE="https://github.com/intel/media-driver"
LICENSE="MIT BSD"
SLOT="0"
-IUSE="+custom-cflags set-as-default X"
+IUSE="+custom-cflags set-as-default test X"
+
+RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}"/${PN}-20.2.0_x11_optional.patch
"${FILESDIR}"/${PN}-20.4.5_custom_cflags.patch
+ "${FILESDIR}"/${PN}-20.4.5_tesing_in_src_test.patch
)
DEPEND=">=media-libs/gmmlib-20.4.1
@@ -38,7 +41,7 @@ RDEPEND="${DEPEND}"
src_configure() {
local mycmakeargs=(
-DMEDIA_BUILD_FATAL_WARNINGS=OFF
- -DMEDIA_RUN_TEST_SUITE=OFF
+ -DMEDIA_RUN_TEST_SUITE=$(usex test)
-DBUILD_TYPE=Release
-DPLATFORM=linux
-DUSE_X11=$(usex X)
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 6952394b5eb..c43c51fa3c7 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
@@ -22,11 +22,14 @@ HOMEPAGE="https://github.com/intel/media-driver"
LICENSE="MIT BSD"
SLOT="0"
-IUSE="+custom-cflags set-as-default X"
+IUSE="+custom-cflags set-as-default test X"
+
+RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}"/${PN}-20.2.0_x11_optional.patch
"${FILESDIR}"/${PN}-20.4.5_custom_cflags.patch
+ "${FILESDIR}"/${PN}-20.4.5_tesing_in_src_test.patch
)
DEPEND=">=media-libs/gmmlib-20.4.1
@@ -38,7 +41,7 @@ RDEPEND="${DEPEND}"
src_configure() {
local mycmakeargs=(
-DMEDIA_BUILD_FATAL_WARNINGS=OFF
- -DMEDIA_RUN_TEST_SUITE=OFF
+ -DMEDIA_RUN_TEST_SUITE=$(usex test)
-DBUILD_TYPE=Release
-DPLATFORM=linux
-DUSE_X11=$(usex X)
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-libs/libva-intel-media-driver/files/, x11-libs/libva-intel-media-driver/
@ 2021-01-11 20:13 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2021-01-11 20:13 UTC (permalink / raw
To: gentoo-commits
commit: fc9a6a46c2a9dbd3e0d72a9b30c4bb2a56665f79
Author: Karlson2k (Evgeny Grin) <k2k <AT> narod <DOT> ru>
AuthorDate: Fri Jan 8 13:02:15 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan 11 20:13:24 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc9a6a46
x11-libs/libva-intel-media-driver: "custom-cflags" USE flag
Added USE flags "custom-cflags" to prevent override of user CFLAGS
Compile supported parts of the driver as C++17 code.
Signed-off-by: Karlson2k (Evgeny Grin) <k2k <AT> narod.ru>
Signed-off-by: Sam James <sam <AT> gentoo.org>
...a-intel-media-driver-20.4.5_custom_cflags.patch | 127 +++++++++++++++++++++
.../libva-intel-media-driver-20.4.5.ebuild | 9 +-
.../libva-intel-media-driver-9999.ebuild | 9 +-
x11-libs/libva-intel-media-driver/metadata.xml | 1 +
4 files changed, 142 insertions(+), 4 deletions(-)
diff --git a/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-20.4.5_custom_cflags.patch b/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-20.4.5_custom_cflags.patch
new file mode 100644
index 00000000000..90051719f30
--- /dev/null
+++ b/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-20.4.5_custom_cflags.patch
@@ -0,0 +1,127 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+--- 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)
+diff --git a/cmrtlib/linux/CMakeLists.txt b/cmrtlib/linux/CMakeLists.txt
+--- 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()
+ 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()
+ 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")
+
+diff --git a/media_driver/cmake/linux/media_compile_flags_linux.cmake b/media_driver/cmake/linux/media_compile_flags_linux.cmake
+--- a/media_driver/cmake/linux/media_compile_flags_linux.cmake
++++ b/media_driver/cmake/linux/media_compile_flags_linux.cmake
+@@ -36,7 +36,10 @@ set(MEDIA_COMPILER_FLAGS_COMMON
+ -Werror=format-security
+ -Werror=non-virtual-dtor
+ -Werror=return-type
++)
+
++if (OVERRIDE_COMPILER_FLAGS)
++ list (APPEND MEDIA_COMPILER_FLAGS_COMMON
+ # General optimization options
+ -march=${UFO_MARCH}
+ -mpopcnt
+@@ -48,19 +51,29 @@ set(MEDIA_COMPILER_FLAGS_COMMON
+ -msse4.2
+ -msse4
+ -mfpmath=sse
++)
++endif(OVERRIDE_COMPILER_FLAGS)
++
++list (APPEND MEDIA_COMPILER_FLAGS_COMMON
+ -finline-functions
+ -funswitch-loops
+ -fno-short-enums
+ -Wa,--noexecstack
+ -fno-strict-aliasing
++)
+
++if (OVERRIDE_COMPILER_FLAGS)
++ list (APPEND MEDIA_COMPILER_FLAGS_COMMON
+ # Common defines
+ -DUSE_MMX
+ -DUSE_SSE
+ -DUSE_SSE2
+ -DUSE_SSE3
+ -DUSE_SSSE3
++)
++endif(OVERRIDE_COMPILER_FLAGS)
+
++list (APPEND MEDIA_COMPILER_FLAGS_COMMON
+ # Other common flags
+ -fmessage-length=0
+ -fvisibility=hidden
+@@ -68,16 +81,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
+ )
+
+@@ -90,6 +113,7 @@ if(${UFO_MARCH} STREQUAL "slm")
+ -mtune=atom
+ )
+ endif()
++endif(OVERRIDE_COMPILER_FLAGS)
+
+ if(${ARCH} STREQUAL "64")
+ set(MEDIA_COMPILER_FLAGS_COMMON
+@@ -206,9 +230,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-20.4.5.ebuild b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.4.5.ebuild
index 5806c83688e..6952394b5eb 100644
--- a/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.4.5.ebuild
+++ b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.4.5.ebuild
@@ -22,9 +22,12 @@ HOMEPAGE="https://github.com/intel/media-driver"
LICENSE="MIT BSD"
SLOT="0"
-IUSE="set-as-default X"
+IUSE="+custom-cflags set-as-default X"
-PATCHES=( "${FILESDIR}"/${PN}-20.2.0_x11_optional.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-20.2.0_x11_optional.patch
+ "${FILESDIR}"/${PN}-20.4.5_custom_cflags.patch
+ )
DEPEND=">=media-libs/gmmlib-20.4.1
>=x11-libs/libva-2.10.0[X?]
@@ -39,6 +42,8 @@ src_configure() {
-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
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 5806c83688e..6952394b5eb 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
@@ -22,9 +22,12 @@ HOMEPAGE="https://github.com/intel/media-driver"
LICENSE="MIT BSD"
SLOT="0"
-IUSE="set-as-default X"
+IUSE="+custom-cflags set-as-default X"
-PATCHES=( "${FILESDIR}"/${PN}-20.2.0_x11_optional.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-20.2.0_x11_optional.patch
+ "${FILESDIR}"/${PN}-20.4.5_custom_cflags.patch
+ )
DEPEND=">=media-libs/gmmlib-20.4.1
>=x11-libs/libva-2.10.0[X?]
@@ -39,6 +42,8 @@ src_configure() {
-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
diff --git a/x11-libs/libva-intel-media-driver/metadata.xml b/x11-libs/libva-intel-media-driver/metadata.xml
index 6e208d8929c..dfe0d9d8141 100644
--- a/x11-libs/libva-intel-media-driver/metadata.xml
+++ b/x11-libs/libva-intel-media-driver/metadata.xml
@@ -10,5 +10,6 @@
</maintainer>
<use>
<flag name="set-as-default">Override libva automatic driver selection and set this (iHD) driver as default one.</flag>
+ <flag name="custom-cflags">Do not override user CFLAGS like -02, -march, -msse and similar with lib defaults. Not tested by upstream.</flag>
</use>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-libs/libva-intel-media-driver/files/, x11-libs/libva-intel-media-driver/
@ 2021-03-26 15:55 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2021-03-26 15:55 UTC (permalink / raw
To: gentoo-commits
commit: d5a533d08c969e1f0d40013216d509ce36849fce
Author: Karlson2k (Evgeny Grin) <k2k <AT> narod <DOT> ru>
AuthorDate: Thu Mar 25 13:36:24 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 26 15:54:45 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5a533d0
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 <AT> narod.ru>
Closes: https://github.com/gentoo/gentoo/pull/20113
Signed-off-by: Sam James <sam <AT> gentoo.org>
x11-libs/libva-intel-media-driver/Manifest | 1 +
...a-intel-media-driver-21.1.2_custom_cflags.patch | 87 ++++++++++++++++++++++
... => libva-intel-media-driver-21.1.2_pre.ebuild} | 8 +-
.../libva-intel-media-driver-9999.ebuild | 8 +-
4 files changed, 96 insertions(+), 8 deletions(-)
diff --git a/x11-libs/libva-intel-media-driver/Manifest b/x11-libs/libva-intel-media-driver/Manifest
index 072e9605b89..847748bc1d0 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 00000000000..4aebd7cdc03
--- /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-9999.ebuild b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-21.1.2_pre.ebuild
similarity index 89%
copy from x11-libs/libva-intel-media-driver/libva-intel-media-driver-9999.ebuild
copy to x11-libs/libva-intel-media-driver/libva-intel-media-driver-21.1.2_pre.ebuild
index 33551ed4938..d8a7364723b 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-21.1.2_pre.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
)
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 33551ed4938..d8a7364723b 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
)
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-libs/libva-intel-media-driver/files/, x11-libs/libva-intel-media-driver/
@ 2021-12-02 18:01 Matt Turner
0 siblings, 0 replies; 5+ messages in thread
From: Matt Turner @ 2021-12-02 18:01 UTC (permalink / raw
To: gentoo-commits
commit: 71af24fc8bbdf44f4406f3b51799e135975de6f1
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 23 22:01:01 2021 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Dec 2 18:01:15 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71af24fc
x11-libs/libva-intel-media-driver: Remove IUSE=custom-cflags
This USE flag is wrongly named, at a minimum. It does not prevent the
build system from stripping out user-specified CFLAGS. Instead, it
prevents the build system from adding a few unwanted CFLAGS, like -g and
-m64.
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
...edia-driver-21.4.2-Remove-unwanted-CFLAGS.patch | 43 ++++++++++++++++++++++
.../libva-intel-media-driver-9999.ebuild | 5 +--
2 files changed, 45 insertions(+), 3 deletions(-)
diff --git a/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-21.4.2-Remove-unwanted-CFLAGS.patch b/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-21.4.2-Remove-unwanted-CFLAGS.patch
new file mode 100644
index 000000000000..288fe2d7f517
--- /dev/null
+++ b/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-21.4.2-Remove-unwanted-CFLAGS.patch
@@ -0,0 +1,43 @@
+From f1c5c12d866783f7a3079be440c06fdb8a931ed2 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Tue, 23 Nov 2021 12:28:05 -0800
+Subject: [PATCH] Remove unwanted CFLAGS
+
+---
+ media_driver/cmake/linux/media_compile_flags_linux.cmake | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/media_driver/cmake/linux/media_compile_flags_linux.cmake b/media_driver/cmake/linux/media_compile_flags_linux.cmake
+index 512ef17b..e8ade76d 100755
+--- a/media_driver/cmake/linux/media_compile_flags_linux.cmake
++++ b/media_driver/cmake/linux/media_compile_flags_linux.cmake
+@@ -52,16 +52,12 @@ set(MEDIA_COMPILER_FLAGS_COMMON
+ -ffunction-sections
+ -Wl,--gc-sections
+
+- # -m32 or -m64
+- -m${ARCH}
+-
+ # Global defines
+ -DLINUX=1
+ -DLINUX
+ -DNO_RTTI
+ -DNO_EXCEPTION_HANDLING
+ -DINTEL_NOT_PUBLIC
+- -g
+ )
+
+
+@@ -189,9 +185,6 @@ 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}")
+- 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}>")
+
+ foreach (flag ${MEDIA_COMPILER_CXX_FLAGS_COMMON})
+ SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
+--
+2.32.0
+
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 0a05dcd1c864..b54b915594c7 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
@@ -25,7 +25,7 @@ HOMEPAGE="https://github.com/intel/media-driver"
LICENSE="MIT BSD redistributable? ( no-source-code )"
SLOT="0"
-IUSE="+custom-cflags +redistributable test X"
+IUSE="+redistributable test X"
RESTRICT="!test? ( test )"
@@ -36,7 +36,7 @@ RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}"/${PN}-20.2.0_x11_optional.patch
- "${FILESDIR}"/${PN}-21.2.2_custom_cflags.patch
+ "${FILESDIR}"/${PN}-21.4.2-Remove-unwanted-CFLAGS.patch
"${FILESDIR}"/${PN}-20.4.5_testing_in_src_test.patch
)
@@ -49,7 +49,6 @@ src_configure() {
-DUSE_X11=$(usex X)
-DENABLE_NONFREE_KERNELS=$(usex redistributable)
-DLATEST_CPP_NEEDED=ON # Seems to be the best option for now
- -DOVERRIDE_COMPILER_FLAGS=$(usex !custom-cflags)
)
cmake_src_configure
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-12-02 18:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-02 18:01 [gentoo-commits] repo/gentoo:master commit in: x11-libs/libva-intel-media-driver/files/, x11-libs/libva-intel-media-driver/ Matt Turner
-- strict thread matches above, loose matches on Subject: below --
2021-03-26 15:55 Sam James
2021-01-11 20:13 Sam James
2021-01-11 20:13 Sam James
2021-01-04 16:59 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox