diff --git a/ports/date/0002-fix-cmake-3.14.patch b/ports/date/0002-fix-cmake-3.14.patch deleted file mode 100644 index 4fece8fa81d92d..00000000000000 --- a/ports/date/0002-fix-cmake-3.14.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ad74900..42d55af 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -73,7 +73,7 @@ target_sources( date INTERFACE - $ - $ - ) --if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.15) -+if (0) - # public headers will get installed: - set_target_properties( date PROPERTIES PUBLIC_HEADER include/date/date.h ) - endif () -@@ -144,7 +144,6 @@ if( BUILD_TZ_LIB ) - endif( ) - set_target_properties( date-tz PROPERTIES - POSITION_INDEPENDENT_CODE ON -- PUBLIC_HEADER "${TZ_HEADERS}" - VERSION "${PROJECT_VERSION}" - SOVERSION "${ABI_VERSION}" ) - if( NOT MSVC ) -@@ -169,8 +169,8 @@ write_basic_package_version_file( "${version_config}" - COMPATIBILITY SameMajorVersion ) - - install( TARGETS date -- EXPORT dateConfig -- PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/date ) -+ EXPORT dateConfig ) -+install( FILES include/date/date.h ${TZ_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/date ) - export( TARGETS date NAMESPACE date:: FILE dateTargets.cmake ) - if (CMAKE_VERSION VERSION_LESS 3.15) - install( diff --git a/ports/date/0002-fix-cmake-install.patch b/ports/date/0002-fix-cmake-install.patch new file mode 100644 index 00000000000000..aa404f1ce95c75 --- /dev/null +++ b/ports/date/0002-fix-cmake-install.patch @@ -0,0 +1,63 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 012512a..2cbcc21 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -73,10 +73,6 @@ target_sources( date INTERFACE + $ + $ + ) +-if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.15) +- # public headers will get installed: +- set_target_properties( date PROPERTIES PUBLIC_HEADER include/date/date.h ) +-endif () + + # These used to be set with generator expressions, + # +@@ -144,7 +140,6 @@ if( BUILD_TZ_LIB ) + endif( ) + set_target_properties( date-tz PROPERTIES + POSITION_INDEPENDENT_CODE ON +- PUBLIC_HEADER "${TZ_HEADERS}" + VERSION "${PROJECT_VERSION}" + SOVERSION "${ABI_VERSION}" ) + if( NOT MSVC ) +@@ -169,30 +164,26 @@ write_basic_package_version_file( "${version_config}" + COMPATIBILITY SameMajorVersion ) + + install( TARGETS date +- EXPORT dateConfig +- PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/date ) ++ EXPORT dateConfig ) + export( TARGETS date NAMESPACE date:: FILE dateTargets.cmake ) +-if (CMAKE_VERSION VERSION_LESS 3.15) +- install( +- FILES include/date/date.h +- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/date ) +-endif () ++install( ++ DIRECTORY "${CMAKE_SOURCE_DIR}/include/date" ++ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ++ PATTERN "chrono_io.h" EXCLUDE ++) + + if( BUILD_TZ_LIB ) + install( TARGETS date-tz + EXPORT dateConfig +- PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/date + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) # This is for Windows + export( TARGETS date-tz NAMESPACE date:: APPEND FILE dateTargets.cmake ) + endif( ) + +-if( WIN32 AND NOT CYGWIN) +- set( CONFIG_LOC CMake ) +-else( ) +- set( CONFIG_LOC "${CMAKE_INSTALL_LIBDIR}/cmake/date" ) +-endif( ) ++ ++set( CONFIG_LOC "${CMAKE_INSTALL_LIBDIR}/cmake/date" ) ++ + install( EXPORT dateConfig + FILE dateTargets.cmake + NAMESPACE date:: diff --git a/ports/date/portfile.cmake b/ports/date/portfile.cmake index beb613ab1344ac..cff1bae789fda5 100644 --- a/ports/date/portfile.cmake +++ b/ports/date/portfile.cmake @@ -13,7 +13,7 @@ vcpkg_from_github( HEAD_REF master PATCHES 0001-fix-uwp.patch - 0002-fix-cmake-3.14.patch + 0002-fix-cmake-install.patch fix-uninitialized-values.patch #Update the new version please remove this patch ) @@ -30,15 +30,11 @@ vcpkg_cmake_configure( ) vcpkg_cmake_install() - -if(VCPKG_TARGET_IS_WINDOWS) - vcpkg_cmake_config_fixup(CONFIG_PATH CMake) -else() - vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/date) -endif() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/date) vcpkg_copy_pdbs() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/date/usage b/ports/date/usage new file mode 100644 index 00000000000000..41d8671b71d70e --- /dev/null +++ b/ports/date/usage @@ -0,0 +1,4 @@ +date provides CMake targets: + + find_package(date CONFIG REQUIRED) + target_link_libraries(main PRIVATE date::date date::date-tz) diff --git a/ports/date/vcpkg.json b/ports/date/vcpkg.json index bc782219a1bd11..dcb30ce169cb48 100644 --- a/ports/date/vcpkg.json +++ b/ports/date/vcpkg.json @@ -1,7 +1,7 @@ { "name": "date", "version": "3.0.1", - "port-version": 3, + "port-version": 4, "description": "A date and time library based on the C++17 header", "homepage": "https://github.com/HowardHinnant/date", "license": "MIT", diff --git a/versions/baseline.json b/versions/baseline.json index 2acb36ccbcf257..37cfb026d6d670 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2034,7 +2034,7 @@ }, "date": { "baseline": "3.0.1", - "port-version": 3 + "port-version": 4 }, "dav1d": { "baseline": "1.2.1", diff --git a/versions/d-/date.json b/versions/d-/date.json index 20a76a34e73240..1d2cf0d75c6110 100644 --- a/versions/d-/date.json +++ b/versions/d-/date.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "4f6b5d17f3cf8ffb0330963bf0b6d8efa9175e13", + "version": "3.0.1", + "port-version": 4 + }, { "git-tree": "b3ca1bdc08676cd1bb802421bd94a18872305737", "version": "3.0.1",