| 1 | # http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-libs/timezone-data/files/timezone-data-2012a-makefile.patch |
| 2 | # Patch reapplied and fixed for tzcode 2012i |
| 3 | |
| 4 | diff -Nru tzcode.orig/Makefile tzcode/Makefile |
| 5 | --- tzcode.orig/Makefile 2012-11-04 10:31:01.772733264 +0100 |
| 6 | +++ tzcode/Makefile 2012-11-04 10:31:16.358872807 +0100 |
| 7 | @@ -39,17 +39,17 @@ |
| 8 | |
| 9 | # Everything gets put in subdirectories of. . . |
| 10 | |
| 11 | -TOPDIR= /usr/local |
| 12 | +TOPDIR= $(DESTDIR)/usr |
| 13 | |
| 14 | # "Compiled" time zone information is placed in the "TZDIR" directory |
| 15 | # (and subdirectories). |
| 16 | # Use an absolute path name for TZDIR unless you're just testing the software. |
| 17 | |
| 18 | -TZDIR= $(TOPDIR)/etc/zoneinfo |
| 19 | +TZDIR= $(TOPDIR)/share/zoneinfo |
| 20 | |
| 21 | # The "tzselect", "zic", and "zdump" commands get installed in. . . |
| 22 | |
| 23 | -ETCDIR= $(TOPDIR)/etc |
| 24 | +SBINDIR= $(TOPDIR)/sbin |
| 25 | |
| 26 | # If you "make INSTALL", the "date" command gets installed in. . . |
| 27 | |
| 28 | @@ -274,8 +274,10 @@ |
| 29 | |
| 30 | ############################################################################### |
| 31 | |
| 32 | -cc= cc |
| 33 | -CC= $(cc) -DTZDIR=\"$(TZDIR)\" |
| 34 | +CC+= -DTZDIR=\"$(TZDIR)\" |
| 35 | +ifeq ($(NLS),1) |
| 36 | +CC += -DHAVE_GETTEXT=1 -DTZ_DOMAIN=\"libc\" |
| 37 | +endif |
| 38 | |
| 39 | TZCSRCS= zic.c localtime.c asctime.c scheck.c ialloc.c |
| 40 | TZCOBJS= zic.o localtime.o asctime.o scheck.o ialloc.o |
| 41 | @@ -316,13 +318,15 @@ |
| 42 | |
| 43 | ALL: all date |
| 44 | |
| 45 | -install: all $(DATA) $(REDO) $(TZLIB) $(MANS) $(TABDATA) |
| 46 | +install: all $(DATA) $(REDO) $(MANS) $(TABDATA) |
| 47 | $(ZIC) -y $(YEARISTYPE) \ |
| 48 | -d $(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES) |
| 49 | -rm -f $(TZDIR)/iso3166.tab $(TZDIR)/zone.tab |
| 50 | cp iso3166.tab zone.tab $(TZDIR)/. |
| 51 | - -mkdir $(TOPDIR) $(ETCDIR) |
| 52 | - cp tzselect zic zdump $(ETCDIR)/. |
| 53 | + -mkdir $(TOPDIR) $(SBINDIR) |
| 54 | + cp zic zdump $(SBINDIR)/. |
| 55 | + -mkdir $(TOPDIR) $(BINDIR) |
| 56 | + cp tzselect $(BINDIR)/. |
| 57 | -mkdir $(TOPDIR) $(MANDIR) \ |
| 58 | $(MANDIR)/man3 $(MANDIR)/man5 $(MANDIR)/man8 |
| 59 | -rm -f $(MANDIR)/man3/newctime.3 \ |
| 60 | @@ -332,8 +336,6 @@ |
| 61 | $(MANDIR)/man8/zdump.8 \ |
| 62 | $(MANDIR)/man8/zic.8 |
| 63 | cp newctime.3 newtzset.3 $(MANDIR)/man3/. |
| 64 | - cp tzfile.5 $(MANDIR)/man5/. |
| 65 | - cp tzselect.8 zdump.8 zic.8 $(MANDIR)/man8/. |
| 66 | |
| 67 | INSTALL: ALL install date.1 |
| 68 | -mkdir $(TOPDIR) $(BINDIR) |
| 69 | @@ -372,9 +374,9 @@ |
| 70 | # You must replace all of $(TZDIR) to switch from not using leap seconds |
| 71 | # to using them, or vice versa. |
| 72 | other_two: zic leapseconds $(TDATA) |
| 73 | - $(ZIC) -y $(YEARISTYPE) -d $(TZDIR)-posix -L /dev/null $(TDATA) |
| 74 | + $(ZIC) -y $(YEARISTYPE) -d $(TZDIR)/posix -L /dev/null $(TDATA) |
| 75 | $(ZIC) -y $(YEARISTYPE) \ |
| 76 | - -d $(TZDIR)-leaps -L leapseconds $(TDATA) |
| 77 | + -d $(TZDIR)/right -L leapseconds $(TDATA) |
| 78 | |
| 79 | posix_right: posix_only other_two |
| 80 | |
| 81 | @@ -400,7 +402,7 @@ |
| 82 | <$? >$@ |
| 83 | chmod +x $@ |
| 84 | |
| 85 | -check: check_tables check_web |
| 86 | +check: check_tables |
| 87 | |
| 88 | check_tables: checktab.awk $(PRIMARY_YDATA) |
| 89 | $(AWK) -f checktab.awk $(PRIMARY_YDATA) |