From cc3d12b16b84377368e5e5b001aeb75877d85ce5 Mon Sep 17 00:00:00 2001 From: yurybura Date: Mon, 12 Mar 2018 19:16:43 +0300 Subject: [PATCH 1/4] [rocksdb] Fix build and use debug suffix 'd' [gtest] Fix issue #2373 --- ports/benchmark/portfile.cmake | 1 + ports/gflags/portfile.cmake | 1 + ports/lz4/portfile.cmake | 3 ++- ports/rocksdb/0001-third-party.patch | 8 ++++---- ports/rocksdb/CONTROL | 2 +- ports/rocksdb/portfile.cmake | 8 +++----- ports/snappy/portfile.cmake | 3 ++- 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/ports/benchmark/portfile.cmake b/ports/benchmark/portfile.cmake index 1832174fee..e76bce6ffe 100644 --- a/ports/benchmark/portfile.cmake +++ b/ports/benchmark/portfile.cmake @@ -26,6 +26,7 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DBENCHMARK_ENABLE_TESTING=OFF + -DCMAKE_DEBUG_POSTFIX=d ) vcpkg_install_cmake() diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake index ee730d4425..31ffeafa5d 100644 --- a/ports/gflags/portfile.cmake +++ b/ports/gflags/portfile.cmake @@ -25,6 +25,7 @@ vcpkg_configure_cmake( -DGFLAGS_REGISTER_BUILD_DIR:BOOL=OFF -DGFLAGS_REGISTER_INSTALL_PREFIX:BOOL=OFF -DBUILD_gflags_nothreads_LIB:BOOL=OFF + -DCMAKE_DEBUG_POSTFIX=d ) vcpkg_install_cmake() diff --git a/ports/lz4/portfile.cmake b/ports/lz4/portfile.cmake index 1928d7e709..6150a35e6d 100644 --- a/ports/lz4/portfile.cmake +++ b/ports/lz4/portfile.cmake @@ -12,7 +12,8 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS_DEBUG - -DLZ4_SKIP_INCLUDES=ON) + -DLZ4_SKIP_INCLUDES=ON + -DCMAKE_DEBUG_POSTFIX=d) vcpkg_install_cmake() vcpkg_copy_pdbs() diff --git a/ports/rocksdb/0001-third-party.patch b/ports/rocksdb/0001-third-party.patch index c28181623a..0b0e3fa8c4 100644 --- a/ports/rocksdb/0001-third-party.patch +++ b/ports/rocksdb/0001-third-party.patch @@ -21,8 +21,8 @@ index a364d1d..1d85d50 100644 -set(GFLAGS_LIB_RELEASE ${GFLAGS_HOME}/bin/retail/amd64/gflags.lib) +set(GFLAGS_HOME ${CURRENT_INSTALLED_DIR}) +set(GFLAGS_INCLUDE ${GFLAGS_HOME}/include) -+find_library(GFLAGS_LIB_DEBUG NAMES gflags gflags_static) -+set(GFLAGS_LIB_RELEASE ${GFLAGS_LIB_DEBUG}) ++set(GFLAGS_LIB_DEBUG ${GFLAGS_HOME}/debug/lib/gflagsd.lib) ++set(GFLAGS_LIB_RELEASE ${GFLAGS_HOME}/lib/gflags.lib) # ================================================== GFLAGS ================================================== # @@ -36,7 +36,7 @@ index a364d1d..1d85d50 100644 -set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/bin/retail/amd64/snappy.lib) +set(SNAPPY_HOME ${CURRENT_INSTALLED_DIR}) +set(SNAPPY_INCLUDE ${SNAPPY_HOME}/include) -+set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/debug/lib/snappy.lib) ++set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/debug/lib/snappyd.lib) +set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/lib/snappy.lib) # @@ -51,7 +51,7 @@ index a364d1d..1d85d50 100644 -set(LZ4_LIB_RELEASE ${LZ4_HOME}/bin/retail/amd64/lz4.lib) +set(LZ4_HOME ${CURRENT_INSTALLED_DIR}) +set(LZ4_INCLUDE ${LZ4_HOME}/include) -+set(LZ4_LIB_DEBUG ${LZ4_HOME}/debug/lib/lz4.lib) ++set(LZ4_LIB_DEBUG ${LZ4_HOME}/debug/lib/lz4d.lib) +set(LZ4_LIB_RELEASE ${LZ4_HOME}/lib/lz4.lib) # diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index 19383f54a6..f317433b5a 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,4 +1,4 @@ Source: rocksdb Version: 5.10.4-1 Description: A library that provides an embeddable, persistent key-value store for fast storage -Build-Depends: snappy, lz4, zlib, gtest +Build-Depends: snappy, gflags, lz4, zlib diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 740c401141..ae60e824ee 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -1,9 +1,5 @@ include(vcpkg_common_functions) -if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - message(FATAL_ERROR "Rocksdb only supports x64") -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/rocksdb @@ -41,9 +37,11 @@ vcpkg_configure_cmake( -DROCKSDB_INSTALL_ON_WINDOWS=ON -DFAIL_ON_WARNINGS=OFF -DWITH_MD_LIBRARY=${WITH_MD_LIBRARY} + -DPORTABLE=ON + -DCMAKE_DEBUG_POSTFIX=d -DROCKSDB_DISABLE_INSTALL_SHARED_LIB=${ROCKSDB_DISABLE_INSTALL_SHARED_LIB} -DROCKSDB_DISABLE_INSTALL_STATIC_LIB=${ROCKSDB_DISABLE_INSTALL_STATIC_LIB} - -DROCKSDB_VERSION=5.10.3 + -DROCKSDB_VERSION=5.10.4 -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} -DCMAKE_DISABLE_FIND_PACKAGE_TBB=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_NUMA=TRUE diff --git a/ports/snappy/portfile.cmake b/ports/snappy/portfile.cmake index f0169c8f2f..c88ff60eb2 100644 --- a/ports/snappy/portfile.cmake +++ b/ports/snappy/portfile.cmake @@ -12,7 +12,8 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DSNAPPY_BUILD_TESTS=OFF) + -DSNAPPY_BUILD_TESTS=OFF + -DCMAKE_DEBUG_POSTFIX=d) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Snappy) From 23a876d2177992b90d47c7acf2b8dd30e93c581f Mon Sep 17 00:00:00 2001 From: yurybura Date: Mon, 12 Mar 2018 19:51:25 +0300 Subject: [PATCH 2/4] [gtest] Fix issue #2373 --- ports/gtest/portfile.cmake | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index b1f9e5dce7..b5f3e58c86 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -25,6 +25,7 @@ vcpkg_configure_cmake( OPTIONS -DBUILD_GMOCK=ON -DBUILD_GTEST=ON + -DCMAKE_DEBUG_POSTFIX=d -Dgtest_force_shared_crt=${GTEST_FORCE_SHARED_CRT} ) @@ -60,12 +61,12 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gtest.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/bin/gmock.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/bin/gmock_main.dll) endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.dll) +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtestd.dll) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin/) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest_main.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock_main.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtestd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtestd.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_maind.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest_maind.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmockd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmockd.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_maind.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock_maind.dll) endif() if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gtest.lib) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) @@ -74,12 +75,12 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gtest.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock_main.lib) endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.lib) +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtestd.lib) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtestd.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtest_maind.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmockd.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmock_maind.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtestd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtestd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtest_maind.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmockd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmockd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmock_maind.lib) endif() vcpkg_copy_pdbs() From ffb77253557b7b640c4b5dd6fb13c77b2608df4e Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Mon, 12 Mar 2018 22:44:59 +0300 Subject: [PATCH 3/4] Update versions --- ports/benchmark/CONTROL | 2 +- ports/gflags/CONTROL | 2 +- ports/gtest/CONTROL | 2 +- ports/lz4/CONTROL | 2 +- ports/rocksdb/CONTROL | 2 +- ports/snappy/CONTROL | 2 +- ports/zlib/CONTROL | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/benchmark/CONTROL b/ports/benchmark/CONTROL index 9e6262e1bf..5b56de372e 100644 --- a/ports/benchmark/CONTROL +++ b/ports/benchmark/CONTROL @@ -1,3 +1,3 @@ Source: benchmark -Version: 1.3.0 +Version: 1.3.0-1 Description: A library to support the benchmarking of functions, similar to unit-tests. diff --git a/ports/gflags/CONTROL b/ports/gflags/CONTROL index 72f2937b74..0a8d83aee7 100644 --- a/ports/gflags/CONTROL +++ b/ports/gflags/CONTROL @@ -1,3 +1,3 @@ Source: gflags -Version: 2.2.1-2 +Version: 2.2.1-3 Description: A C++ library that implements commandline flags processing diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL index f41aec0b90..e76e815c4e 100644 --- a/ports/gtest/CONTROL +++ b/ports/gtest/CONTROL @@ -1,3 +1,3 @@ Source: gtest -Version: 1.8.0-6 +Version: 1.8.0-7 Description: GoogleTest and GoogleMock testing frameworks. diff --git a/ports/lz4/CONTROL b/ports/lz4/CONTROL index ae7d57377a..4a0f53689e 100644 --- a/ports/lz4/CONTROL +++ b/ports/lz4/CONTROL @@ -1,3 +1,3 @@ Source: lz4 -Version: 1.8.1.2 +Version: 1.8.1.2-1 Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core. diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index f317433b5a..161abe80ea 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,4 +1,4 @@ Source: rocksdb -Version: 5.10.4-1 +Version: 5.10.4-2 Description: A library that provides an embeddable, persistent key-value store for fast storage Build-Depends: snappy, gflags, lz4, zlib diff --git a/ports/snappy/CONTROL b/ports/snappy/CONTROL index 2303839557..d90f5039c1 100644 --- a/ports/snappy/CONTROL +++ b/ports/snappy/CONTROL @@ -1,3 +1,3 @@ Source: snappy -Version: 1.1.7-1 +Version: 1.1.7-2 Description: A fast compressor/decompressor. diff --git a/ports/zlib/CONTROL b/ports/zlib/CONTROL index c559637834..657a8e0ae0 100644 --- a/ports/zlib/CONTROL +++ b/ports/zlib/CONTROL @@ -1,3 +1,3 @@ Source: zlib -Version: 1.2.11-3 +Version: 1.2.11-4 Description: A compression library From 92eb878b3efdb780097178125066a6070869c954 Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Mon, 12 Mar 2018 23:12:22 +0300 Subject: [PATCH 4/4] Revert version --- ports/zlib/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/zlib/CONTROL b/ports/zlib/CONTROL index 657a8e0ae0..c559637834 100644 --- a/ports/zlib/CONTROL +++ b/ports/zlib/CONTROL @@ -1,3 +1,3 @@ Source: zlib -Version: 1.2.11-4 +Version: 1.2.11-3 Description: A compression library