diff --git a/devel/cctz/Makefile b/devel/cctz/Makefile index f7fcd3ac886d..0f71fb95763d 100644 --- a/devel/cctz/Makefile +++ b/devel/cctz/Makefile @@ -1,34 +1,38 @@ PORTNAME= cctz -PORTVERSION= 2.2 -PORTREVISION= 3 DISTVERSIONPREFIX= v +DISTVERSION= 2.4 CATEGORIES= devel +PATCH_SITES= https://github.com/google/cctz/commit/ +PATCHFILES= 64d12062183e2fa01f8c0127c4b9f91afaeee46c.patch:-p1 + MAINTAINER= z7dr6ut7gs@snkmail.com COMMENT= C++ library for handling dates, times, and time zones WWW= https://github.com/google/cctz LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE.txt -GH_ACCOUNT= google -USES= compiler:c++11-lib gmake -USE_GITHUB= yes +TEST_DEPENDS= benchmark>0:devel/benchmark \ + googletest>0:devel/googletest -MAKE_ARGS+= CXX=${CXX} \ - EXTRA_CPPFLAGS="-D_POSIX_C_SOURCE=201112L -D_XOPEN_SOURCE=600" +USES= cmake:testing + +USE_GITHUB= yes +GH_ACCOUNT= google -PLIST_FILES= include/cctz/civil_time.h \ - include/cctz/civil_time_detail.h \ - include/cctz/time_zone.h \ - include/cctz/zone_info_source.h \ - lib/libcctz.a PORTDOCS= README.md +CMAKE_OFF= BUILD_EXAMPLES \ + BUILD_TESTING \ + BUILD_TOOLS +CMAKE_ON= BUILD_SHARED_LIBS +CMAKE_ARGS= -DVERSION=${DISTVERSION} -DSOVERSION=${DISTVERSION:R} + OPTIONS_DEFINE= DOCS -post-install: +post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} - cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${STAGEDIR}${DOCSDIR} .include diff --git a/devel/cctz/distinfo b/devel/cctz/distinfo index 6fd030fa3dc5..201dc1083e52 100644 --- a/devel/cctz/distinfo +++ b/devel/cctz/distinfo @@ -1,3 +1,5 @@ -TIMESTAMP = 1525700523 -SHA256 (google-cctz-v2.2_GH0.tar.gz) = ab315d5beb18a65ace57f6ea91f9ea298ec163fee89f84a44e81732af4d07348 -SIZE (google-cctz-v2.2_GH0.tar.gz) = 294330 +TIMESTAMP = 1729718272 +SHA256 (google-cctz-v2.4_GH0.tar.gz) = e1a00957d472044808a24a26f1ba020f36dc26949a69c214562d96b74093adb3 +SIZE (google-cctz-v2.4_GH0.tar.gz) = 222831 +SHA256 (64d12062183e2fa01f8c0127c4b9f91afaeee46c.patch) = ce8209dc567a1c2fddb186e2f420435dccb812deef1a18e1e42e2b619fbb0f1f +SIZE (64d12062183e2fa01f8c0127c4b9f91afaeee46c.patch) = 844 diff --git a/devel/cctz/files/patch-CMakeLists.txt b/devel/cctz/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..0f79593500fb --- /dev/null +++ b/devel/cctz/files/patch-CMakeLists.txt @@ -0,0 +1,32 @@ +--- CMakeLists.txt.orig 2024-10-23 22:32:38 UTC ++++ CMakeLists.txt +@@ -75,7 +75,7 @@ set(CCTZ_HDRS + include/cctz/zone_info_source.h + include/cctz/civil_time.h + ) +-add_library(cctz ++add_library(cctz SHARED + src/civil_time_detail.cc + src/time_zone_fixed.cc + src/time_zone_fixed.h +@@ -107,6 +107,11 @@ add_library(cctz::cctz ALIAS cctz) + target_link_libraries(cctz PUBLIC ${CoreFoundation}) + endif() + add_library(cctz::cctz ALIAS cctz) ++set_target_properties(cctz PROPERTIES ++ OUTPUT_NAME "cctz" ++ VERSION ${VERSION} ++ SOVERSION ${SOVERSION} ++) + + if (BUILD_TOOLS) + add_executable(time_tool src/time_tool.cc) +@@ -155,7 +160,7 @@ if (BUILD_TESTING) + time_zone_format_test + time_zone_lookup_test + PROPERTY +- ENVIRONMENT "TZDIR=${CMAKE_CURRENT_SOURCE_DIR}/testdata/zoneinfo" ++ ENVIRONMENT "TZDIR=/usr/share/zoneinfo" + ) + + if (BUILD_BENCHMARK) diff --git a/devel/cctz/pkg-plist b/devel/cctz/pkg-plist new file mode 100644 index 000000000000..225b5d03c18f --- /dev/null +++ b/devel/cctz/pkg-plist @@ -0,0 +1,10 @@ +include/cctz/civil_time.h +include/cctz/civil_time_detail.h +include/cctz/time_zone.h +include/cctz/zone_info_source.h +lib/cmake/cctz/cctz-config.cmake +lib/cmake/cctz/cctz-targets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/cctz/cctz-targets.cmake +lib/libcctz.so +lib/libcctz.so.2 +lib/libcctz.so.2.4