gentoo-ebuilds/media-libs/x265/files/x265-3.6-cmake-cleanup.patch
Paul Zander e3a0d61649
media-libs/x265: allow building with c++17, small ebuild fixes
The new x265-3.5-r5-cpp-std.patch disabled setting c++98 or c++11 as versions.
This made newer compilers default to c++17 and thus `register` a unused and
reserved keyword.

While on it fix some obvious things that might cause problems:
	one shadowed variable
  use std::abs	in place of abs so we don't accidentally truncate values
	use boolean instead of bitwise comparison when comparing bool

Move ENABLE_CLI=OFF for non native multilib builds to make it clearer.
Don't set ENABLE_TESTS=no on platforms where we set ENABLE_ASSEMBLY=OFF, because
it requires it to be ON and this the option is never created.

Closes: https://bugs.gentoo.org/938515
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/38289
Signed-off-by: Sam James <sam@gentoo.org>
2024-08-26 21:50:26 +01:00

47 lines
1.5 KiB
Diff

From d6b009be2aa62c679ea994125c02310d4b8d401b Mon Sep 17 00:00:00 2001
From: Paul Zander <negril.nx+gentoo@gmail.com>
Date: Mon, 26 Aug 2024 14:23:49 +0200
Subject: [PATCH 1/2] cmake: cleanup old policies
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,18 +6,9 @@ if(NOT CMAKE_BUILD_TYPE)
FORCE)
endif()
message(STATUS "cmake version ${CMAKE_VERSION}")
-if(POLICY CMP0025)
- cmake_policy(SET CMP0025 OLD) # report Apple's Clang as just Clang
-endif()
-if(POLICY CMP0042)
- cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH
-endif()
-if(POLICY CMP0054)
- cmake_policy(SET CMP0054 OLD) # Only interpret if() arguments as variables or keywords when unquoted
-endif()
+cmake_minimum_required (VERSION 3.28) # OBJECT libraries require 2.8.8
project (x265)
-cmake_minimum_required (VERSION 2.8.8) # OBJECT libraries require 2.8.8
include(CheckIncludeFiles)
include(CheckFunctionExists)
include(CheckSymbolExists)
From 701cc9679e9453cc94afac7904657262109e56b5 Mon Sep 17 00:00:00 2001
From: Paul Zander <negril.nx+gentoo@gmail.com>
Date: Mon, 26 Aug 2024 14:23:59 +0200
Subject: [PATCH 2/2] cmake: fix nasm warning
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
--- a/cmake/FindNasm.cmake
+++ b/cmake/FindNasm.cmake
@@ -20,6 +20,6 @@ if(NASM_EXECUTABLE)
endif()
# Provide standardized success/failure messages
-find_package_handle_standard_args(nasm
+find_package_handle_standard_args(Nasm
REQUIRED_VARS NASM_EXECUTABLE
VERSION_VAR NASM_VERSION_STRING)