1 # http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-libs/timezone-data/files/2013f-makefile.patch
2 # added some fixes for the file-layout (jue)
5 # - Don't build/install libtz.a
6 # - Don't install man-pages provided by man-pages
7 # - Move zic, zdump to sbin and tzselect to bin ala glibc
8 # - Install posix zoneinfo into zoneinfo/posix/ instead of zoneinfo-posix/ ala glibc
9 # - Install leaps zoneinfo into zoneinfo/right/ ala glibc
12 diff -Nru tzcode.orig/Makefile tzcode/Makefile
13 --- tzcode.orig/Makefile 2013-12-21 14:05:52.169527862 +0100
14 +++ tzcode/Makefile 2013-12-21 14:06:05.299054045 +0100
17 # Everything gets put in subdirectories of. . .
22 # "Compiled" time zone information is placed in the "TZDIR" directory
23 # (and subdirectories).
24 # Use an absolute path name for TZDIR unless you're just testing the software.
26 TZDIR_BASENAME= zoneinfo
27 -TZDIR= $(TOPDIR)/etc/$(TZDIR_BASENAME)
28 +TZDIR= $(TOPDIR)/share/$(TZDIR_BASENAME)
30 # Types to try, as an alternative to time_t. int64_t should be first.
31 TIME_T_ALTERNATIVES= int64_t int32_t uint32_t uint64_t
33 # The "tzselect", "zic", and "zdump" commands get installed in. . .
35 -ETCDIR= $(TOPDIR)/etc
36 +SBINDIR= $(TOPDIR)/sbin
38 # If you "make INSTALL", the "date" command gets installed in. . .
42 ###############################################################################
45 -CC= $(cc) -DTZDIR=\"$(TZDIR)\"
46 +CC+= -DTZDIR=\"$(TZDIR)\"
48 +CC+= -DHAVE_GETTEXT=1 -DTZ_DOMAIN=\"libc\"
56 install: all $(DATA) $(REDO) $(MANS)
57 - mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \
58 - $(DESTDIR)$(LIBDIR) \
59 + mkdir -p $(DESTDIR)$(SBINDIR) $(DESTDIR)$(TZDIR) \
60 + $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR) \
61 $(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \
62 $(DESTDIR)$(MANDIR)/man8
63 $(ZIC) -y $(YEARISTYPE) \
64 -d $(DESTDIR)$(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
65 cp -f iso3166.tab zone.tab $(DESTDIR)$(TZDIR)/.
66 - cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/.
67 + cp zic zdump $(DESTDIR)$(SBINDIR)/.
68 + cp tzselect $(DESTDIR)$(BINDIR)/.
69 cp libtz.a $(DESTDIR)$(LIBDIR)/.
70 $(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a
71 cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/.
72 - cp -f tzfile.5 $(DESTDIR)$(MANDIR)/man5/.
73 - cp -f tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/.
75 INSTALL: ALL install date.1
76 mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
78 # You must replace all of $(TZDIR) to switch from not using leap seconds
79 # to using them, or vice versa.
80 right_posix: right_only leapseconds
81 - rm -fr $(DESTDIR)$(TZDIR)-leaps
82 - ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-leaps || \
83 - $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-leaps \
84 + rm -fr $(DESTDIR)$(TZDIR)/right
85 + $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)/right \
86 -L leapseconds $(TDATA)
87 - $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-posix \
88 + $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)/posix \
91 posix_right: posix_only leapseconds
92 rm -fr $(DESTDIR)$(TZDIR)-posix
93 - ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-posix || \
94 - $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-posix \
95 + $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)/posix \
97 - $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-leaps \
98 + $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)/right \
99 -L leapseconds $(TDATA)
106 -check: check_character_set check_tables check_web
107 +check: check_character_set check_tables
109 check_character_set: $(ENCHILADA)
110 sharp='#'; ! grep -n $(INVALID_CHAR) $(ENCHILADA)