From 1ff57b2f9a311a6473751abfda14c35666050d68 Mon Sep 17 00:00:00 2001 From: Edgar Date: Mon, 9 Aug 2021 15:53:33 +0200 Subject: [PATCH] :bug: Fixed freeimage build with GCC 11 --- freeimage/all/conandata.yml | 5 ++++- freeimage/all/conanfile.py | 3 +++ freeimage/all/patches/3.18.0/cpp11.patch | 11 +++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 freeimage/all/patches/3.18.0/cpp11.patch diff --git a/freeimage/all/conandata.yml b/freeimage/all/conandata.yml index 0b7ed8f..e5f7ea1 100644 --- a/freeimage/all/conandata.yml +++ b/freeimage/all/conandata.yml @@ -1,4 +1,7 @@ sources: "3.18.0": url: "http://downloads.sourceforge.net/freeimage/FreeImage3180.zip" - sha256: "f41379682f9ada94ea7b34fe86bf9ee00935a3147be41b6569c9605a53e438fd" \ No newline at end of file + sha256: "f41379682f9ada94ea7b34fe86bf9ee00935a3147be41b6569c9605a53e438fd" +patches: + "3.18.0": + - patch_file: "patches/3.18.0/cpp11.patch" \ No newline at end of file diff --git a/freeimage/all/conanfile.py b/freeimage/all/conanfile.py index e84caea..357428c 100644 --- a/freeimage/all/conanfile.py +++ b/freeimage/all/conanfile.py @@ -9,9 +9,12 @@ class freeimageConan(ConanFile): url = "https://github.com/AnotherFoxGuy/conan-freeimage" description = "FreeImage is an Open Source library project for developers who would like to support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by today's multimedia applications." settings = "os", "compiler", "build_type", "arch" + exports_sources = "patches/**" def source(self): tools.get(**self.conan_data["sources"][self.version], strip_root=True) + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) def build(self): if os_info.is_windows: diff --git a/freeimage/all/patches/3.18.0/cpp11.patch b/freeimage/all/patches/3.18.0/cpp11.patch new file mode 100644 index 0000000..76ab4f6 --- /dev/null +++ b/freeimage/all/patches/3.18.0/cpp11.patch @@ -0,0 +1,11 @@ +--- Makefile.gnu ++++ Makefile.gnu +@@ -25,7 +25,7 @@ + CFLAGS += $(INCLUDE) + CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy + # LibJXR +-CXXFLAGS += -D__ANSI__ ++CXXFLAGS += -D__ANSI__ -std=c++11 + CXXFLAGS += $(INCLUDE) + + ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)