public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/luminance-hdr/, media-gfx/luminance-hdr/files/
Date: Tue, 21 Jan 2025 22:16:37 +0000 (UTC)	[thread overview]
Message-ID: <1737497787.928a5281e126a34329defbab20da957621d48e10.asturm@gentoo> (raw)

commit:     928a5281e126a34329defbab20da957621d48e10
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 21 20:55:09 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Jan 21 22:16:27 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=928a5281

media-gfx/luminance-hdr: Fix build w/ boost-1.87

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../luminance-hdr-2.6.1.1-clamp-redefinition.patch | 18 +++++
 ...e-hdr-2.6.1.1-compilersettings-and-openmp.patch | 82 ++++++++++++++++++++++
 .../luminance-hdr/luminance-hdr-2.6.1.1-r2.ebuild  |  8 +--
 3 files changed, 104 insertions(+), 4 deletions(-)

diff --git a/media-gfx/luminance-hdr/files/luminance-hdr-2.6.1.1-clamp-redefinition.patch b/media-gfx/luminance-hdr/files/luminance-hdr-2.6.1.1-clamp-redefinition.patch
new file mode 100644
index 000000000000..121a4403b688
--- /dev/null
+++ b/media-gfx/luminance-hdr/files/luminance-hdr-2.6.1.1-clamp-redefinition.patch
@@ -0,0 +1,18 @@
+diff --git a/src/Libpfs/manip/gamma_levels.cpp b/src/Libpfs/manip/gamma_levels.cpp
+index 67975111..c0fb1798 100644
+--- a/src/Libpfs/manip/gamma_levels.cpp
++++ b/src/Libpfs/manip/gamma_levels.cpp
+@@ -31,13 +31,6 @@
+ 
+ namespace {
+ 
+-template <typename T>
+-inline T clamp(const T &v, const T &lower_bound, const T &upper_bound) {
+-    if (v <= lower_bound) return lower_bound;
+-    if (v >= upper_bound) return upper_bound;
+-    return v;
+-}
+-
+ ////! \note I assume that *in* contains only value between [0,1]
+ // void gamma_levels_array(const pfs::Array2D* in, pfs::Array2D* out,
+ //                        float black_in, float white_in,

diff --git a/media-gfx/luminance-hdr/files/luminance-hdr-2.6.1.1-compilersettings-and-openmp.patch b/media-gfx/luminance-hdr/files/luminance-hdr-2.6.1.1-compilersettings-and-openmp.patch
new file mode 100644
index 000000000000..3d3d59bb0166
--- /dev/null
+++ b/media-gfx/luminance-hdr/files/luminance-hdr-2.6.1.1-compilersettings-and-openmp.patch
@@ -0,0 +1,82 @@
+From b44ecdcbfdf4ee1eca2fdb431dfb7dfd63cc8b1f Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Tue, 21 Jan 2025 21:37:28 +0100
+Subject: [PATCH] CMake: Cleanup CompilerSettings.cmake
+
+>C++11 is a given, so don't tie down to now old standard;
+fixes build w/ boost-1.87
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ build_files/Modules/CompilerSettings.cmake | 49 ++++------------------
+ 1 file changed, 8 insertions(+), 41 deletions(-)
+
+diff --git a/build_files/Modules/CompilerSettings.cmake b/build_files/Modules/CompilerSettings.cmake
+index 76dbc219..5e25a718 100644
+--- a/build_files/Modules/CompilerSettings.cmake
++++ b/build_files/Modules/CompilerSettings.cmake
+@@ -9,53 +9,20 @@ ADD_DEFINITIONS(-march=core2)
+ ENDIF()
+ ENDIF()
+ 
+-#Activate C++11 support, when available
+-if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
+-    add_definitions(-DBRANCH_PREDICTION)
+-    execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
+-    if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)
+-        message(STATUS "C++11 activated for GCC ${GCC_VERSION}")
+-        set(CMAKE_CXX_STANDARD 11)
+-        add_definitions(-DLHDR_CXX11_ENABLED)
+-    elseif(GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3)
+-        message(WARNING "C++0x activated for GCC ${GCC_VERSION}. If you get any errors update to a compiler that fully supports C++11")
+-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")  # add_definitions("-std=gnu++0x")
+-        add_definitions(-DLHDR_CXX11_ENABLED)
+-    else()
+-        message(WARNING "C++11 NOT available. GCC >= 4.3 is needed.")
+-    endif()
+-elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+-    message(STATUS "C++11 activated for Clang")
+-    set(CMAKE_CXX_STANDARD 11)
++set(CMAKE_CXX_STANDARD 20)
++add_definitions(-DLHDR_CXX11_ENABLED)
++add_definitions(-DBRANCH_PREDICTION)
++if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+     if (APPLE)
+         set(CMAKE_EXE_LINKER_FLAGS "-lc++abi -stdlib=libc++ -rpath @loader_path/../Frameworks/")
+-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+     endif()
+-    add_definitions(-DLHDR_CXX11_ENABLED)
+-    add_definitions(-DBRANCH_PREDICTION)
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnull-dereference -Wdelete-non-virtual-dtor -Wsign-compare -Wswitch")
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wreturn-type -Wself-assign -Wunused-argument -Wunused-function -Wtautological-compare")
+-    #OpenMP support under Linux with clang
+-    if (UNIX)
+-        FIND_PACKAGE(OpenMP REQUIRED)
+-        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+-        SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+-    endif()
+-elseif(MSVC)
+-    message(STATUS "C++11 is active by default on Microsoft Visual Studio")
+-    add_definitions(-DLHDR_CXX11_ENABLED)
+-else()
+-    message(WARNING "Your C++ compiler does not support C++11.")
+ endif()
+-#OpenMP Support under Linux, Windows with MSVC & MacOS X with GCC >= 4.3
+-IF(MSVC)
+-    FIND_PACKAGE(OpenMP REQUIRED)
+-    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+-    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+-ELSEIF(CMAKE_COMPILER_IS_GNUCC AND UNIX)
+-    EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
+-    IF(GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3)
+-        MESSAGE(STATUS "GCC >= 4.3")
++
++OPTION(USE_OPENMP "Use openmp threading support." ON)
++IF(USE_OPENMP)
++    IF(MSVC OR UNIX)
+         FIND_PACKAGE(OpenMP REQUIRED)
+         SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+         SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+-- 
+2.45.3
+

