diff options
author | Thomas Munro <tmunro@FreeBSD.org> | 2019-08-19 03:09:03 +0000 |
---|---|---|
committer | Thomas Munro <tmunro@FreeBSD.org> | 2019-08-19 03:09:03 +0000 |
commit | 5df160dbe4992751c03d81359418ae2774e98bc2 (patch) | |
tree | 563ac0b25c2e63b4d0e69f345ad8b27e4dc78ec5 /misc | |
parent | 2c83d4be638c0f9b98c92c4542aeb85146730de6 (diff) | |
download | ports-5df160dbe4992751c03d81359418ae2774e98bc2.tar.gz ports-5df160dbe4992751c03d81359418ae2774e98bc2.zip |
Notes
Diffstat (limited to 'misc')
-rw-r--r-- | misc/zoneinfo/Makefile | 100 | ||||
-rw-r--r-- | misc/zoneinfo/files/patch-etcetera | 14 | ||||
-rw-r--r-- | misc/zoneinfo/files/patch-zone1970.tab | 12 | ||||
-rw-r--r-- | misc/zoneinfo/files/patchremove-ax | 11 | ||||
-rw-r--r-- | misc/zoneinfo/files/patchremove-bl | 11 | ||||
-rw-r--r-- | misc/zoneinfo/files/patchremove-bq | 11 | ||||
-rw-r--r-- | misc/zoneinfo/files/patchremove-cw | 11 | ||||
-rw-r--r-- | misc/zoneinfo/files/patchremove-gg | 11 | ||||
-rw-r--r-- | misc/zoneinfo/files/patchremove-im | 11 | ||||
-rw-r--r-- | misc/zoneinfo/files/patchremove-je | 11 | ||||
-rw-r--r-- | misc/zoneinfo/files/patchremove-me | 8 | ||||
-rw-r--r-- | misc/zoneinfo/files/patchremove-mf | 7 | ||||
-rw-r--r-- | misc/zoneinfo/files/patchremove-rs | 11 | ||||
-rw-r--r-- | misc/zoneinfo/files/patchremove-ss | 11 | ||||
-rw-r--r-- | misc/zoneinfo/files/patchremove-sx | 11 | ||||
-rw-r--r-- | misc/zoneinfo/pkg-plist | 5 |
16 files changed, 93 insertions, 163 deletions
diff --git a/misc/zoneinfo/Makefile b/misc/zoneinfo/Makefile index 6d0ad72a007a..a3fd63751db8 100644 --- a/misc/zoneinfo/Makefile +++ b/misc/zoneinfo/Makefile @@ -3,6 +3,7 @@ PORTNAME= zoneinfo DISTVERSION= 2019b +PORTREVISION= 1 CATEGORIES= misc MASTER_SITES= https://data.iana.org/time-zones/releases/ \ ftp://ftp.iana.org/tz/releases/ @@ -18,61 +19,88 @@ PREFIX= /usr NO_ARCH= yes OPTIONS_DEFINE= BACKWARD -OPTIONS_DEFAULT= BACKWARD +OPTIONS_DEFAULT= OPTIONS_SUB= yes -BACKWARD_DESC= Include backwards compatible zones +BACKWARD_DESC= Include backwards compatible zones +BACKWARD_VARS= tzfiles+=backward TZFILES= africa antarctica asia australasia etcetera europe \ factory northamerica southamerica systemv POSIXRULES= America/New_York -.include <bsd.port.options.mk> - -.if ${PORT_OPTIONS:MBACKWARD} -TZFILES+= backward -.endif - -# Run with "DEVELOPER=1 make check-plist" before commiting! +# Run both of: +# "make DEVELOPER=1 WITHOUT=BACKWARD do-clean test-pkgplist" +# and +# "make DEVELOPER=1 WITH=BACKWARD do-clean test-pkgplist" +# before commiting! # Make sure it breaks when the distfile isn't there anymore. .if !defined(PACKAGE_BUILDING) MASTER_SITES+= http://people.freebsd.org/~edwin/ .endif -.include <bsd.port.pre.mk> - -# The following country codes can be missing from /usr/share/misc/iso3166 and -# shouldn't appear in the zoneinfo file. -MISSING= ax bl bq cw gg im je me mf rs ss sx - -.ifndef NOMISSING -.for M in ${MISSING} -HAS_${M:tu}!= ${GREP} -c ^${M:tu} /usr/share/misc/iso3166 || ${TRUE} -.if ${HAS_${M:tu}} == "0" -EXTRA_PATCHES+= ${FILESDIR}/patchremove-${M} -.endif -.endfor -.endif +# tzsetup objects (fatally) if any entry in zone.tab or zone1970.tab +# refers to a country code that doesn't exist in misc/iso3166. While +# arguably that should be fixed, for compatibility we remove such +# entries here to avoid the problem. +# +# This used to be done by adding patch files for each country to +# remove, but that doesn't work for zone1970.tab. +# +# We generate a list of all 2-letter codes that are NOT in iso3166; +# then, for any entry in zone.tab or zone1970.tab that contains a bad +# code: first emit a commented-out version of the line, then a version +# with the bad codes stripped out of the first field (unless this +# leaves the first field empty). + +post-patch: + cd ${WRKSRC}; \ + badc=$$(${AWK} '/^[^\#]/ { t[$$1]=1; }; \ + END { for (i=0; i<676; ++i) { \ + c = sprintf("%c%c", 65+int(i/26), 65+(i%26)); \ + if (!(c in t)) print c; \ + } \ + }' \ + /usr/share/misc/iso3166 | \ + ${SED} -n -e '1h; 1!H; $${g;s/\n/|/g;p;}'); \ + for fn in zone.tab zone1970.tab; do \ + ${MV} $${fn} $${fn}.bak; \ + ${AWK} -v FS="\t" -v OFS="\t" -v re="(^|,)($${badc})" \ + '/^[^#]/ && $$1 ~ re { \ + print "#" $$0; \ + gsub(re,"",$$1); \ + sub(/^,/,"",$$1); \ + }; \ + $$1 != "" { print; }' <$${fn}.bak >$${fn}; \ + done do-build: umask 022; \ cd ${WRKSRC}; \ zic -d ${WRKSRC}/zoneinfo -p ${POSIXRULES} -m ${NOBINMODE} \ - ${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES} + -y ${.OBJDIR}/yearistype ${TZFILES} do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/share/zoneinfo - ${CP} -R -p ${WRKSRC}/zoneinfo/ ${STAGEDIR}${PREFIX}/share/zoneinfo + (cd ${WRKSRC}/zoneinfo && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/share/zoneinfo) ${INSTALL_DATA} ${WRKSRC}/zone.tab ${STAGEDIR}${PREFIX}/share/zoneinfo - -test-patches: -.for M in ${MISSING} - make clean - NOMISSING=1 EXTRA_PATCHES=${FILESDIR}/patchremove-${M} make patch -.endfor - -test-pkgplist: - for f in $$(find work/stage/usr/share/zoneinfo/ | sed -e 's,work/stage/usr/share/zoneinfo/,,' ); do if [ $$(grep -c $$f pkg-plist) -eq 0 ]; then echo $$f; fi ; done - -.include <bsd.port.post.mk> + ${INSTALL_DATA} ${WRKSRC}/zone1970.tab ${STAGEDIR}${PREFIX}/share/zoneinfo + +# check-plist is too lenient for us; it doesn't care if there are +# files in the stage dir that are commented out in plist due to port +# options. But we need to check for an exact match, otherwise the +# final package may be incorrect if entries move into or out of the +# "backward" file. +# +# So this rule makes the additional check that there must be no file in +# STAGEDIR not accounted for by .plist-files-no-comments. + +test-pkgplist: check-plist + @(cd ${STAGEDIR} && ${FIND} . -type f -print) | \ + ${SED} -e 's:^[.]::' | sort | \ + ${COMM} -23 -- - ${WRKDIR}/.plist-files-no-comments | \ + while read -r f; do echo "MISSING FROM PLIST: $$f" >&2; echo fail; done | \ + ! ${GREP} fail >/dev/null + +.include <bsd.port.mk> diff --git a/misc/zoneinfo/files/patch-etcetera b/misc/zoneinfo/files/patch-etcetera new file mode 100644 index 000000000000..fbfc70c8dce8 --- /dev/null +++ b/misc/zoneinfo/files/patch-etcetera @@ -0,0 +1,14 @@ +--- etcetera.orig 2019-07-23 03:26:15 UTC ++++ etcetera +@@ -22,8 +22,10 @@ Zone Etc/UTC 0 - UTC + + # The following link uses older naming conventions, + # but it belongs here, not in the file 'backward', +-# as functions like gmtime load the "GMT" file to handle leap seconds properly. ++# as functions like gmtime load the "UTC" file to handle leap seconds properly. + # We want this to work even on installations that omit the other older names. ++Link Etc/UTC UTC ++# Do the same for GMT for compatibility reasons. + Link Etc/GMT GMT + + Link Etc/UTC Etc/Universal diff --git a/misc/zoneinfo/files/patch-zone1970.tab b/misc/zoneinfo/files/patch-zone1970.tab new file mode 100644 index 000000000000..5d285cc7b189 --- /dev/null +++ b/misc/zoneinfo/files/patch-zone1970.tab @@ -0,0 +1,12 @@ +--- zone1970.tab.orig 2019-06-22 19:39:01 UTC ++++ zone1970.tab +@@ -9,7 +9,8 @@ + # UTF-8 encoding. The columns of the table are as follows: + # + # 1. The countries that overlap the timezone, as a comma-separated list +-# of ISO 3166 2-character country codes. See the file 'iso3166.tab'. ++# of ISO 3166 2-character country codes. ++# See the file '/usr/share/misc/iso3166'. + # 2. Latitude and longitude of the timezone's principal location + # in ISO 6709 sign-degrees-minutes-seconds format, + # either ±DDMM±DDDMM or ±DDMMSS±DDDMMSS, diff --git a/misc/zoneinfo/files/patchremove-ax b/misc/zoneinfo/files/patchremove-ax deleted file mode 100644 index 105145644c25..000000000000 --- a/misc/zoneinfo/files/patchremove-ax +++ /dev/null @@ -1,11 +0,0 @@ ---- zone.tab.orig Tue Aug 21 00:45:10 2007 -+++ zone.tab Fri Oct 12 07:10:31 2007 -@@ -66,7 +66,7 @@ - AU -3157+11551 Australia/Perth Western Australia - most locations - AU -3143+12852 Australia/Eucla Western Australia - Eucla area - AW +1230-06958 America/Aruba --AX +6006+01957 Europe/Mariehamn -+#AX +6006+01957 Europe/Mariehamn - AZ +4023+04951 Asia/Baku - BA +4352+01825 Europe/Sarajevo - BB +1306-05937 America/Barbados diff --git a/misc/zoneinfo/files/patchremove-bl b/misc/zoneinfo/files/patchremove-bl deleted file mode 100644 index 558fb6c7c4ce..000000000000 --- a/misc/zoneinfo/files/patchremove-bl +++ /dev/null @@ -1,11 +0,0 @@ ---- zone.tab.orig Tue Dec 4 09:46:40 2007 -+++ zone.tab Tue Dec 4 09:46:50 2007 -@@ -77,7 +77,7 @@ - BH +2623+05035 Asia/Bahrain - BI -0323+02922 Africa/Bujumbura - BJ +0629+00237 Africa/Porto-Novo --BL +1753-06251 America/St_Barthelemy -+#BL +1753-06251 America/St_Barthelemy - BM +3217-06446 Atlantic/Bermuda - BN +0456+11455 Asia/Brunei - BO -1630-06809 America/La_Paz diff --git a/misc/zoneinfo/files/patchremove-bq b/misc/zoneinfo/files/patchremove-bq deleted file mode 100644 index 842fa8da2eaa..000000000000 --- a/misc/zoneinfo/files/patchremove-bq +++ /dev/null @@ -1,11 +0,0 @@ ---- zone.tab.orig 2011-09-01 17:55:11.000000000 +1000 -+++ zone.tab 2011-09-01 17:55:21.000000000 +1000 -@@ -86,7 +86,7 @@ - BM +3217-06446 Atlantic/Bermuda - BN +0456+11455 Asia/Brunei - BO -1630-06809 America/La_Paz --BQ +120903-0681636 America/Kralendijk -+#BQ +120903-0681636 America/Kralendijk - BR -0351-03225 America/Noronha Atlantic islands - BR -0127-04829 America/Belem Amapa, E Para - BR -0343-03830 America/Fortaleza NE Brazil (MA, PI, CE, RN, PB) diff --git a/misc/zoneinfo/files/patchremove-cw b/misc/zoneinfo/files/patchremove-cw deleted file mode 100644 index 79146ed1b0f7..000000000000 --- a/misc/zoneinfo/files/patchremove-cw +++ /dev/null @@ -1,11 +0,0 @@ ---- zone.tab.orig 2011-09-01 17:55:33.000000000 +1000 -+++ zone.tab 2011-09-01 17:56:54.000000000 +1000 -@@ -155,7 +155,7 @@ - CR +0956-08405 America/Costa_Rica - CU +2308-08222 America/Havana - CV +1455-02331 Atlantic/Cape_Verde --CW +1211-06900 America/Curacao -+#CW +1211-06900 America/Curacao - CX -1025+10543 Indian/Christmas - CY +3510+03322 Asia/Nicosia - CZ +5005+01426 Europe/Prague diff --git a/misc/zoneinfo/files/patchremove-gg b/misc/zoneinfo/files/patchremove-gg deleted file mode 100644 index 867e3c178943..000000000000 --- a/misc/zoneinfo/files/patchremove-gg +++ /dev/null @@ -1,11 +0,0 @@ ---- zone.tab.orig Tue Aug 29 18:02:45 2006 -+++ zone.tab Tue Aug 29 18:02:56 2006 -@@ -178,7 +178,7 @@ - GD +1203-06145 America/Grenada - GE +4143+04449 Asia/Tbilisi - GF +0456-05220 America/Cayenne --GG +4927-00232 Europe/Guernsey -+#GG +4927-00232 Europe/Guernsey - GH +0533-00013 Africa/Accra - GI +3608-00521 Europe/Gibraltar - GL +6411-05144 America/Godthab most locations diff --git a/misc/zoneinfo/files/patchremove-im b/misc/zoneinfo/files/patchremove-im deleted file mode 100644 index ff5da7229d28..000000000000 --- a/misc/zoneinfo/files/patchremove-im +++ /dev/null @@ -1,11 +0,0 @@ ---- zone.tab.orig 2013-09-11 10:47:17.000000000 +1000 -+++ zone.tab 2013-10-10 06:13:41.000000000 +1100 -@@ -225,7 +225,7 @@ - ID -0232+14042 Asia/Jayapura west New Guinea (Irian Jaya) & Malukus (Moluccas) - IE +5320-00615 Europe/Dublin - IL +314650+0351326 Asia/Jerusalem --IM +5409-00428 Europe/Isle_of_Man -+#IM +5409-00428 Europe/Isle_of_Man - IN +2232+08822 Asia/Kolkata - IO -0720+07225 Indian/Chagos - IQ +3321+04425 Asia/Baghdad diff --git a/misc/zoneinfo/files/patchremove-je b/misc/zoneinfo/files/patchremove-je deleted file mode 100644 index 6b769cd1c742..000000000000 --- a/misc/zoneinfo/files/patchremove-je +++ /dev/null @@ -1,11 +0,0 @@ ---- zone.tab.orig 2013-09-11 10:47:17.000000000 +1000 -+++ zone.tab 2013-10-10 06:14:19.000000000 +1100 -@@ -232,7 +232,7 @@ - IR +3540+05126 Asia/Tehran - IS +6409-02151 Atlantic/Reykjavik - IT +4154+01229 Europe/Rome --JE +4912-00207 Europe/Jersey -+#JE +4912-00207 Europe/Jersey - JM +175805-0764736 America/Jamaica - JO +3157+03556 Asia/Amman - JP +353916+1394441 Asia/Tokyo diff --git a/misc/zoneinfo/files/patchremove-me b/misc/zoneinfo/files/patchremove-me deleted file mode 100644 index 5a1144dca70c..000000000000 --- a/misc/zoneinfo/files/patchremove-me +++ /dev/null @@ -1,8 +0,0 @@ ---- zone.tab.orig Tue Dec 4 01:50:41 2007 -+++ zone.tab Tue Dec 4 09:57:33 2007 -@@ -250,4 +250,4 @@ - MA +3339-00735 Africa/Casablanca - MC +4342+00723 Europe/Monaco - MD +4700+02850 Europe/Chisinau --ME +4226+01916 Europe/Podgorica -+#ME +4226+01916 Europe/Podgorica diff --git a/misc/zoneinfo/files/patchremove-mf b/misc/zoneinfo/files/patchremove-mf deleted file mode 100644 index 440a45ff56f4..000000000000 --- a/misc/zoneinfo/files/patchremove-mf +++ /dev/null @@ -1,7 +0,0 @@ ---- zone.tab.orig Tue Dec 4 01:50:41 2007 -+++ zone.tab Tue Dec 4 09:57:33 2007 -@@ -254,3 +254,3 @@ --MF +1804-06305 America/Marigot -+#MF +1804-06305 America/Marigot - MG -1855+04731 Indian/Antananarivo - MH +0709+17112 Pacific/Majuro most locations diff --git a/misc/zoneinfo/files/patchremove-rs b/misc/zoneinfo/files/patchremove-rs deleted file mode 100644 index c466c6ee6b82..000000000000 --- a/misc/zoneinfo/files/patchremove-rs +++ /dev/null @@ -1,11 +0,0 @@ ---- zone.tab.orig Tue Oct 17 07:38:12 2006 -+++ zone.tab Tue Oct 17 07:38:31 2006 -@@ -312,7 +312,7 @@ - QA +2517+05132 Asia/Qatar - RE -2052+05528 Indian/Reunion - RO +4426+02606 Europe/Bucharest --RS +4450+02030 Europe/Belgrade -+#RS +4450+02030 Europe/Belgrade - RU +5443+02030 Europe/Kaliningrad Moscow-01 - Kaliningrad - RU +5545+03735 Europe/Moscow Moscow+00 - west Russia - RU +4844+04425 Europe/Volgograd Moscow+00 - Caspian Sea diff --git a/misc/zoneinfo/files/patchremove-ss b/misc/zoneinfo/files/patchremove-ss deleted file mode 100644 index b0a81963105b..000000000000 --- a/misc/zoneinfo/files/patchremove-ss +++ /dev/null @@ -1,11 +0,0 @@ ---- zone.tab.orig 2011-09-01 17:52:14.000000000 +1000 -+++ zone.tab 2011-09-01 17:52:21.000000000 +1000 -@@ -361,7 +361,7 @@ - SN +1440-01726 Africa/Dakar - SO +0204+04522 Africa/Mogadishu - SR +0550-05510 America/Paramaribo --SS +0451+03136 Africa/Juba -+#SS +0451+03136 Africa/Juba - ST +0020+00644 Africa/Sao_Tome - SV +1342-08912 America/El_Salvador - SX +180305-0630250 America/Lower_Princes diff --git a/misc/zoneinfo/files/patchremove-sx b/misc/zoneinfo/files/patchremove-sx deleted file mode 100644 index dc9ce4132802..000000000000 --- a/misc/zoneinfo/files/patchremove-sx +++ /dev/null @@ -1,11 +0,0 @@ ---- zone.tab.orig 2011-09-01 17:57:06.000000000 +1000 -+++ zone.tab 2011-09-01 17:57:40.000000000 +1000 -@@ -364,7 +364,7 @@ - SS +0451+03136 Africa/Juba - ST +0020+00644 Africa/Sao_Tome - SV +1342-08912 America/El_Salvador --SX +180305-0630250 America/Lower_Princes -+#SX +180305-0630250 America/Lower_Princes - SY +3330+03618 Asia/Damascus - SZ -2618+03106 Africa/Mbabane - TC +2128-07108 America/Grand_Turk diff --git a/misc/zoneinfo/pkg-plist b/misc/zoneinfo/pkg-plist index 528bea32cb07..fc736ead74a7 100644 --- a/misc/zoneinfo/pkg-plist +++ b/misc/zoneinfo/pkg-plist @@ -351,7 +351,6 @@ %%DATADIR%%/Etc/GMT-9 %%DATADIR%%/Etc/GMT0 %%DATADIR%%/Etc/Greenwich -%%DATADIR%%/Etc/UCT %%DATADIR%%/Etc/UTC %%DATADIR%%/Etc/Universal %%DATADIR%%/Etc/Zulu @@ -472,9 +471,11 @@ %%DATADIR%%/Pacific/Tongatapu %%DATADIR%%/Pacific/Wake %%DATADIR%%/Pacific/Wallis +%%DATADIR%%/UTC %%DATADIR%%/WET %%DATADIR%%/posixrules %%DATADIR%%/zone.tab +%%DATADIR%%/zone1970.tab %%BACKWARD%%%%DATADIR%%/Africa/Asmera %%BACKWARD%%%%DATADIR%%/Africa/Timbuktu %%BACKWARD%%%%DATADIR%%/America/Argentina/ComodRivadavia @@ -542,6 +543,7 @@ %%BACKWARD%%%%DATADIR%%/Cuba %%BACKWARD%%%%DATADIR%%/Egypt %%BACKWARD%%%%DATADIR%%/Eire +%%BACKWARD%%%%DATADIR%%/Etc/UCT %%BACKWARD%%%%DATADIR%%/Europe/Belfast %%BACKWARD%%%%DATADIR%%/Europe/Tiraspol %%BACKWARD%%%%DATADIR%%/GB @@ -589,7 +591,6 @@ %%BACKWARD%%%%DATADIR%%/US/Mountain %%BACKWARD%%%%DATADIR%%/US/Pacific %%BACKWARD%%%%DATADIR%%/US/Samoa -%%BACKWARD%%%%DATADIR%%/UTC %%BACKWARD%%%%DATADIR%%/Universal %%BACKWARD%%%%DATADIR%%/W-SU %%BACKWARD%%%%DATADIR%%/Zulu |