Date: Sunday, July 19, 2020 @ 02:35:58
  Author: ainola
Revision: 664516

upgpkg: chrono-date 3.0.0-1

* Add provides=libdate-tz.so

* Add CMake build flags to conform to packaging standards

* Disable a few problematic tests. 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/4961

Added:
  chrono-date/trunk/disable_buggy_libstdc++_tests.patch
Modified:
  chrono-date/trunk/538-output-date-pc-for-pkg-config.patch
  chrono-date/trunk/PKGBUILD

-----------------------------------------+
 538-output-date-pc-for-pkg-config.patch |    2 -
 PKGBUILD                                |   52 +++++++++++++++---------------
 disable_buggy_libstdc++_tests.patch     |   30 +++++++++++++++++
 3 files changed, 58 insertions(+), 26 deletions(-)

Modified: 538-output-date-pc-for-pkg-config.patch
===================================================================
--- 538-output-date-pc-for-pkg-config.patch     2020-07-19 02:34:24 UTC (rev 
664515)
+++ 538-output-date-pc-for-pkg-config.patch     2020-07-19 02:35:58 UTC (rev 
664516)
@@ -19,7 +19,7 @@
  
 +if ( BUILD_TZ_LIB )
 +  # Cflags: -I${includedir} @TZ_COMPILE_DEFINITIONS@
-+  set( TZ_COMPILE_DEFINITIONS 
"$<IF:$<TARGET_EXISTS:tz>,-D$<JOIN:$<TARGET_PROPERTY:tz,INTERFACE_COMPILE_DEFINITIONS>,
 -D>,>" )
++  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" )

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2020-07-19 02:34:24 UTC (rev 664515)
+++ PKGBUILD    2020-07-19 02:35:58 UTC (rev 664516)
@@ -1,7 +1,7 @@
 # Maintainer: Brett Cornwall <ain...@archlinux.org>
 
 pkgname=chrono-date
-pkgver=2.4.1+134+g9a0ee25
+pkgver=3.0.0
 pkgrel=1
 pkgdesc="A date and time library based on the C++11/14/17 <chrono> header"
 arch=(x86_64)
@@ -11,46 +11,48 @@
     'cmake'
     'git'
 )
-# It's easiest to pin this commit and wait for a new release rather than patch
-# as a number of issues with tests/dependent packages (e.g.
-# https://github.com/Alexays/Waybar/issues/565) are present with the tagged
-# stable version.
-source=("$pkgname::git+https://github.com/HowardHinnant/date#commit=9a0ee2542848ab8625984fc8cdbfb9b5414c0082";
-        
"538-output-date-pc-for-pkg-config.patch::https://patch-diff.githubusercontent.com/raw/HowardHinnant/date/pull/538.patch";)
-sha256sums=('SKIP'
-            'f39ce7f1f738ebdc02948ed78be68cca10c01f9e22a4243670304eeda53a03fd')
+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";
+        "disable_buggy_libstdc++_tests.patch")
+sha256sums=('87bba2eaf0ebc7ec539e5e62fc317cb80671a337c1fb1b84cb9e4d42c6dbebe3'
+            '77bd5764c4807aaaba59000a5d45b71a04bc0d43eb157f8067b2be46c4314987'
+            'bd770b44554790c8854dd433aa670ecb8071a69bbeb2855c97dc66570d442165')
 
-pkgver() {
-    cd "$pkgname"
-    git describe --always --tags | sed 's/^v//;s/-/+/g'
-}
-
 prepare() {
-    cd "$pkgname"
-    mkdir build
+    cd "date-$pkgver"
     # https://github.com/HowardHinnant/date/issues/537
     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/4961
+    patch -p1 < ../disable_buggy_libstdc++_tests.patch
 }
 
+
 build() {
-    cd "$pkgname/build"
-    cmake .. \
-        -DCMAKE_BUILD_TYPE=Release \
+    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
+        -DENABLE_DATE_TESTING=true \
+        -Wno-dev
 }
 
 check() {
-    cd "$pkgname/build"
-    make testit
+    make -C build testit
 }
 
 package() {
-    cd "$pkgname"
     make -C build DESTDIR="$pkgdir/" install
-    install -Dm644 LICENSE.txt -t "$pkgdir/usr/share/licenses/$pkgname"
-    install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
+    install -Dm644 "date-$pkgver/LICENSE.txt" -t 
"$pkgdir/usr/share/licenses/$pkgname"
+    install -Dm644 "date-$pkgver/README.md" -t "$pkgdir/usr/share/doc/$pkgname"
 }

Added: disable_buggy_libstdc++_tests.patch
===================================================================
--- disable_buggy_libstdc++_tests.patch                         (rev 0)
+++ disable_buggy_libstdc++_tests.patch 2020-07-19 02:35:58 UTC (rev 664516)
@@ -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();

Reply via email to