summaryrefslogtreecommitdiff
path: root/harmony/tzdata
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-02-27 14:34:02 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-02-27 14:34:02 -0600
commit7553795ec2d735c01dbdde129a65b7f45d5aa999 (patch)
treeb3970009a8246b0c17a105fe6b10c8077fc2b763 /harmony/tzdata
parente2b01859c88d221992403d1293d42da33002be4d (diff)
downloadpackages-7553795ec2d735c01dbdde129a65b7f45d5aa999.tar.gz
packages-7553795ec2d735c01dbdde129a65b7f45d5aa999.tar.bz2
packages-7553795ec2d735c01dbdde129a65b7f45d5aa999.tar.xz
packages-7553795ec2d735c01dbdde129a65b7f45d5aa999.zip
Add harmony/ repo for packages still being discussed
See https://wiki.adelielinux.org/wiki/Project:Harmony
Diffstat (limited to 'harmony/tzdata')
-rw-r--r--harmony/tzdata/0001-posixtz-fix-up-lseek.patch27
-rw-r--r--harmony/tzdata/APKBUILD66
2 files changed, 93 insertions, 0 deletions
diff --git a/harmony/tzdata/0001-posixtz-fix-up-lseek.patch b/harmony/tzdata/0001-posixtz-fix-up-lseek.patch
new file mode 100644
index 000000000..4bf164fec
--- /dev/null
+++ b/harmony/tzdata/0001-posixtz-fix-up-lseek.patch
@@ -0,0 +1,27 @@
+From 5c4cd3cee03428636e8d7cc4ed644389a4d598b3 Mon Sep 17 00:00:00 2001
+From: William Pitcock <nenolod@dereferenced.org>
+Date: Thu, 28 Apr 2011 02:56:42 -0500
+Subject: [PATCH] posixtz: ensure the file offset we pass to lseek is off_t
+
+on 32-bit systems, sizeof(off_t) is 4, on 64-bit sizeof(off_t) is 8
+causing a word masking issue.
+---
+ posixtz.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/posixtz.c b/posixtz.c
+index cddcb3e..972ca31 100644
+--- a/posixtz-0.5/posixtz.c
++++ b/posixtz-0.5/posixtz.c
+@@ -36,7 +36,7 @@ char *posix_tz(const char *filename)
+ if (r != TZ_BUFLEN
+ || strncmp(buf, "TZif", 4) != 0
+ || (unsigned char)buf[4] < 2
+- || lseek(fd, -TZ_BUFLEN, SEEK_END) < 0
++ || lseek(fd, (off_t) -TZ_BUFLEN, SEEK_END) < 0
+ )
+ goto ERROR;
+
+--
+1.7.4.5
+
diff --git a/harmony/tzdata/APKBUILD b/harmony/tzdata/APKBUILD
new file mode 100644
index 000000000..e4ff75efd
--- /dev/null
+++ b/harmony/tzdata/APKBUILD
@@ -0,0 +1,66 @@
+# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=tzdata
+pkgver=2017c
+_tzcodever=2017c
+_ptzver=0.5
+pkgrel=1
+pkgdesc="Timezone data"
+url="https://www.iana.org/time-zones"
+arch="all"
+license="Public Domain"
+depends=""
+depends_dev=""
+makedepends=""
+checkdepends="sp"
+install=""
+subpackages="$pkgname-doc"
+source="http://www.iana.org/time-zones/repository/releases/tzcode$_tzcodever.tar.gz
+ http://www.iana.org/time-zones/repository/releases/tzdata$pkgver.tar.gz
+ http://dev.alpinelinux.org/archive/posixtz/posixtz-$_ptzver.tar.xz
+ 0001-posixtz-fix-up-lseek.patch"
+
+builddir="$srcdir"
+_timezones="africa antarctica asia australasia europe northamerica \
+ southamerica pacificnew etcetera backward systemv factory"
+
+build() {
+ cd "$builddir"
+ make cc="${CC:-gcc}" CFLAGS="$CFLAGS -DHAVE_STDINT_H=1"
+ TZDIR="/usr/share/zoneinfo"
+
+ cd "$builddir"/posixtz-$_ptzver
+ make posixtz
+}
+
+check() {
+ cd "$builddir"
+ make -j1 check
+}
+
+package() {
+ cd "$builddir"
+
+ ./zic -y ./yearistype -d "$pkgdir"/usr/share/zoneinfo ${_timezones}
+ ./zic -y ./yearistype -d "$pkgdir"/usr/share/zoneinfo/right -L leapseconds ${_timezones}
+ #./zic -y ./yearistype -d "$pkgdir"/usr/share/zoneinfo/posix ${_timezones}
+
+ ./zic -y ./yearistype -d "$pkgdir"/usr/share/zoneinfo -p America/New_York
+ install -m444 -t "$pkgdir"/usr/share/zoneinfo iso3166.tab zone1970.tab zone.tab
+
+ mkdir -p "$pkgdir"/usr/sbin
+ install -m755 zic zdump "$pkgdir"/usr/sbin
+
+ mkdir -p "$pkgdir"/usr/share/man/man8
+ install -m644 zic.8 zdump.8 "$pkgdir"/usr/share/man/man8
+
+ rm -f "$pkgdir"/usr/share/zoneinfo/localtime
+ install -Dm755 "$srcdir"/posixtz-$_ptzver/posixtz \
+ "$pkgdir"/usr/bin/posixtz
+}
+
+sha512sums="0d8c3e07b0de9015a137602450468ceb6358312a50eeda2a860882367107b8ba9ef275880b292570a671b9910afc54e6209e1e642387d246bc9c08c4ff660ffb tzcode2017c.tar.gz
+feb5c544e617b30c73a397e5a1c51f9847d0fddf1dfa0f9ace2e6f686786f09b666937b2048e07075c84593fc584bd5a25d639fce70eca9735267df28621ab4c tzdata2017c.tar.gz
+68dbaab9f4aef166ac2f2d40b49366527b840bebe17a47599fe38345835e4adb8a767910745ece9c384b57af815a871243c3e261a29f41d71f8054df3061b3fd posixtz-0.5.tar.xz
+f54ce213d74c5a8387e1a7c56299bc6eee65a035772288222128abc249a112067b8791b88b45c342b2d4d8d12e9e4f1f2f5c92c5de67f8b6413b1ebf1d7de467 0001-posixtz-fix-up-lseek.patch"