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

Brett Cornwall ainola at archlinux.org
Wed Feb 26 02:12:02 UTC 2020


    Date: Wednesday, February 26, 2020 @ 02:12:01
  Author: ainola
Revision: 582229

archrelease: copy trunk to community-x86_64

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

-----------------------------------------+
 538-output-date-pc-for-pkg-config.patch |   60 ++++++++++++++++++++++++++++++
 PKGBUILD                                |   56 ++++++++++++++++++++++++++++
 2 files changed, 116 insertions(+)

Copied: chrono-date/repos/community-x86_64/538-output-date-pc-for-pkg-config.patch (from rev 582228, chrono-date/trunk/538-output-date-pc-for-pkg-config.patch)
===================================================================
--- community-x86_64/538-output-date-pc-for-pkg-config.patch	                        (rev 0)
+++ community-x86_64/538-output-date-pc-for-pkg-config.patch	2020-02-26 02:12:01 UTC (rev 582229)
@@ -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:tz>,-D$<JOIN:$<TARGET_PROPERTY: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} -ltz
++Cflags: -I${includedir} @TZ_COMPILE_DEFINITIONS@

Copied: chrono-date/repos/community-x86_64/PKGBUILD (from rev 582228, chrono-date/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2020-02-26 02:12:01 UTC (rev 582229)
@@ -0,0 +1,56 @@
+# Maintainer: Brett Cornwall <ainola at archlinux.org>
+
+pkgname=chrono-date
+pkgver=2.4.1+134+g9a0ee25
+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'
+)
+# 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')
+
+pkgver() {
+    cd "$pkgname"
+    git describe --always --tags | sed 's/^v//;s/-/+/g'
+}
+
+prepare() {
+    cd "$pkgname"
+    mkdir build
+    # https://github.com/HowardHinnant/date/issues/537
+    patch -p1 < ../538-output-date-pc-for-pkg-config.patch
+}
+
+build() {
+    cd "$pkgname/build"
+    cmake .. \
+        -DCMAKE_BUILD_TYPE=Release \
+        -DCMAKE_INSTALL_PREFIX=/usr \
+        -DBUILD_SHARED_LIBS=true \
+        -DBUILD_TZ_LIB=true \
+        -DUSE_SYSTEM_TZ_DB=true \
+        -DENABLE_DATE_TESTING=true
+}
+
+check() {
+    cd "$pkgname/build"
+    make 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"
+}



More information about the arch-commits mailing list