1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-15 03:20:43 +02:00
guix/gnu/packages/patches/date-output-pkg-config-files.patch
Nicolas Graves bc62e66b9b
gnu: date: Update to 3.0.1.
* gnu/packages/calendar.scm (date): Update to 3.0.1.
  [arguments]{phases}: Add phase 'skip-failing-test, adapt phase
  'check.
* gnu/packages/patches/date-output-pkg-config-files.patch: Update
patch accordingly.

Change-Id: Ie8b5dff4e8005b2654f2da295a6dd1cc629df001
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2025-07-04 12:50:22 +01:00

60 lines
1.9 KiB
Diff

From 13762204d70733b6e7510ccd323b9b1e77c06c0f Mon Sep 17 00:00:00 2001
From: Cole Mickens <cole.mickens@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 012512a..5fbea80 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -158,6 +158,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
#]===================================================================]
@@ -201,6 +210,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@