pkgsrc-WIP-changes archive

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

hare: Don't hardcode path to leap-second data



Module Name:	pkgsrc-wip
Committed By:	Charlotte Koch <charlotte%NetBSD.org@localhost>
Pushed By:	cfkoch
Date:		Sat Sep 7 18:53:21 2024 -0700
Changeset:	ad2ae90246a0166f030f1f048047addb31b0ec3d

Modified Files:
	hare/Makefile
	hare/PLIST
	hare/distinfo
Removed Files:
	hare/patches/patch-time_chrono_+netbsd.ha

Log Message:
hare: Don't hardcode path to leap-second data

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

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

diffstat:
 hare/Makefile                             |  8 +++++++-
 hare/PLIST                                |  1 -
 hare/distinfo                             |  1 -
 hare/patches/patch-time_chrono_+netbsd.ha | 14 --------------
 4 files changed, 7 insertions(+), 17 deletions(-)

diffs:
diff --git a/hare/Makefile b/hare/Makefile
index f886fe6539..3909e0dbb2 100644
--- a/hare/Makefile
+++ b/hare/Makefile
@@ -28,10 +28,16 @@ pre-configure:
 
 # TODO: After NetBSD 10.1, we can remove the time/chrono patch and the
 #       following
+SUBST_CLASSES+=		leapsecs
+SUBST_MESSAGE.leapsecs=	Parameterize path to leap-second data.
+SUBST_STAGE.leapsecs=	post-extract
+SUBST_FILES.leapsecs=	time/chrono/+netbsd.ha
+SUBST_SED.leapsecs=	-e s,/usr/share/zoneinfo/leap-seconds.list,${PREFIX}/share/hare/leap-seconds.list,g
+
 MASTER_SITES+=	https://data.iana.org/time-zones/code/
 DISTFILES=	${DEFAULT_DISTFILES}
 DISTFILES+=	leap-seconds.list
-pre-build:
+post-install:
 	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/hare
 	${INSTALL_DATA} ${WRKDIR}/leap-seconds.list \
 		${DESTDIR}${PREFIX}/share/hare/leap-seconds.list
diff --git a/hare/PLIST b/hare/PLIST
index 23028d70a8..0c857d4d87 100644
--- a/hare/PLIST
+++ b/hare/PLIST
@@ -759,7 +759,6 @@ share/hare/stdlib/time/arithm.ha
 share/hare/stdlib/time/chrono/+freebsd.ha
 share/hare/stdlib/time/chrono/+linux.ha
 share/hare/stdlib/time/chrono/+netbsd.ha
-share/hare/stdlib/time/chrono/+netbsd.ha.orig
 share/hare/stdlib/time/chrono/+openbsd.ha
 share/hare/stdlib/time/chrono/README
 share/hare/stdlib/time/chrono/arithmetic.ha
diff --git a/hare/distinfo b/hare/distinfo
index 33a578341d..083889166b 100644
--- a/hare/distinfo
+++ b/hare/distinfo
@@ -7,4 +7,3 @@ BLAKE2s (hare/leap-seconds.list) = 7db9dd929502f4cf1d9d27c2c6df1f6fd725363b59ce8
 SHA512 (hare/leap-seconds.list) = 6efa96f201099b89a38d664c7bf37bc314033475a99da6ad06f9924750d3e03afdab4892aa84042177ee37052efb5e7b3f138c44eb6492f745346346fed384f8
 Size (hare/leap-seconds.list) = 5064 bytes
 SHA1 (patch-scripts_version) = ba5b8f77fddada9fc02c85379bb9edefaa275058
-SHA1 (patch-time_chrono_+netbsd.ha) = 36c89cef0c48302a2d2458550ee4b2437eb1477e
diff --git a/hare/patches/patch-time_chrono_+netbsd.ha b/hare/patches/patch-time_chrono_+netbsd.ha
deleted file mode 100644
index c8464cd333..0000000000
--- a/hare/patches/patch-time_chrono_+netbsd.ha
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
-Correctly determine path to the leap-second data file.
-
-XXX Don't hardcode '/usr/pkg'
-
---- time/chrono/+netbsd.ha.orig	2024-07-14 11:28:01.000000000 +0000
-+++ time/chrono/+netbsd.ha
-@@ -6,4 +6,4 @@ def TZDB_PATH: str = "/usr/share/zoneinf
- 
- // The filepath of the system's "leap-seconds.list" file, which contains UTC/TAI
- // leap second data.
--export def UTC_LEAPSECS_PATH: str = "/usr/share/zoneinfo/leap-seconds.list";
-+export def UTC_LEAPSECS_PATH: str = "/usr/pkg/share/hare/leap-seconds.list";


Home | Main Index | Thread Index | Old Index