aboutsummaryrefslogtreecommitdiff
path: root/ports/folly
diff options
context:
space:
mode:
authorWimok Nupphiboon <wimok.mok@gmail.com>2018-03-30 21:58:49 +0700
committerWimok Nupphiboon <wimok.mok@gmail.com>2018-03-30 21:58:49 +0700
commitc681f4ee840c81a508fc0e8352c9aedf66fb5eaf (patch)
tree5bda96eca1cee03af97da726b9b3d3038d75fae1 /ports/folly
parent663be4bbffd435cf5e5fc62a0774c784c10ddc68 (diff)
parentf9d4692749ad68340a07453add49a8ef029fa155 (diff)
downloadvcpkg-c681f4ee840c81a508fc0e8352c9aedf66fb5eaf.tar.gz
vcpkg-c681f4ee840c81a508fc0e8352c9aedf66fb5eaf.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'ports/folly')
-rw-r--r--ports/folly/CONTROL29
-rw-r--r--ports/folly/FindLZ4.cmake12
-rw-r--r--ports/folly/FindSnappy.cmake12
-rw-r--r--ports/folly/cmake-link-boost-fix.patch35
-rw-r--r--ports/folly/portfile.cmake45
5 files changed, 84 insertions, 49 deletions
diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL
index 8f0bb7656..457874906 100644
--- a/ports/folly/CONTROL
+++ b/ports/folly/CONTROL
@@ -1,4 +1,29 @@
Source: folly
-Version: 2017.11.27.00-3
+Version: 2018.03.19.00-1
Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows
-Build-Depends: zlib, openssl, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy, boost-context, boost-chrono, boost-date-time, boost-filesystem, boost-program-options, boost-regex, boost-system, boost-thread, boost-conversion, boost-multi-index, boost-crc
+Build-Depends: openssl, libevent, double-conversion, glog, gflags, boost-chrono, boost-context, boost-conversion, boost-crc, boost-date-time, boost-filesystem, boost-multi-index, boost-program-options, boost-regex, boost-system, boost-thread
+Default-Features: zlib
+
+Feature: zlib
+Build-Depends: zlib
+Description: Support zlib for compression
+
+Feature: bzip2
+Build-Depends: bzip2
+Description: Support bzip2 for compression
+
+Feature: lzma
+Build-Depends: liblzma
+Description: Support LZMA for compression
+
+Feature: zstd
+Build-Depends: zstd
+Description: Support zstd for compression
+
+Feature: snappy
+Build-Depends: snappy
+Description: Support Snappy for compression
+
+Feature: lz4
+Build-Depends: lz4
+Description: Support lz4 for compression
diff --git a/ports/folly/FindLZ4.cmake b/ports/folly/FindLZ4.cmake
new file mode 100644
index 000000000..bf3140e15
--- /dev/null
+++ b/ports/folly/FindLZ4.cmake
@@ -0,0 +1,12 @@
+find_path(LZ4_INCLUDE_DIR lz4.h)
+
+find_package(LZ4_LIBRARY_DEBUG NAMES lz4d)
+find_package(LZ4_LIBRARY_RELEASE NAMES lz4)
+
+select_library_configurations(LZ4_LIBRARY)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(
+ LZ4 DEFAULT_MSG
+ LZ4_LIBRARY LZ4_INCLUDE_DIR
+)
diff --git a/ports/folly/FindSnappy.cmake b/ports/folly/FindSnappy.cmake
new file mode 100644
index 000000000..e8916d6e0
--- /dev/null
+++ b/ports/folly/FindSnappy.cmake
@@ -0,0 +1,12 @@
+find_path(SNAPPY_INCLUDE_DIR snappy.h)
+
+find_package(SNAPPY_LIBRARY_DEBUG NAMES snappyd)
+find_package(SNAPPY_LIBRARY_RELEASE NAMES snappy)
+
+select_library_configurations(SNAPPY_LIBRARY)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(
+ SNAPPY DEFAULT_MSG
+ SNAPPY_LIBRARY SNAPPY_INCLUDE_DIR
+)
diff --git a/ports/folly/cmake-link-boost-fix.patch b/ports/folly/cmake-link-boost-fix.patch
deleted file mode 100644
index d3baf13a3..000000000
--- a/ports/folly/cmake-link-boost-fix.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index ec5a985c..36564534 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -136,13 +136,6 @@ source_group("folly\\build" FILES
- )
-
- set(FOLLY_SHINY_DEPENDENCIES
-- Boost::chrono
-- Boost::context
-- Boost::date_time
-- Boost::filesystem
-- Boost::program_options
-- Boost::regex
-- Boost::system
- OpenSSL::SSL
- OpenSSL::Crypto
- )
-@@ -179,6 +172,7 @@ endif()
-
- set(FOLLY_LINK_LIBRARIES
- ${FOLLY_LINK_LIBRARIES}
-+ ${Boost_LIBRARIES}
- Iphlpapi.lib
- Ws2_32.lib
-
-@@ -320,7 +314,7 @@ if (BUILD_TESTS)
- )
- target_link_libraries(folly_test_support
- PUBLIC
-- Boost::thread
-+ ${Boost_LIBRARIES}
- folly
- ${LIBGMOCK_LIBRARY}
- )
diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake
index 00c1093da..ce101d918 100644
--- a/ports/folly/portfile.cmake
+++ b/ports/folly/portfile.cmake
@@ -17,45 +17,66 @@ set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebook/folly
- REF v2017.11.27.00
- SHA512 738bb00047a7cbd807f2dccd64031763df80bbebca73f1ae9500b750dcad156dde84e47f4eda7af1bcd7abfae10c973da47515f2e111929979d1637869cf06ee
+ REF v2018.03.19.00
+ SHA512 72df8768753bf9f1109ad3f16645d811906b633833c91c7d9fe856a06c16b5e398876cf6cae415401eff96b568c99ffa1dc0c44d81cd40219bafb0f4c72fc2ca
HEAD_REF master
)
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/cmake-link-boost-fix.patch
${CMAKE_CURRENT_LIST_DIR}/msvc-15.6-workaround.patch
)
+file(COPY
+ ${CMAKE_CURRENT_LIST_DIR}/FindLZ4.cmake
+ ${CMAKE_CURRENT_LIST_DIR}/FindSnappy.cmake
+ DESTINATION ${SOURCE_PATH}/CMake/
+)
+
if(VCPKG_CRT_LINKAGE STREQUAL static)
set(MSVC_USE_STATIC_RUNTIME ON)
else()
set(MSVC_USE_STATIC_RUNTIME OFF)
endif()
+set(FEATURE_OPTIONS)
+
+macro(feature FEATURENAME PACKAGENAME)
+ if("${FEATURENAME}" IN_LIST FEATURES)
+ list(APPEND FEATURE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_${PACKAGENAME}=OFF)
+ else()
+ list(APPEND FEATURE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_${PACKAGENAME}=ON)
+ endif()
+endmacro()
+
+feature(zlib ZLIB)
+feature(bzip2 BZip2)
+feature(lzma LibLZMA)
+feature(lz4 LZ4)
+feature(zstd Zstd)
+feature(snappy Snappy)
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DMSVC_USE_STATIC_RUNTIME=${MSVC_USE_STATIC_RUNTIME}
+ -DCMAKE_DISABLE_FIND_PACKAGE_LibDwarf=ON
+ -DCMAKE_DISABLE_FIND_PACKAGE_Libiberty=ON
+ -DCMAKE_DISABLE_FIND_PACKAGE_LibAIO=ON
+ -DLIBAIO_FOUND=OFF
+ -DLIBURCU_FOUND=OFF
+ -DCMAKE_DISABLE_FIND_PACKAGE_LibURCU=ON
+ ${FEATURE_OPTIONS}
)
-# Folly runs built executables during the build, so they need access to the installed DLLs.
-set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin")
-
-vcpkg_install_cmake()
+vcpkg_install_cmake(ADD_BIN_TO_PATH)
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets()
-# changes target search path
-file(READ ${CURRENT_PACKAGES_DIR}/share/folly/folly-targets.cmake FOLLY_MODULE)
-string(REPLACE "${CURRENT_INSTALLED_DIR}/lib/" "" FOLLY_MODULE "${FOLLY_MODULE}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/folly/folly-targets.cmake "${FOLLY_MODULE}")
-
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright