summaryrefslogtreecommitdiff
path: root/package/tzdata
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-05-31 15:41:54 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-05-31 19:59:04 +0200
commit9e3458d13ae01591479732c1fe0cada8fd2259b7 (patch)
tree07d79eccc5dc104231a2a8a8b6e8e132da2c7395 /package/tzdata
parent8f80156cc093a23d958c8667559e9dd967accfc1 (diff)
update to latest upstream
Diffstat (limited to 'package/tzdata')
-rw-r--r--package/tzdata/Makefile10
-rw-r--r--package/tzdata/patches/patch-Makefile103
-rw-r--r--package/tzdata/patches/patch-date_c11
-rw-r--r--package/tzdata/patches/patch-localtime_c44
4 files changed, 113 insertions, 55 deletions
diff --git a/package/tzdata/Makefile b/package/tzdata/Makefile
index 01d2858f3..aef020895 100644
--- a/package/tzdata/Makefile
+++ b/package/tzdata/Makefile
@@ -4,9 +4,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= tzdata
-PKG_VERSION:= 2013d
-PKG_RELEASE:= 3
-PKG_MD5SUM:= 65b6818162230fc02f86f293376c73df 4616a9560270f180eeb9a08540636890
+PKG_VERSION:= 2014d
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 299b86c0368ecfb321f15d5c408a1d9b 4a0f5f259ba8a2b826fffb1fa26d0134
PKG_DESCR:= timezone data (/usr/share/zoneinfo)
PKG_SECTION:= base/apps
PKG_URL:= http://www.iana.org/time-zones/
@@ -29,7 +29,7 @@ $(eval $(call PKG_template,DATE,date,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS
CONFIG_STYLE:= manual
CFLAGS_FOR_BUILD+= -DSTD_INSPIRED=1
TARGET_CFLAGS+= -DHAVE_INTTYPES_H=1
-XAKE_FLAGS+= TOPDIR="${WRKINST}" TZDIR="${WRKINST}/usr/share/zoneinfo" cc="${TARGET_CC}"
+XAKE_FLAGS+= TZDIR="/usr/share/zoneinfo" cc="${TARGET_CC}"
# the uppercase targets enable building and installation of the date utility
ALL_TARGET:= ALL
INSTALL_TARGET:= INSTALL
@@ -55,6 +55,6 @@ tzdata-install:
date-install:
${INSTALL_DIR} ${IDIR_DATE}/usr/bin
- ${INSTALL_BIN} ${WRKINST}/bin/date ${IDIR_DATE}/usr/bin/
+ ${INSTALL_BIN} ${WRKINST}/usr/bin/date ${IDIR_DATE}/usr/bin/
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/tzdata/patches/patch-Makefile b/package/tzdata/patches/patch-Makefile
index 556028d22..ed1bba324 100644
--- a/package/tzdata/patches/patch-Makefile
+++ b/package/tzdata/patches/patch-Makefile
@@ -1,6 +1,46 @@
---- w-tzdata-2013d-1.orig/Makefile 2013-07-05 16:38:01.000000000 +0200
-+++ w-tzdata-2013d-1/Makefile 2013-10-04 11:29:22.000000000 +0200
-@@ -231,7 +231,7 @@ GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-co
+--- w-tzdata-2014d-1.orig/Makefile 2014-05-28 06:35:46.000000000 +0200
++++ w-tzdata-2014d-1/Makefile 2014-05-30 09:15:54.792171067 +0200
+@@ -45,33 +45,33 @@ POSIXRULES= America/New_York
+
+ # Everything gets put in subdirectories of. . .
+
+-TOPDIR= /usr/local
++TZTOPDIR= /usr
+
+ # "Compiled" time zone information is placed in the "TZDIR" directory
+ # (and subdirectories).
+ # Use an absolute path name for TZDIR unless you're just testing the software.
+
+ TZDIR_BASENAME= zoneinfo
+-TZDIR= $(TOPDIR)/etc/$(TZDIR_BASENAME)
++TZDIR= $(TZTOPDIR)/etc/$(TZDIR_BASENAME)
+
+ # Types to try, as an alternative to time_t. int64_t should be first.
+ TIME_T_ALTERNATIVES= int64_t int32_t uint32_t uint64_t
+
+ # The "tzselect", "zic", and "zdump" commands get installed in. . .
+
+-ETCDIR= $(TOPDIR)/etc
++ETCDIR= $(TZTOPDIR)/etc
+
+ # If you "make INSTALL", the "date" command gets installed in. . .
+
+-BINDIR= $(TOPDIR)/bin
++BINDIR= $(TZTOPDIR)/bin
+
+ # Manual pages go in subdirectories of. . .
+
+-MANDIR= $(TOPDIR)/man
++MANDIR= $(TZTOPDIR)/man
+
+ # Library functions are put in an archive in LIBDIR.
+
+-LIBDIR= $(TOPDIR)/lib
++LIBDIR= $(TZTOPDIR)/lib
+
+ # If you always want time values interpreted as "seconds since the epoch
+ # (not counting leap seconds)", use
+@@ -224,7 +224,7 @@ GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-co
# before the first Monday in January when a "%V" format is used and January 1
# falls on a Friday, Saturday, or Sunday.
@@ -9,27 +49,27 @@
# Linker flags. Default to $(LFLAGS) for backwards compatibility
# to tzcode2012h and earlier.
-@@ -239,7 +239,7 @@ CFLAGS=
+@@ -232,7 +232,7 @@ CFLAGS=
LDFLAGS= $(LFLAGS)
zic= ./zic
-ZIC= $(zic) $(ZFLAGS)
+ZIC= ./zic_for_build $(ZFLAGS)
- # The name of a Posix-compliant `awk' on your system.
- AWK= awk
-@@ -330,7 +330,7 @@ ENCHILADA= $(COMMON) $(DOCS) $(SOURCES)
+ ZFLAGS=
- SHELL= /bin/sh
+@@ -338,7 +338,7 @@ SHELL= /bin/sh
--all: tzselect zic zdump $(LIBOBJS)
-+all: zic_for_build tzselect zic zdump $(LIBOBJS)
+ all: tzselect zic zdump libtz.a $(TABDATA)
- ALL: all date
+-ALL: all date
++ALL: zic_for_build date
-@@ -365,6 +365,14 @@ version.h:
- echo 'static char const TZVERSION[]="$(VERSION)";' && \
- echo 'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";') >$@
+ install: all $(DATA) $(REDO) $(MANS)
+ mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \
+@@ -371,6 +371,14 @@ zdump: $(TZDOBJS)
+ zic: $(TZCOBJS) yearistype
+ $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS)
+zic_for_build: version.h
+ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) zic.c -o zic_build.o
@@ -39,28 +79,29 @@
+ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) ialloc.c -o ialloc_build.o
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ zic_build.o localtime_build.o asctime_build.o scheck_build.o ialloc_build.o
+
- zdump: $(TZDOBJS)
- $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS)
-
-@@ -375,10 +383,10 @@ yearistype: yearistype.sh
+ yearistype: yearistype.sh
cp yearistype.sh yearistype
chmod +x yearistype
+@@ -378,11 +386,11 @@ yearistype: yearistype.sh
+ leapseconds: $(LEAP_DEPS)
+ $(AWK) -f leapseconds.awk leap-seconds.list >$@
-posix_only: zic $(TDATA)
+posix_only: zic_for_build $(TDATA)
- $(ZIC) -y $(YEARISTYPE) -d $(TZDIR) -L /dev/null $(TDATA)
+ $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) \
+ -L /dev/null $(TDATA)
-right_only: zic leapseconds $(TDATA)
+right_only: zic_for_build leapseconds $(TDATA)
- $(ZIC) -y $(YEARISTYPE) -d $(TZDIR) -L leapseconds $(TDATA)
-
- # In earlier versions of this makefile, the other two directories were
-@@ -390,7 +398,7 @@ right_only: zic leapseconds $(TDATA)
- # Therefore, the other two directories are now siblings of $(TZDIR).
- # You must replace all of $(TZDIR) to switch from not using leap seconds
- # to using them, or vice versa.
--other_two: zic leapseconds $(TDATA)
-+other_two: zic_for_build leapseconds $(TDATA)
- $(ZIC) -y $(YEARISTYPE) -d $(TZDIR)-posix -L /dev/null $(TDATA)
- $(ZIC) -y $(YEARISTYPE) \
- -d $(TZDIR)-leaps -L leapseconds $(TDATA)
+ $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) \
+ -L leapseconds $(TDATA)
+
+@@ -520,7 +528,7 @@ check_time_t_alternatives:
+ for type in $(TIME_T_ALTERNATIVES); do \
+ mkdir -p tzpublic/$$type && \
+ make clean_misc && \
+- make TOPDIR=`pwd`/tzpublic/$$type \
++ make TZTOPDIR=`pwd`/tzpublic/$$type \
+ CFLAGS='$(CFLAGS) -Dtime_tz='"'$$type'" \
+ install && \
+ diff -qr tzpublic/int64_t/etc/zoneinfo tzpublic/$$type/etc/zoneinfo && \
diff --git a/package/tzdata/patches/patch-date_c b/package/tzdata/patches/patch-date_c
deleted file mode 100644
index 1f93988b2..000000000
--- a/package/tzdata/patches/patch-date_c
+++ /dev/null
@@ -1,11 +0,0 @@
-strchr() is false defined here
---- w-tzdata-2013d-1.orig/date.c 2013-05-28 06:26:18.000000000 +0200
-+++ w-tzdata-2013d-1/date.c 2013-08-14 12:54:54.000000000 +0200
-@@ -60,7 +60,6 @@ extern char * getlogin();
- extern time_t mktime();
- extern char * optarg;
- extern int optind;
--extern char * strchr();
- extern time_t time();
- extern char * tzname[2];
-
diff --git a/package/tzdata/patches/patch-localtime_c b/package/tzdata/patches/patch-localtime_c
index 62ddda50c..548d10073 100644
--- a/package/tzdata/patches/patch-localtime_c
+++ b/package/tzdata/patches/patch-localtime_c
@@ -1,10 +1,38 @@
---- w-tzdata-2013d-1.orig/localtime.c 2013-05-28 06:26:18.000000000 +0200
-+++ w-tzdata-2013d-1/localtime.c 2013-10-04 11:35:35.000000000 +0200
-@@ -10,6 +10,7 @@
+--- w-tzdata-2014d-1.orig/localtime.c 2014-01-18 07:42:22.000000000 +0100
++++ w-tzdata-2014d-1/localtime.c 2014-05-30 09:09:35.130879741 +0200
+@@ -1329,7 +1329,7 @@ localsub(const time_t *const timep, cons
+ }
- /*LINTLIBRARY*/
+ struct tm *
+-localtime(const time_t *const timep)
++localtime_tz(const time_t *const timep)
+ {
+ tzset();
+ return localsub(timep, 0L, &tm);
+@@ -1550,7 +1550,7 @@ ctime(const time_t *const timep)
+ ** to local time in the form of a string. It is equivalent to
+ ** asctime(localtime(timer))
+ */
+- return asctime(localtime(timep));
++ return asctime(localtime_tz(timep));
+ }
-+#include <stdint.h>
- #include "private.h"
- #include "tzfile.h"
- #include "fcntl.h"
+ char *
+@@ -1929,7 +1929,7 @@ time1(struct tm *const tmp,
+ }
+
+ time_t
+-mktime(struct tm *const tmp)
++mktime_tz(struct tm *const tmp)
+ {
+ tzset();
+ return time1(tmp, localsub, 0L);
+@@ -1973,7 +1973,7 @@ timeoff(struct tm *const tmp, const long
+ long
+ gtime(struct tm *const tmp)
+ {
+- const time_t t = mktime(tmp);
++ const time_t t = mktime_tz(tmp);
+
+ if (t == WRONG)
+ return -1;