Accepting request 940191 from home:cgiboudeaux:graphics
3.0.0 OBS-URL: https://build.opensuse.org/request/show/940191 OBS-URL: https://build.opensuse.org/package/show/graphics/gmic?expand=0&rev=64
This commit is contained in:
parent
b65edc1a99
commit
cc24ae2ac5
@ -1,91 +0,0 @@
|
|||||||
From f05f07d501710c7e1609ac7348e9190f791f6127 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andreas Schneider <asn@cryptomilk.org>
|
|
||||||
Date: Sun, 7 Nov 2021 19:58:24 +0100
|
|
||||||
Subject: [PATCH] cmake: Set target compile flags correctly
|
|
||||||
|
|
||||||
This will not overwrite what you set with CMAKE_CXX_FLAGS on the
|
|
||||||
command line. Currently flags set by distributions are ignored when
|
|
||||||
packaging gmic.
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 31 ++++++++++++++++++++-----------
|
|
||||||
1 file changed, 20 insertions(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 8c6c4101..63a783f9 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -96,15 +96,15 @@ endif()
|
|
||||||
# compile flags
|
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE True)
|
|
||||||
|
|
||||||
-set(COMPILE_FLAGS "-Dgmic_build -Dcimg_use_vt100 -Dgmic_is_parallel -Dcimg_use_abort")
|
|
||||||
+set(GMIC_CXX_COMPILE_FLAGS "-Dgmic_build -Dcimg_use_vt100 -Dgmic_is_parallel -Dcimg_use_abort")
|
|
||||||
if(APPLE)
|
|
||||||
- set(COMPILE_FLAGS "${COMPILE_FLAGS} -mmacosx-version-min=10.8 -stdlib=libc++ -Wno-error=c++11-narrowing -Wc++11-extensions -fpermissive")
|
|
||||||
+ list(APPEND GMIC_CXX_COMPILE_FLAGS -mmacosx-version-min=10.8 -stdlib=libc++ -Wno-error=c++11-narrowing -Wc++11-extensions -fpermissive)
|
|
||||||
else()
|
|
||||||
- set(COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-error=narrowing -fno-ipa-sra -fpermissive")
|
|
||||||
+ list(APPEND GMIC_CXX_COMPILE_FLAGS -Wno-error=narrowing -fno-ipa-sra -fpermissive)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT "${PRERELEASE_TAG}" STREQUAL "")
|
|
||||||
- set(COMPILE_FLAGS "${COMPILE_FLAGS} -Dgmic_prerelease=\"${PRERELEASE_TAG}\"")
|
|
||||||
+ list(APPEND GMIC_CXX_COMPILE_FLAGS "-Dgmic_prerelease=\"${PRERELEASE_TAG}\"")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (ENABLE_LTO)
|
|
||||||
@@ -126,14 +126,20 @@ if(ENABLE_DYNAMIC_LINKING)
|
|
||||||
set(CMAKE_SKIP_RPATH TRUE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
-set(CMAKE_CXX_FLAGS_DEBUG "-g -ansi -Wall -Wextra -pedantic -Dcimg_verbosity=3 ${COMPILE_FLAGS}")
|
|
||||||
-set(CMAKE_CXX_FLAGS_RELEASE "${COMPILE_FLAGS}")
|
|
||||||
-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g ${COMPILE_FLAGS}")
|
|
||||||
+string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
|
|
||||||
+if (${CMAKE_BUILD_TYPE_LOWER} STREQUAL "debug")
|
|
||||||
+ list(PREPEND GMIC_CXX_COMPILE_FLAGS -g -ansi -Wall -Wextra -pedantic -Dcimg_verbosity=3)
|
|
||||||
+endif()
|
|
||||||
+if (${CMAKE_BUILD_TYPE_LOWER} STREQUAL "relwithdebinfo")
|
|
||||||
+ list(PREPEND GMIC_CXX_COMPILE_FLAGS -g)
|
|
||||||
+endif()
|
|
||||||
|
|
||||||
-if(NOT CUSTOM_CFLAGS)
|
|
||||||
- set(CMAKE_CXX_FLAGS_DEBUG "-Og ${CMAKE_CXX_FLAGS_DEBUG}")
|
|
||||||
- set(CMAKE_CXX_FLAGS_RELEASE "-Ofast ${CMAKE_CXX_FLAGS_RELEASE}")
|
|
||||||
- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Ofast ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
|
||||||
+if (NOT CUSTOM_CFLAGS)
|
|
||||||
+ if (${CMAKE_BUILD_TYPE_LOWER} STREQUAL "debug")
|
|
||||||
+ list(PREPEND GMIC_CXX_COMPILE_FLAGS -Og)
|
|
||||||
+ else()
|
|
||||||
+ list(PREPEND GMIC_CXX_COMPILE_FLAGS -Ofast)
|
|
||||||
+ endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# source files
|
|
||||||
@@ -141,6 +147,7 @@ set(CLI_Sources src/gmic.cpp)
|
|
||||||
|
|
||||||
if(BUILD_LIB)
|
|
||||||
add_library(libgmic SHARED ${CLI_Sources})
|
|
||||||
+ target_compile_options(libgmic PRIVATE ${GMIC_CXX_COMPILE_FLAGS})
|
|
||||||
set_target_properties(libgmic PROPERTIES SOVERSION "1" OUTPUT_NAME "gmic")
|
|
||||||
target_link_libraries(libgmic
|
|
||||||
CImg::CImg
|
|
||||||
@@ -164,6 +171,7 @@ endif()
|
|
||||||
|
|
||||||
if(BUILD_LIB_STATIC)
|
|
||||||
add_library(libgmicstatic STATIC ${CLI_Sources})
|
|
||||||
+ target_compile_options(libgmicstatic PRIVATE ${GMIC_CXX_COMPILE_FLAGS})
|
|
||||||
set_target_properties(libgmicstatic PROPERTIES OUTPUT_NAME "gmic")
|
|
||||||
target_link_libraries(libgmicstatic
|
|
||||||
CImg::CImg
|
|
||||||
@@ -182,6 +190,7 @@ endif()
|
|
||||||
|
|
||||||
if(BUILD_CLI)
|
|
||||||
add_executable(gmic src/gmic_cli.cpp)
|
|
||||||
+ target_compile_options(gmic PRIVATE ${GMIC_CXX_COMPILE_FLAGS})
|
|
||||||
if(ENABLE_DYNAMIC_LINKING)
|
|
||||||
target_link_libraries(gmic libgmic)
|
|
||||||
else()
|
|
||||||
--
|
|
||||||
2.33.1
|
|
||||||
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 13 09:47:22 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
|
||||||
|
|
||||||
|
- Update to 3.0.0. No changelog.
|
||||||
|
- Drop 0001-cmake-Set-target-compile-flags-correctly.patch.
|
||||||
|
Merged upstream.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Nov 7 13:48:14 UTC 2021 - Andreas Schneider <asn@cryptomilk.org>
|
Sun Nov 7 13:48:14 UTC 2021 - Andreas Schneider <asn@cryptomilk.org>
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
%global _gimpplugindir %(gimptool-2.0 --gimpplugindir)/plug-ins
|
%global _gimpplugindir %(gimptool-2.0 --gimpplugindir)/plug-ins
|
||||||
Name: gmic
|
Name: gmic
|
||||||
Version: 2.9.9
|
Version: 3.0.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: GREYC's Magick for Image Computing (denoise and others)
|
Summary: GREYC's Magick for Image Computing (denoise and others)
|
||||||
# gmic-qt is GPL-3.0-or-later, zart is CECILL-2.0, libgmic and cli program are
|
# gmic-qt is GPL-3.0-or-later, zart is CECILL-2.0, libgmic and cli program are
|
||||||
@ -29,7 +29,6 @@ URL: https://gmic.eu
|
|||||||
# Git URL: https://github.com/dtschump/gmic
|
# Git URL: https://github.com/dtschump/gmic
|
||||||
Source0: https://gmic.eu/files/source/gmic_%{version}.tar.gz
|
Source0: https://gmic.eu/files/source/gmic_%{version}.tar.gz
|
||||||
Source1: gmic_qt.png
|
Source1: gmic_qt.png
|
||||||
Patch0: 0001-cmake-Set-target-compile-flags-correctly.patch
|
|
||||||
BuildRequires: cmake >= 3.14.0
|
BuildRequires: cmake >= 3.14.0
|
||||||
BuildRequires: fftw3-threads-devel
|
BuildRequires: fftw3-threads-devel
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:9f053338752ec96a6b619718037767682c5fd58e2471c08f3740fdb070605bc0
|
|
||||||
size 7325061
|
|
3
gmic_3.0.0.tar.gz
Normal file
3
gmic_3.0.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3f056bb9e6dbf0674af4c8dce59f4198172187662f7fbb36cc63ebc8c1b71120
|
||||||
|
size 10225122
|
Loading…
Reference in New Issue
Block a user