summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2022-03-21 21:03:49 +0100
committerConrad Kostecki <conikost@gentoo.org>2022-03-21 21:03:49 +0100
commit393fb763363e84b84e5a681f334b1cd5f7151dbd (patch)
treeefb81a851c067479bc4c19e8a6b088aa31a78006 /media-libs/gmmlib
parentsys-auth/AusweisApp2: drop 1.22.3 (diff)
downloadgentoo-393fb763363e84b84e5a681f334b1cd5f7151dbd.tar.gz
gentoo-393fb763363e84b84e5a681f334b1cd5f7151dbd.tar.bz2
gentoo-393fb763363e84b84e5a681f334b1cd5f7151dbd.zip
media-libs/gmmlib: add 22.1.1
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'media-libs/gmmlib')
-rw-r--r--media-libs/gmmlib/Manifest1
-rw-r--r--media-libs/gmmlib/files/gmmlib-22.1.1_custom_cflags.patch102
-rw-r--r--media-libs/gmmlib/gmmlib-22.1.1.ebuild33
3 files changed, 136 insertions, 0 deletions
diff --git a/media-libs/gmmlib/Manifest b/media-libs/gmmlib/Manifest
index 918847298cfb..4a2b14e99b5f 100644
--- a/media-libs/gmmlib/Manifest
+++ b/media-libs/gmmlib/Manifest
@@ -1,2 +1,3 @@
DIST intel-gmmlib-22.0.2.tar.gz 757146 BLAKE2B 1a1045fea6cb5f3b56732febccaa50b45a8d7019b7977a8edd99e3ebadd53449a70de23e28d1518a41b0e875bd9d879fde424bc7cd9760253084d518e2b29f0d SHA512 87c43a6f730ac13301f2ce0ec75dcd160bfa7a44d32480544f534519937744e618143831e207d3461a6a9dc7409adefd32c318bd8776939599d367a4c4bd9b4a
DIST intel-gmmlib-22.0.3.tar.gz 757738 BLAKE2B 37247195cfbfa787f8f0d9c4541bb03034a492a2edc4f8747740abecd5519f7803048d3be1f7f26965d78121deb2865e703764e8f1aeb8b9d944ab0967453da7 SHA512 ee4d51153e498540ba1528d7f1f792ff7c6b3684a38094af41ca323b0467e30b231ac346411aa12efd53cbc5f4dfb83869472a03181669e79074f3fcdf2c1e9d
+DIST intel-gmmlib-22.1.1.tar.gz 813482 BLAKE2B 756741d0624a55a9ec3fdcf42a3d98a7e396424901f9035d1540c42f4b5bac281c1eb6dcc3753e0495fb52597a5b90f831cb7c5ef7fc4e5b0014b5cfe9584001 SHA512 5640d3d2b01ffa980be867d63bacefef5a241ca7dc3a1f39d48f9538cfefcc7274f40e3cc259c958e0f5abd1d12edd4e64377dbc245962781c6f0dd922ab298e
diff --git a/media-libs/gmmlib/files/gmmlib-22.1.1_custom_cflags.patch b/media-libs/gmmlib/files/gmmlib-22.1.1_custom_cflags.patch
new file mode 100644
index 000000000000..d4acb515bf3d
--- /dev/null
+++ b/media-libs/gmmlib/files/gmmlib-22.1.1_custom_cflags.patch
@@ -0,0 +1,102 @@
+Prevent overriding of user-define CFLAGS, including -march flag.
+The flag -msse4.1 is required otherwise compile will not be able to inline sse4.1 code.
+Note: code should detect CPU features at runtime and use sse4.1 paths only if supported by CPU.
+
+--- a/Source/GmmLib/CMakeLists.txt
++++ b/Source/GmmLib/CMakeLists.txt
+@@ -74,6 +74,10 @@
+ endif()
+ endif()
+
++if(NOT DEFINED OVERRIDE_COMPILER_FLAGS)
++ option(OVERRIDE_COMPILER_FLAGS "Override user compiler FLAGS and use lib defaults" ON)
++endif()
++
+ # begin -- label bldsys file prologue
+ # WARNING: The "project" statement triggers reading of CMAKE_TOOLCHAIN_FILE
+ # and so must precede the inclusion below of bs_init.cmake .
+--- a/Source/GmmLib/Linux.cmake
++++ b/Source/GmmLib/Linux.cmake
+@@ -76,7 +76,10 @@
+ -Werror=format-security
+ -Werror=non-virtual-dtor
+ -Werror=return-type
++ )
+
++if (OVERRIDE_COMPILER_FLAGS)
++ list (APPEND GMMLIB_COMPILER_FLAGS_COMMON
+ # General optimization options
+ -march=${GMMLIB_MARCH}
+ -mpopcnt
+@@ -85,19 +88,31 @@
+ -msse3
+ -mssse3
+ -msse4
+- -msse4.1
+ -msse4.2
++ )
++endif()
++
++list (APPEND GMMLIB_COMPILER_FLAGS_COMMON
++ -msse4.1 # SSE4.1 compiler support is required to build
+ -mfpmath=sse
+ -finline-functions
+ -fno-short-enums
+ -Wa,--noexecstack
+ -fno-strict-aliasing
++ )
++
++if (OVERRIDE_COMPILER_FLAGS)
++ list (APPEND GMMLIB_COMPILER_FLAGS_COMMON
+ # Common defines
+ -DUSE_MMX
+ -DUSE_SSE
+ -DUSE_SSE2
+ -DUSE_SSE3
+ -DUSE_SSSE3
++ )
++endif()
++
++list (APPEND GMMLIB_COMPILER_FLAGS_COMMON
+ # Other common flags
+ -fstack-protector
+ -fdata-sections
+@@ -105,11 +120,16 @@
+ -fmessage-length=0
+ -fvisibility=hidden
+ -fPIC
++ )
++
++if (OVERRIDE_COMPILER_FLAGS)
++ list (APPEND GMMLIB_COMPILER_FLAGS_COMMON
+ -g
+ # -m32 or -m64
+ -m${GMMLIB_ARCH}
+ )
+ endif()
++endif()
+
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+ #Gcc only flags
+@@ -167,10 +187,12 @@
+
+ #set predefined compiler flags set
+ add_compile_options("${GMMLIB_COMPILER_FLAGS_COMMON}")
++if (OVERRIDE_COMPILER_FLAGS)
+ add_compile_options("$<$<CONFIG:Debug>:${GMMLIB_COMPILER_FLAGS_DEBUG}>")
+ add_compile_options("$<$<CONFIG:Release>:${GMMLIB_COMPILER_FLAGS_RELEASE}>")
+ add_compile_options("$<$<CONFIG:ReleaseInternal>:${GMMLIB_COMPILER_FLAGS_RELEASEINTERNAL}>")
+ #cmake 3.3+, add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:${GMMLIB_COMPILER_CXX_FLAGS_COMMON}>")
++endif()
+ foreach (flag ${GMMLIB_COMPILER_CXX_FLAGS_COMMON})
+ SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
+ endforeach()
+@@ -179,6 +201,8 @@
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
+ SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
+ else()
++ if (OVERRIDE_COMPILER_FLAGS)
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m${GMMLIB_ARCH}")
+ SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m${GMMLIB_ARCH}")
++ endif()
+ endif()
diff --git a/media-libs/gmmlib/gmmlib-22.1.1.ebuild b/media-libs/gmmlib/gmmlib-22.1.1.ebuild
new file mode 100644
index 000000000000..f0fd281de976
--- /dev/null
+++ b/media-libs/gmmlib/gmmlib-22.1.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Intel Graphics Memory Management Library"
+HOMEPAGE="https://github.com/intel/gmmlib"
+SRC_URI="https://github.com/intel/gmmlib/archive/intel-${P}.tar.gz"
+S="${WORKDIR}/${PN}-intel-${P}"
+
+KEYWORDS="~amd64"
+LICENSE="MIT"
+SLOT="0/12.1"
+IUSE="+custom-cflags test"
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-20.2.2_conditional_testing.patch
+ "${FILESDIR}"/${PN}-20.3.2_cmake_project.patch
+ "${FILESDIR}"/${PN}-22.1.1_custom_cflags.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_TESTING="$(usex test)"
+ -DBUILD_TYPE="Release"
+ -DOVERRIDE_COMPILER_FLAGS="$(usex !custom-cflags)"
+ )
+
+ cmake_src_configure
+}