From 8687b50390fbf7c8e465abcbfb27425c4cba2f4d Mon Sep 17 00:00:00 2001 From: ankurv Date: Tue, 26 Jan 2021 18:58:24 -0800 Subject: [PATCH 01/21] osgearth:x64-windows-static-md fixes --- ports/osgearth/StaticOSG.patch | 84 +++++++++++++++++++++++++ ports/osgearth/deprecated_cpp_fix.patch | 28 +++++++++ ports/osgearth/portfile.cmake | 40 ++++++++---- versions/o-/osgearth.json | 2 +- 4 files changed, 142 insertions(+), 12 deletions(-) create mode 100644 ports/osgearth/StaticOSG.patch create mode 100644 ports/osgearth/deprecated_cpp_fix.patch diff --git a/ports/osgearth/StaticOSG.patch b/ports/osgearth/StaticOSG.patch new file mode 100644 index 00000000000000..2f4b1bff11c7de --- /dev/null +++ b/ports/osgearth/StaticOSG.patch @@ -0,0 +1,84 @@ +From 4e719ceacdc8df729f3296f62c9f50075c862967 Mon Sep 17 00:00:00 2001 +From: Ankur Verma +Date: Sun, 27 Dec 2020 22:26:32 -0800 +Subject: [PATCH] StaticOSG + +--- + CMakeLists.txt | 9 ++++++ + CMakeModules/FindGEOS.cmake | 29 +++++++++++++++++++++++++++-- + 2 files changed, 36 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 049e37e..d75a3b9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -266,6 +266,15 @@ ELSE() + SET(OSGEARTH_DYNAMIC_OR_STATIC "STATIC") + ENDIF() + ++IF(NOT OSGEARTH_BUILD_SHARED_LIBS) ++ ADD_DEFINITIONS(-DOSGEARTH_LIBRARY_STATIC) ++ENDIF() ++ ++OPTION(OSG_IS_STATIC "Set to ON to build OSG for static linking. Use OFF for dynamic." OFF) ++IF (OSG_IS_STATIC) ++ ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC) ++ LINK_LIBRARIES(${CMAKE_DL_LIBS}) ++ENDIF(OSG_IS_STATIC) + + # OE Libraries + ADD_SUBDIRECTORY(src) +diff --git a/CMakeModules/FindGEOS.cmake b/CMakeModules/FindGEOS.cmake +index e85f922..b1bbfed 100644 +--- a/CMakeModules/FindGEOS.cmake ++++ b/CMakeModules/FindGEOS.cmake +@@ -65,7 +65,7 @@ FIND_LIBRARY(GEOS_LIBRARY + ) + + FIND_LIBRARY(GEOS_LIBRARY_DEBUG +- NAMES geos_cd geos_i_d geosd ++ NAMES geos_cd geos_i_d + PATHS + ${GEOS_DIR}/lib + $ENV{GEOS_DIR} +@@ -74,7 +74,7 @@ FIND_LIBRARY(GEOS_LIBRARY_DEBUG + ) + + FIND_LIBRARY(GEOS_LIBRARY_DEBUG +- NAMES geos_cd geos_i_d geosd ++ NAMES geos_cd geos_i_d + PATHS + ~/Library/Frameworks + /Library/Frameworks +@@ -92,3 +92,28 @@ SET(GEOS_FOUND "NO") + IF(GEOS_LIBRARY AND GEOS_INCLUDE_DIR) + SET(GEOS_FOUND "YES") + ENDIF(GEOS_LIBRARY AND GEOS_INCLUDE_DIR) ++ ++OPTION(GEOS_IS_STATIC "Set to ON to build GEOS for static linking. Use OFF for dynamic." OFF) ++IF (GEOS_IS_STATIC) ++ FIND_LIBRARY(GEOS_CXX_LIBRARY ++ NAMES geos ++ PATHS ++ ${GEOS_DIR}/lib ++ $ENV{GEOS_DIR} ++ NO_DEFAULT_PATH ++ PATH_SUFFIXES lib64 lib ++ ) ++ ++ FIND_LIBRARY(GEOS_CXX_LIBRARY_DEBUG ++ NAMES geosd ++ PATHS ++ ${GEOS_DIR}/lib ++ $ENV{GEOS_DIR} ++ NO_DEFAULT_PATH ++ PATH_SUFFIXES lib64 lib ++ ) ++ ++ set(GEOS_LIBRARY "${GEOS_LIBRARY};${GEOS_CXX_LIBRARY}" CACHE STRING "Geos Libraries" FORCE ) ++ set(GEOS_LIBRARY_DEBUG "${GEOS_LIBRARY_DEBUG};${GEOS_CXX_LIBRARY_DEBUG}" CACHE STRING "Geos Debug Libraries" FORCE ) ++ ++ENDIF(GEOS_IS_STATIC) +-- +2.29.2 + diff --git a/ports/osgearth/deprecated_cpp_fix.patch b/ports/osgearth/deprecated_cpp_fix.patch new file mode 100644 index 00000000000000..7a56041983f2bd --- /dev/null +++ b/ports/osgearth/deprecated_cpp_fix.patch @@ -0,0 +1,28 @@ +From 89bea8378ae632b0caa134293f713b927774ab50 Mon Sep 17 00:00:00 2001 +From: ankurv +Date: Sun, 3 Jan 2021 11:05:32 -0800 +Subject: [PATCH] Patch + +--- + src/osgEarth/Threading | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/osgEarth/Threading b/src/osgEarth/Threading +index 9093ca6..0fbd9ce 100644 +--- a/src/osgEarth/Threading ++++ b/src/osgEarth/Threading +@@ -602,7 +602,11 @@ namespace osgEarth { namespace Threading + template + constexpr auto cpp11invoke(Fn&& f, Args&&... args) + noexcept(noexcept(std::forward(f)(std::forward(args)...))) ++#if defined(__cpp_lib_is_invocable) && __cpp_lib_is_invocable >= 201703 ++ -> typename std::invoke_result::type ++#else + -> typename std::result_of::type ++#endif + { + return std::forward(f)(std::forward(args)...); + } +-- +2.29.2.windows.3 + diff --git a/ports/osgearth/portfile.cmake b/ports/osgearth/portfile.cmake index 57d42b523151f8..5be71e00888509 100644 --- a/ports/osgearth/portfile.cmake +++ b/ports/osgearth/portfile.cmake @@ -1,8 +1,26 @@ -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) +set(CONFIGURE_OPTIONS + -DOSGEARTH_BUILD_EXAMPLES=OFF + -DOSGEARTH_BUILD_TOOLS=OFF + -DOSGEARTH_BUILD_TESTS=OFF + -DOSGEARTH_BUILD_DOCS=OFF + -DOSGEARTH_BUILD_PROCEDURAL_NODEKIT=OFF + -DOSGEARTH_BUILD_TRITON_NODEKIT=OFF + -DOSGEARTH_BUILD_SILVERLINING_NODEKIT=OFF + -DWITH_EXTERNAL_TINYXML=ON +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + list(APPEND CONFIGURE_OPTIONS + -DOSGEARTH_BUILD_SHARED_LIBS=OFF + -DNRL_STATIC_LIBRARIES=ON + -DOSG_IS_STATIC=ON + -DGEOS_IS_STATIC=ON + ) +endif() file(GLOB OSG_PLUGINS_SUBDIR ${CURRENT_INSTALLED_DIR}/tools/osg/osgPlugins-*) list(LENGTH OSG_PLUGINS_SUBDIR OSG_PLUGINS_SUBDIR_LENGTH) -if(NOT OSG_PLUGINS_SUBDIR_LENGTH EQUAL 1) +if((NOT OSG_PLUGINS_SUBDIR_LENGTH EQUAL 1) AND (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)) message(FATAL_ERROR "Could not determine osg version") endif() string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/osg/" "" OSG_PLUGINS_SUBDIR "${OSG_PLUGINS_SUBDIR}") @@ -13,26 +31,22 @@ vcpkg_from_github( REF 342fcadf4c8892ba84841cb5b4162bdc51519e3c #version 3.1 SHA512 03378a918306846d2144e545785c783b01e33fa2dd5c77d16d390a275217b6ce7a3a743c35ae99a497b272a7516b055442c0a891bd312cce727a5538b40364f5 HEAD_REF master - PATCHES + PATCHES + StaticOSG.patch # Fix port compilation in static-md module + deprecated_cpp_fix.patch # Fix port headers to not use classes deprecated in c++17. Gives errors when using the installed port headers make-all-find-packages-required.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS - -DOSGEARTH_BUILD_EXAMPLES=OFF - -DOSGEARTH_BUILD_TESTS=OFF - -DOSGEARTH_BUILD_DOCS=OFF - -DOSGEARTH_BUILD_PROCEDURAL_NODEKIT=OFF - -DOSGEARTH_BUILD_TRITON_NODEKIT=OFF - -DOSGEARTH_BUILD_SILVERLINING_NODEKIT=OFF - -DWITH_EXTERNAL_TINYXML=ON + OPTIONS ${CONFIGURE_OPTIONS} ) vcpkg_install_cmake() #Release +if (WIN32 AND (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)) set(OSGEARTH_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/${PORT}) set(OSGEARTH_TOOL_PLUGIN_PATH ${OSGEARTH_TOOL_PATH}/${OSG_PLUGINS_SUBDIR}) @@ -47,10 +61,12 @@ file(COPY ${OSGDB_PLUGINS} DESTINATION ${OSGEARTH_TOOL_PLUGIN_PATH}) file(REMOVE_RECURSE ${OSGEARTH_TOOLS}) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/${OSG_PLUGINS_SUBDIR}) +endif() #Debug file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if (WIN32 AND (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)) set(OSGEARTH_DEBUG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}) set(OSGEARTH_DEBUG_TOOL_PLUGIN_PATH ${OSGEARTH_DEBUG_TOOL_PATH}/${OSG_PLUGINS_SUBDIR}) @@ -65,6 +81,8 @@ file(COPY ${OSGDB_DEBUG_PLUGINS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) file(REMOVE_RECURSE ${OSGEARTH_DEBUG_TOOLS}) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/${OSG_PLUGINS_SUBDIR}) +endif() # Handle copyright +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/versions/o-/osgearth.json b/versions/o-/osgearth.json index 13b6b3fece1b9c..13b0d46f56d96c 100644 --- a/versions/o-/osgearth.json +++ b/versions/o-/osgearth.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "d194c647fcf69fe345c13ae7b6da3451e4bbddb6", + "git-tree": "7457d296d878c169845c2727e95b3de990eaf8e0", "version": "3.1", "port-version": 1 }, From 41d1010b445469dcc21d4d143c43b2b905797e6b Mon Sep 17 00:00:00 2001 From: ankurv Date: Tue, 26 Jan 2021 19:06:32 -0800 Subject: [PATCH 02/21] Try to build for x64-windows-static-md --- ports/osgearth/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/osgearth/vcpkg.json b/ports/osgearth/vcpkg.json index 7d7a220150a688..414fb0b25e0e12 100644 --- a/ports/osgearth/vcpkg.json +++ b/ports/osgearth/vcpkg.json @@ -4,7 +4,7 @@ "port-version": 1, "description": "osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2015 Pelican Mapping.", "homepage": "https://github.com/gwaldron/osgearth", - "supports": "!(x86 | wasm32) & !staticcrt", + "supports": "!(x86 | wasm32)", "dependencies": [ "basisu", "draco", From e989994e0e3f676bd350cf1a407d4aaa721fa98e Mon Sep 17 00:00:00 2001 From: ankurv Date: Wed, 27 Jan 2021 09:08:02 -0800 Subject: [PATCH 03/21] Fix builds --- ports/osgearth/portfile.cmake | 11 ----------- versions/o-/osgearth.json | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/ports/osgearth/portfile.cmake b/ports/osgearth/portfile.cmake index 5be71e00888509..1216dba559361c 100644 --- a/ports/osgearth/portfile.cmake +++ b/ports/osgearth/portfile.cmake @@ -50,18 +50,11 @@ if (WIN32 AND (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)) set(OSGEARTH_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/${PORT}) set(OSGEARTH_TOOL_PLUGIN_PATH ${OSGEARTH_TOOL_PATH}/${OSG_PLUGINS_SUBDIR}) -file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PATH}) file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PLUGIN_PATH}) - -file(GLOB OSGEARTH_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(GLOB OSGDB_PLUGINS ${CURRENT_PACKAGES_DIR}/bin/${OSG_PLUGINS_SUBDIR}/osgdb*.dll) -file(COPY ${OSGEARTH_TOOLS} DESTINATION ${OSGEARTH_TOOL_PATH}) file(COPY ${OSGDB_PLUGINS} DESTINATION ${OSGEARTH_TOOL_PLUGIN_PATH}) - -file(REMOVE_RECURSE ${OSGEARTH_TOOLS}) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/${OSG_PLUGINS_SUBDIR}) -endif() #Debug file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -70,16 +63,12 @@ if (WIN32 AND (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)) set(OSGEARTH_DEBUG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}) set(OSGEARTH_DEBUG_TOOL_PLUGIN_PATH ${OSGEARTH_DEBUG_TOOL_PATH}/${OSG_PLUGINS_SUBDIR}) -file(MAKE_DIRECTORY ${OSGEARTH_DEBUG_TOOL_PATH}) file(MAKE_DIRECTORY ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) -file(GLOB OSGEARTH_DEBUG_TOOLS ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) file(GLOB OSGDB_DEBUG_PLUGINS ${CURRENT_PACKAGES_DIR}/debug/bin/${OSG_PLUGINS_SUBDIR}/osgdb*.dll) -file(COPY ${OSGEARTH_DEBUG_TOOLS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PATH}) file(COPY ${OSGDB_DEBUG_PLUGINS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) -file(REMOVE_RECURSE ${OSGEARTH_DEBUG_TOOLS}) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/${OSG_PLUGINS_SUBDIR}) endif() diff --git a/versions/o-/osgearth.json b/versions/o-/osgearth.json index 13b0d46f56d96c..17ae8fdfef6ac6 100644 --- a/versions/o-/osgearth.json +++ b/versions/o-/osgearth.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "7457d296d878c169845c2727e95b3de990eaf8e0", + "git-tree": "f35a11624111e650b96e5702d504be1518681c65", "version": "3.1", "port-version": 1 }, From f31aad979c2a4be960b9e6af534900a6881c2836 Mon Sep 17 00:00:00 2001 From: ankurv Date: Wed, 27 Jan 2021 09:28:55 -0800 Subject: [PATCH 04/21] Indent and combine blocks --- ports/osgearth/portfile.cmake | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/ports/osgearth/portfile.cmake b/ports/osgearth/portfile.cmake index 1216dba559361c..76dbc4b0c3f2a1 100644 --- a/ports/osgearth/portfile.cmake +++ b/ports/osgearth/portfile.cmake @@ -47,31 +47,30 @@ vcpkg_install_cmake() #Release if (WIN32 AND (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)) -set(OSGEARTH_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/${PORT}) -set(OSGEARTH_TOOL_PLUGIN_PATH ${OSGEARTH_TOOL_PATH}/${OSG_PLUGINS_SUBDIR}) + set(OSGEARTH_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + set(OSGEARTH_TOOL_PLUGIN_PATH ${OSGEARTH_TOOL_PATH}/${OSG_PLUGINS_SUBDIR}) -file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PLUGIN_PATH}) -file(GLOB OSGDB_PLUGINS ${CURRENT_PACKAGES_DIR}/bin/${OSG_PLUGINS_SUBDIR}/osgdb*.dll) + file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PLUGIN_PATH}) + file(GLOB OSGDB_PLUGINS ${CURRENT_PACKAGES_DIR}/bin/${OSG_PLUGINS_SUBDIR}/osgdb*.dll) -file(COPY ${OSGDB_PLUGINS} DESTINATION ${OSGEARTH_TOOL_PLUGIN_PATH}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/${OSG_PLUGINS_SUBDIR}) + file(COPY ${OSGDB_PLUGINS} DESTINATION ${OSGEARTH_TOOL_PLUGIN_PATH}) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/${OSG_PLUGINS_SUBDIR}) -#Debug -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -if (WIN32 AND (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)) -set(OSGEARTH_DEBUG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}) -set(OSGEARTH_DEBUG_TOOL_PLUGIN_PATH ${OSGEARTH_DEBUG_TOOL_PATH}/${OSG_PLUGINS_SUBDIR}) + set(OSGEARTH_DEBUG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}) + set(OSGEARTH_DEBUG_TOOL_PLUGIN_PATH ${OSGEARTH_DEBUG_TOOL_PATH}/${OSG_PLUGINS_SUBDIR}) -file(MAKE_DIRECTORY ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) + file(MAKE_DIRECTORY ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) -file(GLOB OSGDB_DEBUG_PLUGINS ${CURRENT_PACKAGES_DIR}/debug/bin/${OSG_PLUGINS_SUBDIR}/osgdb*.dll) + file(GLOB OSGDB_DEBUG_PLUGINS ${CURRENT_PACKAGES_DIR}/debug/bin/${OSG_PLUGINS_SUBDIR}/osgdb*.dll) -file(COPY ${OSGDB_DEBUG_PLUGINS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) + file(COPY ${OSGDB_DEBUG_PLUGINS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/${OSG_PLUGINS_SUBDIR}) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/${OSG_PLUGINS_SUBDIR}) endif() +#Debug +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + # Handle copyright file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) From 43695b2528ab363aa42c2d9d8ec0d7eb311f473f Mon Sep 17 00:00:00 2001 From: ankurv Date: Wed, 27 Jan 2021 09:37:44 -0800 Subject: [PATCH 05/21] overwrite version --- versions/o-/osgearth.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/o-/osgearth.json b/versions/o-/osgearth.json index 17ae8fdfef6ac6..44a109ceea6d32 100644 --- a/versions/o-/osgearth.json +++ b/versions/o-/osgearth.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "f35a11624111e650b96e5702d504be1518681c65", + "git-tree": "831859fb8533614cf17ff066f532eab51854f785", "version": "3.1", "port-version": 1 }, From 8926faebade73750140910f5153c78496280228c Mon Sep 17 00:00:00 2001 From: ankurv Date: Wed, 27 Jan 2021 18:43:54 -0800 Subject: [PATCH 06/21] merge with master and update version --- versions/o-/osgearth.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/o-/osgearth.json b/versions/o-/osgearth.json index 674e0b0abbf093..7905e288a3bbbd 100644 --- a/versions/o-/osgearth.json +++ b/versions/o-/osgearth.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "9355b8ad52fcf4998fe4c262f29a4e01fa83b9fa", + "git-tree": "0b9f73296de1a385c8f96c49ec4b10fbc241cf7e", "version": "3.1", "port-version": 2 }, From 9c8f5d4b00e54032448505a5845d6f7bc676ffa4 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Wed, 27 Jan 2021 23:30:45 -0800 Subject: [PATCH 07/21] revert incorrect version changes --- versions/o-/osgearth.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/o-/osgearth.json b/versions/o-/osgearth.json index 7905e288a3bbbd..674e0b0abbf093 100644 --- a/versions/o-/osgearth.json +++ b/versions/o-/osgearth.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "0b9f73296de1a385c8f96c49ec4b10fbc241cf7e", + "git-tree": "9355b8ad52fcf4998fe4c262f29a4e01fa83b9fa", "version": "3.1", "port-version": 2 }, From e65e91f06a2b7fe597a1701819b98bab55495fb6 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Thu, 28 Jan 2021 01:13:03 -0800 Subject: [PATCH 08/21] [osgearth] Improve portfile.cmake, add feature tools --- ports/osgearth/portfile.cmake | 66 +++++++++++-------- ports/osgearth/remove-tool-debug-suffix.patch | 13 ++++ ports/osgearth/vcpkg.json | 12 +++- 3 files changed, 60 insertions(+), 31 deletions(-) create mode 100644 ports/osgearth/remove-tool-debug-suffix.patch diff --git a/ports/osgearth/portfile.cmake b/ports/osgearth/portfile.cmake index be8c3c38541ab5..b3efe6101b1731 100644 --- a/ports/osgearth/portfile.cmake +++ b/ports/osgearth/portfile.cmake @@ -1,30 +1,13 @@ -set(CONFIGURE_OPTIONS - -DOSGEARTH_BUILD_EXAMPLES=OFF - -DOSGEARTH_BUILD_TOOLS=OFF - -DOSGEARTH_BUILD_TESTS=OFF - -DOSGEARTH_BUILD_DOCS=OFF - -DOSGEARTH_BUILD_PROCEDURAL_NODEKIT=OFF - -DOSGEARTH_BUILD_TRITON_NODEKIT=OFF - -DOSGEARTH_BUILD_SILVERLINING_NODEKIT=OFF - -DWITH_EXTERNAL_TINYXML=ON -) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - list(APPEND CONFIGURE_OPTIONS - -DOSGEARTH_BUILD_SHARED_LIBS=OFF - -DNRL_STATIC_LIBRARIES=ON - -DOSG_IS_STATIC=ON - -DGEOS_IS_STATIC=ON - ) +# Only dynamic build need dlls +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB OSG_PLUGINS_SUBDIR ${CURRENT_INSTALLED_DIR}/tools/osg/osgPlugins-*) + list(LENGTH OSG_PLUGINS_SUBDIR OSG_PLUGINS_SUBDIR_LENGTH) + if(NOT OSG_PLUGINS_SUBDIR_LENGTH EQUAL 1) + message(FATAL_ERROR "Could not determine osg version") + endif() + string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/osg/" "" OSG_PLUGINS_SUBDIR "${OSG_PLUGINS_SUBDIR}") endif() -file(GLOB OSG_PLUGINS_SUBDIR ${CURRENT_INSTALLED_DIR}/tools/osg/osgPlugins-*) -list(LENGTH OSG_PLUGINS_SUBDIR OSG_PLUGINS_SUBDIR_LENGTH) -if((NOT OSG_PLUGINS_SUBDIR_LENGTH EQUAL 1) AND (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)) - message(FATAL_ERROR "Could not determine osg version") -endif() -string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/osg/" "" OSG_PLUGINS_SUBDIR "${OSG_PLUGINS_SUBDIR}") - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gwaldron/osgearth @@ -36,21 +19,40 @@ vcpkg_from_github( deprecated_cpp_fix.patch # Fix port headers to not use classes deprecated in c++17. Gives errors when using the installed port headers make-all-find-packages-required.patch fix-tinyxml.patch + remove-tool-debug-suffix.patch ) # Upstream bug, see https://github.com/gwaldron/osgearth/issues/1002 file(REMOVE ${SOURCE_PATH}/src/osgEarth/tinyxml.h) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tools OSGEARTH_BUILD_TOOLS +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS ${CONFIGURE_OPTIONS} + OPTIONS ${FEATURE_OPTIONS} + -DOSGEARTH_BUILD_SHARED_LIBS=${BUILD_SHARED} + -DNRL_STATIC_LIBRARIES=${BUILD_STATIC} + -DOSG_IS_STATIC=${BUILD_STATIC} + -DGEOS_IS_STATIC=${BUILD_STATIC} + -DOSGEARTH_BUILD_EXAMPLES=OFF + -DOSGEARTH_BUILD_TESTS=OFF + -DOSGEARTH_BUILD_DOCS=OFF + -DOSGEARTH_BUILD_PROCEDURAL_NODEKIT=OFF + -DOSGEARTH_BUILD_TRITON_NODEKIT=OFF + -DOSGEARTH_BUILD_SILVERLINING_NODEKIT=OFF + -DWITH_EXTERNAL_TINYXML=ON ) vcpkg_install_cmake() -#Release if (WIN32 AND (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)) + #Release set(OSGEARTH_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/${PORT}) set(OSGEARTH_TOOL_PLUGIN_PATH ${OSGEARTH_TOOL_PATH}/${OSG_PLUGINS_SUBDIR}) @@ -60,6 +62,7 @@ if (WIN32 AND (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)) file(COPY ${OSGDB_PLUGINS} DESTINATION ${OSGEARTH_TOOL_PLUGIN_PATH}) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/${OSG_PLUGINS_SUBDIR}) + #Debug set(OSGEARTH_DEBUG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}) set(OSGEARTH_DEBUG_TOOL_PLUGIN_PATH ${OSGEARTH_DEBUG_TOOL_PATH}/${OSG_PLUGINS_SUBDIR}) @@ -72,9 +75,14 @@ if (WIN32 AND (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/${OSG_PLUGINS_SUBDIR}) endif() -#Debug +if ("tools" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES osgearth_3pv osgearth_atlas osgearth_boundarygen osgearth_clamp + osgearth_conv osgearth_overlayviewer osgearth_tfs osgearth_toc osgearth_version osgearth_viewer + AUTO_CLEAN + ) +endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/osgearth/remove-tool-debug-suffix.patch b/ports/osgearth/remove-tool-debug-suffix.patch new file mode 100644 index 00000000000000..24cbb2fe58a900 --- /dev/null +++ b/ports/osgearth/remove-tool-debug-suffix.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeModules/OsgEarthMacroUtils.cmake b/CMakeModules/OsgEarthMacroUtils.cmake +index 6e0eb46..12388c4 100644 +--- a/CMakeModules/OsgEarthMacroUtils.cmake ++++ b/CMakeModules/OsgEarthMacroUtils.cmake +@@ -364,8 +364,6 @@ MACRO(SETUP_EXE IS_COMMANDLINE_APP) + + SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES PROJECT_LABEL "${TARGET_LABEL}") + SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES OUTPUT_NAME ${TARGET_NAME}) +- SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES DEBUG_OUTPUT_NAME "${TARGET_NAME}${CMAKE_DEBUG_POSTFIX}") +- SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES RELEASE_OUTPUT_NAME "${TARGET_NAME}${CMAKE_RELEASE_POSTFIX}") + SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES RELWITHDEBINFO_OUTPUT_NAME "${TARGET_NAME}${CMAKE_RELWITHDEBINFO_POSTFIX}") + SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES MINSIZEREL_OUTPUT_NAME "${TARGET_NAME}${CMAKE_MINSIZEREL_POSTFIX}") + diff --git a/ports/osgearth/vcpkg.json b/ports/osgearth/vcpkg.json index d2330393d14168..1a84d6aa8362d1 100644 --- a/ports/osgearth/vcpkg.json +++ b/ports/osgearth/vcpkg.json @@ -1,7 +1,7 @@ { "name": "osgearth", "version": "3.1", - "port-version": 2, + "port-version": 3, "description": "osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2015 Pelican Mapping.", "homepage": "https://github.com/gwaldron/osgearth", "supports": "!(x86 | wasm32)", @@ -22,5 +22,13 @@ "protobuf", "sqlite3", "tinyxml" - ] + ], + "default-features": [ + "tools" + ], + "features": { + "tools": { + "description": "Build tools" + } + } } From 57058696bb748aad9050a45cec8d0528fedb37ae Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Thu, 28 Jan 2021 01:16:29 -0800 Subject: [PATCH 09/21] update version record --- versions/baseline.json | 2 +- versions/o-/osgearth.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index ef7e997e47a977..b5dc3786c055cb 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4374,7 +4374,7 @@ }, "osgearth": { "baseline": "3.1", - "port-version": 2 + "port-version": 3 }, "osi": { "baseline": "0.108.6", diff --git a/versions/o-/osgearth.json b/versions/o-/osgearth.json index 674e0b0abbf093..15a5a0042e5a9b 100644 --- a/versions/o-/osgearth.json +++ b/versions/o-/osgearth.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "175659f3ff915102b4ad83d854d14277206b3343", + "version": "3.1", + "port-version": 3 + }, { "git-tree": "9355b8ad52fcf4998fe4c262f29a4e01fa83b9fa", "version": "3.1", From f7cd946885ccf9838aae5377b71eab3a33e78575 Mon Sep 17 00:00:00 2001 From: ankurv Date: Sat, 30 Jan 2021 09:02:26 -0800 Subject: [PATCH 10/21] disable fontconfig on windows --- ports/osg/CONTROL | 2 +- ports/osg/portfile.cmake | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ports/osg/CONTROL b/ports/osg/CONTROL index 8d453c36c7901f..a05f5abe7116e1 100644 --- a/ports/osg/CONTROL +++ b/ports/osg/CONTROL @@ -1,6 +1,6 @@ Source: osg Version: 3.6.5 -Port-Version: 6 +Port-Version: 7 Homepage: https://github.com/openscenegraph/OpenSceneGraph Description: The OpenSceneGraph is an open source high performance 3D graphics toolkit. Build-Depends: zlib, fontconfig (!windows), expat (windows), openimageio (osx) diff --git a/ports/osg/portfile.cmake b/ports/osg/portfile.cmake index eaa94c2ddf7e30..b8aeaa71227085 100644 --- a/ports/osg/portfile.cmake +++ b/ports/osg/portfile.cmake @@ -54,6 +54,11 @@ if (VCPKG_TARGET_IS_WINDOWS AND OSG_DYNAMIC) endif() list(APPEND OPTIONS -DENABLE_NVTT=${ENABLE_NVTT}) +if (VCPKG_TARGET_IS_WINDOWS) + list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_FONTCONFIG=ON) + list(APPEND OPTIONS -DOSG_TEXT_USE_FONTCONFIG=OFF) +endif() + vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS tools BUILD_OSG_APPLICATIONS examples BUILD_OSG_EXAMPLES From d9ddecf60b4955cfdae46ca55131394abe449608 Mon Sep 17 00:00:00 2001 From: ankurv Date: Sat, 30 Jan 2021 09:02:57 -0800 Subject: [PATCH 11/21] update version --- versions/baseline.json | 2 +- versions/o-/osg.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 7b4f511bfe3c47..28c3fc56390418 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4370,7 +4370,7 @@ }, "osg": { "baseline": "3.6.5", - "port-version": 6 + "port-version": 7 }, "osg-qt": { "baseline": "Qt4", diff --git a/versions/o-/osg.json b/versions/o-/osg.json index 973c0de20fbfab..3a40b3ef90e7f0 100644 --- a/versions/o-/osg.json +++ b/versions/o-/osg.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "41c640888000654e84d2bf227b42973cc1ba15c9", + "version-string": "3.6.5", + "port-version": 7 + }, { "git-tree": "9b787269fae66af2447354c4e76ce0883c8d93b9", "version-string": "3.6.5", From 038397f17c772663497d9cebc1e6ec8c16495483 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Wed, 3 Feb 2021 22:47:53 -0800 Subject: [PATCH 12/21] [osgearth] Fix dependencies --- ports/osgearth/fix-dependencies.patch | 54 +++++++++++++++++++++++++++ ports/osgearth/fix-tinyxml.patch | 15 -------- ports/osgearth/portfile.cmake | 2 +- 3 files changed, 55 insertions(+), 16 deletions(-) create mode 100644 ports/osgearth/fix-dependencies.patch delete mode 100644 ports/osgearth/fix-tinyxml.patch diff --git a/ports/osgearth/fix-dependencies.patch b/ports/osgearth/fix-dependencies.patch new file mode 100644 index 00000000000000..f4a72d8973f4a2 --- /dev/null +++ b/ports/osgearth/fix-dependencies.patch @@ -0,0 +1,54 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 001ebf1..f0a0a55 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -128,24 +128,32 @@ ENDIF (OSGEARTH_USE_GLES) + + # required + find_package(OSG REQUIRED) +-find_package(CURL REQUIRED) ++find_package(CURL CONFIG REQUIRED) ++set(CURL_LIBRARY CURL::libcurl) + find_package(GDAL REQUIRED) ++set(GDAL_LIBRARY ${GDAL_LIBRARIES}) + + # optional +-find_package(GEOS REQUIRED) +-find_package(Sqlite3 REQUIRED) ++find_package(geos CONFIG REQUIRED) ++set(GEOS_LIBRARY GEOS::geos GEOS::geos_c) ++find_package(unofficial-sqlite3 CONFIG REQUIRED) ++set(SQLITE3_LIBRARY unofficial::sqlite3::sqlite3) + find_package(Draco REQUIRED) + find_package(BASISU REQUIRED) + find_package(GLEW REQUIRED) +-find_package(Protobuf REQUIRED) +-find_package(WEBP REQUIRED) ++set(GLEW_LIBRARIES GLEW::GLEW) ++find_package(protobuf CONFIG REQUIRED) ++set(Protobuf_LIBRARIES protobuf::libprotoc protobuf::libprotobuf) ++find_package(WebP CONFIG REQUIRED) ++set(WEBP_LIBRARY WebP::webp) + + if(OSGEARTH_ENABLE_PROFILING) + find_package(Tracy REQUIRED) + endif() + + if(OSGEARTH_BUILD_ZIP_PLUGIN) +- find_package(LIBZIP REQUIRED) ++ find_package(libzip CONFIG REQUIRED) ++ set(LIBZIP_LIBRARY libzip::zip) + endif() + + if(OSGEARTH_BUILD_TRITON_NODEKIT) +@@ -193,7 +201,9 @@ OPTION(OSGEARTH_INSTALL_SHADERS "Whether to deploy GLSL shaders when doing a Mak + # TinyXML is an XML parsing library + SET (WITH_EXTERNAL_TINYXML FALSE CACHE BOOL "Use bundled or system wide version of TinyXML") + IF (WITH_EXTERNAL_TINYXML) +- find_package(TinyXML REQUIRED) ++ find_package(tinyxml CONFIG REQUIRED) ++ set(TINYXML_FOUND 1) ++ set(TINYXML_LIBRARY unofficial-tinyxml::unofficial-tinyxml) + ENDIF (WITH_EXTERNAL_TINYXML) + + # postfix settings for various configs diff --git a/ports/osgearth/fix-tinyxml.patch b/ports/osgearth/fix-tinyxml.patch deleted file mode 100644 index 9f9a6d96ff4c67..00000000000000 --- a/ports/osgearth/fix-tinyxml.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c78bd16..bf31091 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -193,7 +193,9 @@ OPTION(OSGEARTH_INSTALL_SHADERS "Whether to deploy GLSL shaders when doing a Mak - # TinyXML is an XML parsing library - SET (WITH_EXTERNAL_TINYXML FALSE CACHE BOOL "Use bundled or system wide version of TinyXML") - IF (WITH_EXTERNAL_TINYXML) -- find_package(TinyXML REQUIRED) -+ find_package(tinyxml CONFIG REQUIRED) -+ set(TINYXML_FOUND 1) -+ set(TINYXML_LIBRARY unofficial-tinyxml::unofficial-tinyxml) - ENDIF (WITH_EXTERNAL_TINYXML) - - # postfix settings for various configs diff --git a/ports/osgearth/portfile.cmake b/ports/osgearth/portfile.cmake index b3efe6101b1731..8f6b6c7330e1a9 100644 --- a/ports/osgearth/portfile.cmake +++ b/ports/osgearth/portfile.cmake @@ -18,7 +18,7 @@ vcpkg_from_github( StaticOSG.patch # Fix port compilation in static-md module deprecated_cpp_fix.patch # Fix port headers to not use classes deprecated in c++17. Gives errors when using the installed port headers make-all-find-packages-required.patch - fix-tinyxml.patch + fix-dependencies.patch remove-tool-debug-suffix.patch ) From aba71ed6173cfc2f978323194550a9e94aa68b34 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Thu, 4 Feb 2021 00:12:02 -0800 Subject: [PATCH 13/21] [osgearth] Re-fix dependencies --- ports/osgearth/fix-dependencies.patch | 19 ++++++++++++++++--- ports/osgearth/portfile.cmake | 1 + 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ports/osgearth/fix-dependencies.patch b/ports/osgearth/fix-dependencies.patch index f4a72d8973f4a2..54c414875bb15d 100644 --- a/ports/osgearth/fix-dependencies.patch +++ b/ports/osgearth/fix-dependencies.patch @@ -1,34 +1,46 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 001ebf1..f0a0a55 100644 +index 001ebf1..8e49af2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -128,24 +128,32 @@ ENDIF (OSGEARTH_USE_GLES) +@@ -128,24 +128,45 @@ ENDIF (OSGEARTH_USE_GLES) # required find_package(OSG REQUIRED) -find_package(CURL REQUIRED) +find_package(CURL CONFIG REQUIRED) +set(CURL_LIBRARY CURL::libcurl) ++ find_package(GDAL REQUIRED) +set(GDAL_LIBRARY ${GDAL_LIBRARIES}) ++set(GDAL_FOUND 1) # optional -find_package(GEOS REQUIRED) -find_package(Sqlite3 REQUIRED) +find_package(geos CONFIG REQUIRED) +set(GEOS_LIBRARY GEOS::geos GEOS::geos_c) ++set(GEOS_FOUND 1) ++ +find_package(unofficial-sqlite3 CONFIG REQUIRED) ++set(SQLITE3_FOUND 1) +set(SQLITE3_LIBRARY unofficial::sqlite3::sqlite3) ++ find_package(Draco REQUIRED) find_package(BASISU REQUIRED) ++ find_package(GLEW REQUIRED) -find_package(Protobuf REQUIRED) -find_package(WEBP REQUIRED) +set(GLEW_LIBRARIES GLEW::GLEW) ++set(GLEW_FOUND 1) ++ +find_package(protobuf CONFIG REQUIRED) +set(Protobuf_LIBRARIES protobuf::libprotoc protobuf::libprotobuf) ++set(Protobuf_FOUND 1) ++ +find_package(WebP CONFIG REQUIRED) +set(WEBP_LIBRARY WebP::webp) ++set(WEBP_FOUND 1) if(OSGEARTH_ENABLE_PROFILING) find_package(Tracy REQUIRED) @@ -38,10 +50,11 @@ index 001ebf1..f0a0a55 100644 - find_package(LIBZIP REQUIRED) + find_package(libzip CONFIG REQUIRED) + set(LIBZIP_LIBRARY libzip::zip) ++ set(LIBZIP_FOUND 1) endif() if(OSGEARTH_BUILD_TRITON_NODEKIT) -@@ -193,7 +201,9 @@ OPTION(OSGEARTH_INSTALL_SHADERS "Whether to deploy GLSL shaders when doing a Mak +@@ -193,7 +214,9 @@ OPTION(OSGEARTH_INSTALL_SHADERS "Whether to deploy GLSL shaders when doing a Mak # TinyXML is an XML parsing library SET (WITH_EXTERNAL_TINYXML FALSE CACHE BOOL "Use bundled or system wide version of TinyXML") IF (WITH_EXTERNAL_TINYXML) diff --git a/ports/osgearth/portfile.cmake b/ports/osgearth/portfile.cmake index 8f6b6c7330e1a9..dcce15f3c0182c 100644 --- a/ports/osgearth/portfile.cmake +++ b/ports/osgearth/portfile.cmake @@ -40,6 +40,7 @@ vcpkg_configure_cmake( -DNRL_STATIC_LIBRARIES=${BUILD_STATIC} -DOSG_IS_STATIC=${BUILD_STATIC} -DGEOS_IS_STATIC=${BUILD_STATIC} + -DCURL_IS_STATIC=${BUILD_STATIC} -DOSGEARTH_BUILD_EXAMPLES=OFF -DOSGEARTH_BUILD_TESTS=OFF -DOSGEARTH_BUILD_DOCS=OFF From 35ad56d49e5c07a1204fdfc82eec7953afa99d8f Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Thu, 4 Feb 2021 00:15:17 -0800 Subject: [PATCH 14/21] [osgearth] Fix the sequence of linking osg --- ports/osgearth/fix-osg-link-sequence.patch | 16 ++++++++++++++++ ports/osgearth/portfile.cmake | 1 + 2 files changed, 17 insertions(+) create mode 100644 ports/osgearth/fix-osg-link-sequence.patch diff --git a/ports/osgearth/fix-osg-link-sequence.patch b/ports/osgearth/fix-osg-link-sequence.patch new file mode 100644 index 00000000000000..067755b4c5111d --- /dev/null +++ b/ports/osgearth/fix-osg-link-sequence.patch @@ -0,0 +1,16 @@ +diff --git a/src/osgEarth/CMakeLists.txt b/src/osgEarth/CMakeLists.txt +index c49bfcd..fe8c451 100644 +--- a/src/osgEarth/CMakeLists.txt ++++ b/src/osgEarth/CMakeLists.txt +@@ -870,9 +870,9 @@ ENDIF(TRACY_FOUND) + + OPTION(NRL_STATIC_LIBRARIES "Link osgEarth against static GDAL and cURL, including static OpenSSL, Proj4, JPEG, PNG, and TIFF." OFF) + if(NOT NRL_STATIC_LIBRARIES) +- LINK_WITH_VARIABLES(${LIB_NAME} OSG_LIBRARY OSGUTIL_LIBRARY OSGSIM_LIBRARY OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OPENTHREADS_LIBRARY CURL_LIBRARY GDAL_LIBRARY OSGMANIPULATOR_LIBRARY) ++ LINK_WITH_VARIABLES(${LIB_NAME} OSGSIM_LIBRARY OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OPENTHREADS_LIBRARY CURL_LIBRARY GDAL_LIBRARIES OSGMANIPULATOR_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY) + else(NOT NRL_STATIC_LIBRARIES) +- LINK_WITH_VARIABLES(${LIB_NAME} OSG_LIBRARY OSGUTIL_LIBRARY OSGSIM_LIBRARY OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OPENTHREADS_LIBRARY CURL_LIBRARY GDAL_LIBRARY OSGMANIPULATOR_LIBRARY SSL_EAY_RELEASE LIB_EAY_RELEASE TIFF_LIBRARY PROJ4_LIBRARY PNG_LIBRARY JPEG_LIBRARY) ++ LINK_WITH_VARIABLES(${LIB_NAME} OSGSIM_LIBRARY OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY CURL_LIBRARY GDAL_LIBRARIES OSGMANIPULATOR_LIBRARY SSL_EAY_RELEASE LIB_EAY_RELEASE TIFF_LIBRARY PROJ4_LIBRARY PNG_LIBRARY JPEG_LIBRARY) + endif(NOT NRL_STATIC_LIBRARIES) + + LINK_CORELIB_DEFAULT(${LIB_NAME} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIBRARY}) diff --git a/ports/osgearth/portfile.cmake b/ports/osgearth/portfile.cmake index dcce15f3c0182c..126ab012f858da 100644 --- a/ports/osgearth/portfile.cmake +++ b/ports/osgearth/portfile.cmake @@ -19,6 +19,7 @@ vcpkg_from_github( deprecated_cpp_fix.patch # Fix port headers to not use classes deprecated in c++17. Gives errors when using the installed port headers make-all-find-packages-required.patch fix-dependencies.patch + fix-osg-link-sequence.patch remove-tool-debug-suffix.patch ) From 4b0234a8563d21c5c6f1e7d889845eea6490e108 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Mon, 8 Feb 2021 20:06:02 -0800 Subject: [PATCH 15/21] [osgearth] Fix dependency osg --- ports/osgearth/fix-dependency-osg.patch | 164 +++++++++++++++++++++ ports/osgearth/fix-osg-link-sequence.patch | 16 -- ports/osgearth/portfile.cmake | 2 +- 3 files changed, 165 insertions(+), 17 deletions(-) create mode 100644 ports/osgearth/fix-dependency-osg.patch delete mode 100644 ports/osgearth/fix-osg-link-sequence.patch diff --git a/ports/osgearth/fix-dependency-osg.patch b/ports/osgearth/fix-dependency-osg.patch new file mode 100644 index 00000000000000..7d1ca07e9d5995 --- /dev/null +++ b/ports/osgearth/fix-dependency-osg.patch @@ -0,0 +1,164 @@ +diff --git a/CMakeModules/FindOSG.cmake b/CMakeModules/FindOSG.cmake +index b7dff11..d1ec2ff 100644 +--- a/CMakeModules/FindOSG.cmake ++++ b/CMakeModules/FindOSG.cmake +@@ -121,5 +121,29 @@ IF( OSG_LIBRARY AND OSG_INCLUDE_DIR ) + SET( OSG_FOUND "YES" ) + SET( OSG_INCLUDE_DIRS ${OSG_INCLUDE_DIR} ${OSG_GEN_INCLUDE_DIR} ) + GET_FILENAME_COMPONENT( OSG_LIBRARIES_DIR ${OSG_LIBRARY} PATH ) ++ ++ find_package(ZLIB REQUIRED) ++ set(ZLIB_LIBRARY ZLIB::ZLIB) ++ ++ find_package(freetype CONFIG REQUIRED) ++ set(FREETYPE_LIBRARY freetype) ++ ++ find_package(unofficial-brotli CONFIG REQUIRED) ++ find_package(BZip2 REQUIRED) ++ ++ FIND_LIBRARY(UUID_LIBRARY_DEBUG uuid libuuid NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) ++ FIND_LIBRARY(UUID_LIBRARY_RELEASE uuid libuuid NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) ++ select_library_configurations(UUID) ++ ++ FIND_LIBRARY(FONTCONFIG_LIBRARY_DEBUG fontconfig libfontconfig NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) ++ FIND_LIBRARY(FONTCONFIG_LIBRARY_RELEASE fontconfig libfontconfig NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) ++ select_library_configurations(FONTCONFIG) ++ ++ set(FONTCONFIG_LIBRARY ${FONTCONFIG_LIBRARY} ${FREETYPE_LIBRARY} ${UUID_LIBRARY}) ++ ++ SET(OSG_DEPENDS_LIBRARY ${FONTCONFIG_LIBRARY}) ++ if (UNIX) ++ SET(OSG_DEPENDS_LIBRARY ${OSG_DEPENDS_LIBRARY} -pthread) ++ endif() + ENDIF( OSG_LIBRARY AND OSG_INCLUDE_DIR ) + +diff --git a/src/applications/osgearth_3pv/CMakeLists.txt b/src/applications/osgearth_3pv/CMakeLists.txt +index e1dc876..6d688ff 100644 +--- a/src/applications/osgearth_3pv/CMakeLists.txt ++++ b/src/applications/osgearth_3pv/CMakeLists.txt +@@ -1,5 +1,5 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_SRC osgearth_3pv.cpp ) + +diff --git a/src/applications/osgearth_atlas/CMakeLists.txt b/src/applications/osgearth_atlas/CMakeLists.txt +index aadbb5e..69698c7 100644 +--- a/src/applications/osgearth_atlas/CMakeLists.txt ++++ b/src/applications/osgearth_atlas/CMakeLists.txt +@@ -1,6 +1,6 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) + +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_SRC osgearth_atlas.cpp ) + +diff --git a/src/applications/osgearth_boundarygen/CMakeLists.txt b/src/applications/osgearth_boundarygen/CMakeLists.txt +index fe9ec6b..52915b0 100644 +--- a/src/applications/osgearth_boundarygen/CMakeLists.txt ++++ b/src/applications/osgearth_boundarygen/CMakeLists.txt +@@ -1,5 +1,5 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_H + BoundaryUtil +diff --git a/src/applications/osgearth_clamp/CMakeLists.txt b/src/applications/osgearth_clamp/CMakeLists.txt +index 996ea43..728ee77 100644 +--- a/src/applications/osgearth_clamp/CMakeLists.txt ++++ b/src/applications/osgearth_clamp/CMakeLists.txt +@@ -1,5 +1,5 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OPENTHREADS_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_SRC osgearth_clamp.cpp) + +diff --git a/src/applications/osgearth_conv/CMakeLists.txt b/src/applications/osgearth_conv/CMakeLists.txt +index a77d703..2aac5f2 100644 +--- a/src/applications/osgearth_conv/CMakeLists.txt ++++ b/src/applications/osgearth_conv/CMakeLists.txt +@@ -1,5 +1,5 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OPENTHREADS_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_SRC osgearth_conv.cpp ) + +diff --git a/src/applications/osgearth_overlayviewer/CMakeLists.txt b/src/applications/osgearth_overlayviewer/CMakeLists.txt +index bb2802a..5175cfc 100644 +--- a/src/applications/osgearth_overlayviewer/CMakeLists.txt ++++ b/src/applications/osgearth_overlayviewer/CMakeLists.txt +@@ -1,5 +1,5 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_SRC osgearth_overlayviewer.cpp ) + +diff --git a/src/applications/osgearth_tfs/CMakeLists.txt b/src/applications/osgearth_tfs/CMakeLists.txt +index 90c153a..d331019 100644 +--- a/src/applications/osgearth_tfs/CMakeLists.txt ++++ b/src/applications/osgearth_tfs/CMakeLists.txt +@@ -1,6 +1,6 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) + +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_SRC osgearth_tfs.cpp ) + +diff --git a/src/applications/osgearth_toc/CMakeLists.txt b/src/applications/osgearth_toc/CMakeLists.txt +index b32c523..7b25b79 100644 +--- a/src/applications/osgearth_toc/CMakeLists.txt ++++ b/src/applications/osgearth_toc/CMakeLists.txt +@@ -1,5 +1,5 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY OSGWIDGET_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGWIDGET_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_SRC osgearth_toc.cpp ) + +diff --git a/src/applications/osgearth_version/CMakeLists.txt b/src/applications/osgearth_version/CMakeLists.txt +index 1f1d48d..01e963b 100644 +--- a/src/applications/osgearth_version/CMakeLists.txt ++++ b/src/applications/osgearth_version/CMakeLists.txt +@@ -1,5 +1,5 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_SRC osgearth_version.cpp ) + +diff --git a/src/applications/osgearth_viewer/CMakeLists.txt b/src/applications/osgearth_viewer/CMakeLists.txt +index 8c61e42..bbda7be 100644 +--- a/src/applications/osgearth_viewer/CMakeLists.txt ++++ b/src/applications/osgearth_viewer/CMakeLists.txt +@@ -1,5 +1,5 @@ + INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} ) +-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY) ++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY) + + SET(TARGET_SRC osgearth_viewer.cpp ) + +diff --git a/src/osgEarth/CMakeLists.txt b/src/osgEarth/CMakeLists.txt +index c49bfcd..a7b9a2d 100644 +--- a/src/osgEarth/CMakeLists.txt ++++ b/src/osgEarth/CMakeLists.txt +@@ -870,9 +870,11 @@ ENDIF(TRACY_FOUND) + + OPTION(NRL_STATIC_LIBRARIES "Link osgEarth against static GDAL and cURL, including static OpenSSL, Proj4, JPEG, PNG, and TIFF." OFF) + if(NOT NRL_STATIC_LIBRARIES) +- LINK_WITH_VARIABLES(${LIB_NAME} OSG_LIBRARY OSGUTIL_LIBRARY OSGSIM_LIBRARY OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OPENTHREADS_LIBRARY CURL_LIBRARY GDAL_LIBRARY OSGMANIPULATOR_LIBRARY) ++ LINK_WITH_VARIABLES(${LIB_NAME} OSGSIM_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGDB_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OPENTHREADS_LIBRARY OSGMANIPULATOR_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY) ++ TARGET_LINK_LIBRARIES(${LIB_NAME} ${OSG_DEPENDS_LIBRARY} ${CURL_LIBRARY} ${GDAL_LIBRARIES}) + else(NOT NRL_STATIC_LIBRARIES) +- LINK_WITH_VARIABLES(${LIB_NAME} OSG_LIBRARY OSGUTIL_LIBRARY OSGSIM_LIBRARY OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OPENTHREADS_LIBRARY CURL_LIBRARY GDAL_LIBRARY OSGMANIPULATOR_LIBRARY SSL_EAY_RELEASE LIB_EAY_RELEASE TIFF_LIBRARY PROJ4_LIBRARY PNG_LIBRARY JPEG_LIBRARY) ++ LINK_WITH_VARIABLES(${LIB_NAME} OSGSIM_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGDB_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OPENTHREADS_LIBRARY OSGMANIPULATOR_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY) ++ TARGET_LINK_LIBRARIES(${LIB_NAME} ${OSG_DEPENDS_LIBRARY} ${CURL_LIBRARY} ${GDAL_LIBRARIES} ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE} ${TIFF_LIBRARY} ${PROJ4_LIBRARY} ${PNG_LIBRARY} ${JPEG_LIBRARY}) + endif(NOT NRL_STATIC_LIBRARIES) + + LINK_CORELIB_DEFAULT(${LIB_NAME} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIBRARY}) diff --git a/ports/osgearth/fix-osg-link-sequence.patch b/ports/osgearth/fix-osg-link-sequence.patch deleted file mode 100644 index 067755b4c5111d..00000000000000 --- a/ports/osgearth/fix-osg-link-sequence.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/src/osgEarth/CMakeLists.txt b/src/osgEarth/CMakeLists.txt -index c49bfcd..fe8c451 100644 ---- a/src/osgEarth/CMakeLists.txt -+++ b/src/osgEarth/CMakeLists.txt -@@ -870,9 +870,9 @@ ENDIF(TRACY_FOUND) - - OPTION(NRL_STATIC_LIBRARIES "Link osgEarth against static GDAL and cURL, including static OpenSSL, Proj4, JPEG, PNG, and TIFF." OFF) - if(NOT NRL_STATIC_LIBRARIES) -- LINK_WITH_VARIABLES(${LIB_NAME} OSG_LIBRARY OSGUTIL_LIBRARY OSGSIM_LIBRARY OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OPENTHREADS_LIBRARY CURL_LIBRARY GDAL_LIBRARY OSGMANIPULATOR_LIBRARY) -+ LINK_WITH_VARIABLES(${LIB_NAME} OSGSIM_LIBRARY OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OPENTHREADS_LIBRARY CURL_LIBRARY GDAL_LIBRARIES OSGMANIPULATOR_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY) - else(NOT NRL_STATIC_LIBRARIES) -- LINK_WITH_VARIABLES(${LIB_NAME} OSG_LIBRARY OSGUTIL_LIBRARY OSGSIM_LIBRARY OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OPENTHREADS_LIBRARY CURL_LIBRARY GDAL_LIBRARY OSGMANIPULATOR_LIBRARY SSL_EAY_RELEASE LIB_EAY_RELEASE TIFF_LIBRARY PROJ4_LIBRARY PNG_LIBRARY JPEG_LIBRARY) -+ LINK_WITH_VARIABLES(${LIB_NAME} OSGSIM_LIBRARY OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY CURL_LIBRARY GDAL_LIBRARIES OSGMANIPULATOR_LIBRARY SSL_EAY_RELEASE LIB_EAY_RELEASE TIFF_LIBRARY PROJ4_LIBRARY PNG_LIBRARY JPEG_LIBRARY) - endif(NOT NRL_STATIC_LIBRARIES) - - LINK_CORELIB_DEFAULT(${LIB_NAME} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIBRARY}) diff --git a/ports/osgearth/portfile.cmake b/ports/osgearth/portfile.cmake index 126ab012f858da..4a7270469740a5 100644 --- a/ports/osgearth/portfile.cmake +++ b/ports/osgearth/portfile.cmake @@ -19,7 +19,7 @@ vcpkg_from_github( deprecated_cpp_fix.patch # Fix port headers to not use classes deprecated in c++17. Gives errors when using the installed port headers make-all-find-packages-required.patch fix-dependencies.patch - fix-osg-link-sequence.patch + fix-dependency-osg.patch remove-tool-debug-suffix.patch ) From e6ec1ca06b27786685a8bdd009dccf91844d4505 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Mon, 8 Feb 2021 20:07:00 -0800 Subject: [PATCH 16/21] update version record --- versions/o-/osgearth.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/o-/osgearth.json b/versions/o-/osgearth.json index 15a5a0042e5a9b..6811e33f54ee3e 100644 --- a/versions/o-/osgearth.json +++ b/versions/o-/osgearth.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "175659f3ff915102b4ad83d854d14277206b3343", + "git-tree": "c85b88a5b9fb4247b1d4189d7e102783255d72c3", "version": "3.1", "port-version": 3 }, From 64a9ce7e8450a8c14c6145bdbabe1c904de36277 Mon Sep 17 00:00:00 2001 From: Ankur Verma Date: Fri, 19 Mar 2021 15:44:46 -0700 Subject: [PATCH 17/21] Fix osgearth:x64-linux --- ports/osgearth/fix-dependency-osg.patch | 38 +++++++++++++++++-------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/ports/osgearth/fix-dependency-osg.patch b/ports/osgearth/fix-dependency-osg.patch index 7d1ca07e9d5995..9c9148cfa136da 100644 --- a/ports/osgearth/fix-dependency-osg.patch +++ b/ports/osgearth/fix-dependency-osg.patch @@ -2,7 +2,7 @@ diff --git a/CMakeModules/FindOSG.cmake b/CMakeModules/FindOSG.cmake index b7dff11..d1ec2ff 100644 --- a/CMakeModules/FindOSG.cmake +++ b/CMakeModules/FindOSG.cmake -@@ -121,5 +121,29 @@ IF( OSG_LIBRARY AND OSG_INCLUDE_DIR ) +@@ -121,5 +121,43 @@ IF( OSG_LIBRARY AND OSG_INCLUDE_DIR ) SET( OSG_FOUND "YES" ) SET( OSG_INCLUDE_DIRS ${OSG_INCLUDE_DIR} ${OSG_GEN_INCLUDE_DIR} ) GET_FILENAME_COMPONENT( OSG_LIBRARIES_DIR ${OSG_LIBRARY} PATH ) @@ -16,17 +16,31 @@ index b7dff11..d1ec2ff 100644 + find_package(unofficial-brotli CONFIG REQUIRED) + find_package(BZip2 REQUIRED) + -+ FIND_LIBRARY(UUID_LIBRARY_DEBUG uuid libuuid NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) -+ FIND_LIBRARY(UUID_LIBRARY_RELEASE uuid libuuid NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) -+ select_library_configurations(UUID) -+ -+ FIND_LIBRARY(FONTCONFIG_LIBRARY_DEBUG fontconfig libfontconfig NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) -+ FIND_LIBRARY(FONTCONFIG_LIBRARY_RELEASE fontconfig libfontconfig NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) -+ select_library_configurations(FONTCONFIG) -+ -+ set(FONTCONFIG_LIBRARY ${FONTCONFIG_LIBRARY} ${FREETYPE_LIBRARY} ${UUID_LIBRARY}) -+ -+ SET(OSG_DEPENDS_LIBRARY ${FONTCONFIG_LIBRARY}) ++ find_package(libpng CONFIG REQUIRED) ++ find_package(JPEG REQUIRED) ++ find_package(TIFF REQUIRED) ++ ++ if (UNIX) ++ FIND_LIBRARY(UUID_LIBRARY_DEBUG uuid libuuid NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) ++ FIND_LIBRARY(UUID_LIBRARY_RELEASE uuid libuuid NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) ++ select_library_configurations(UUID) ++ ++ FIND_LIBRARY(FONTCONFIG_LIBRARY_DEBUG fontconfig libfontconfig NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) ++ FIND_LIBRARY(FONTCONFIG_LIBRARY_RELEASE fontconfig libfontconfig NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) ++ select_library_configurations(FONTCONFIG) ++ ++ set(FONTCONFIG_LIBRARY ${FONTCONFIG_LIBRARY} ${FREETYPE_LIBRARY} ${UUID_LIBRARY}) ++ endif() ++ ++ SET(OSG_DEPENDS_LIBRARY ${FONTCONFIG_LIBRARY} PNG::PNG JPEG::JPEG TIFF::TIFF ${GIF_LIBRARIES} ${CFITSIO_LIBRARY}) ++ ++ foreach (libname gdal proj json-c sqlite3 expat zstd webp gif cfitsio) ++ find_library(${libname}_LIBRARY_RELEASE NAMES ${libname} NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) ++ find_library(${libname}_LIBRARY_DEBUG NAMES ${libname} ${libname}d NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) ++ select_library_configurations(${libname}) ++ list(APPEND OSG_DEPENDS_LIBRARY ${${libname}_LIBRARY}) ++ endforeach() ++ + if (UNIX) + SET(OSG_DEPENDS_LIBRARY ${OSG_DEPENDS_LIBRARY} -pthread) + endif() From cc684a336ab26bfe5ebd7707ad4cec7b9013177e Mon Sep 17 00:00:00 2001 From: ankurv Date: Sat, 20 Mar 2021 00:21:54 -0700 Subject: [PATCH 18/21] x64-windows-static-md fixes --- ports/osgearth/fix-dependency-osg.patch | 31 ++++++++++--------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/ports/osgearth/fix-dependency-osg.patch b/ports/osgearth/fix-dependency-osg.patch index 9c9148cfa136da..f553b746e44d06 100644 --- a/ports/osgearth/fix-dependency-osg.patch +++ b/ports/osgearth/fix-dependency-osg.patch @@ -2,7 +2,7 @@ diff --git a/CMakeModules/FindOSG.cmake b/CMakeModules/FindOSG.cmake index b7dff11..d1ec2ff 100644 --- a/CMakeModules/FindOSG.cmake +++ b/CMakeModules/FindOSG.cmake -@@ -121,5 +121,43 @@ IF( OSG_LIBRARY AND OSG_INCLUDE_DIR ) +@@ -121,5 +121,36 @@ IF( OSG_LIBRARY AND OSG_INCLUDE_DIR ) SET( OSG_FOUND "YES" ) SET( OSG_INCLUDE_DIRS ${OSG_INCLUDE_DIR} ${OSG_GEN_INCLUDE_DIR} ) GET_FILENAME_COMPONENT( OSG_LIBRARIES_DIR ${OSG_LIBRARY} PATH ) @@ -15,35 +15,28 @@ index b7dff11..d1ec2ff 100644 + + find_package(unofficial-brotli CONFIG REQUIRED) + find_package(BZip2 REQUIRED) -+ ++ find_package(expat CONFIG REQUIRED) + find_package(libpng CONFIG REQUIRED) + find_package(JPEG REQUIRED) + find_package(TIFF REQUIRED) ++ find_package(zstd REQUIRED) ++ find_package(gif REQUIRED) + ++ list(APPEND OSG_DEPENDS_LIBRARY expat::expat PNG::PNG JPEG::JPEG TIFF::TIFF zstd::libzstd_static ${GIF_LIBRARIES} ${CFITSIO_LIBRARY}) + if (UNIX) -+ FIND_LIBRARY(UUID_LIBRARY_DEBUG uuid libuuid NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) -+ FIND_LIBRARY(UUID_LIBRARY_RELEASE uuid libuuid NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) -+ select_library_configurations(UUID) -+ -+ FIND_LIBRARY(FONTCONFIG_LIBRARY_DEBUG fontconfig libfontconfig NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) -+ FIND_LIBRARY(FONTCONFIG_LIBRARY_RELEASE fontconfig libfontconfig NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) -+ select_library_configurations(FONTCONFIG) -+ -+ set(FONTCONFIG_LIBRARY ${FONTCONFIG_LIBRARY} ${FREETYPE_LIBRARY} ${UUID_LIBRARY}) ++ list(APPEND OSG_DEPENDS_LIBRARY ${OSG_DEPENDS_LIBRARY} -pthread) ++ # Due to Linux Linker dependency issues these need to included again ++ set(DEPEND_LIB_LIST fontconfig uuid gdal json-c expat zstd proj sqlite3 webp gif cfitsio) ++ else(UNIX) ++ set(DEPEND_LIB_LIST cfitsio) + endif() -+ -+ SET(OSG_DEPENDS_LIBRARY ${FONTCONFIG_LIBRARY} PNG::PNG JPEG::JPEG TIFF::TIFF ${GIF_LIBRARIES} ${CFITSIO_LIBRARY}) -+ -+ foreach (libname gdal proj json-c sqlite3 expat zstd webp gif cfitsio) ++ foreach (libname ${DEPEND_LIB_LIST}) + find_library(${libname}_LIBRARY_RELEASE NAMES ${libname} NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) -+ find_library(${libname}_LIBRARY_DEBUG NAMES ${libname} ${libname}d NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) ++ find_library(${libname}_LIBRARY_DEBUG NAMES ${libname} ${libname}d ${libname}_d NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) + select_library_configurations(${libname}) + list(APPEND OSG_DEPENDS_LIBRARY ${${libname}_LIBRARY}) + endforeach() + -+ if (UNIX) -+ SET(OSG_DEPENDS_LIBRARY ${OSG_DEPENDS_LIBRARY} -pthread) -+ endif() ENDIF( OSG_LIBRARY AND OSG_INCLUDE_DIR ) diff --git a/src/applications/osgearth_3pv/CMakeLists.txt b/src/applications/osgearth_3pv/CMakeLists.txt From 0ca45c7f56563fabd4417f735a5c4e945394dc19 Mon Sep 17 00:00:00 2001 From: Ankur Verma Date: Sat, 20 Mar 2021 14:31:29 -0700 Subject: [PATCH 19/21] Fix x64-linux --- ports/osgearth/fix-dependency-osg.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/osgearth/fix-dependency-osg.patch b/ports/osgearth/fix-dependency-osg.patch index f553b746e44d06..87425b1890107b 100644 --- a/ports/osgearth/fix-dependency-osg.patch +++ b/ports/osgearth/fix-dependency-osg.patch @@ -20,7 +20,7 @@ index b7dff11..d1ec2ff 100644 + find_package(JPEG REQUIRED) + find_package(TIFF REQUIRED) + find_package(zstd REQUIRED) -+ find_package(gif REQUIRED) ++ find_package(GIF REQUIRED) + + list(APPEND OSG_DEPENDS_LIBRARY expat::expat PNG::PNG JPEG::JPEG TIFF::TIFF zstd::libzstd_static ${GIF_LIBRARIES} ${CFITSIO_LIBRARY}) + if (UNIX) From 845f03655d0d72e5b81a94a8815f75c81554985d Mon Sep 17 00:00:00 2001 From: Ankur Verma Date: Sat, 20 Mar 2021 19:30:20 -0700 Subject: [PATCH 20/21] Build fixes --- ports/osgearth/fix-dependency-osg.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/osgearth/fix-dependency-osg.patch b/ports/osgearth/fix-dependency-osg.patch index 87425b1890107b..b6d00a06f11a3d 100644 --- a/ports/osgearth/fix-dependency-osg.patch +++ b/ports/osgearth/fix-dependency-osg.patch @@ -10,23 +10,22 @@ index b7dff11..d1ec2ff 100644 + find_package(ZLIB REQUIRED) + set(ZLIB_LIBRARY ZLIB::ZLIB) + -+ find_package(freetype CONFIG REQUIRED) -+ set(FREETYPE_LIBRARY freetype) ++ find_package(Freetype REQUIRED) ++ set(FREETYPE_LIBRARY Freetype::Freetype) + + find_package(unofficial-brotli CONFIG REQUIRED) + find_package(BZip2 REQUIRED) + find_package(expat CONFIG REQUIRED) -+ find_package(libpng CONFIG REQUIRED) ++ find_package(PNG REQUIRED) + find_package(JPEG REQUIRED) + find_package(TIFF REQUIRED) + find_package(zstd REQUIRED) + find_package(GIF REQUIRED) + -+ list(APPEND OSG_DEPENDS_LIBRARY expat::expat PNG::PNG JPEG::JPEG TIFF::TIFF zstd::libzstd_static ${GIF_LIBRARIES} ${CFITSIO_LIBRARY}) + if (UNIX) + list(APPEND OSG_DEPENDS_LIBRARY ${OSG_DEPENDS_LIBRARY} -pthread) + # Due to Linux Linker dependency issues these need to included again -+ set(DEPEND_LIB_LIST fontconfig uuid gdal json-c expat zstd proj sqlite3 webp gif cfitsio) ++ set(DEPEND_LIB_LIST fontconfig freetype uuid gdal json-c expat zstd proj sqlite3 webp gif cfitsio) + else(UNIX) + set(DEPEND_LIB_LIST cfitsio) + endif() @@ -36,6 +35,7 @@ index b7dff11..d1ec2ff 100644 + select_library_configurations(${libname}) + list(APPEND OSG_DEPENDS_LIBRARY ${${libname}_LIBRARY}) + endforeach() ++ list(APPEND OSG_DEPENDS_LIBRARY ZLIB::ZLIB Freetype::Freetype expat::expat PNG::PNG JPEG::JPEG TIFF::TIFF ${GIF_LIBRARIES} ${CFITSIO_LIBRARY}) + ENDIF( OSG_LIBRARY AND OSG_INCLUDE_DIR ) From f3c899afa4c43007a8c1cd87d01ed274865c4282 Mon Sep 17 00:00:00 2001 From: Ankur Verma Date: Sat, 20 Mar 2021 19:50:17 -0700 Subject: [PATCH 21/21] Update x-add-version --- versions/o-/osgearth.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/o-/osgearth.json b/versions/o-/osgearth.json index 6811e33f54ee3e..c074ed279ecb01 100644 --- a/versions/o-/osgearth.json +++ b/versions/o-/osgearth.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "c85b88a5b9fb4247b1d4189d7e102783255d72c3", + "git-tree": "d2483eb1bb083bdcf0b4de24f0f8c0d77825dc56", "version": "3.1", "port-version": 3 },