Skip to content

Commit

Permalink
[osgearth/rocksdb] Update to latest release (#14976)
Browse files Browse the repository at this point in the history
  • Loading branch information
NancyLi1013 authored Dec 17, 2020
1 parent 9a81392 commit ce5d30c
Show file tree
Hide file tree
Showing 13 changed files with 101 additions and 411 deletions.
5 changes: 2 additions & 3 deletions ports/osgearth/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Source: osgearth
Version: 3.0
Port-Version: 2
Version: 3.1
Homepage: https://github.com/gwaldron/osgearth
Description: osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2015 Pelican Mapping.
Build-Depends: osg[plugins]
Build-Depends: osg[plugins]
79 changes: 0 additions & 79 deletions ports/osgearth/RocksDB.patch

This file was deleted.

24 changes: 14 additions & 10 deletions ports/osgearth/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,21 @@ string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/osg/" "" OSG_PLUGINS_SUBDIR "${OS
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO gwaldron/osgearth
REF dc73ac92b19fff1427414cfb981b6018c0ed88a1 #version 3.0
SHA512 86c287a75946b902c05897d3952c9ff201853599d52023c7b2c850f2253b7e738c4b54ac7ae947bf0909b3aaf074bdb1472f4e92c59cd919458933a72fd13b80
REF 342fcadf4c8892ba84841cb5b4162bdc51519e3c #version 3.1
SHA512 03378a918306846d2144e545785c783b01e33fa2dd5c77d16d390a275217b6ce7a3a743c35ae99a497b272a7516b055442c0a891bd312cce727a5538b40364f5
HEAD_REF master
PATCHES
RocksDB.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
)

vcpkg_install_cmake()
Expand All @@ -32,13 +37,13 @@ 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/osgdb*.dll)
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 ${OSGDB_PLUGINS})
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/${OSG_PLUGINS_SUBDIR})

#Debug
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
Expand All @@ -50,14 +55,13 @@ 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/osgdb*.dll)
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 ${OSGDB_DEBUG_PLUGINS})

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/${OSG_PLUGINS_SUBDIR})

# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
13 changes: 0 additions & 13 deletions ports/rocksdb/0001-disable-gtest.patch

This file was deleted.

4 changes: 2 additions & 2 deletions ports/rocksdb/0002-only-build-one-flavor.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f9c8f3346..74c2d263c 100644
index 6761929..4d2b0a1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -938,13 +938,17 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS)
@@ -987,13 +987,17 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS)

install(DIRECTORY "${PROJECT_SOURCE_DIR}/cmake/modules" COMPONENT devel DESTINATION ${package_config_destination})

Expand Down
29 changes: 26 additions & 3 deletions ports/rocksdb/0003-use-find-package.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 36eddb32b..97a93601b 100644
index 6761929..6f74d31 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -91,7 +91,7 @@ include(CMakeDependentOption)
Expand All @@ -23,7 +23,14 @@ index 36eddb32b..97a93601b 100644
add_definitions(-DSNAPPY)
list(APPEND THIRDPARTY_LIBS Snappy::snappy)
endif()
@@ -163,10 +160,9 @@ else()
@@ -157,16 +154,19 @@ else()
endif()

if(WITH_LZ4)
- find_package(lz4 REQUIRED)
+ find_package(lz4 CONFIG REQUIRED)
add_definitions(-DLZ4)
list(APPEND THIRDPARTY_LIBS lz4::lz4)
endif()

if(WITH_ZSTD)
Expand All @@ -32,7 +39,23 @@ index 36eddb32b..97a93601b 100644
add_definitions(-DZSTD)
- include_directories(${ZSTD_INCLUDE_DIR})
- list(APPEND THIRDPARTY_LIBS zstd::zstd)
+ list(APPEND THIRDPARTY_LIBS libzstd)
+ if(TARGET zstd::libzstd_shared)
+ list(APPEND THIRDPARTY_LIBS zstd::libzstd_shared)
+ elseif(TARGET zstd::libzstd_static)
+ list(APPEND THIRDPARTY_LIBS zstd::libzstd_static)
+ endif()
endif()
endif()

@@ -375,9 +375,9 @@ endif()

option(WITH_TBB "build with Threading Building Blocks (TBB)" OFF)
if(WITH_TBB)
- find_package(TBB REQUIRED)
+ find_package(TBB CONFIG REQUIRED)
add_definitions(-DTBB)
- list(APPEND THIRDPARTY_LIBS TBB::TBB)
+ list(APPEND THIRDPARTY_LIBS TBB::tbb)
endif()

# Stall notifications eat some performance from inserts
13 changes: 0 additions & 13 deletions ports/rocksdb/0004-add-config-to-findpackage.patch

This file was deleted.

22 changes: 22 additions & 0 deletions ports/rocksdb/0004-fix-dependency-in-config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/cmake/RocksDBConfig.cmake.in b/cmake/RocksDBConfig.cmake.in
index 0bd14be..f9f6aa8 100644
--- a/cmake/RocksDBConfig.cmake.in
+++ b/cmake/RocksDBConfig.cmake.in
@@ -37,7 +37,7 @@ if(@WITH_LZ4@)
endif()

if(@WITH_ZSTD@)
- find_dependency(zstd)
+ find_dependency(zstd CONFIG)
endif()

if(@WITH_NUMA@)
@@ -45,7 +45,7 @@ if(@WITH_NUMA@)
endif()

if(@WITH_TBB@)
- find_dependency(TBB)
+ find_dependency(TBB CONFIG)
endif()

find_dependency(Threads)
Loading

0 comments on commit ce5d30c

Please sign in to comment.