diff --git a/ports/ffmpeg/0004-fix-debug-build.patch b/ports/ffmpeg/0004-fix-debug-build.patch index 513dc966ba..6f921960ac 100644 --- a/ports/ffmpeg/0004-fix-debug-build.patch +++ b/ports/ffmpeg/0004-fix-debug-build.patch @@ -31,7 +31,7 @@ index bd2de34..fba948a 100755 require libsmbclient libsmbclient.h smbc_init -lsmbclient; } -enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++ +if enabled debug_configure; then -+ enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappyd -lstdc++ ++ enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++ +else + enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++ +fi diff --git a/ports/ffmpeg/vcpkg.json b/ports/ffmpeg/vcpkg.json index 183285411c..a464fa5b04 100644 --- a/ports/ffmpeg/vcpkg.json +++ b/ports/ffmpeg/vcpkg.json @@ -1,7 +1,7 @@ { "name": "ffmpeg", "version": "4.4.1", - "port-version": 17, + "port-version": 18, "description": [ "a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.", "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations." diff --git a/ports/hpx/fix-debug.patch b/ports/hpx/fix-debug.patch new file mode 100644 index 0000000000..a77b518be2 --- /dev/null +++ b/ports/hpx/fix-debug.patch @@ -0,0 +1,21 @@ +diff --git a/cmake/HPX_CompilerFlagsTargets.cmake b/cmake/HPX_CompilerFlagsTargets.cmake +index 5bf4649..0912503 100644 +--- a/cmake/HPX_CompilerFlagsTargets.cmake ++++ b/cmake/HPX_CompilerFlagsTargets.cmake +@@ -15,14 +15,8 @@ target_compile_features(hpx_public_flags INTERFACE cxx_std_${HPX_CXX_STANDARD}) + + # Set other flags that should always be set + +-# HPX_DEBUG must be set without a generator expression as it determines ABI +-# compatibility. Projects in Release mode using HPX in Debug mode must have +-# HPX_DEBUG set, and projects in Debug mode using HPX in Release mode must not +-# have HPX_DEBUG set. HPX_DEBUG must also not be set by projects using HPX. +-if(${CMAKE_BUILD_TYPE} STREQUAL "Debug") +- target_compile_definitions(hpx_private_flags INTERFACE HPX_DEBUG) +- target_compile_definitions(hpx_public_flags INTERFACE HPX_DEBUG) +-endif() ++target_compile_definitions(hpx_private_flags INTERFACE $<$:HPX_DEBUG>) ++target_compile_definitions(hpx_public_flags INTERFACE $<$:HPX_DEBUG>) + + target_compile_definitions( + hpx_private_flags diff --git a/ports/hpx/fix-export.patch b/ports/hpx/fix-export.patch new file mode 100644 index 0000000000..c9c2bbf4cb --- /dev/null +++ b/ports/hpx/fix-export.patch @@ -0,0 +1,24 @@ +diff --git a/cmake/HPX_GeneratePackageUtils.cmake b/cmake/HPX_GeneratePackageUtils.cmake +index 3ec8002..b098465 100644 +--- a/cmake/HPX_AddModule.cmake ++++ b/cmake/HPX_AddModule.cmake +@@ -437,7 +437,7 @@ function(add_hpx_module libname modulename) + elseif(MSVC) + set(_module_target hpx_${modulename}) + target_link_libraries( +- hpx_${libname} PRIVATE -WHOLEARCHIVE:$ ++ hpx_${libname} PRIVATE -WHOLEARCHIVE:$> + ) + endif() + target_link_libraries(hpx_${libname} PRIVATE ${_module_target}) +--- a/cmake/HPX_GeneratePackageUtils.cmake ++++ b/cmake/HPX_GeneratePackageUtils.cmake +@@ -101,7 +101,7 @@ function( + ) + set(_libraries + ${_libraries} +- $>$> ++ $>>$> + ) + endif() + elseif("${dep_target}" MATCHES "^-l") diff --git a/ports/hpx/fix_output_name_clash.patch b/ports/hpx/fix_output_name_clash.patch new file mode 100644 index 0000000000..a031b1fa68 --- /dev/null +++ b/ports/hpx/fix_output_name_clash.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/HPX_AddComponent.cmake b/cmake/HPX_AddComponent.cmake +index 129a87ced..b45feb3f5 100644 +--- a/cmake/HPX_AddComponent.cmake ++++ b/cmake/HPX_AddComponent.cmake +@@ -303,7 +303,7 @@ function(add_hpx_component name) + hpx_setup_target( + ${name}_component + TYPE COMPONENT +- NAME ${name} ++ NAME ${name}_component + FOLDER ${${name}_FOLDER} + COMPILE_FLAGS ${${name}_COMPILE_FLAGS} + LINK_FLAGS ${${name}_LINK_FLAGS} diff --git a/ports/hpx/format.patch b/ports/hpx/format.patch new file mode 100644 index 0000000000..f3a5003cef --- /dev/null +++ b/ports/hpx/format.patch @@ -0,0 +1,12 @@ +diff --git a/components/iostreams/include/hpx/components/iostreams/ostream.hpp b/components/iostreams/include/hpx/components/iostreams/ostream.hpp +index 423f4728d00..dda4b059796 100644 +--- a/components/iostreams/include/hpx/components/iostreams/ostream.hpp ++++ b/components/iostreams/include/hpx/components/iostreams/ostream.hpp +@@ -398,6 +398,6 @@ namespace hpx { namespace util { + hpx::iostreams::ostream& os, std::string const& format_str, + Args const&... args) + { +- return os << format(format_str, args...); ++ return os << hpx::util::format(format_str, args...); + } + }} // namespace hpx::util diff --git a/ports/hpx/portfile.cmake b/ports/hpx/portfile.cmake index 37b1813867..00d351d31f 100644 --- a/ports/hpx/portfile.cmake +++ b/ports/hpx/portfile.cmake @@ -1,4 +1,7 @@ -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" HPX_WITH_STATIC_LINKING) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -8,16 +11,28 @@ vcpkg_from_github( HEAD_REF stable PATCHES fix-dependency-hwloc.patch + format.patch + fix-export.patch + fix-debug.patch + fix_output_name_clash.patch ) -set(HPX_WITH_MALLOC system) -if(VCPKG_TARGET_IS_LINUX) - # This is done at the request of the hpx maintainers; see - # https://github.com/microsoft/vcpkg/pull/21673#issuecomment-979904882 - # It must match when gperftools is treated as a dependency of this port. - set(HPX_WITH_MALLOC tcmalloc) +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "zlib" HPX_WITH_COMPRESSION_ZLIB + "snappy" HPX_WITH_COMPRESSION_SNAPPY + "bzip2" HPX_WITH_COMPRESSION_BZIP2 + "cuda" HPX_WITH_CUDA + "mpi" HPX_WITH_PARCELPORT_MPI + "mpi" HPX_WITH_PARCELPORT_MPI_MULTITHREADED +) + +if(NOT VCPKG_TARGET_ARCHITECTURE MATCHES "(x64|x86)") + list(APPEND FEATURE_OPTIONS "-DHPX_WITH_GENERIC_CONTEXT_COROUTINES=ON") endif() +file(REMOVE "${SOURCE_PATH}/cmake/FindBZip2.cmake") # Outdated vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" @@ -28,9 +43,15 @@ vcpkg_cmake_configure( -DHPX_WITH_TOOLS=OFF -DHPX_WITH_RUNTIME=OFF -DHPX_USE_CMAKE_CXX_STANDARD=ON - "-DHPX_WITH_MALLOC=${HPX_WITH_MALLOC}" + ${FEATURE_OPTIONS} + -DHPX_WITH_PKGCONFIG=OFF + -DHPX_WITH_STATIC_LINKING=${HPX_WITH_STATIC_LINKING} + -DHPX_WITH_PARCELPORT_TCP=ON + -DHPX_WITH_THREAD_TARGET_ADDRESS=ON + -DHPX_WITH_CHECK_MODULE_DEPENDENCIES=ON + -DHPX_WITH_THREAD_IDLE_RATES=ON + -DVCPKG_HOST_TRIPLET=${_HOST_TRIPLET} ) - vcpkg_cmake_install() # post build cleanup @@ -64,30 +85,6 @@ file(INSTALL "${SOURCE_PATH}/LICENSE_1_0.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) -file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") -if(DLLS) - file(COPY ${DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/bin") - file(REMOVE ${DLLS}) -endif() - -file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/lib/hpx/*.dll") -if(DLLS) - file(COPY ${DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/bin/hpx") - file(REMOVE ${DLLS}) -endif() - -file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") -if(DLLS) - file(COPY ${DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") - file(REMOVE ${DLLS}) -endif() - -file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/hpx/*.dll") -if(DLLS) - file(COPY ${DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin/hpx") - file(REMOVE ${DLLS}) -endif() - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") @@ -96,4 +93,13 @@ vcpkg_fixup_pkgconfig() vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/hpxcxx" "\"${CURRENT_PACKAGES_DIR}\"" "os.path.dirname(os.path.dirname(os.path.realpath(__file__)))") vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/hpxcxx" "\"${CURRENT_PACKAGES_DIR}/debug\"" "os.path.dirname(os.path.dirname(os.path.realpath(__file__)))") -vcpkg_copy_pdbs() +file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/hpxcxx" "${CURRENT_PACKAGES_DIR}/debug/bin/hpxcxx") + +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}") +file(RENAME "${CURRENT_PACKAGES_DIR}/bin/hpxrun.py" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/hpxrun.py") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY) diff --git a/ports/hpx/usage b/ports/hpx/usage new file mode 100644 index 0000000000..cf471d0596 --- /dev/null +++ b/ports/hpx/usage @@ -0,0 +1,4 @@ +The port hpx provides CMake targets: + + find_package(HPX REQUIRED) + target_link_libraries(main PRIVATE HPX::hpx) diff --git a/ports/hpx/vcpkg.json b/ports/hpx/vcpkg.json index 3c49969c1c..ba47e04b64 100644 --- a/ports/hpx/vcpkg.json +++ b/ports/hpx/vcpkg.json @@ -1,6 +1,7 @@ { "name": "hpx", "version": "1.8.0", + "port-version": 1, "description": [ "The C++ Standards Library for Concurrency and Parallelism", "HPX is a C++ Standards Library for Concurrency and Parallelism. It implements all of the corresponding facilities as defined by the C++ Standard. Additionally, in HPX we implement functionalities proposed as part of the ongoing C++ standardization process. We also extend the C++ Standard APIs to the distributed case." @@ -28,6 +29,10 @@ "platform": "linux" }, "hwloc", + { + "name": "pkgconf", + "host": true + }, { "name": "vcpkg-cmake", "host": true @@ -36,5 +41,43 @@ "name": "vcpkg-cmake-config", "host": true } - ] + ], + "default-features": [ + "bzip2", + "mpi", + "snappy", + "zlib" + ], + "features": { + "bzip2": { + "description": "Build with bzip2 compression", + "dependencies": [ + "bzip2" + ] + }, + "cuda": { + "description": "Build with CUDA support", + "dependencies": [ + "cuda" + ] + }, + "mpi": { + "description": "Build with MPI parcelport", + "dependencies": [ + "mpi" + ] + }, + "snappy": { + "description": "Build with snappy compression", + "dependencies": [ + "snappy" + ] + }, + "zlib": { + "description": "Build with zlib compression", + "dependencies": [ + "zlib" + ] + } + } } diff --git a/ports/jemalloc/portfile.cmake b/ports/jemalloc/portfile.cmake index 81c01ab9e4..36f0834e1d 100644 --- a/ports/jemalloc/portfile.cmake +++ b/ports/jemalloc/portfile.cmake @@ -22,6 +22,8 @@ vcpkg_configure_make( vcpkg_install_make() if(VCPKG_TARGET_IS_WINDOWS) + file(COPY "${SOURCE_PATH}/include/msvc_compat/strings.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/jemalloc/msvc_compat") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/jemalloc/jemalloc.h" "" "\"msvc_compat/strings.h\"") if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/jemalloc.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin") diff --git a/ports/jemalloc/vcpkg.json b/ports/jemalloc/vcpkg.json index dccb6d1734..007e05b931 100644 --- a/ports/jemalloc/vcpkg.json +++ b/ports/jemalloc/vcpkg.json @@ -1,6 +1,7 @@ { "name": "jemalloc", "version": "5.3.0", + "port-version": 1, "description": "jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support", "homepage": "https://jemalloc.net/", "license": "BSD-2-Clause" diff --git a/ports/snappy/portfile.cmake b/ports/snappy/portfile.cmake index 6660b86efd..df95a08db8 100644 --- a/ports/snappy/portfile.cmake +++ b/ports/snappy/portfile.cmake @@ -1,7 +1,10 @@ +file(READ "${CURRENT_PORT_DIR}/vcpkg.json" manifest) +string(JSON version GET "${manifest}" version) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/snappy - REF 1.1.9 + REF ${version} SHA512 f1f8a90f5f7f23310423574b1d8c9acb84c66ea620f3999d1060395205e5760883476837aba02f0aa913af60819e34c625d8308c18a5d7a9c4e190f35968b024 HEAD_REF master PATCHES @@ -13,12 +16,21 @@ vcpkg_cmake_configure( OPTIONS -DSNAPPY_BUILD_TESTS=OFF -DSNAPPY_BUILD_BENCHMARKS=OFF - -DCMAKE_DEBUG_POSTFIX=d ) vcpkg_cmake_install() vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Snappy) vcpkg_copy_pdbs() +string(JSON version GET "${manifest}" version) +string(JSON description GET "${manifest}" description) +set(name "${PORT}") + +configure_file("${CURRENT_PORT_DIR}/${PORT}.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${PORT}.pc" @ONLY) +if(NOT VCPKG_BUILD_TYPE) + configure_file("${CURRENT_PORT_DIR}/${PORT}.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${PORT}.pc" @ONLY) +endif() + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/snappy/snappy.pc.in b/ports/snappy/snappy.pc.in new file mode 100644 index 0000000000..055f14bdee --- /dev/null +++ b/ports/snappy/snappy.pc.in @@ -0,0 +1,10 @@ +prefix=${pcfiledir}/../.. +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: @name@ +Description: @description@ +Version: @version@ +Libs: -L${libdir} -l@libname@ +Cflags: -I${includedir} \ No newline at end of file diff --git a/ports/snappy/vcpkg.json b/ports/snappy/vcpkg.json index ecc8a2aea5..05178f3eb9 100644 --- a/ports/snappy/vcpkg.json +++ b/ports/snappy/vcpkg.json @@ -1,9 +1,10 @@ { "name": "snappy", "version": "1.1.9", - "port-version": 2, + "port-version": 3, "description": "A fast compressor/decompressor.", "homepage": "https://github.com/google/snappy", + "license": null, "dependencies": [ { "name": "vcpkg-cmake", diff --git a/versions/baseline.json b/versions/baseline.json index 699dcdb191..969da39bbb 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2282,7 +2282,7 @@ }, "ffmpeg": { "baseline": "4.4.1", - "port-version": 17 + "port-version": 18 }, "ffnvcodec": { "baseline": "11.1.5.0", @@ -2898,7 +2898,7 @@ }, "hpx": { "baseline": "1.8.0", - "port-version": 0 + "port-version": 1 }, "http-parser": { "baseline": "2.9.4", @@ -3146,7 +3146,7 @@ }, "jemalloc": { "baseline": "5.3.0", - "port-version": 0 + "port-version": 1 }, "jinja2cpplight": { "baseline": "2018-05-08", @@ -6818,7 +6818,7 @@ }, "snappy": { "baseline": "1.1.9", - "port-version": 2 + "port-version": 3 }, "sndfile": { "baseline": "0", diff --git a/versions/f-/ffmpeg.json b/versions/f-/ffmpeg.json index 0e438c990b..24b4de633c 100644 --- a/versions/f-/ffmpeg.json +++ b/versions/f-/ffmpeg.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "65fe58cd3c36c19b6ad4b104b9ff57c506009e9a", + "version": "4.4.1", + "port-version": 18 + }, { "git-tree": "197609d70edc506c0257721d873b1eb3b93ba4b8", "version": "4.4.1", diff --git a/versions/h-/hpx.json b/versions/h-/hpx.json index 3d312e3cf8..1bdd4bc464 100644 --- a/versions/h-/hpx.json +++ b/versions/h-/hpx.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "aaf58e8627662fd841d011ea7e71d23507573772", + "version": "1.8.0", + "port-version": 1 + }, { "git-tree": "2bd151915f73223a06d9470f38f56d253392a484", "version": "1.8.0", diff --git a/versions/j-/jemalloc.json b/versions/j-/jemalloc.json index 0288884968..447406220f 100644 --- a/versions/j-/jemalloc.json +++ b/versions/j-/jemalloc.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "96ec9736a357ac7af9b108bcc8e9d237cfb18a43", + "version": "5.3.0", + "port-version": 1 + }, { "git-tree": "6baf5d3d5e323c49a4f91a2e67f778421af4a4c5", "version": "5.3.0", diff --git a/versions/s-/snappy.json b/versions/s-/snappy.json index 0ee914f721..cd35443c66 100644 --- a/versions/s-/snappy.json +++ b/versions/s-/snappy.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "00bd59377f162448da6b19382a7ca392b1761f22", + "version": "1.1.9", + "port-version": 3 + }, { "git-tree": "7122115f0f35f7f90f7a7adc1d15a4b6f7af5315", "version": "1.1.9",