From 58fc7e5c010ebedae8f5cb8f335b1fd5c5d5a5b5 Mon Sep 17 00:00:00 2001 From: Jonas Karlsson Date: Tue, 25 Aug 2020 23:47:28 +0200 Subject: [PATCH] [irrlicht] Patch moved sysctl.h header file (#13137) Sysctl has been deprecated for a while and in newer versions of glibc it is removed which leads to a compilation error on modern Linux. This is fixed in SVN trunk of irrlich so I copied the include guards from there. In this case sysctl headers are only loaded for OS X where they are also actually used. --- ports/irrlicht/fix-sysctl.patch | 12 ++++++++++++ ports/irrlicht/portfile.cmake | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 ports/irrlicht/fix-sysctl.patch diff --git a/ports/irrlicht/fix-sysctl.patch b/ports/irrlicht/fix-sysctl.patch new file mode 100644 index 0000000000..98c70273ec --- /dev/null +++ b/ports/irrlicht/fix-sysctl.patch @@ -0,0 +1,12 @@ +--- a/source/Irrlicht/COSOperator.cpp ++++ b/source/Irrlicht/COSOperator.cpp +@@ -11,8 +11,8 @@ + #else + #include + #include +-#ifndef _IRR_SOLARIS_PLATFORM_ + #include ++#ifdef _IRR_OSX_PLATFORM_ + #include + #endif + #endif diff --git a/ports/irrlicht/portfile.cmake b/ports/irrlicht/portfile.cmake index cad4ca5a03..754119f3ed 100644 --- a/ports/irrlicht/portfile.cmake +++ b/ports/irrlicht/portfile.cmake @@ -6,7 +6,7 @@ vcpkg_from_sourceforge( REF 1.8/1.8.4 FILENAME "irrlicht-1.8.4.zip" SHA512 de69ddd2c6bc80a1b27b9a620e3697b1baa552f24c7d624076d471f3aecd9b15f71dce3b640811e6ece20f49b57688d428e3503936a7926b3e3b0cc696af98d1 - PATCHES fix-encoding.patch + PATCHES fix-encoding.patch fix-sysctl.patch ) configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) @@ -45,4 +45,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/irrlicht) endif() -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)