pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

chrono-date: patch to ship pkg-config file



Module Name:	pkgsrc-wip
Committed By:	kikadf <kikadf.01%gmail.com@localhost>
Pushed By:	kikadf
Date:		Tue Dec 30 19:35:24 2025 +0100
Changeset:	772ebc6013bf4b465ed693178d642f0eb09e2d9f

Modified Files:
	chrono-date/Makefile
	chrono-date/PLIST
	chrono-date/distinfo
Added Files:
	chrono-date/patches/patch-CMakeLists.txt
	chrono-date/patches/patch-date.pc.in

Log Message:
chrono-date: patch to ship pkg-config file

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=772ebc6013bf4b465ed693178d642f0eb09e2d9f

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 chrono-date/Makefile                     |  6 ++++++
 chrono-date/PLIST                        |  1 +
 chrono-date/distinfo                     |  2 ++
 chrono-date/patches/patch-CMakeLists.txt | 36 ++++++++++++++++++++++++++++++++
 chrono-date/patches/patch-date.pc.in     | 18 ++++++++++++++++
 5 files changed, 63 insertions(+)

diffs:
diff --git a/chrono-date/Makefile b/chrono-date/Makefile
index 03b219a3e3..5b819ca13c 100644
--- a/chrono-date/Makefile
+++ b/chrono-date/Makefile
@@ -17,6 +17,12 @@ CMAKE_CONFIGURE_ARGS+=	-DCMAKE_BUILD_TYPE=Release
 CMAKE_CONFIGURE_ARGS+=	-DBUILD_SHARED_LIBS=ON
 CMAKE_CONFIGURE_ARGS+=	-DBUILD_TZ_LIB=ON
 
+SUBST_CLASSES+=		pc
+SUBST_STAGE.pc=		pre-configure
+SUBST_MESSAGE.pc=	Set pkg-config file
+SUBST_FILES.pc=		date.pc.in
+SUBST_SED.pc+=		-e 's|@VERSION@|${PKGVERSION_NOREV}|g'
+
 .include "../../devel/cmake/build.mk"
 .include "../../www/curl/buildlink3.mk"
 .include "../../mk/pthread.buildlink3.mk"
diff --git a/chrono-date/PLIST b/chrono-date/PLIST
index 8b15e45076..c6eff21da0 100644
--- a/chrono-date/PLIST
+++ b/chrono-date/PLIST
@@ -12,3 +12,4 @@ lib/cmake/date/dateTargets.cmake
 lib/libdate-tz.so
 lib/libdate-tz.so.3
 lib/libdate-tz.so.${PKGVERSION}
+lib/pkgconfig/date.pc
diff --git a/chrono-date/distinfo b/chrono-date/distinfo
index fc0b0be444..115a113a4d 100644
--- a/chrono-date/distinfo
+++ b/chrono-date/distinfo
@@ -3,3 +3,5 @@ $NetBSD: distinfo,v 1.5 2025/10/01 12:12:24 kikadf Exp $
 BLAKE2s (chrono-date-3.0.4.tar.gz) = 167b7a65379e4e7f78480ca4fd5f162f3895e255692f688ef927948ca7d5acbc
 SHA512 (chrono-date-3.0.4.tar.gz) = 9bffca5c7cfd1769f66bef330fe4ef0ad2512a8afd229ddb4043a4f166741e697c7a5fbdddf29f7157b3fc2c2c2a80fa7cff45078f1d8ab248d3b07e14518fcf
 Size (chrono-date-3.0.4.tar.gz) = 830670 bytes
+SHA1 (patch-CMakeLists.txt) = 3f8b905b7838dae17ad393597207315ada14d333
+SHA1 (patch-date.pc.in) = 1422d97051bbdf2022ba2aba65e0e2fa63489199
diff --git a/chrono-date/patches/patch-CMakeLists.txt b/chrono-date/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..272c82ae80
--- /dev/null
+++ b/chrono-date/patches/patch-CMakeLists.txt
@@ -0,0 +1,36 @@
+$NetBSD$
+
+* Install date.pc for pkg-config
+  from Arch Linux
+
+--- CMakeLists.txt.orig	2025-05-28 17:53:02.000000000 +0000
++++ CMakeLists.txt
+@@ -186,6 +186,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
+ #]===================================================================]
+@@ -231,6 +240,12 @@ if( ENABLE_DATE_INSTALL )
+     DESTINATION ${CONFIG_LOC})
+ endif( )
+ 
++if ( BUILD_TZ_LIB )
++  install(
++    FILES ${CMAKE_BINARY_DIR}/date.pc
++    DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
++endif( )
++
+ #[===================================================================[
+    testing
+ #]===================================================================]
diff --git a/chrono-date/patches/patch-date.pc.in b/chrono-date/patches/patch-date.pc.in
new file mode 100644
index 0000000000..88ced5cc98
--- /dev/null
+++ b/chrono-date/patches/patch-date.pc.in
@@ -0,0 +1,18 @@
+$NetBSD$
+
+* date.pc for pkg-config
+  from Arch Linux
+
+--- date.pc.in.orig	2025-12-30 17:59:51.476545818 +0000
++++ date.pc.in
+@@ -0,0 +1,10 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=${prefix}
++libdir=${prefix}/lib
++includedir=${prefix}/include
++
++Name: date
++Description: A date and time library based on the C++11/14/17 <chrono> header
++Version: @VERSION@
++Libs: -L${libdir} -ldate-tz
++Cflags: -I${includedir} @TZ_COMPILE_DEFINITIONS@


Home | Main Index | Thread Index | Old Index