# Description: date and time library based on the C++11/14/17 header # URL: https://howardhinnant.github.io/date/date.html # Maintainer: John McQuah, jmcquah at disroot dot org # Depends on: name=chrono-date version=3.0.1 release=1 source=("https://github.com/HowardHinnant/date/archive/v$version.tar.gz" "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") renames=("$name-$version.tar.gz" "538-output-date-pc-for-pkg-config.patch" SKIP SKIP SKIP) build() { cd date-$version # 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 < $SRC/052eebaf0086e6bbc5ead01c3f1a8f02496aa701.patch patch -p1 < $SRC/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 < $SRC/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 < $SRC/disable_buggy_libstdc++_tests.patch cmake -B build -S "." \ -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX="/usr" \ -DBUILD_SHARED_LIBS=true \ -DBUILD_TZ_LIB=true \ -DENABLE_DATE_TESTING=true \ -Wno-dev make -C build testit make -C build DESTDIR=$PKG install }