/sys-libs/timezone-data/files/timezone-data-2008h-makefile.patch

https://github.com/1000timesdead/portage · Patch · 138 lines · 111 code · 27 blank · 0 comment · 0 complexity · bf648701672ba4325950eb4ce4a18174 MD5 · raw file

  1. - Fix up default paths
  2. - Support env DESTDIR / LDFLAGS / CFLAGS / CC
  3. - Use awk instead of nawk
  4. - Don't build/install libtz.a
  5. - Don't install man-pages provided by sys-apps/man-pages
  6. - Move zic zdump to sbin and tzselect to bin ala glibc
  7. - Install posix zoneinfo into zoneinfo/posix/ instead of zoneinfo-posix/ ala glibc
  8. - Install leaps zoneinfo into zoneinfo/right/ ala glibc
  9. - Disable broken web test
  10. - Make sure tzselect uses #!/bin/bash and not #!/bin/ksh
  11. - Flags to the linking are passed as LDFLAGS, not LFLAGS
  12. - LDFLAGS was missed for the 'date' target
  13. --- Makefile
  14. +++ Makefile
  15. @@ -35,5 +35,5 @@
  16. # Everything gets put in subdirectories of. . .
  17. -TOPDIR= /usr/local
  18. +TOPDIR= $(DESTDIR)/usr
  19. # "Compiled" time zone information is placed in the "TZDIR" directory
  20. @@ -41,9 +41,9 @@
  21. # Use an absolute path name for TZDIR unless you're just testing the software.
  22. -TZDIR= $(TOPDIR)/etc/zoneinfo
  23. +TZDIR= $(TOPDIR)/share/zoneinfo
  24. # The "tzselect", "zic", and "zdump" commands get installed in. . .
  25. -ETCDIR= $(TOPDIR)/etc
  26. +SBINDIR= $(TOPDIR)/sbin
  27. # If you "make INSTALL", the "date" command gets installed in. . .
  28. @@ -53,5 +53,5 @@
  29. # Manual pages go in subdirectories of. . .
  30. -MANDIR= $(TOPDIR)/man
  31. +MANDIR= $(TOPDIR)/share/man
  32. # Library functions are put in an archive in LIBDIR.
  33. @@ -211,5 +211,5 @@
  34. # falls on a Friday, Saturday, or Sunday.
  35. -CFLAGS=
  36. +CFLAGS += -std=gnu99
  37. # If you want zic's -s option used when installing, uncomment the next line
  38. @@ -220,5 +220,5 @@
  39. # The name of a Posix-compliant `awk' on your system.
  40. -AWK= nawk
  41. +AWK= awk
  42. # The path where SGML DTDs are kept.
  43. @@ -241,8 +241,10 @@
  44. ###############################################################################
  45. -cc= cc
  46. -CC= $(cc) -DTZDIR=\"$(TZDIR)\"
  47. +CC+= -DTZDIR=\"$(TZDIR)\"
  48. +ifeq ($(NLS),1)
  49. +CC += -DHAVE_GETTEXT=1 -DTZ_DOMAIN=\"libc\"
  50. +endif
  51. TZCSRCS= zic.c localtime.c asctime.c scheck.c ialloc.c
  52. TZCOBJS= zic.o localtime.o asctime.o scheck.o ialloc.o
  53. @@ -281,11 +281,13 @@
  54. ALL: all date
  55. -install: all $(DATA) $(REDO) $(TZLIB) $(MANS) $(TABDATA)
  56. +install: all $(DATA) $(REDO) $(MANS) $(TABDATA)
  57. $(ZIC) -y $(YEARISTYPE) \
  58. -d $(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
  59. -rm -f $(TZDIR)/iso3166.tab $(TZDIR)/zone.tab
  60. cp iso3166.tab zone.tab $(TZDIR)/.
  61. - -mkdir $(TOPDIR) $(ETCDIR)
  62. - cp tzselect zic zdump $(ETCDIR)/.
  63. + -mkdir $(TOPDIR) $(SBINDIR)
  64. + cp zic zdump $(SBINDIR)/.
  65. + -mkdir $(TOPDIR) $(BINDIR)
  66. + cp tzselect $(BINDIR)/.
  67. -mkdir $(TOPDIR) $(MANDIR) \
  68. $(MANDIR)/man3 $(MANDIR)/man5 $(MANDIR)/man8
  69. @@ -297,6 +299,4 @@
  70. $(MANDIR)/man8/zic.8
  71. cp newctime.3 newtzset.3 $(MANDIR)/man3/.
  72. - cp tzfile.5 $(MANDIR)/man5/.
  73. - cp tzselect.8 zdump.8 zic.8 $(MANDIR)/man8/.
  74. INSTALL: ALL install date.1
  75. @@ -309,10 +309,10 @@
  76. cp date.1 $(MANDIR)/man1/.
  77. zdump: $(TZDOBJS)
  78. - $(CC) $(CFLAGS) $(LFLAGS) $(TZDOBJS) $(LDLIBS) -o $@
  79. + $(CC) $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS) -o $@
  80. zic: $(TZCOBJS) yearistype
  81. - $(CC) $(CFLAGS) $(LFLAGS) $(TZCOBJS) $(LDLIBS) -o $@
  82. + $(CC) $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS) -o $@
  83. yearistype: yearistype.sh
  84. cp yearistype.sh yearistype
  85. @@ -333,7 +333,7 @@
  86. # to using them, or vice versa.
  87. other_two: zic leapseconds $(TDATA)
  88. - $(ZIC) -y $(YEARISTYPE) -d $(TZDIR)-posix -L /dev/null $(TDATA)
  89. + $(ZIC) -y $(YEARISTYPE) -d $(TZDIR)/posix -L /dev/null $(TDATA)
  90. $(ZIC) -y $(YEARISTYPE) \
  91. - -d $(TZDIR)-leaps -L leapseconds $(TDATA)
  92. + -d $(TZDIR)/right -L leapseconds $(TDATA)
  93. posix_right: posix_only other_two
  94. @@ -351,7 +351,7 @@
  95. then ranlib $@ ; fi
  96. date: $(DATEOBJS)
  97. - $(CC) $(CFLAGS) date.o localtime.o asctime.o strftime.o \
  98. + $(CC) $(CFLAGS) $(LDFLAGS) date.o localtime.o asctime.o strftime.o \
  99. $(LDLIBS) -lc -o $@
  100. tzselect: tzselect.ksh
  101. @@ -366,5 +366,5 @@
  102. chmod +x $@
  103. -check: check_tables check_web
  104. +check: check_tables
  105. check_tables: checktab.awk $(PRIMARY_YDATA)
  106. --- tzselect.ksh
  107. +++ tzselect.ksh
  108. @@ -1,3 +1,3 @@
  109. -#! /bin/ksh
  110. +#! /bin/bash
  111. # '@(#)tzselect.ksh 1.8'