public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Conrad Kostecki" <conikost@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/gmmlib/, media-libs/gmmlib/files/
Date: Mon, 21 Mar 2022 20:04:28 +0000 (UTC)	[thread overview]
Message-ID: <1647893029.393fb763363e84b84e5a681f334b1cd5f7151dbd.conikost@gentoo> (raw)

commit:     393fb763363e84b84e5a681f334b1cd5f7151dbd
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 21 20:03:49 2022 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Mon Mar 21 20:03:49 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=393fb763

media-libs/gmmlib: add 22.1.1

Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 media-libs/gmmlib/Manifest                         |   1 +
 .../gmmlib/files/gmmlib-22.1.1_custom_cflags.patch | 102 +++++++++++++++++++++
 media-libs/gmmlib/gmmlib-22.1.1.ebuild             |  33 +++++++
 3 files changed, 136 insertions(+)

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
+}


             reply	other threads:[~2022-03-21 20:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21 20:04 Conrad Kostecki [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-11-25 17:07 [gentoo-commits] repo/gentoo:master commit in: media-libs/gmmlib/, media-libs/gmmlib/files/ Matt Turner
2023-06-17  5:42 Sam James
2022-04-23 18:33 Conrad Kostecki
2021-10-30 21:24 Conrad Kostecki
2021-01-14 20:15 Sam James
2021-01-11 18:55 Sam James
2019-11-20 13:56 Andreas Sturmlechner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1647893029.393fb763363e84b84e5a681f334b1cd5f7151dbd.conikost@gentoo \
    --to=conikost@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox