mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-23 15:31:05 +02:00
sys-libs/timezone-data: import latest stable ebuild from upstream
This commit is contained in:
parent
d71ba2963c
commit
56adefa9db
@ -1,2 +1,2 @@
|
||||
DIST tzcode2015b.tar.gz 183630 SHA256 e668f1235b998c90e43ecc93c8535728c65bb01d6bb93d22467e04b5ffa35d76 SHA512 d9b56c8ec98d9158d10cf80df0181864c467a4387b8ced5701f466c40885ea524bc1d49b0e17c0a18d8006a423da1c1b9a7e74626c4a916dd37cbb85e04b2b0a WHIRLPOOL 9e57737318d00470a6315cda75ed0cc3b4bb7f57de4c60b0d3b527be12164ec7c390f285dde23102c764e2ff6b9473d2e4762642f7a3e716e746bcacb931eaad
|
||||
DIST tzdata2015b.tar.gz 293482 SHA256 556ac1a5b3a371adc1ad4e77138f78ddd7f8ddd7bc2b52545924598c7dc8ad62 SHA512 767782b87e62a8f7a4dbcae595d16a54197c9e04ca974d7016d11f90ebaf2537b804d111f204af9052c68d4670afe0af0af9e5b150867a357fc199bb541368d0 WHIRLPOOL e6d7bd671dd17c44b9d51744bda2283b42d5e4b9b673e693976af2f52f2a03a9571d6604a30b88701ed11f69a3a797429c72274126c0f45e5a4b9637b589a632
|
||||
DIST tzcode2016e.tar.gz 194647 SHA256 57d8c4fcd5e8a90657d0e298eac5effb1a642119c92308db68d13a4612fa459e SHA512 dcaf615ada96920e60ffb336253f53541861153decc156d41661f43e0bfb128c6c231b0b776bbe3f2176549346275fc5a879074f4977d5141228e58cb33a41c6 WHIRLPOOL e9397b1d4236062a95a46ed463378a295a1959593611536416aeeb8c72c98131cf059d065439f59ae2b40722129b1c2ede7d14dc131ed431042620e54133148d
|
||||
DIST tzdata2016e.tar.gz 313684 SHA256 ba00f899f18dc4048d7fa21f5e1fdef434496084eedc06f6caa15e5ecdb6bd81 SHA512 dace0f6fc87a73879ca3a1b143d7dcf9c50803e23e6b8c91f83711704e28129af776676c547c42f14dee7f1e8e285ce25296e53a52d11f4c8f155b5f80f4beb3 WHIRLPOOL 69f5e70ae836c71c84c3bb1653887b15e2d408fe0927397a8f16f81b13ce1a23e1ad881084eb36b7785b3f129299830d03a5d2722029fdb8eed305c851661b7d
|
||||
|
@ -2,9 +2,7 @@
|
||||
- Support env CC
|
||||
- Don't build/install libtz.a
|
||||
- Don't install man-pages provided by sys-apps/man-pages
|
||||
- Move zic, zdump to sbin and tzselect to bin ala glibc
|
||||
- Install posix zoneinfo into zoneinfo/posix/ instead of zoneinfo-posix/ ala glibc
|
||||
- Install leaps zoneinfo into zoneinfo/right/ ala glibc
|
||||
- Move tzselect, zic, and zdump to bin
|
||||
- Do not run network based unittests
|
||||
|
||||
--- a/Makefile
|
||||
@ -43,32 +41,27 @@
|
||||
|
||||
# Library functions are put in an archive in LIBDIR.
|
||||
|
||||
@@ -298,8 +298,10 @@ GZIPFLAGS= -9n
|
||||
@@ -298,8 +298,7 @@ GZIPFLAGS= -9n
|
||||
|
||||
###############################################################################
|
||||
#MAKE= make
|
||||
|
||||
-cc= cc
|
||||
-CC= $(cc) -DTZDIR=\"$(TZDIR)\"
|
||||
+CPPFLAGS+= -DTZDIR=\"$(TZDIR)\"
|
||||
+ifeq ($(NLS),1)
|
||||
+CPPFLAGS+= -DHAVE_GETTEXT=1 -DTZ_DOMAIN=\"libc\"
|
||||
+endif
|
||||
|
||||
AR= ar
|
||||
|
||||
@@ -352,17 +354,14 @@ ALL: all date
|
||||
@@ -352,16 +354,12 @@ ALL: all date
|
||||
install: all $(DATA) $(REDO) $(MANS)
|
||||
mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \
|
||||
- $(DESTDIR)$(LIBDIR) \
|
||||
+ $(DESTDIR)$(SBINDIR) $(DESTDIR)$(BINDIR) \
|
||||
+ $(DESTDIR)$(BINDIR) \
|
||||
$(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \
|
||||
$(DESTDIR)$(MANDIR)/man8
|
||||
$(ZIC) -y $(YEARISTYPE) \
|
||||
-d $(DESTDIR)$(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
|
||||
$(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES)
|
||||
cp -f iso3166.tab $(ZONETABLES) $(DESTDIR)$(TZDIR)/.
|
||||
- cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/.
|
||||
+ cp zic zdump $(DESTDIR)$(SBINDIR)/.
|
||||
+ cp tzselect $(DESTDIR)$(BINDIR)/.
|
||||
+ cp tzselect zic zdump $(DESTDIR)$(BINDIR)/.
|
||||
- cp libtz.a $(DESTDIR)$(LIBDIR)/.
|
||||
- $(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a
|
||||
cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/.
|
||||
@ -77,32 +70,7 @@
|
||||
|
||||
INSTALL: ALL install date.1
|
||||
mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
|
||||
@@ -406,18 +408,18 @@ right_only: zic leapseconds $(TDATA)
|
||||
# to using them, or vice versa.
|
||||
right_posix: right_only leapseconds
|
||||
rm -fr $(DESTDIR)$(TZDIR)-leaps
|
||||
- ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-leaps || \
|
||||
- $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-leaps \
|
||||
+ ln -s . $(DESTDIR)$(TZDIR)/right || \
|
||||
+ $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)/right \
|
||||
-L leapseconds $(TDATA)
|
||||
- $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-posix \
|
||||
+ $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)/posix \
|
||||
-L /dev/null $(TDATA)
|
||||
|
||||
posix_right: posix_only leapseconds
|
||||
rm -fr $(DESTDIR)$(TZDIR)-posix
|
||||
- ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-posix || \
|
||||
- $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-posix \
|
||||
+ ln -s . $(DESTDIR)$(TZDIR)/posix || \
|
||||
+ $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)/posix \
|
||||
-L /dev/null $(TDATA)
|
||||
- $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-leaps \
|
||||
+ $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)/right \
|
||||
-L leapseconds $(TDATA)
|
||||
|
||||
posix_packrat: posix_only backzone
|
||||
@@ -440,7 +442,7 @@ tzselect: tzselect.ksh
|
||||
@@ -440,7 +438,7 @@ tzselect: tzselect.ksh
|
||||
chmod +x $@
|
||||
|
||||
check: check_character_set check_white_space check_links check_sorted \
|
@ -1,99 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/timezone-data-2015b.ebuild,v 1.2 2015/04/14 15:38:01 vapier Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit eutils toolchain-funcs flag-o-matic
|
||||
|
||||
code_ver=${PV}
|
||||
data_ver=${PV}
|
||||
DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
|
||||
HOMEPAGE="http://www.iana.org/time-zones http://www.twinsun.com/tz/tz-link.htm"
|
||||
SRC_URI="http://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.tar.gz
|
||||
http://www.iana.org/time-zones/repository/releases/tzcode${code_ver}.tar.gz"
|
||||
|
||||
LICENSE="BSD public-domain"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="nls right_timezone elibc_FreeBSD elibc_glibc"
|
||||
|
||||
RDEPEND="!sys-libs/glibc[vanilla(+)]"
|
||||
|
||||
S=${WORKDIR}
|
||||
|
||||
pkg_setup() {
|
||||
# Deal with the case where older timezone-data installed a
|
||||
# dir here, but newer one installs symlinks. Portage will
|
||||
# barf when you try to transition file types.
|
||||
if cd "${EROOT}"/usr/share/zoneinfo 2>/dev/null ; then
|
||||
# In case of a failed upgrade, clean up the symlinks #506570
|
||||
if [ -L .gentoo-upgrade ] ; then
|
||||
rm -rf posix .gentoo-upgrade
|
||||
fi
|
||||
if [ -d posix ] ; then
|
||||
rm -rf .gentoo-upgrade #487192
|
||||
mv posix .gentoo-upgrade || die
|
||||
ln -s .gentoo-upgrade posix || die
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-2015a-makefile.patch
|
||||
tc-is-cross-compiler && cp -pR "${S}" "${S}"-native
|
||||
}
|
||||
|
||||
_emake() {
|
||||
emake \
|
||||
TOPDIR="${EPREFIX}/usr" \
|
||||
REDO=$(usex right_timezone posix_right posix_only) \
|
||||
"$@"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local LDLIBS
|
||||
tc-export CC
|
||||
if use elibc_FreeBSD || use elibc_Darwin ; then
|
||||
append-cppflags -DSTD_INSPIRED #138251
|
||||
fi
|
||||
export NLS=$(usex nls 1 0)
|
||||
if use nls && ! use elibc_glibc ; then
|
||||
LDLIBS+=" -lintl" #154181
|
||||
fi
|
||||
# TOPDIR is used in some utils when compiling.
|
||||
_emake \
|
||||
AR="$(tc-getAR)" \
|
||||
CC="$(tc-getCC)" \
|
||||
RANLIB="$(tc-getRANLIB)" \
|
||||
CFLAGS="${CFLAGS} -std=gnu99" \
|
||||
LDFLAGS="${LDFLAGS}" \
|
||||
LDLIBS="${LDLIBS}"
|
||||
if tc-is-cross-compiler ; then
|
||||
_emake -C "${S}"-native \
|
||||
CC="$(tc-getBUILD_CC)" \
|
||||
CFLAGS="${BUILD_CFLAGS}" \
|
||||
CPPFLAGS="${BUILD_CPPFLAGS}" \
|
||||
LDFLAGS="${BUILD_LDFLAGS}" \
|
||||
LDLIBS="${LDLIBS}" \
|
||||
zic
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local zic=""
|
||||
tc-is-cross-compiler && zic="zic=${S}-native/zic"
|
||||
_emake install ${zic} DESTDIR="${D}"
|
||||
dodoc CONTRIBUTING README NEWS Theory
|
||||
dohtml *.htm
|
||||
|
||||
# install the symlink by hand to not break existing timezones
|
||||
if ! use right_timezone && [[ ! -e ${ED}/usr/share/zoneinfo/posix ]] ; then
|
||||
dosym . /usr/share/zoneinfo/posix
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
rm -rf "${EROOT}"/usr/share/zoneinfo/.gentoo-upgrade
|
||||
}
|
||||
|
157
sdk_container/src/third_party/coreos-overlay/sys-libs/timezone-data/timezone-data-2016e.ebuild
vendored
Normal file
157
sdk_container/src/third_party/coreos-overlay/sys-libs/timezone-data/timezone-data-2016e.ebuild
vendored
Normal file
@ -0,0 +1,157 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils toolchain-funcs flag-o-matic
|
||||
|
||||
code_ver=${PV}
|
||||
data_ver=${PV}
|
||||
DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
|
||||
HOMEPAGE="http://www.iana.org/time-zones http://www.twinsun.com/tz/tz-link.htm"
|
||||
SRC_URI="http://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.tar.gz
|
||||
http://www.iana.org/time-zones/repository/releases/tzcode${code_ver}.tar.gz"
|
||||
|
||||
LICENSE="BSD public-domain"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="nls leaps_timezone elibc_FreeBSD"
|
||||
|
||||
DEPEND="nls? ( virtual/libintl )"
|
||||
RDEPEND="${DEPEND}
|
||||
!sys-libs/glibc[vanilla(+)]"
|
||||
|
||||
S=${WORKDIR}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-2016c-makefile.patch
|
||||
tc-is-cross-compiler && cp -pR "${S}" "${S}"-native
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export CC
|
||||
|
||||
append-lfs-flags #471102
|
||||
|
||||
if use elibc_FreeBSD || use elibc_Darwin ; then
|
||||
append-cppflags -DSTD_INSPIRED #138251
|
||||
fi
|
||||
|
||||
append-cppflags -DHAVE_GETTEXT=$(usex nls 1 0) -DTZ_DOMAIN='\"libc\"'
|
||||
LDLIBS=""
|
||||
if use nls ; then
|
||||
# See if an external libintl is available. #154181 #578424
|
||||
local c="${T}/test"
|
||||
echo 'main(){}' > "${c}.c"
|
||||
if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then
|
||||
LDLIBS+=" -lintl"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
_emake() {
|
||||
emake \
|
||||
TOPDIR="${EPREFIX}/usr" \
|
||||
REDO=$(usex leaps_timezone posix_right posix_only) \
|
||||
"$@"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# TOPDIR is used in some utils when compiling.
|
||||
_emake \
|
||||
AR="$(tc-getAR)" \
|
||||
CC="$(tc-getCC)" \
|
||||
RANLIB="$(tc-getRANLIB)" \
|
||||
CFLAGS="${CFLAGS} -std=gnu99" \
|
||||
LDFLAGS="${LDFLAGS}" \
|
||||
LDLIBS="${LDLIBS}"
|
||||
if tc-is-cross-compiler ; then
|
||||
_emake -C "${S}"-native \
|
||||
CC="$(tc-getBUILD_CC)" \
|
||||
CFLAGS="${BUILD_CFLAGS}" \
|
||||
CPPFLAGS="${BUILD_CPPFLAGS}" \
|
||||
LDFLAGS="${BUILD_LDFLAGS}" \
|
||||
LDLIBS="${LDLIBS}" \
|
||||
zic
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local zic=""
|
||||
tc-is-cross-compiler && zic="zic=${S}-native/zic"
|
||||
_emake install ${zic} DESTDIR="${D}"
|
||||
dodoc CONTRIBUTING README NEWS Theory
|
||||
dohtml *.htm
|
||||
}
|
||||
|
||||
get_TIMEZONE() {
|
||||
local tz src="${EROOT}etc/timezone"
|
||||
if [[ -e ${src} ]] ; then
|
||||
tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
|
||||
else
|
||||
tz="FOOKABLOIE"
|
||||
fi
|
||||
[[ -z ${tz} ]] && return 1 || echo "${tz}"
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
local tz=$(get_TIMEZONE)
|
||||
if [[ ${tz} == right/* || ${tz} == posix/* ]] ; then
|
||||
eerror "The right & posix subdirs are no longer installed as subdirs -- they have been"
|
||||
eerror "relocated to match upstream paths as sibling paths. Further, posix/xxx is the"
|
||||
eerror "same as xxx, so you should simply drop the posix/ prefix. You also should not"
|
||||
eerror "be using right/xxx for the system timezone as it breaks programs."
|
||||
die "Please fix your timezone setting"
|
||||
fi
|
||||
|
||||
# Trim the symlink by hand to avoid portage's automatic protection checks.
|
||||
rm -f "${EROOT}"/usr/share/zoneinfo/posix
|
||||
|
||||
if has_version "<=${CATEGORY}/${PN}-2015c" ; then
|
||||
elog "Support for accessing posix/ and right/ directly has been dropped to match"
|
||||
elog "upstream. There is no need to set TZ=posix/xxx as it is the same as TZ=xxx."
|
||||
elog "For TZ=right/, you can use TZ=../zoneinfo-leaps/xxx instead. See this post"
|
||||
elog "for details: https://mm.icann.org/pipermail/tz/2015-February/022024.html"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
# make sure the /etc/localtime file does not get stale #127899
|
||||
local tz src="${EROOT}etc/timezone" etc_lt="${EROOT}etc/localtime"
|
||||
|
||||
# If it's a symlink, assume the user knows what they're doing and
|
||||
# they're managing it themselves. #511474
|
||||
if [[ -L ${etc_lt} ]] ; then
|
||||
einfo "Assuming your ${etc_lt} symlink is what you want; skipping update."
|
||||
return 0
|
||||
fi
|
||||
|
||||
if ! tz=$(get_TIMEZONE) ; then
|
||||
einfo "Assuming your empty ${etc_lt} file is what you want; skipping update."
|
||||
return 0
|
||||
fi
|
||||
if [[ ${tz} == "FOOKABLOIE" ]] ; then
|
||||
elog "You do not have TIMEZONE set in ${src}."
|
||||
|
||||
if [[ ! -e ${etc_lt} ]] ; then
|
||||
cp -f "${EROOT}"/usr/share/zoneinfo/Factory "${etc_lt}"
|
||||
elog "Setting ${etc_lt} to Factory."
|
||||
else
|
||||
elog "Skipping auto-update of ${etc_lt}."
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ ! -e ${EROOT}/usr/share/zoneinfo/${tz} ]] ; then
|
||||
elog "You have an invalid TIMEZONE setting in ${src}"
|
||||
elog "Your ${etc_lt} has been reset to Factory; enjoy!"
|
||||
tz="Factory"
|
||||
fi
|
||||
einfo "Updating ${etc_lt} with ${EROOT}usr/share/zoneinfo/${tz}"
|
||||
cp -f "${EROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
pkg_config
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user