Monday, August 09, 2021

[sparc64/base-gcc] Fix build of graphics/opencolorio

Need to strip a couple -Werror instances out to fix the build on sparc64

This patch fixes the build (and regenerates a patch incidentally).

ok?

(cc maintainer)

--Kurt

Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/graphics/opencolorio/patches/patch-CMakeLists_txt,v
retrieving revision 1.3
diff -u -p -r1.3 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt 1 Jan 2021 22:48:55 -0000 1.3
+++ patches/patch-CMakeLists_txt 9 Aug 2021 14:55:12 -0000
@@ -2,9 +2,10 @@ $OpenBSD: patch-CMakeLists_txt,v 1.3 202

Fix macro redefined error

---- CMakeLists.txt.orig 2018-01-05 12:08:27 UTC
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
+++ CMakeLists.txt
-@@ -218,8 +222,7 @@ else(USE_EXTERNAL_TINYXML)
+@@ -218,8 +218,7 @@ else(USE_EXTERNAL_TINYXML)
## => great news when build staticaly since we do not want another client project have to link also with tinyxml when he want to use this project
## => could be problematic if the client project use another version of tinyxml... In this case build tinyxml as shared lib with all projects could be a solution
## => TODO: so maybe provide a simple cmake way to build 3rdParty as shared and auto install with this project ?
@@ -14,7 +15,7 @@ Fix macro redefined error
list(APPEND EXTERNAL_OBJECTS $<TARGET_OBJECTS:TINYXML_LIB>)
else()
find_package(Git REQUIRED) ## in order to apply patch (for crossplateform compatibility)
-@@ -384,7 +387,7 @@ else()
+@@ -384,7 +383,7 @@ else()
set(OCIO_INLINES_HIDDEN OFF)
endif()

Index: patches/patch-src_core_CMakeLists_txt
===================================================================
RCS file: patches/patch-src_core_CMakeLists_txt
diff -N patches/patch-src_core_CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_core_CMakeLists_txt 9 Aug 2021 14:55:12 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Strip -Werror to fix sparc64 build
+
+Index: src/core/CMakeLists.txt
+--- src/core/CMakeLists.txt.orig
++++ src/core/CMakeLists.txt
+@@ -24,7 +24,7 @@ if(WIN32)
+ set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} /WX")
+ endif()
+ else()
+- set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} -Werror")
++ set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS}")
+ endif()
+
+ # SHARED
Index: patches/patch-src_pyglue_CMakeLists_txt
===================================================================
RCS file: patches/patch-src_pyglue_CMakeLists_txt
diff -N patches/patch-src_pyglue_CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_pyglue_CMakeLists_txt 9 Aug 2021 14:55:12 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Strip -Werror to fix sparc64 build
+
+Index: src/pyglue/CMakeLists.txt
+--- src/pyglue/CMakeLists.txt.orig
++++ src/pyglue/CMakeLists.txt
+@@ -23,7 +23,7 @@ endif()
+ # Process all warnings as errors
+ # Unfortunately Windows still has a warning
+ if(UNIX)
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ endif()
+
+ find_package(PythonLibs)

No comments:

Post a Comment