diff --git a/distros/humble/patch/ros2-rviz-ogre-vendor.patch b/distros/humble/patch/ros2-rviz-ogre-vendor.patch index 934b3d51..15e4882f 100644 --- a/distros/humble/patch/ros2-rviz-ogre-vendor.patch +++ b/distros/humble/patch/ros2-rviz-ogre-vendor.patch @@ -197,7 +197,7 @@ index 000000000..9e9540007 + //! value type typedef for use in iterators + typedef code_point value_type; diff --git a/CMakeLists.txt b/CMakeLists.txt -index 122f2f29..c837ae29 100644 +index d274cad..59b2cf4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,8 +12,8 @@ if(POLICY CMP0135) @@ -211,7 +211,7 @@ index 122f2f29..c837ae29 100644 else() set(BUILDING_FREETYPE_LOCALLY OFF) set(BUILDING_ZLIB_LOCALLY OFF) -@@ -125,7 +125,11 @@ macro(build_ogre) +@@ -125,7 +125,15 @@ macro(build_ogre) set(OGRE_CXX_FLAGS "${OGRE_CXX_FLAGS} /w /EHsc") elseif(APPLE) set(OGRE_CXX_FLAGS "${OGRE_CXX_FLAGS} -std=c++14 -stdlib=libc++ -w") @@ -221,10 +221,24 @@ index 122f2f29..c837ae29 100644 + else() + list(APPEND extra_cmake_args "-DCMAKE_OSX_ARCHITECTURES='x86_64'") + endif() ++ # OGRE adds /usr/local (Homebrew on Intel Macs) to its dependency search path: ++ # find freetype and zlib in our prefix instead ++ list(APPEND extra_cmake_args "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}") ++ list(APPEND extra_cmake_args "-DCMAKE_IGNORE_PREFIX_PATH=/usr/local") else() # Linux set(OGRE_C_FLAGS "${OGRE_C_FLAGS} -w") # include Clang -Wno-everything to disable warnings in that build. GCC doesn't mind it -@@ -161,9 +165,8 @@ macro(build_ogre) +@@ -142,6 +150,9 @@ macro(build_ogre) + + # These next lines can be used to disable some of the components or plugins for OGRE + list(APPEND extra_cmake_args "-DOGRE_CONFIG_ENABLE_ZIP:BOOL=ON") ++ # RViz doesn't use the EXR codec, and Ogre's FindOpenEXR only knows OpenEXR 2's library names ++ # (it never finds conda-forge's OpenEXR 3, but may mix in a system OpenEXR 2 from /usr) ++ list(APPEND extra_cmake_args "-DOGRE_BUILD_PLUGIN_EXRCODEC:BOOL=OFF") + + if(BUILDING_FREETYPE_LOCALLY) + list(APPEND extra_cmake_args +@@ -161,9 +172,8 @@ macro(build_ogre) find_package(Patch REQUIRED) include(ExternalProject) @@ -236,7 +250,7 @@ index 122f2f29..c837ae29 100644 TIMEOUT 1200 LOG_CONFIGURE ${should_log} LOG_BUILD ${should_log} -@@ -185,21 +185,26 @@ macro(build_ogre) +@@ -185,21 +195,26 @@ macro(build_ogre) -DOGRE_BUILD_COMPONENT_JAVA:BOOL=FALSE -DOGRE_BUILD_COMPONENT_CSHARP:BOOL=FALSE -DOGRE_BUILD_COMPONENT_BITES:BOOL=FALSE diff --git a/distros/jazzy/patch/ros2-rviz-ogre-vendor.patch b/distros/jazzy/patch/ros2-rviz-ogre-vendor.patch index defd111f..457358ec 100644 --- a/distros/jazzy/patch/ros2-rviz-ogre-vendor.patch +++ b/distros/jazzy/patch/ros2-rviz-ogre-vendor.patch @@ -1,7 +1,8 @@ -diff -ruN a/CMakeLists.txt b/CMakeLists.txt +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7f60ad5..6e36fdf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -22,6 +22,8 @@ +@@ -24,6 +24,8 @@ if(WIN32) -DFT_DISABLE_PNG:BOOL=ON -DFT_DISABLE_HARFBUZZ:BOOL=ON "-DCMAKE_C_FLAGS=${FREETYPE_C_FLAGS}" @@ -10,12 +11,15 @@ diff -ruN a/CMakeLists.txt b/CMakeLists.txt ) set(ZLIB_C_FLAGS "${ZLIB_C_FLAGS}") -@@ -72,13 +74,19 @@ +@@ -72,13 +74,22 @@ else() endif() set(OGRE_CMAKE_ARGS) +# OGRE 1.12.10 declares cmake_minimum_required < 3.5, rejected by CMake >= 4 +list(APPEND OGRE_CMAKE_ARGS -DCMAKE_POLICY_VERSION_MINIMUM=3.5) ++# RViz doesn't use the EXR codec, and Ogre's FindOpenEXR only knows OpenEXR 2's library names ++# (it never finds conda-forge's OpenEXR 3, but may mix in a system OpenEXR 2 from /usr) ++list(APPEND OGRE_CMAKE_ARGS -DOGRE_BUILD_PLUGIN_EXRCODEC:BOOL=OFF) if(NOT WIN32) list(APPEND OGRE_CMAKE_ARGS -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON) endif() @@ -31,8 +35,10 @@ diff -ruN a/CMakeLists.txt b/CMakeLists.txt endif() ament_vendor(ogre_vendor -diff -ruN a/patches/0005-fix-macos-arm64.patch b/patches/0005-fix-macos-arm64.patch ---- a/patches/0005-fix-macos-arm64.patch +diff --git a/patches/0005-fix-macos-arm64.patch b/patches/0005-fix-macos-arm64.patch +new file mode 100644 +index 0000000..9494cc9 +--- /dev/null +++ b/patches/0005-fix-macos-arm64.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -54,8 +60,10 @@ diff -ruN a/patches/0005-fix-macos-arm64.patch b/patches/0005-fix-macos-arm64.pa + # Make sure that the OpenGL render system is selected for non-iOS Apple builds + set(OGRE_BUILD_RENDERSYSTEM_GLES2 FALSE) + endif () -diff -ruN a/patches/0006-fix-char16.patch b/patches/0006-fix-char16.patch ---- a/patches/0006-fix-char16.patch +diff --git a/patches/0006-fix-char16.patch b/patches/0006-fix-char16.patch +new file mode 100644 +index 0000000..dfc080b +--- /dev/null +++ b/patches/0006-fix-char16.patch @@ -0,0 +1,17 @@ +diff --git a/Components/Overlay/include/OgreUTFString.h b/Components/Overlay/include/OgreUTFString.h diff --git a/distros/lyrical/patch/ros2-rviz-ogre-vendor.patch b/distros/lyrical/patch/ros2-rviz-ogre-vendor.patch index fce0b1dc..35359bef 100644 --- a/distros/lyrical/patch/ros2-rviz-ogre-vendor.patch +++ b/distros/lyrical/patch/ros2-rviz-ogre-vendor.patch @@ -1,8 +1,17 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8d23a299a..f58c62831 100644 +index 2fa3254..81c6932 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -76,7 +76,11 @@ endif() +@@ -34,13 +34,20 @@ else() + endif() + + set(OGRE_CMAKE_ARGS) ++# RViz doesn't use the EXR codec, and Ogre's FindOpenEXR only knows OpenEXR 2's library names ++# (it never finds conda-forge's OpenEXR 3, but may mix in a system OpenEXR 2 from /usr) ++list(APPEND OGRE_CMAKE_ARGS -DOGRE_BUILD_PLUGIN_EXRCODEC:BOOL=OFF) + if(NOT WIN32) + list(APPEND OGRE_CMAKE_ARGS -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON) + endif() if(APPLE) list(APPEND OGRE_CMAKE_ARGS -DOGRE_ENABLE_PRECOMPILED_HEADERS:BOOL=OFF) @@ -17,7 +26,7 @@ index 8d23a299a..f58c62831 100644 ament_vendor(ogre_vendor diff --git a/patches/0005-fix-macos-arm64.patch b/patches/0005-fix-macos-arm64.patch new file mode 100644 -index 000000000..9494cc9ae +index 0000000..9494cc9 --- /dev/null +++ b/patches/0005-fix-macos-arm64.patch @@ -0,0 +1,19 @@ @@ -42,7 +51,7 @@ index 000000000..9494cc9ae + endif () diff --git a/patches/0006-fix-char16.patch b/patches/0006-fix-char16.patch new file mode 100644 -index 000000000..dfc080bb9 +index 0000000..dfc080b --- /dev/null +++ b/patches/0006-fix-char16.patch @@ -0,0 +1,17 @@ diff --git a/distros/rolling/patch/ros2-rviz-ogre-vendor.patch b/distros/rolling/patch/ros2-rviz-ogre-vendor.patch index fce0b1dc..2b6bbe50 100644 --- a/distros/rolling/patch/ros2-rviz-ogre-vendor.patch +++ b/distros/rolling/patch/ros2-rviz-ogre-vendor.patch @@ -1,8 +1,17 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8d23a299a..f58c62831 100644 +index b7e8732..f139539 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -76,7 +76,11 @@ endif() +@@ -34,13 +34,20 @@ else() + endif() + + set(OGRE_CMAKE_ARGS) ++# RViz doesn't use the EXR codec, and Ogre's FindOpenEXR only knows OpenEXR 2's library names ++# (it never finds conda-forge's OpenEXR 3, but may mix in a system OpenEXR 2 from /usr) ++list(APPEND OGRE_CMAKE_ARGS -DOGRE_BUILD_PLUGIN_EXRCODEC:BOOL=OFF) + if(NOT WIN32) + list(APPEND OGRE_CMAKE_ARGS -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON) + endif() if(APPLE) list(APPEND OGRE_CMAKE_ARGS -DOGRE_ENABLE_PRECOMPILED_HEADERS:BOOL=OFF) @@ -15,34 +24,9 @@ index 8d23a299a..f58c62831 100644 endif() ament_vendor(ogre_vendor -diff --git a/patches/0005-fix-macos-arm64.patch b/patches/0005-fix-macos-arm64.patch -new file mode 100644 -index 000000000..9494cc9ae ---- /dev/null -+++ b/patches/0005-fix-macos-arm64.patch -@@ -0,0 +1,19 @@ -+diff --git a/CMakeLists.txt b/CMakeLists.txt -+index f4d8fd4..ffae9c8 100644 -+--- a/CMakeLists.txt -++++ b/CMakeLists.txt -+@@ -270,14 +270,6 @@ elseif(EMSCRIPTEN) -+ set(OGRE_CONFIG_THREADS "0" CACHE STRING "Threading is unstable on Emscripten" FORCE) -+ elseif (APPLE AND NOT APPLE_IOS) -+ -+- set(XCODE_ATTRIBUTE_SDKROOT macosx) -+- if(CMAKE_GENERATOR STREQUAL "Unix Makefiles") -+- execute_process(COMMAND xcodebuild -version -sdk "${XCODE_ATTRIBUTE_SDKROOT}" Path | head -n 1 OUTPUT_VARIABLE CMAKE_OSX_SYSROOT) -+- string(REGEX REPLACE "(\r?\n)+$" "" CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}") -+- else() -+- set(CMAKE_OSX_SYSROOT macosx) -+- endif() -+- -+ # Make sure that the OpenGL render system is selected for non-iOS Apple builds -+ set(OGRE_BUILD_RENDERSYSTEM_GLES2 FALSE) -+ endif () diff --git a/patches/0006-fix-char16.patch b/patches/0006-fix-char16.patch new file mode 100644 -index 000000000..dfc080bb9 +index 0000000..dfc080b --- /dev/null +++ b/patches/0006-fix-char16.patch @@ -0,0 +1,17 @@ @@ -63,3 +47,27 @@ index 000000000..dfc080bb9 + + //! value type typedef for use in iterators + typedef code_point value_type; +diff --git a/patches/0008-fix-macos-sysroot.patch b/patches/0008-fix-macos-sysroot.patch +new file mode 100644 +index 0000000..f58ad22 +--- /dev/null ++++ b/patches/0008-fix-macos-sysroot.patch +@@ -0,0 +1,18 @@ ++diff --git a/CMakeLists.txt b/CMakeLists.txt ++--- a/CMakeLists.txt +++++ b/CMakeLists.txt ++@@ -270,14 +270,6 @@ elseif(EMSCRIPTEN) ++ set(OGRE_CONFIG_THREADS "0" CACHE STRING "Threading is unstable on Emscripten" FORCE) ++ elseif (APPLE AND NOT APPLE_IOS) ++ ++- set(XCODE_ATTRIBUTE_SDKROOT macosx) ++- if(CMAKE_GENERATOR STREQUAL "Unix Makefiles") ++- execute_process(COMMAND xcrun --sdk macosx --show-sdk-path OUTPUT_VARIABLE CMAKE_OSX_SYSROOT) ++- string(REGEX REPLACE "(\r?\n)+$" "" CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}") ++- else() ++- set(CMAKE_OSX_SYSROOT macosx) ++- endif() ++- ++ # Make sure that the OpenGL render system is selected for non-iOS Apple builds ++ set(OGRE_BUILD_RENDERSYSTEM_GLES2 FALSE) ++ endif ()