[packages/luminance-hdr] fix passing compiler flags

atler atler at pld-linux.org
Wed Aug 11 00:38:04 CEST 2021


commit 2dad121df5c7f8065742a5abcacb270c1491b4d0
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Aug 11 00:35:11 2021 +0200

    fix passing compiler flags

 buildtype.patch    | 19 +++++++++++++++++++
 luminance-hdr.spec |  5 +++--
 2 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/luminance-hdr.spec b/luminance-hdr.spec
index 83d6634..9c8f7b9 100644
--- a/luminance-hdr.spec
+++ b/luminance-hdr.spec
@@ -14,6 +14,7 @@ License:	GPL v2+
 Group:		X11/Applications/Graphics
 Source0:	http://downloads.sourceforge.net/qtpfsgui/%{name}-%{version}.tar.bz2
 # Source0-md5:	9ac2be847d304f0ddc7089b251825c4d
+Patch0:		buildtype.patch
 URL:		http://qtpfsgui.sourceforge.net/
 BuildRequires:	CCfits-devel
 BuildRequires:	OpenEXR-devel >= 2.0.1
@@ -66,6 +67,7 @@ Luminance HDR - narzędzie do składania obrazów HDR.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 mkdir build
@@ -74,8 +76,7 @@ cd build
 CXXFLAGS="%{rpmcxxflags} -msse2 -DLUMINANCE_USE_SSE=1"
 %endif
 %cmake .. \
-	-DBUILD_SHARED_LIBS:BOOL=OFF \
-	-DCMAKE_BUILD_TYPE=Release
+	-DBUILD_SHARED_LIBS:BOOL=OFF
 
 %{__make}
 
diff --git a/buildtype.patch b/buildtype.patch
new file mode 100644
index 0000000..675e6ff
--- /dev/null
+++ b/buildtype.patch
@@ -0,0 +1,19 @@
+--- luminance-hdr-2.6.0/CMakeLists.txt.orig	2019-06-09 21:18:38.000000000 +0200
++++ luminance-hdr-2.6.0/CMakeLists.txt	2021-08-11 00:17:06.339778891 +0200
+@@ -6,14 +6,14 @@
+ PROJECT("Luminance HDR")
+ 
+ string(TOLOWER ${CMAKE_BUILD_TYPE} LOWERCASE_CMAKE_BUILD_TYPE)
+-if(LOWERCASE_CMAKE_BUILD_TYPE MATCHES "^(debug|release|relwithdebinfo|minsizerel)$")
++if(LOWERCASE_CMAKE_BUILD_TYPE MATCHES "^(debug|release|relwithdebinfo|minsizerel|pld)$")
+     message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+ else()
+     message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}\n"
+         "CMAKE_BUILD_TYPE should be one of:\nDebug, Release, RelWithDebInfo, MinSizeRel")
+ endif()
+ 
+-if(LOWERCASE_CMAKE_BUILD_TYPE MATCHES "^(release|minsizerel)$")
++if(LOWERCASE_CMAKE_BUILD_TYPE MATCHES "^(release|minsizerel|pld)$")
+     message(STATUS "Adding definitions: -DQT_NO_DEBUG_OUTPUT")
+     add_definitions("-DQT_NO_DEBUG_OUTPUT")
+ endif()
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/luminance-hdr.git/commitdiff/42b554cc6753c1057bff0c952ae5159ec61bc626



More information about the pld-cvs-commit mailing list