summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2013-07-06 14:47:56 +0000
committerJeroen Roovers <jer@gentoo.org>2013-07-06 14:47:56 +0000
commit32583ba7deb18439a009eabca69bb9e5d6b8d365 (patch)
treef38bb87558b17a03c099bd893077c99fc998447c /sci-calculators
parentInitial import, from Emacs overlay. Ebuild contributed by me. (diff)
downloadhistorical-32583ba7deb18439a009eabca69bb9e5d6b8d365.tar.gz
historical-32583ba7deb18439a009eabca69bb9e5d6b8d365.tar.bz2
historical-32583ba7deb18439a009eabca69bb9e5d6b8d365.zip
Install a patched units_cur (bug #470182).
Package-Manager: portage-2.2.0_alpha186/cvs/Linux x86_64 Manifest-Sign-Key: 0xA792A613
Diffstat (limited to 'sci-calculators')
-rw-r--r--sci-calculators/units/ChangeLog8
-rw-r--r--sci-calculators/units/Manifest12
-rw-r--r--sci-calculators/units/files/units-2.01_cur.patch100
-rw-r--r--sci-calculators/units/units-2.01-r1.ebuild33
4 files changed, 147 insertions, 6 deletions
diff --git a/sci-calculators/units/ChangeLog b/sci-calculators/units/ChangeLog
index 5675017b5e0c..bbac6e0dbf0f 100644
--- a/sci-calculators/units/ChangeLog
+++ b/sci-calculators/units/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-calculators/units
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-calculators/units/ChangeLog,v 1.53 2013/01/14 20:24:25 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-calculators/units/ChangeLog,v 1.54 2013/07/06 14:47:55 jer Exp $
+
+*units-2.01-r1 (06 Jul 2013)
+
+ 06 Jul 2013; Jeroen Roovers <jer@gentoo.org> +units-2.01-r1.ebuild,
+ +files/units-2.01_cur.patch:
+ Install a patched units_cur (bug #470182).
14 Jan 2013; Jeroen Roovers <jer@gentoo.org> metadata.xml:
Fix metadata.xml.
diff --git a/sci-calculators/units/Manifest b/sci-calculators/units/Manifest
index e94cb4b57a86..ac8c09016fd9 100644
--- a/sci-calculators/units/Manifest
+++ b/sci-calculators/units/Manifest
@@ -2,14 +2,16 @@
Hash: SHA256
AUX units-2.01-install.patch 2008 SHA256 7487ec8d4d887cae48e6696361a5777b461eec48f1f2d2100b15fc593a578ab1 SHA512 73dfabad8fdbf24798e51f5104c0a68b28b30c53b162c28facd36cc53f5d68afa269decc04d4055475b17b4e5d932f449d174b41aab9546b5e6f2e32e0410203 WHIRLPOOL a3da2bc69feeb54360284e3d1158d68a2e0c29f784348b0e47c953d676c1398e1dd3d221b9800b4a4c5c32d98320bd2606df66e5fd7698385fb9a7e742e263d2
+AUX units-2.01_cur.patch 2742 SHA256 a962655a7367e59cbc1aef175d629ed3cce83b192309db5bc0dcf2017e2d4a88 SHA512 b887b20682305d8b4ddaa6bc1c1cf4bd7a843de96f0b4963c6326c6f24233318b004766f036ed09aa50152a1b7b839c13e5369b0b1647ea9c2c6da8bec7ae5b8 WHIRLPOOL 7532fff389086a28d65c61d9f30dfb959c4cefed9a720fd7ce39e1d08d8d2a73a1c3a8c039bf7214d459101c4e1c73370bf42914ae453370486146298844cace
DIST units-2.01.tar.gz 709368 SHA256 138b12c70bffa0e484fdfe579927412b1ac573e8351c17d8938592f9ba9a88f2 SHA512 ddaa9d8ad84aea963e84379f6d5d6298ec0431c56ba2c805a5fbc3695504279a7ba81609e33bb9d52771ee3ca739570b925d30aa1637dacb5a90d8c8c483fd37 WHIRLPOOL 1c97a5ca7b2e351773eae5850a30680817a5788f8324bd37d2d8632e8a3fcf2a9da7dd59ee0d415bc8617c1e89fcc2a82ac4a51e27f76a1ac8b77321ea035e17
+EBUILD units-2.01-r1.ebuild 775 SHA256 a9b4cf14057202152c2aff16386c9b0490fd4eb451a84dc0cf460fe60708d720 SHA512 f3673ed43a813477b902f0b9e2a596cdf419a58b1d316eac4dc2798be678b3b3724b1a7ae2635ae730fe66abb4ae8cdf1b4df01c5bf189987cf99ec2ca797c89 WHIRLPOOL 97b759abeb12058a18c4a298a7893889f3c6d54b23eaa945f528294a7b2f7ace212473fc3282372ed98b7af0109023deb8c8a6990ceb9adeb9bf2e96db8795e0
EBUILD units-2.01.ebuild 824 SHA256 a8313ec940a23cb7c071c2a64b7ec6d3f5fb5e1f06dda6e5626dcb914d87c664 SHA512 d12a93bc2233da45de60cc4cf2d68c1423e20d15751aaa18057c721979450c14694ca9b172b57840ddb9437143941c544017ae1452b64909054e47f9dd4d158b WHIRLPOOL e624f4c8b45a51d436bb49a93030cbb8c3d541726f5e7a4650248ad160956d1bdad103172c7725a67b13fc839c54509717eeba9591f010ce683a67cfe4dcd6ca
-MISC ChangeLog 7815 SHA256 df70287fac68d44568010c7a7b01ab54d330bc7f17e10f4a0d5ba9825f6b87c6 SHA512 bf4cefb7c9268bd36643a78ec310f5871eb454ebc15f18b9b48365695f10787cc3e506cbb7b54cf5ae17ab13a1ea24f8033a4382b6835e12c38bce9fe800d9d2 WHIRLPOOL 4625545f84a5a8082efefa3d1620565444795b4d69156837bdc23aaea5eb8bbe62a451416cab2f005aeb4dd2be37a60bfad4f4d2e531b1cd49990596884c813e
+MISC ChangeLog 7992 SHA256 03bba33ffda731121cf9addcd104c2a6046f3440ad4ab626f40b4b740e90abc1 SHA512 94aaf801b23f1edc92f3acd200582cc68e0b3d4354f73128a3e60d43254e94e9ac0b64e834d2e09d5fd2955e4163594a5b724c23fa3e2dd2dd2024b84abdffcf WHIRLPOOL 6798d7bd57fa6eebfef9e6fbafb3f6a2d5196a396b43d5c33babc54b6831553512502dcdc9c1abeddb0f0c2a5f357f3c71d45c0429c03ba31d7066b77291b0c6
MISC metadata.xml 224 SHA256 d7ffc52704d4bc0180f6f1c448ea4bdd0e3ff3a562384dc944af4a00debc9620 SHA512 6487ad35c6f3d2e4876714919e7bb01fd65f57e7753cbfc318130727dded4fcf8632a06ab9b7a3016fc1ab127434d1d20de2dd0ef2cc63ad162023f2dbf64b1e WHIRLPOOL 879ad2c41f2e1297b677803b2b0478ed2affc91059b198524795e1a128cf8ab6b9fbe78b53bdd3421041f27b419bce387a267e389111125cd55b05e260abc998
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.19 (GNU/Linux)
+Version: GnuPG v2.0.20 (GNU/Linux)
-iEYEAREIAAYFAlD0aXoACgkQVWmRsqeSphM9tQCdF8chHLnUUNE3LA8taIXVqlCO
-c08AniptJBOrV2IpsuRb7en+uqBVrlh2
-=CaCN
+iEYEAREIAAYFAlHYLhwACgkQVWmRsqeSphODfwCfTO0Gp5+B+RZGYjG6KRbdgufr
+dJ0AniRObYRtUDaDyqhERCf3vlMAHLzn
+=3rCM
-----END PGP SIGNATURE-----
diff --git a/sci-calculators/units/files/units-2.01_cur.patch b/sci-calculators/units/files/units-2.01_cur.patch
new file mode 100644
index 000000000000..8cf9c9c939be
--- /dev/null
+++ b/sci-calculators/units/files/units-2.01_cur.patch
@@ -0,0 +1,100 @@
+--- a/units-2.01/units_cur
++++ b/units-2.01/units_cur
+@@ -1,10 +1,11 @@
+-#!/usr/bin/python
++#!/usr/bin/python2
+
+ import urllib
+ import datetime
+ from xml.dom import minidom
+ import sys
+ import re
++import xml.etree.ElementTree as ET
+
+ outfile = 'currency.units'
+
+@@ -26,51 +27,54 @@
+ sys.exit(1)
+
+ try:
+- data = urllib.urlopen('http://rss.timegenie.com/forex.txt').readlines()
++ data = ET.parse(urllib.urlopen('http://rss.timegenie.com/forex.xml')).findall('data')
+ except IOError, exc:
+ sys.stderr.write('Error connecting to currency server. {0}\n'.format(exc))
+ sys.exit(1)
+
+-if not re.match(r"[A-Z]{3}\|[A-Za-z ]*\|[0-9.]*",data[0]):
+- sys.stderr.write('Something wrong with timegenie reply\n')
+- sys.exit(1)
+-
+-splitdata = [x.split('|') for x in data]
+-
+-codes = [x[0] for x in splitdata]
+-names = [x[1].lower().replace(' ','') for x in splitdata]
+-values = ['1|' + x[2].rstrip('\n') for x in splitdata]
+-
++# <forex>
++# <data>
++# <code>AED</code>
++# <description>United Arab Emirates Dirham</description>
++# <rate>4.8013</rate>
++# </data>
++# </forex>
+
+ # print codes here
+
+ output.write('# ISO Currency Codes\n\n')
+
+-for x in zip(codes, names):
+- output.write(('{0}' + ' '*20 + '{1}\n').format(*x))
+-
+-usd = codes.index('USD')
+-euro = codes.index('EUR')
+-usdval = values[usd][2:] # Trim off leading 1|
+-
+-values = [x+' euro' for x in values]
+-
+-values[euro] = usdval + ' US$'
+-
+-del names[usd]
+-del values[usd]
+-
+-# print values here
++for datum in data:
++ code = datum.find('code').text
++ description = datum.find('description').text.lower().replace(' ','')
++ datum.find('description').text = description
++ output.write(code + ' '*20 + description + '\n')
++
++# print rates here
++
++for datum in data:
++ if datum.find('code').text == 'USD':
++ usdval = datum.find('rate').text[2:]
++ datum.remove
+
+ now = datetime.datetime.now()
+ output.write('\n# Currency exchange rates from Time Genie (www.timegenie.com)\n')
+ output.write('\n!message Currency exchange rates from ' + now.strftime('%Y-%m-%d') + '\n\n')
++maxlen = 0
+
+-maxlen = max(map(len,names))
+-names = [x.ljust(maxlen+2) for x in names]
+-for x in zip(names, values):
+- output.write('{0}{1}\n'.format(*x))
++for datum in data:
++ if len(datum.find('description').text) > maxlen:
++ maxlen = len(datum.find('description').text)
++
++ if datum.find('code').text == 'EUR':
++ euro = datum.find('rate').text
++ datum.find('rate').text = usdval + ' US$'
++
++ else:
++ datum.find('rate').text += ' euro'
++ output.write(datum.find('description').text.ljust(maxlen+2) + '1|' + datum.find('rate').text + '\n')
+
++# precious metals prices
+
+ output.write('\n# Precious metals prices from http://services.packetizer.com/spotprices/\n\n')
+
diff --git a/sci-calculators/units/units-2.01-r1.ebuild b/sci-calculators/units/units-2.01-r1.ebuild
new file mode 100644
index 000000000000..17c8e1d15c6b
--- /dev/null
+++ b/sci-calculators/units/units-2.01-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-calculators/units/units-2.01-r1.ebuild,v 1.1 2013/07/06 14:47:55 jer Exp $
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Unit conversion program"
+HOMEPAGE="http://www.gnu.org/software/units/units.html"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+DEPEND="
+ >=sys-libs/readline-4.1-r2
+"
+RDEPEND="
+ || ( dev-lang/python:2.5 dev-lang/python:2.6 dev-lang/python:2.7 )
+ ${DEPEND}
+"
+
+DOCS=( ChangeLog NEWS README )
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-install.patch \
+ "${FILESDIR}"/${P}_cur.patch
+
+ eautoreconf
+}