diff --git a/media-gfx/luminance-hdr/luminance-hdr-2.6.1.1-r2.ebuild b/media-gfx/luminance-hdr/luminance-hdr-2.6.1.1-r2.ebuild
index 936f8848ccfc..69be0239138b 100644
--- a/media-gfx/luminance-hdr/luminance-hdr-2.6.1.1-r2.ebuild
+++ b/media-gfx/luminance-hdr/luminance-hdr-2.6.1.1-r2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit cmake toolchain-funcs flag-o-matic xdg-utils
+inherit cmake toolchain-funcs xdg-utils
 
 DESCRIPTION="Graphical user interface that provides a workflow for HDR imaging"
 HOMEPAGE="http://qtpfsgui.sourceforge.net https://github.com/LuminanceHDR/LuminanceHDR"
@@ -50,8 +50,10 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-2.6.0-cmake.patch
 	"${FILESDIR}"/${PN}-2.6.0-no-git.patch
 	"${FILESDIR}"/${PN}-2.6.0-docs.patch
-	"${FILESDIR}"/${PN}-2.5.1-openmp-automagic.patch
 	"${FILESDIR}"/${PN}-2.6.1.1-boost-1.85.patch
+	# downstream; fix build w/ boost-1.87, openmp automagic
+	"${FILESDIR}"/${P}-clamp-redefinition.patch
+	"${FILESDIR}"/${P}-compilersettings-and-openmp.patch
 	# patch by ArchLinux
 	"${FILESDIR}"/${P}-exiv2-0.28.patch
 	# inspired by FreeBSD
@@ -67,8 +69,6 @@ pkg_setup() {
 }
 
 src_configure() {
-	append-flags -std=c++17
-
 	local mycmakeargs=(
 		-DWITH_HELPBROWSER=OFF
 		$(cmake_use_find_package fits CFITSIO)


             reply	other threads:[~2025-01-21 22:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-21 22:16 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-28 16:11 [gentoo-commits] repo/gentoo:master commit in: media-gfx/luminance-hdr/, media-gfx/luminance-hdr/files/ Andreas Sturmlechner
2023-06-08 14:05 Andreas Sturmlechner
2019-11-13 21:25 Andreas Sturmlechner
2018-12-29 13:32 Andreas Sturmlechner
2018-06-16  7:04 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=1737497787.928a5281e126a34329defbab20da957621d48e10.asturm@gentoo \
    --to=asturm@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