Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-calculators/units/, sci-calculators/units/files/
Date: Tue, 26 Jun 2018 19:21:10
Message-Id: 1530040860.fd82bd40312ded4b7de57786920fe72d3a0ae7fa.jer@gentoo
1 commit: fd82bd40312ded4b7de57786920fe72d3a0ae7fa
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 26 19:20:30 2018 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 26 19:21:00 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd82bd40
7
8 sci-calculators/units: Version 2.17.
9
10 Package-Manager: Portage-2.3.40, Repoman-2.3.9
11
12 sci-calculators/units/Manifest | 1 +
13 .../units/files/units-2.17-network-sandbox.patch | 11 ++++
14 sci-calculators/units/units-2.17.ebuild | 63 ++++++++++++++++++++++
15 3 files changed, 75 insertions(+)
16
17 diff --git a/sci-calculators/units/Manifest b/sci-calculators/units/Manifest
18 index 54718b48ff6..1839e593f0d 100644
19 --- a/sci-calculators/units/Manifest
20 +++ b/sci-calculators/units/Manifest
21 @@ -1 +1,2 @@
22 DIST units-2.16.tar.gz 1178197 BLAKE2B 6de569cd70c8067be053c5acb0885f898b76252bf6bafbea5f8b4972eca0acb13adfb4b2bc70ef0a3df747ee31084076fea3d3199922f0c44fc8c6d08232192b SHA512 afca2bf313208db2d0a3f4e96fed7bb86a3e96030b420e1cfa68a140499b9a8f2ef8c166c1d608d03c9ca6260199569a67c67c623d8c6a4b8d52e9d5cb6e3091
23 +DIST units-2.17.tar.gz 1185070 BLAKE2B 44db938b214596058cdfaeda7fd8d70161221c196a0971b5a0e03331e30fdeb52db85ab43b721f25efd755f4baee4f92aa6204a85d38703a31ec7cac0cefd689 SHA512 e4114f7dc0e40146f969375511c5d930497cb9502306ef82feac78c8e09a03e84ed0b582ff82e2878beae41702c9612f7a3d28fc6e9ed2cfae708f9feb8b737b
24
25 diff --git a/sci-calculators/units/files/units-2.17-network-sandbox.patch b/sci-calculators/units/files/units-2.17-network-sandbox.patch
26 new file mode 100644
27 index 00000000000..e457610e430
28 --- /dev/null
29 +++ b/sci-calculators/units/files/units-2.17-network-sandbox.patch
30 @@ -0,0 +1,11 @@
31 +--- a/Makefile.in
32 ++++ b/Makefile.in
33 +@@ -107,7 +107,7 @@
34 + -e "s@/usr/bin/python@$(PYTHON)@" \
35 + $(srcdir)/units_cur > units_cur_inst
36 +
37 +-install-support: definitions.units units_cur_inst currency-units-update
38 ++install-support: definitions.units units_cur_inst
39 + $(MKDIR_P) $(DESTDIR)@UDAT@ $(DESTDIR)$(bindir) $(DESTDIR)@CDAT@
40 + $(INSTALL_DATA) $(srcdir)/definitions.units $(DESTDIR)@UDAT@×××××××××××.units
41 + -rm -f $(DESTDIR)@UDAT@××××××××.units
42
43 diff --git a/sci-calculators/units/units-2.17.ebuild b/sci-calculators/units/units-2.17.ebuild
44 new file mode 100644
45 index 00000000000..01fbb74ef39
46 --- /dev/null
47 +++ b/sci-calculators/units/units-2.17.ebuild
48 @@ -0,0 +1,63 @@
49 +# Copyright 1999-2018 Gentoo Foundation
50 +# Distributed under the terms of the GNU General Public License v2
51 +
52 +EAPI=6
53 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
54 +inherit eutils python-single-r1
55 +
56 +DESCRIPTION="Unit conversion program"
57 +HOMEPAGE="https://www.gnu.org/software/units/units.html"
58 +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
59 +
60 +LICENSE="FDL-1.3 GPL-3"
61 +SLOT="0"
62 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
63 +IUSE="+units_cur"
64 +REQUIRED_USE="units_cur? ( ${PYTHON_REQUIRED_USE} )"
65 +
66 +RDEPEND="
67 + sys-libs/readline:=
68 + units_cur? (
69 + ${PYTHON_DEPS}
70 + dev-python/future[${PYTHON_USEDEP}]
71 + dev-python/requests[${PYTHON_USEDEP}]
72 + )
73 +"
74 +DEPEND="
75 + ${RDEPEND}
76 +"
77 +PATCHES=(
78 + "${FILESDIR}"/${PN}-2.17-network-sandbox.patch
79 +)
80 +
81 +pkg_setup() {
82 + use units_cur && python-single-r1_pkg_setup
83 +}
84 +
85 +src_configure() {
86 + econf \
87 + --sharedstatedir="${EROOT}/var/lib" \
88 + ac_cv_path_PYTHON=no
89 +}
90 +
91 +src_compile() {
92 + emake ${PN}
93 +}
94 +
95 +src_install() {
96 + emake DESTDIR="${D}" install
97 +
98 + dodoc ChangeLog NEWS README
99 +
100 + # we're intentionally delaying this since 'make install' would
101 + # get confused if we shove 'units_cur' there, and there is no real
102 + # need to add more complexity for it
103 + if use units_cur; then
104 + sed \
105 + -e "/^outfile/s|'.*'|'/usr/share/units/currency.units'|g" \
106 + -e 's|^#!|&/usr/bin/python|g' \
107 + units_cur_inst > units_cur || die
108 + python_fix_shebang units_cur
109 + python_doscript units_cur
110 + fi
111 +}