diff --git a/vcpkg-registry/ports/nesfolly/arm-compilation.patch b/vcpkg-registry/ports/folly/arm-compilation.patch similarity index 100% rename from vcpkg-registry/ports/nesfolly/arm-compilation.patch rename to vcpkg-registry/ports/folly/arm-compilation.patch diff --git a/vcpkg-registry/ports/nesfolly/follyconfig.patch b/vcpkg-registry/ports/folly/follyconfig.patch similarity index 100% rename from vcpkg-registry/ports/nesfolly/follyconfig.patch rename to vcpkg-registry/ports/folly/follyconfig.patch diff --git a/vcpkg-registry/ports/nesfolly/nesfolly.patch b/vcpkg-registry/ports/folly/nesfolly.patch similarity index 100% rename from vcpkg-registry/ports/nesfolly/nesfolly.patch rename to vcpkg-registry/ports/folly/nesfolly.patch diff --git a/vcpkg-registry/ports/nesfolly/portfile.cmake b/vcpkg-registry/ports/folly/portfile.cmake similarity index 95% rename from vcpkg-registry/ports/nesfolly/portfile.cmake rename to vcpkg-registry/ports/folly/portfile.cmake index 9cd7cbd..18c680c 100644 --- a/vcpkg-registry/ports/nesfolly/portfile.cmake +++ b/vcpkg-registry/ports/folly/portfile.cmake @@ -7,7 +7,7 @@ vcpkg_from_github( nesfolly.patch arm-compilation.patch follyconfig.patch - malloc.patch + remove-boost.patch ) vcpkg_cmake_configure( diff --git a/vcpkg-registry/ports/folly/remove-boost.patch b/vcpkg-registry/ports/folly/remove-boost.patch new file mode 100644 index 0000000..5b7584f --- /dev/null +++ b/vcpkg-registry/ports/folly/remove-boost.patch @@ -0,0 +1,286 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a44ca977a..4e9ccab83 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,17 +1,14 @@ + cmake_minimum_required(VERSION 3.21) +-project(nesfolly) ++project(folly) + + set(CMAKE_CXX_STANDARD 20) + +-# Currently there is a dependency on BOOST-MPL +-find_package(Boost REQUIRED) +- + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/folly-config.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/config/folly/folly-config.h + ) + +-add_library(nesfolly ++add_library(folly + folly/SharedMutex.cpp + folly/ScopeGuard.cpp + folly/concurrency/CacheLocality.cpp +@@ -32,12 +29,12 @@ add_library(nesfolly + folly/Executor.cpp + folly/portability/SysMembarrier.cpp + folly/memory/MallctlHelper.cpp ++ folly/memory/detail/MallocImpl.cpp + ) + +-target_compile_features(nesfolly PRIVATE cxx_std_20) ++target_compile_features(folly PRIVATE cxx_std_20) + +-target_include_directories(nesfolly PUBLIC +- ${Boost_INCLUDE_DIRS} ++target_include_directories(folly PUBLIC + $ + $) + +@@ -71,7 +68,7 @@ install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}-targets # create export s + ) + # Install Export Set + install(EXPORT ${PROJECT_NAME}-targets +- NAMESPACE nesfolly:: ++ NAMESPACE folly:: + DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}) + + +diff --git a/cmake/config.cmake b/cmake/config.cmake +index 29a8021e9..0e267af7f 100644 +--- a/cmake/config.cmake ++++ b/cmake/config.cmake +@@ -1,5 +1,5 @@ + @PACKAGE_INIT@ + +-include(${CMAKE_CURRENT_LIST_DIR}/nesfolly-targets.cmake) ++include(${CMAKE_CURRENT_LIST_DIR}/folly-targets.cmake) + +-check_required_components(nesfolly) ++check_required_components(folly) +diff --git a/folly/container/Access.h b/folly/container/Access.h +index 50c948f85..35e5d8670 100644 +--- a/folly/container/Access.h ++++ b/folly/container/Access.h +@@ -88,14 +88,14 @@ FOLLY_INLINE_VARIABLE constexpr data_fn data{}; + // begin + // + // Invokes unqualified begin with std::begin in scope. +-FOLLY_CREATE_FREE_INVOKER(begin_fn, begin, std); +-FOLLY_INLINE_VARIABLE constexpr begin_fn begin{}; ++// FOLLY_CREATE_FREE_INVOKER(begin_fn, begin, std); ++// FOLLY_INLINE_VARIABLE constexpr begin_fn begin{}; + + // end + // + // Invokes unqualified end with std::end in scope. +-FOLLY_CREATE_FREE_INVOKER(end_fn, end, std); +-FOLLY_INLINE_VARIABLE constexpr end_fn end{}; ++// FOLLY_CREATE_FREE_INVOKER(end_fn, end, std); ++// FOLLY_INLINE_VARIABLE constexpr end_fn end{}; + + } // namespace access + +diff --git a/folly/container/Foreach-inl.h b/folly/container/Foreach-inl.h +index d6b709502..ec38285fb 100644 +--- a/folly/container/Foreach-inl.h ++++ b/folly/container/Foreach-inl.h +@@ -98,14 +98,14 @@ struct IsTuple, T> : std::true_type {}; + /** + * Check if the sequence is a range + */ +-template ::type> +-using EnableIfRange = void_t< +- decltype(access::begin(std::declval())), +- decltype(access::end(std::declval()))>; +-template +-struct IsRange : std::false_type {}; +-template +-struct IsRange, T> : std::true_type {}; ++// template ::type> ++// using EnableIfRange = void_t< ++// decltype(access::begin(std::declval())), ++// decltype(access::end(std::declval()))>; ++// template ++// struct IsRange : std::false_type {}; ++// template ++// struct IsRange, T> : std::true_type {}; + + struct TupleTag {}; + struct RangeTag {}; +@@ -114,8 +114,7 @@ struct RangeTag {}; + * Should ideally check if it is a tuple and if not return void, but msvc fails + */ + template +-using SequenceTag = +- std::conditional_t::value, RangeTag, TupleTag>; ++using SequenceTag = TupleTag; + + struct BeginAddTag {}; + struct IndexingTag {}; +@@ -153,41 +152,41 @@ LoopControl invoke_returning_loop_control(Func&& f, Args&&... a) { + /** + * Implementations for the runtime function + */ +-template +-void for_each_range_impl(index_constant<3>, Sequence&& range, Func& func) { +- auto first = access::begin(range); +- auto last = access::end(range); +- for (auto index = std::size_t{0}; first != last; ++index) { +- auto next = std::next(first); +- auto control = invoke_returning_loop_control(func, *first, index, first); +- if (loop_break == control) { +- break; +- } +- first = next; +- } +-} +-template +-void for_each_range_impl(index_constant<2>, Sequence&& range, Func& func) { +- // make a three arg adaptor for the function passed in so that the main +- // implementation function can be used +- auto three_arg_adaptor = [&func]( +- auto&& ele, auto index, auto) -> decltype(auto) { +- return func(std::forward(ele), index); +- }; +- for_each_range_impl( +- index_constant<3>{}, std::forward(range), three_arg_adaptor); +-} +- +-template +-void for_each_range_impl(index_constant<1>, Sequence&& range, Func& func) { +- // make a three argument adaptor for the function passed in that just ignores +- // the second and third argument +- auto three_arg_adaptor = [&func](auto&& ele, auto, auto) -> decltype(auto) { +- return func(std::forward(ele)); +- }; +- for_each_range_impl( +- index_constant<3>{}, std::forward(range), three_arg_adaptor); +-} ++// template ++// void for_each_range_impl(index_constant<3>, Sequence&& range, Func& func) { ++// auto first = access::begin(range); ++// auto last = access::end(range); ++// for (auto index = std::size_t{0}; first != last; ++index) { ++// auto next = std::next(first); ++// auto control = invoke_returning_loop_control(func, *first, index, first); ++// if (loop_break == control) { ++// break; ++// } ++// first = next; ++// } ++// } ++// template ++// void for_each_range_impl(index_constant<2>, Sequence&& range, Func& func) { ++// // make a three arg adaptor for the function passed in so that the main ++// // implementation function can be used ++// auto three_arg_adaptor = [&func]( ++// auto&& ele, auto index, auto) -> decltype(auto) { ++// return func(std::forward(ele), index); ++// }; ++// for_each_range_impl( ++// index_constant<3>{}, std::forward(range), three_arg_adaptor); ++// } ++// ++// template ++// void for_each_range_impl(index_constant<1>, Sequence&& range, Func& func) { ++// // make a three argument adaptor for the function passed in that just ignores ++// // the second and third argument ++// auto three_arg_adaptor = [&func](auto&& ele, auto, auto) -> decltype(auto) { ++// return func(std::forward(ele)); ++// }; ++// for_each_range_impl( ++// index_constant<3>{}, std::forward(range), three_arg_adaptor); ++// } + + /** + * Handlers for iteration +@@ -260,40 +259,40 @@ void for_each_impl(TupleTag, Sequence&& range, Func& func) { + static_assert(!std::is_same::value, "unknown invocability"); + for_each_tuple_impl(tag{}, std::forward(range), func); + } +-template +-void for_each_impl(RangeTag, Sequence&& range, Func& func) { +- using iter = decltype(access::begin(std::declval())); +- using type = decltype(*std::declval()); +- using tag = ForEachImplTag; +- static_assert(!std::is_same::value, "unknown invocability"); +- for_each_range_impl(tag{}, std::forward(range), func); +-} +- ++// template ++// void for_each_impl(RangeTag, Sequence&& range, Func& func) { ++// using iter = decltype(access::begin(std::declval())); ++// using type = decltype(*std::declval()); ++// using tag = ForEachImplTag; ++// static_assert(!std::is_same::value, "unknown invocability"); ++// for_each_range_impl(tag{}, std::forward(range), func); ++// } ++// + template + decltype(auto) fetch_impl(IndexingTag, Sequence&& sequence, Index&& index) { + return std::forward(sequence)[std::forward(index)]; + } +-template +-decltype(auto) fetch_impl(BeginAddTag, Sequence&& sequence, Index index) { +- return *(access::begin(std::forward(sequence)) + index); +-} ++// template ++// decltype(auto) fetch_impl(BeginAddTag, Sequence&& sequence, Index index) { ++// return *(access::begin(std::forward(sequence)) + index); ++// } + + template + decltype(auto) fetch_impl(TupleTag, Sequence&& sequence, Index index) { + return get_impl(std::forward(sequence)); + } +-template +-decltype(auto) fetch_impl(RangeTag, Sequence&& sequence, Index&& index) { +- using iter = decltype(access::begin(std::declval())); +- using iter_traits = std::iterator_traits>; +- using iter_cat = typename iter_traits::iterator_category; +- using tag = std::conditional_t< +- std::is_same::value, +- BeginAddTag, +- IndexingTag>; +- return fetch_impl( +- tag{}, std::forward(sequence), std::forward(index)); +-} ++// template ++// decltype(auto) fetch_impl(RangeTag, Sequence&& sequence, Index&& index) { ++// using iter = decltype(access::begin(std::declval())); ++// using iter_traits = std::iterator_traits>; ++// using iter_cat = typename iter_traits::iterator_category; ++// using tag = std::conditional_t< ++// std::is_same::value, ++// BeginAddTag, ++// IndexingTag>; ++// return fetch_impl( ++// tag{}, std::forward(sequence), std::forward(index)); ++// } + + } // namespace for_each_detail + +diff --git a/folly/functional/Invoke.h b/folly/functional/Invoke.h +index f94435605..87adbf4e2 100644 +--- a/folly/functional/Invoke.h ++++ b/folly/functional/Invoke.h +@@ -19,11 +19,11 @@ + #include + #include + +-#include +-#include +-#include +-#include +-#include ++// #include ++// #include ++// #include ++// #include ++// #include + + #include + #include + diff --git a/vcpkg-registry/ports/nesfolly/vcpkg.json b/vcpkg-registry/ports/folly/vcpkg.json similarity index 91% rename from vcpkg-registry/ports/nesfolly/vcpkg.json rename to vcpkg-registry/ports/folly/vcpkg.json index 8b9f29d..b9a2b23 100644 --- a/vcpkg-registry/ports/nesfolly/vcpkg.json +++ b/vcpkg-registry/ports/folly/vcpkg.json @@ -1,11 +1,10 @@ { - "name": "nesfolly", + "name": "folly", "version-string": "2021.10.11.00", "description": "An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows", "homepage": "https://github.com/facebook/folly", "supports": "x64 | (arm64 & !windows)", "dependencies": [ - "boost-mpl", { "name": "vcpkg-cmake", "host": true diff --git a/vcpkg-registry/ports/nesfolly/malloc.patch b/vcpkg-registry/ports/nesfolly/malloc.patch deleted file mode 100644 index 9f4d7ae..0000000 --- a/vcpkg-registry/ports/nesfolly/malloc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a44ca977a..5ec725685 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -32,6 +32,7 @@ add_library(nesfolly - folly/Executor.cpp - folly/portability/SysMembarrier.cpp - folly/memory/MallctlHelper.cpp -+ folly/memory/detail/MallocImpl.cpp - ) - - target_compile_features(nesfolly PRIVATE cxx_std_20) - diff --git a/vcpkg-registry/versions/baseline.json b/vcpkg-registry/versions/baseline.json index 605a0f9..b4f045e 100644 --- a/vcpkg-registry/versions/baseline.json +++ b/vcpkg-registry/versions/baseline.json @@ -1,6 +1,6 @@ { "default": { - "nesfolly": { "baseline": "2021.10.11.00", "port-version": 0 }, + "folly": { "baseline": "2021.10.11.00", "port-version": 0 }, "jemalloc-nes": { "baseline": "5.2.1", "port-version": 0 }, "oatpp": { "baseline": "1.3.0", "port-version": 0 } } diff --git a/vcpkg-registry/versions/n/nesfolly.json b/vcpkg-registry/versions/f/folly.json similarity index 100% rename from vcpkg-registry/versions/n/nesfolly.json rename to vcpkg-registry/versions/f/folly.json diff --git a/vcpkg.json b/vcpkg.json index fcc72d7..35ab3c2 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -21,7 +21,7 @@ "benchmark", "antlr4", "spdlog", - "nesfolly", + "folly", "jemalloc-nes", "simdjson", "oatpp",