diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-08-13 16:07:04 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-08-13 16:07:04 -0300 |
commit | e6b487980c858023cb4a3678f2d27f52c2a32596 (patch) | |
tree | 3a348db541d1a1ae1f356dd3970fff4910529558 /community/datemath | |
parent | f08b6a2decf228473f030cfd49116c9fd0b05c37 (diff) | |
parent | 07a52495b8a64f14843878d6116151fbdb6deefb (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
community/bird/PKGBUILD
community/ecryptfs-utils/PKGBUILD
community/linux-tools/PKGBUILD
community/qtcurve-kde4/PKGBUILD
extra/audacity/PKGBUILD
extra/cups/PKGBUILD
extra/imagemagick/PKGBUILD
extra/kdeadmin/PKGBUILD
extra/kdepim/PKGBUILD
extra/kradio/PKGBUILD
extra/libimobiledevice/PKGBUILD
extra/libmowgli/PKGBUILD
extra/llvm/PKGBUILD
extra/phonon-vlc/PKGBUILD
extra/pycrypto/PKGBUILD
extra/xorg-server/PKGBUILD
libre/linux-libre/PKGBUILD
libre/syslinux/PKGBUILD
multilib-staging/gcc-multilib/PKGBUILD
multilib/lib32-libldap/PKGBUILD
staging/binutils/PKGBUILD
staging/gcc/PKGBUILD
staging/glibc/PKGBUILD
testing/cronie/PKGBUILD
testing/cryptsetup/PKGBUILD
testing/krb5/PKGBUILD
testing/lvm2/PKGBUILD
testing/net-tools/PKGBUILD
testing/systemd/PKGBUILD
Diffstat (limited to 'community/datemath')
-rw-r--r-- | community/datemath/PKGBUILD | 11 | ||||
-rw-r--r-- | community/datemath/y2k.patch | 29 |
2 files changed, 36 insertions, 4 deletions
diff --git a/community/datemath/PKGBUILD b/community/datemath/PKGBUILD index a36029d6d..b44c1be73 100644 --- a/community/datemath/PKGBUILD +++ b/community/datemath/PKGBUILD @@ -1,21 +1,24 @@ -# $Id: PKGBUILD 65110 2012-02-20 04:48:43Z spupykin $ +# $Id: PKGBUILD 74846 2012-08-07 05:46:50Z spupykin $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Maintainer: Todd Musall <tmusall@comcast.net> # Contributor: Todd Musall <tmusall@comcast.net> pkgname=datemath pkgver=2.0.10 -pkgrel=3 +pkgrel=4 pkgdesc="Command line date and time math utility." arch=('i686' 'x86_64' 'mips64el') url="http://www.unixwiz.net/tools/datemath.html" license=("GPL") depends=('glibc') -source=(http://www.unixwiz.net/tools/$pkgname.tar.gz) -md5sums=('2c369d70a43313b71dbe3c7cc50207de') +source=(http://www.unixwiz.net/tools/$pkgname.tar.gz + y2k.patch) +md5sums=('2c369d70a43313b71dbe3c7cc50207de' + '87758503414a967f06566b94523fc010') build() { cd $srcdir + patch -Np0 <$srcdir/y2k.patch make install -D -m755 $srcdir/datemath $pkgdir/usr/bin/datemath } diff --git a/community/datemath/y2k.patch b/community/datemath/y2k.patch new file mode 100644 index 000000000..4605ad505 --- /dev/null +++ b/community/datemath/y2k.patch @@ -0,0 +1,29 @@ +diff -Naur ../datemath/util.c ./util.c +--- ../datemath/util.c 2004-03-06 18:27:59.000000000 +0100 ++++ ./util.c 2012-08-01 09:37:30.767738221 +0200 +@@ -18,6 +18,7 @@ + #include "defs.h" + + int century19_year = 40; /* 0..39 = 2000 / 40..99 = 1999 */ ++static int century; /* may not be 1900... */ + + /* + * jultoyymm() +@@ -35,6 +36,8 @@ + + if (mdy[YY] < 1900) /* too early? */ + mdy[YY] = 1900; ++ ++ century = mdy[YY] / 100; + + mdy[YY] %= 100; /* strip off 19xx */ + +@@ -59,7 +62,7 @@ + mdy[YY] = yymm / 100; + mdy[DD] = eflag ? daysinmm(mdy[MM], mdy[YY]) : 1; + +- mdy[YY] += 1900; ++ mdy[YY] += century * 100; + + if (rv = rmdyjul(mdy, &jdate), rv < 0) + die("bad date conversion in yymmtojul-(%d)", rv); |