[arch-commits] Commit in chrono-date/repos (4 files)

Brett Cornwall ainola at gemini.archlinux.org
Mon Jul 19 02:18:53 UTC 2021


    Date: Monday, July 19, 2021 @ 02:18:52
  Author: ainola
Revision: 978559

archrelease: copy trunk to community-staging-x86_64

Added:
  chrono-date/repos/community-staging-x86_64/
  chrono-date/repos/community-staging-x86_64/538-output-date-pc-for-pkg-config.patch
    (from rev 978558, chrono-date/trunk/538-output-date-pc-for-pkg-config.patch)
  chrono-date/repos/community-staging-x86_64/PKGBUILD
    (from rev 978558, chrono-date/trunk/PKGBUILD)
  chrono-date/repos/community-staging-x86_64/disable_buggy_libstdc++_tests.patch
    (from rev 978558, chrono-date/trunk/disable_buggy_libstdc++_tests.patch)

-----------------------------------------+
 538-output-date-pc-for-pkg-config.patch |   60 ++++++++++++++++++++++++++
 PKGBUILD                                |   69 ++++++++++++++++++++++++++++++
 disable_buggy_libstdc++_tests.patch     |   30 +++++++++++++
 3 files changed, 159 insertions(+)

Copied: chrono-date/repos/community-staging-x86_64/538-output-date-pc-for-pkg-config.patch (from rev 978558, chrono-date/trunk/538-output-date-pc-for-pkg-config.patch)
===================================================================
--- community-staging-x86_64/538-output-date-pc-for-pkg-config.patch	                        (rev 0)
+++ community-staging-x86_64/538-output-date-pc-for-pkg-config.patch	2021-07-19 02:18:52 UTC (rev 978559)
@@ -0,0 +1,60 @@
+From e56b2dce7e89a92e1b9b35caa13b3e938c4cedea Mon Sep 17 00:00:00 2001
+From: Cole Mickens <cole.mickens at gmail.com>
+Date: Sun, 26 Jan 2020 01:27:08 -0800
+Subject: [PATCH] CMakeLists.txt: output date.pc for pkg-config
+
+---
+ CMakeLists.txt | 15 +++++++++++++++
+ date.pc.in     | 10 ++++++++++
+ 2 files changed, 25 insertions(+)
+ create mode 100644 date.pc.in
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f30c473..fe778e8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -128,6 +128,15 @@ if( BUILD_TZ_LIB )
+     endif( )
+ endif( )
+ 
++if ( BUILD_TZ_LIB )
++  # Cflags: -I${includedir} @TZ_COMPILE_DEFINITIONS@
++  set( TZ_COMPILE_DEFINITIONS "$<IF:$<TARGET_EXISTS:date-tz>,-D$<JOIN:$<TARGET_PROPERTY:date-tz,INTERFACE_COMPILE_DEFINITIONS>, -D>,>" )
++  configure_file(date.pc.in date.pc.cf @ONLY)
++  file( GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/date.pc"
++    INPUT "${CMAKE_CURRENT_BINARY_DIR}/date.pc.cf" )
++
++endif( )
++
+ #[===================================================================[
+    installation
+ #]===================================================================]
+@@ -171,6 +180,12 @@ install (
+   FILES cmake/dateConfig.cmake "${version_config}"
+   DESTINATION ${CONFIG_LOC})
+ 
++if ( BUILD_TZ_LIB )
++  install(
++    FILES ${CMAKE_BINARY_DIR}/date.pc
++    DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
++endif( )
++
+ #[===================================================================[
+    testing
+ #]===================================================================]
+diff --git a/date.pc.in b/date.pc.in
+new file mode 100644
+index 0000000..b9c4623
+--- /dev/null
++++ b/date.pc.in
+@@ -0,0 +1,10 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_BINDIR@
++libdir=@CMAKE_INSTALL_LIB@
++includedir=@CMAKE_INSTALL_INCLUDE@
++
++Name: date
++Description: A date and time library based on the C++11/14/17 <chrono> header
++Version: @PACKAGE_VERSION@
++Libs: -L${libdir} -ldate-tz
++Cflags: -I${includedir} @TZ_COMPILE_DEFINITIONS@

Copied: chrono-date/repos/community-staging-x86_64/PKGBUILD (from rev 978558, chrono-date/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-07-19 02:18:52 UTC (rev 978559)
@@ -0,0 +1,69 @@
+# Maintainer: Brett Cornwall <ainola at archlinux.org>
+
+pkgname=chrono-date
+pkgver=3.0.1
+pkgrel=1
+pkgdesc="A date and time library based on the C++11/14/17 <chrono> header"
+arch=(x86_64)
+url="https://howardhinnant.github.io/date/date.html"
+license=('MIT')
+makedepends=(
+    'cmake'
+    'git'
+)
+provides=(
+    'libdate-tz.so'
+)
+source=("$pkgname-$pkgver.tar.gz::https://github.com/HowardHinnant/date/archive/v$pkgver.tar.gz"
+        "538-output-date-pc-for-pkg-config.patch::https://patch-diff.githubusercontent.com/raw/HowardHinnant/date/pull/538.patch"
+        "https://github.com/HowardHinnant/date/commit/052eebaf0086e6bbc5ead01c3f1a8f02496aa701.patch"
+        "https://github.com/HowardHinnant/date/commit/b49a7575ebbe127e8bd344900a52c14b5d69dd7b.patch"
+        "disable_buggy_libstdc++_tests.patch")
+sha256sums=('7a390f200f0ccd207e8cff6757e04817c1a0aec3e327b006b7eb451c57ee3538'
+            'c881ae3ae08b46a2137b987e593469d030669c37c9423921a1fac7de512676f3'
+            '9d8586fce2b98130dbfa5586250a74142f87cde97a9368ae07ebe89e5d6ea586'
+            '2a14544db6dad5e0f6a674384fccb86144915c45e9d3826f0c49ef2c01143884'
+            'bd770b44554790c8854dd433aa670ecb8071a69bbeb2855c97dc66570d442165')
+
+prepare() {
+    cd "date-$pkgver"
+
+    # https://github.com/HowardHinnant/date/issues/671
+    # These two patches were commited right after release of 3.0.1 and fix a
+    # failing test.
+    patch -p1 < ../052eebaf0086e6bbc5ead01c3f1a8f02496aa701.patch
+    patch -p1 < ../b49a7575ebbe127e8bd344900a52c14b5d69dd7b.patch
+    # https://github.com/HowardHinnant/date/issues/537
+    # Modified to link against date-tz as newer releases of date changed the library.
+    patch -p1 < ../538-output-date-pc-for-pkg-config.patch
+
+    # FIXME: one particular test suite will fail; according to the date author,
+    # GCC's std::time_get is buggy and bugs should be raised to that project.
+    # See:
+    # https://github.com/HowardHinnant/date/issues/334
+    # https://github.com/HowardHinnant/date/issues/455
+    # https://github.com/HowardHinnant/date/issues/496
+    patch -p1 < ../disable_buggy_libstdc++_tests.patch
+}
+
+
+build() {
+    cmake -B build -S "date-$pkgver" \
+        -DCMAKE_BUILD_TYPE=None \
+        -DCMAKE_INSTALL_PREFIX=/usr \
+        -DBUILD_SHARED_LIBS=true \
+        -DBUILD_TZ_LIB=true \
+        -DUSE_SYSTEM_TZ_DB=true \
+        -DENABLE_DATE_TESTING=true \
+        -Wno-dev
+}
+
+check() {
+    make -C build testit
+}
+
+package() {
+    make -C build DESTDIR="$pkgdir/" install
+    install -Dm644 "date-$pkgver/LICENSE.txt" -t "$pkgdir/usr/share/licenses/$pkgname"
+    install -Dm644 "date-$pkgver/README.md" -t "$pkgdir/usr/share/doc/$pkgname"
+}

Copied: chrono-date/repos/community-staging-x86_64/disable_buggy_libstdc++_tests.patch (from rev 978558, chrono-date/trunk/disable_buggy_libstdc++_tests.patch)
===================================================================
--- community-staging-x86_64/disable_buggy_libstdc++_tests.patch	                        (rev 0)
+++ community-staging-x86_64/disable_buggy_libstdc++_tests.patch	2021-07-19 02:18:52 UTC (rev 978559)
@@ -0,0 +1,30 @@
+--- a/test/date_test/parse.pass.cpp	2020-06-02 18:08:57.000000000 -0700
++++ b/test/date_test/parse.pass.cpp	2020-07-11 19:35:35.349377734 -0700
+@@ -874,27 +874,20 @@
+ int
+ main()
+ {
+-    test_a();
+-    test_b();
+-    test_c();
+     test_C();
+     test_d();
+     test_D();
+     test_F();
+     test_H();
+-    test_Ip();
+     test_j();
+     test_m();
+     test_M();
+-    test_p();
+-    test_r();
+     test_R();
+     test_S();
+     test_T();
+     test_U();
+     test_W();
+     test_GV();
+-    test_x();
+     test_X();
+     test_z();
+     test_Z();




More information about the arch-commits mailing list