aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLong Huan <8551701+longhuan2018@users.noreply.github.com>2019-08-15 13:27:14 +0800
committerLong Huan <8551701+longhuan2018@users.noreply.github.com>2019-08-15 13:27:14 +0800
commit4b81f7f08f7e47880c9627bf6feddba7da8896ac (patch)
tree38b7a9805442f6c151a722738e059a9adc3192cc
parente6a21e1b421e8231f3eb46d8af574a990b5da8c8 (diff)
downloadvcpkg-4b81f7f08f7e47880c9627bf6feddba7da8896ac.tar.gz
vcpkg-4b81f7f08f7e47880c9627bf6feddba7da8896ac.zip
Fix osgearth rocksdb plugin build falied
-rw-r--r--ports/osgearth/CONTROL2
-rw-r--r--ports/osgearth/RocksDB.patch84
-rw-r--r--ports/osgearth/portfile.cmake14
3 files changed, 89 insertions, 11 deletions
diff --git a/ports/osgearth/CONTROL b/ports/osgearth/CONTROL
index c46d03451..d54992b82 100644
--- a/ports/osgearth/CONTROL
+++ b/ports/osgearth/CONTROL
@@ -1,4 +1,4 @@
Source: osgearth
-Version: 2.10.1
+Version: 2.10.2
Description: osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2015 Pelican Mapping.
Build-Depends: osg
diff --git a/ports/osgearth/RocksDB.patch b/ports/osgearth/RocksDB.patch
new file mode 100644
index 000000000..07fd7e603
--- /dev/null
+++ b/ports/osgearth/RocksDB.patch
@@ -0,0 +1,84 @@
+diff --git a/CMakeModules/FindRocksDB.cmake b/CMakeModules/FindRocksDB.cmake
+index 109b383..8382ed9 100644
+--- a/CMakeModules/FindRocksDB.cmake
++++ b/CMakeModules/FindRocksDB.cmake
+@@ -40,5 +40,49 @@ find_package_handle_standard_args(ROCKSDB
+ "Could NOT find ROCKSDB"
+ )
+
++if(ROCKSDB_FOUND)
++ FIND_PACKAGE(ZLIB REQUIRED)
++
++ include(SelectLibraryConfigurations)
++ # Find Snappy library
++ find_library(SNAPPY_LIBRARY_DEBUG NAMES snappyd)
++ find_library(SNAPPY_LIBRARY_RELEASE NAMES snappy)
++ select_library_configurations(SNAPPY)
++ find_package_handle_standard_args(SNAPPY
++ FOUND_VAR
++ SNAPPY_FOUND
++ REQUIRED_VARS
++ SNAPPY_LIBRARY
++ FAIL_MESSAGE
++ "Could NOT find SNAPPY"
++ )
++
++ # Find LZ4 library
++ find_library(LZ4_LIBRARY_DEBUG NAMES lz4d)
++ find_library(LZ4_LIBRARY_RELEASE NAMES lz4)
++ select_library_configurations(LZ4)
++ find_package_handle_standard_args(LZ4
++ FOUND_VAR
++ LZ4_FOUND
++ REQUIRED_VARS
++ LZ4_LIBRARY
++ FAIL_MESSAGE
++ "Could NOT find LZ4"
++ )
++
++ # Find ZSTD library
++ find_library(ZSTD_LIBRARY_DEBUG NAMES zstdd)
++ find_library(ZSTD_LIBRARY_RELEASE NAMES zstd)
++ select_library_configurations(ZSTD)
++ find_package_handle_standard_args(ZSTD
++ FOUND_VAR
++ ZSTD_FOUND
++ REQUIRED_VARS
++ ZSTD_LIBRARY
++ FAIL_MESSAGE
++ "Could NOT find ZSTD_"
++ )
++endif(ROCKSDB_FOUND)
++
+ set(ROCKSDB_INCLUDE_DIRS ${ROCKSDB_INCLUDE_DIR} )
+ set(ROCKSDB_LIBRARIES ${ROCKSDB_LIBRARY})
+-
+-
+
+diff --git a/src/osgEarthDrivers/cache_rocksdb/CMakeLists.txt b/src/osgEarthDrivers/cache_rocksdb/CMakeLists.txt
+index 68ad85d..86bb18a 100644
+--- a/src/osgEarthDrivers/cache_rocksdb/CMakeLists.txt
++++ b/src/osgEarthDrivers/cache_rocksdb/CMakeLists.txt
+@@ -16,7 +16,19 @@ SET(TARGET_SRC
+ RocksDBCacheDriver.cpp
+ )
+
+-SET(TARGET_LIBRARIES_VARS ROCKSDB_LIBRARY ZLIB_LIBRARY)
++if(SNAPPY_FOUND)
++ SET(ROCKSDB_DEPENDENT_LIBRARY ${ROCKSDB_DEPENDENT_LIBRARY} ${SNAPPY_LIBRARY})
++endif(SNAPPY_FOUND)
++
++if(LZ4_FOUND)
++ SET(ROCKSDB_DEPENDENT_LIBRARY ${ROCKSDB_DEPENDENT_LIBRARY} ${LZ4_LIBRARY})
++endif(LZ4_FOUND)
++
++if(ZSTD_FOUND)
++ SET(ROCKSDB_DEPENDENT_LIBRARY ${ROCKSDB_DEPENDENT_LIBRARY} ${ZSTD_LIBRARY})
++endif(ZSTD_FOUND)
++
++SET(TARGET_LIBRARIES_VARS ROCKSDB_LIBRARY ZLIB_LIBRARY ROCKSDB_DEPENDENT_LIBRARY)
+
+ IF(MSVC)
+ SET(TARGET_EXTERNAL_LIBRARIES ws2_32 winmm rpcrt4 shlwapi)
+-
+- \ No newline at end of file
diff --git a/ports/osgearth/portfile.cmake b/ports/osgearth/portfile.cmake
index 6bc95df7c..8f74dea63 100644
--- a/ports/osgearth/portfile.cmake
+++ b/ports/osgearth/portfile.cmake
@@ -9,20 +9,14 @@ if(NOT OSG_PLUGINS_SUBDIR_LENGTH EQUAL 1)
endif()
string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/osg/" "" OSG_PLUGINS_SUBDIR "${OSG_PLUGINS_SUBDIR}")
-vcpkg_download_distfile(
- VS2017PATCH
- URLS "https://github.com/remoe/osgearth/commit/f7081cc4f9991c955c6a0ef7b7b50e48360d14fd.diff"
- FILENAME "osgearth-f7081cc4f9991c955c6a0ef7b7b50e48360d14fd.patch"
- SHA512 eadb47a5713c00c05add8627e5cad22844db041da34081d59104151a1a1e2d5ac9552909d67171bfc0449a3e4d2930dd3a7914d3ec7ef7ff1015574e9c9a6105
-)
-
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO gwaldron/osgearth
- REF osgearth-2.10.1
- SHA512 a74e6922ae29f85b4227b23a83dbccba92e08b7880533c281ceb244703c38b51a02823fdee3199c975c969db963b35ebad0e3bfed3c1e218a36d130b20a48e5b
+ REF osgearth-2.10.2
+ SHA512 fa306a82374716dafae9d834ed0fb07a7369ae0961696de36b6e2af45bc150040295985d9b9781ab713fd0707691451a6a8f173b34253749ab22764f51e60045
HEAD_REF master
- PATCHES ${VS2017PATCH}
+ PATCHES
+ RocksDB.patch
)
vcpkg_configure_cmake(