Github messages for voidlinux
 help / color / mirror / Atom feed
From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] tzutils: merge tzdata template
Date: Wed, 27 Jul 2022 17:29:09 +0200	[thread overview]
Message-ID: <20220727152909.vqM758EXhojqJNTo8OtQCCA3ccj2KVWJhep4x46VI7M@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38307@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1481 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages tzutils-merge
https://github.com/void-linux/void-packages/pull/38307

tzutils: merge tzdata template
- Use upstream pre-generated tarball
- tzutils and tzdata has been coupled together for a long time.
- Use original install rules since upstream recommends shipping tzdata.zi
c.f. https://mm.icann.org/pipermail/tz/2022-July/031703.html

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/38307.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tzutils-merge-38307.patch --]
[-- Type: text/x-diff, Size: 4243 bytes --]

From 7ee40ea88a18dc87df4bbfd69815cbd74780b80a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Wed, 27 Jul 2022 09:44:36 +0700
Subject: [PATCH] tzutils: merge tzdata template

- Use upstream pre-generated tarball
- tzutils and tzdata has been coupled together for a long time.
- Use original install rules since upstream recommends shipping tzdata.zi
c.f. https://mm.icann.org/pipermail/tz/2022-July/031703.html
- Fix zdump on 32bit-timestamp zdump(8)
---
 srcpkgs/tzdata           |  1 +
 srcpkgs/tzdata/template  | 25 -------------------
 srcpkgs/tzutils/template | 52 +++++++++++++++++++++++++++++-----------
 3 files changed, 39 insertions(+), 39 deletions(-)
 create mode 120000 srcpkgs/tzdata
 delete mode 100644 srcpkgs/tzdata/template

diff --git a/srcpkgs/tzdata b/srcpkgs/tzdata
new file mode 120000
index 000000000000..fe7b875cf3de
--- /dev/null
+++ b/srcpkgs/tzdata
@@ -0,0 +1 @@
+tzutils
\ No newline at end of file
diff --git a/srcpkgs/tzdata/template b/srcpkgs/tzdata/template
deleted file mode 100644
index fe7ca90f5ac8..000000000000
--- a/srcpkgs/tzdata/template
+++ /dev/null
@@ -1,25 +0,0 @@
-# Template file for 'tzdata'
-pkgname=tzdata
-version=2022a
-revision=1
-bootstrap=yes
-create_wrksrc=yes
-hostmakedepends="tzutils"
-short_desc="Time zone and daylight-saving time data"
-maintainer="Enno Boland <gottox@voidlinux.org>"
-license="Public Domain"
-homepage="http://www.iana.org/time-zones"
-distfiles="http://www.iana.org/time-zones/repository/releases/tzdata${version}.tar.gz"
-checksum=ef7fffd9f4f50f4f58328b35022a32a5a056b245c5cb3d6791dddb342f871664
-
-do_install() {
-	local timezones="africa antarctica asia australasia europe northamerica \
-		southamerica etcetera backward factory"
-
-	zic -b fat -d ${DESTDIR}/usr/share/zoneinfo ${timezones}
-	zic -b fat -d ${DESTDIR}/usr/share/zoneinfo/posix ${timezones}
-	zic -b fat -d ${DESTDIR}/usr/share/zoneinfo/right -L leapseconds ${timezones}
-
-	zic -b fat -d ${DESTDIR}/usr/share/zoneinfo -p America/New_York
-	install -m444 -t ${DESTDIR}/usr/share/zoneinfo iso3166.tab zone1970.tab zone.tab
-}
diff --git a/srcpkgs/tzutils/template b/srcpkgs/tzutils/template
index d0d6cf99dd95..2bfcccb4f4d5 100644
--- a/srcpkgs/tzutils/template
+++ b/srcpkgs/tzutils/template
@@ -1,20 +1,31 @@
 # Template file for 'tzutils'
 pkgname=tzutils
 version=2022a
-revision=1
+revision=2
 bootstrap=yes
-wrksrc="tz-${version}"
+wrksrc="tzdb-${version}"
 short_desc="Time zone and daylight-saving time utilities"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
-license="Public Domain, BSD-3-Clause"
+license="Public Domain"
 homepage="https://www.iana.org/time-zones"
-distfiles="https://github.com/eggert/tz/archive/${version}.tar.gz"
-checksum=e9d82a851a15bb5db2cbaae2c3fc633743ad9edc069e3738c5e8908978064ed8
+distfiles="https://www.iana.org/time-zones/repository/releases/tzdb-${version}.tar.lz"
+checksum=46123b769c55190138cf64e80db605b86f710dc6ca2a15df431966e7fd6e8490
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends="tzutils"
+fi
+
+if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+	# enforce 64-bit time_t for Y2038
+	CFLAGS="-Dtime_tz=int64_t"
+	license+=", BSD-3-Clause"
+fi
 
 do_build() {
-	echo "$version" >version
-	make TZDIR=/usr/share/zoneinfo KSHELL=/bin/sh \
+	touch version
+	make KSHELL=/bin/sh \
 		CC=$CC CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
+	sed -n '/Copyright/,/SUCH DAMAGE/p' strftime.c >strftime.license
 }
 
 do_check() {
@@ -22,11 +33,24 @@ do_check() {
 }
 
 do_install() {
-	vbin zic
-	vbin zdump
-	vbin tzselect
-	vman zic.8
-	vman zdump.8
-	vman tzselect.8
-	vlicense LICENSE
+	local zic
+	if [ "$CROSS_BUILD" ]; then
+		zic="zic=/usr/bin/zic"
+	fi
+	make install DESTDIR="$DESTDIR" ZICDIR=/usr/bin $zic ZFLAGS="-b fat"
+	rm -rf "$DESTDIR"/{etc,usr/lib,usr/share/man/man3}
+	# Backward compatible links
+	ln -s ../zoneinfo-posix "$DESTDIR/usr/share/zoneinfo/posix"
+	ln -s ../zoneinfo-leaps "$DESTDIR/usr/share/zoneinfo/right"
+	if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+		vlicense strftime.license
+	fi
+}
+
+tzdata_package() {
+	short_desc="Time zone and daylight-saving time data"
+	pkg_install() {
+		vmove usr/share/man/man5
+		vmove "usr/share/zoneinfo*"
+	}
 }

  parent reply	other threads:[~2022-07-27 15:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-27 12:51 [PR PATCH] " sgn
2022-07-27 15:26 ` [PR PATCH] [Updated] " sgn
2022-07-27 15:26 ` sgn
2022-07-27 15:29 ` sgn [this message]
2022-07-29  1:09 ` [PR PATCH] [Merged]: " sgn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220727152909.vqM758EXhojqJNTo8OtQCCA3ccj2KVWJhep4x46VI7M@z \
    --to=sgn@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).