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