tzdata-mdvconfig.patch 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. --- tzdata/Makeconfig.in.mdvconfig 2003-07-24 19:52:36.000000000 +0200
  2. +++ tzdata/Makeconfig.in 2007-03-07 14:01:06.000000000 +0100
  3. @@ -1,8 +1,9 @@
  4. -objpfx := @objpfx@
  5. -datadir := @datadir@
  6. -install_root := @install_root@
  7. +ifdef subdir
  8. +.. := ../
  9. +endif
  10. +include $(..)config.mk
  11. AWK := awk
  12. -built-program-cmd := /usr/sbin/zic
  13. +built-program-cmd := $(objpfx)/zic
  14. cross-compiling := no
  15. have-ksh := yes
  16. +force =
  17. @@ -11,3 +12,23 @@ posixrules = America/New_York
  18. posixrules-file = posixrules
  19. zonedir := $(datadir)/zoneinfo
  20. inst_zonedir := $(install_root)$(zonedir)
  21. +sysconfdir = $(prefix)/etc
  22. +inst_sysconfdir = $(install_root)$(sysconfdir)
  23. +localtime = Factory
  24. +localtime-file = $(sysconfdir)/localtime
  25. +inst_localtime-file = $(install_root)$(localtime-file)
  26. +inst_sbindir = $(install_root)$(sbindir)
  27. +
  28. +# These are the variables that the implicit compilation rules use.
  29. +# Note that we can't use -std=* in CPPFLAGS, because it overrides
  30. +# the implicit -lang-asm and breaks cpp behavior for .S files--notably
  31. +# it causes cpp to stop predefining __ASSEMBLER__.
  32. +CPPFLAGS = $(sysdep-CPPFLAGS) \
  33. + $(CPPFLAGS-$(suffix $@)) \
  34. + $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
  35. +override CFLAGS = $(sysdep-CFLAGS) -std=gnu99 \
  36. + $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
  37. + $(CFLAGS-$(@F))
  38. +
  39. +$(objpfx)%.o: %.c
  40. + $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
  41. --- tzdata/Rules.mdvconfig 2003-07-24 18:52:34.000000000 +0200
  42. +++ tzdata/Rules 2007-03-07 13:59:44.000000000 +0100
  43. @@ -1,9 +1,3 @@
  44. -$(objpfx)zic: /dev/null
  45. - touch $@
  46. -$(objpfx)scheck.o: /dev/null
  47. - touch $@
  48. -$(objpfx)ialloc.o: /dev/null
  49. - touch $@
  50. define make-target-directory
  51. $(addprefix mkdir -p ,\
  52. $(filter-out $(wildcard $(@D:%/=%)),$(@D:%/=%)))
  53. @@ -12,7 +6,28 @@ define do-install
  54. $(make-target-directory)
  55. /usr/bin/install -m 644 $< $@
  56. endef
  57. -install: $(inst_zonedir)/
  58. +define do-install-program
  59. +$(make-target-directory)
  60. +/usr/bin/install -m 755 $< $@.new
  61. +mv -f $@.new $@
  62. +endef
  63. +install: install-zoneinfo install-programs
  64. +
  65. +install-zoneinfo: $(inst_zonedir)/
  66. $(MAKE) install-data
  67. $(inst_zonedir)/: ; $(make-target-directory)
  68. install-data: $(install-others)
  69. +
  70. +ifdef install-sbin
  71. +$(addprefix $(inst_sbindir)/,$(install-sbin)): \
  72. + $(inst_sbindir)/%: $(objpfx)% $(+force)
  73. + $(do-install-program)
  74. +installed-programs += $(addprefix $(inst_sbindir)/,$(install-sbin))
  75. +endif
  76. +
  77. +install-programs: $(installed-programs)
  78. +
  79. +others: $(addprefix $(objpfx),$(extra-objs) \
  80. + $(install-lib) \
  81. + $(install-bin) \
  82. + $(install-rootsbin) $(install-sbin))
  83. --- tzdata/Makefile.mdvconfig 2005-11-02 13:17:57.000000000 +0100
  84. +++ tzdata/Makefile 2007-03-07 13:46:40.000000000 +0100
  85. @@ -1,6 +1,13 @@
  86. -all:
  87. - mkdir obj
  88. +all: prepare
  89. + $(MAKE) -C src others
  90. +
  91. +OBJ_DIR = obj
  92. +$(OBJ_DIR)::
  93. + @[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1
  94. +
  95. +prepare: $(OBJ_DIR)
  96. for i in tzdata*/*; do ln -sf ../$$i src/; done
  97. + for i in tzcode*/*.[ch]; do ln -sf ../$$i src/; done
  98. cp -L src/yearistype.sh src/yearistype; chmod +x src/yearistype
  99. include ./Makeconfig
  100. --- tzdata/scripts/rellns-sh.mdvconfig 2007-03-07 13:46:40.000000000 +0100
  101. +++ tzdata/scripts/rellns-sh 2007-03-07 13:46:40.000000000 +0100
  102. @@ -0,0 +1,74 @@
  103. +#! /bin/sh
  104. +# rellns-sh - Simplified ln program to generate relative symbolic link.
  105. +# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
  106. +# Written by Ulrich Drepper <drepper@cygnus.com>, October 1996
  107. +#
  108. +# This program is free software; you can redistribute it and/or modify
  109. +# it under the terms of the GNU General Public License as published by
  110. +# the Free Software Foundation; either version 2, or (at your option)
  111. +# any later version.
  112. +#
  113. +# This program is distributed in the hope that it will be useful,
  114. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  115. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  116. +# GNU General Public License for more details.
  117. +#
  118. +# You should have received a copy of the GNU General Public License
  119. +# along with this program; if not, write to the Free Software
  120. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  121. +
  122. +if test $# -ne 2; then
  123. + echo "Usage: rellns SOURCE DEST" >&2
  124. + exit 1
  125. +fi
  126. +
  127. +if test -x /bin/pwd; then
  128. + pwd=/bin/pwd
  129. +elif test -x /usr/bin/pwd; then
  130. + pwd=/usr/bin/pwd
  131. +else
  132. + pwd='pwd'
  133. +fi
  134. +
  135. +# Make both paths absolute.
  136. +if test -d $1; then
  137. + to=`cd $1 && $pwd`
  138. +else
  139. + temp=`echo $1 | sed 's%/*[^/]*$%%'`
  140. + if test -z "$temp"; then
  141. + to=`$pwd`
  142. + else
  143. + to=`cd $temp && $pwd`
  144. + fi
  145. + to="$to/`echo $1 | sed 's%.*/\([^/][^/]*\)$%\1%'`"
  146. +fi
  147. +to=`echo $to | sed 's%^/%%'`
  148. +
  149. +if test -d $2; then
  150. + from=`echo $2 | sed 's%/*$%%'`
  151. +else
  152. + from=`echo $2 | sed 's%/*[^/]*$%%'`
  153. +fi
  154. +
  155. +if test -z "$from"; then
  156. + from=`$pwd | sed 's%^/%%'`
  157. +else
  158. + from=`cd $from && $pwd | sed 's%^/%%'`
  159. +fi
  160. +
  161. +while test -n "$to" && test -n "$from"; do
  162. + preto=`echo $to | sed 's%^\([^/]*\)/.*%\1%'`
  163. + prefrom=`echo $from | sed 's%^\([^/]*\)/.*%\1%'`
  164. +
  165. + test "$preto" != "$prefrom" && break
  166. +
  167. + to=`echo $to | sed 's%^[^/]*/*\(.*\)$%\1%'`
  168. + from=`echo $from | sed 's%^[^/]*/*\(.*\)$%\1%'`
  169. +done
  170. +
  171. +while test -n "$from"; do
  172. + rfrom="../$rfrom"
  173. + from=`echo $from | sed 's%^[^/]*/*%%'`
  174. +done
  175. +
  176. +ln -s $rfrom$to $2