unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 3fd1d54b3690a353a0c2ea9bcb8714612b0a289f 1944 bytes (raw)
name: packages/patches/date-output-pkg-config-files.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
 
From e56b2dce7e89a92e1b9b35caa13b3e938c4cedea 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 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@

debug log:

solving 3fd1d54b3690a353a0c2ea9bcb8714612b0a289f ...
found 3fd1d54b3690a353a0c2ea9bcb8714612b0a289f in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).