Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/rrdtool/
Date: Wed, 01 Jul 2020 16:55:01
Message-Id: 1593622493.dcdcf047aa40fe23f63cb59acc67c538bb4850a7.jer@gentoo
1 commit: dcdcf047aa40fe23f63cb59acc67c538bb4850a7
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 1 16:54:27 2020 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 1 16:54:53 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dcdcf047
7
8 net-analyzer/rrdtool: Drop USE=deprecated requirement on dev-lang/lua
9
10 Package-Manager: Portage-2.3.103, Repoman-2.3.23
11 Closes: https://bugs.gentoo.org/730368
12 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
13
14 net-analyzer/rrdtool/rrdtool-1.7.2-r1.ebuild | 186 +++++++++++++++++++++++++++
15 1 file changed, 186 insertions(+)
16
17 diff --git a/net-analyzer/rrdtool/rrdtool-1.7.2-r1.ebuild b/net-analyzer/rrdtool/rrdtool-1.7.2-r1.ebuild
18 new file mode 100644
19 index 00000000000..18ef0863e7e
20 --- /dev/null
21 +++ b/net-analyzer/rrdtool/rrdtool-1.7.2-r1.ebuild
22 @@ -0,0 +1,186 @@
23 +# Copyright 1999-2020 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=6
27 +DISTUTILS_OPTIONAL=true
28 +DISTUTILS_SINGLE_IMPL=true
29 +GENTOO_DEPEND_ON_PERL=no
30 +PYTHON_COMPAT=( python3_{6,7,8} )
31 +inherit autotools perl-module distutils-r1 flag-o-matic multilib
32 +
33 +MY_P=${P/_/-}
34 +
35 +DESCRIPTION="A system to store and display time-series data"
36 +HOMEPAGE="https://oss.oetiker.ch/rrdtool/"
37 +SRC_URI="https://oss.oetiker.ch/rrdtool/pub/${MY_P}.tar.gz"
38 +
39 +LICENSE="GPL-2"
40 +SLOT="0/8.0.0"
41 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
42 +IUSE="dbi doc graph lua perl python rados rrdcgi ruby static-libs tcl tcpd"
43 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
44 +
45 +CDEPEND="
46 + >=dev-libs/glib-2.28.7:2[static-libs(+)?]
47 + >=dev-libs/libxml2-2.7.8:2[static-libs(+)?]
48 + dbi? ( dev-db/libdbi[static-libs(+)?] )
49 + graph? (
50 + >=media-libs/libpng-1.5.10:0=[static-libs(+)?]
51 + >=x11-libs/cairo-1.10.2[svg,static-libs(+)?]
52 + >=x11-libs/pango-1.28
53 + )
54 + lua? ( dev-lang/lua:* )
55 + perl? ( dev-lang/perl:= )
56 + python? ( ${PYTHON_DEPS} )
57 + rados? ( sys-cluster/ceph )
58 + tcl? ( dev-lang/tcl:0= )
59 + tcpd? ( sys-apps/tcp-wrappers )
60 +"
61 +
62 +DEPEND="
63 + ${CDEPEND}
64 + sys-apps/groff
65 + virtual/pkgconfig
66 + virtual/awk
67 +"
68 +RDEPEND="
69 + ${CDEPEND}
70 +"
71 +PDEPEND="
72 + ruby? ( ~dev-ruby/rrdtool-bindings-${PV} )
73 +"
74 +PATCHES=(
75 + "${FILESDIR}"/${PN}-1.4.9-disable-rrd_graph-perl.patch
76 + "${FILESDIR}"/${PN}-1.7.0-disable-rrd_graph-cgi.patch
77 + "${FILESDIR}"/${PN}-1.7.1-configure.ac.patch
78 +)
79 +S=${WORKDIR}/${MY_P}
80 +
81 +python_compile() {
82 + cd bindings/python || die
83 + distutils-r1_python_compile
84 +}
85 +
86 +python_install() {
87 + cd bindings/python || die
88 + distutils-r1_python_install
89 +}
90 +
91 +pkg_setup() {
92 + use python && python-single-r1_pkg_setup
93 +}
94 +
95 +src_prepare() {
96 + default
97 + # At the next version bump, please see if you actually still need this
98 + # before adding versions
99 + if ! [ -f doc/rrdrados.pod ]; then
100 + cp "${FILESDIR}"/${PN}-1.5.5-rrdrados.pod doc/rrdrados.pod
101 + else
102 + die "File already exists: doc/rrdrados.pod. Remove this code!"
103 + fi
104 +
105 + # bug 456810
106 + # no time to sleep
107 + sed -i \
108 + -e 's|$LUA_CFLAGS|IGNORE_THIS_BAD_TEST|g' \
109 + -e 's|^sleep 1$||g' \
110 + -e '/^dnl.*png/s|^dnl||g' \
111 + configure.ac || die
112 +
113 + # Python bindings are built/installed manually
114 + sed -i \
115 + -e '/^all-local:/s| @COMP_PYTHON@||' \
116 + bindings/Makefile.am || die
117 +
118 + if ! use graph; then
119 + sed -i \
120 + -e '2s:rpn1::; 2s:rpn2::; 6s:create-with-source-4::;' \
121 + -e '7s:xport1::; 7s:dcounter1::; 7s:vformatter1::' \
122 + tests/Makefile.am || die
123 + fi
124 +
125 + eautoreconf
126 +}
127 +
128 +src_configure() {
129 + export rd_cv_gcc_flag__Werror=no
130 + export rd_cv_ms_async=ok
131 +
132 + filter-flags -ffast-math
133 +
134 + export RRDDOCDIR=${EPREFIX}/usr/share/doc/${PF}
135 +
136 + # to solve bug #260380
137 + [[ ${CHOST} == *-solaris* ]] && append-flags -D__EXTENSIONS__
138 +
139 + # Stub configure.ac
140 + local myconf=()
141 + if ! use tcpd; then
142 + myconf+=( "--disable-libwrap" )
143 + fi
144 + if ! use dbi; then
145 + myconf+=( "--disable-libdbi" )
146 + fi
147 + if ! use rados; then
148 + myconf+=( "--disable-librados" )
149 + fi
150 +
151 + econf \
152 + $(use_enable graph rrd_graph) \
153 + $(use_enable lua lua-site-install) \
154 + $(use_enable lua) \
155 + $(use_enable perl perl-site-install) \
156 + $(use_enable perl) \
157 + $(use_enable python) \
158 + $(use_enable rrdcgi) \
159 + $(use_enable static-libs static) \
160 + $(use_enable tcl) \
161 + $(use_with tcl tcllib "${EPREFIX}"/usr/$(get_libdir)) \
162 + --with-perl-options=INSTALLDIRS=vendor \
163 + --disable-ruby-site-install \
164 + --disable-ruby \
165 + ${myconf[@]}
166 +}
167 +
168 +src_compile() {
169 + default
170 +
171 + use python && distutils-r1_src_compile
172 +}
173 +
174 +src_test() {
175 + export LC_ALL=C
176 + default
177 +}
178 +
179 +src_install() {
180 + default
181 +
182 + if ! use doc ; then
183 + rm -rf "${ED}"usr/share/doc/${PF}/{html,txt}
184 + fi
185 +
186 + if use !rrdcgi ; then
187 + # uses rrdcgi, causes invalid shebang error in Prefix, useless
188 + # without rrdcgi installed
189 + rm -f "${ED}"usr/share/${PN}/examples/cgi-demo.cgi
190 + fi
191 +
192 + if use perl ; then
193 + perl_delete_localpod
194 + perl_delete_packlist
195 + fi
196 +
197 + dodoc CHANGES CONTRIBUTORS NEWS THREADS TODO
198 +
199 + find "${ED}"usr -name '*.la' -exec rm -f {} +
200 +
201 + keepdir /var/lib/rrdcached/journal/
202 + keepdir /var/lib/rrdcached/db/
203 +
204 + newconfd "${FILESDIR}"/rrdcached.confd rrdcached
205 + newinitd "${FILESDIR}"/rrdcached.init rrdcached
206 +
207 + use python && distutils-r1_src_install
208 +}