* [gentoo-commits] repo/gentoo:master commit in: dev-ruby/rrdtool-bindings/files/, dev-ruby/rrdtool-bindings/
@ 2025-03-01 1:14 Conrad Kostecki
0 siblings, 0 replies; only message in thread
From: Conrad Kostecki @ 2025-03-01 1:14 UTC (permalink / raw
To: gentoo-commits
commit: 1ddc26a9000679faf0a9d1d2bf18cec9dece1025
Author: Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Sat Feb 15 05:02:31 2025 +0000
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sat Mar 1 00:50:29 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ddc26a9
dev-ruby/rrdtool-bindings: allow alteast some testing with USE="-graph"
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/40579
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
...rrdtool-bindings-1.4.8-no-graph-ruby-test.patch | 45 +++++++++++++++++
.../rrdtool-bindings-1.9.0-r1.ebuild | 57 ++++++++++++++++++++++
2 files changed, 102 insertions(+)
diff --git a/dev-ruby/rrdtool-bindings/files/rrdtool-bindings-1.4.8-no-graph-ruby-test.patch b/dev-ruby/rrdtool-bindings/files/rrdtool-bindings-1.4.8-no-graph-ruby-test.patch
new file mode 100644
index 000000000000..e7e502b0934f
--- /dev/null
+++ b/dev-ruby/rrdtool-bindings/files/rrdtool-bindings-1.4.8-no-graph-ruby-test.patch
@@ -0,0 +1,45 @@
+--- a/bindings/ruby/test.rb
++++ b/bindings/ruby/test.rb
+@@ -31,42 +31,3 @@ puts "fetching data from #{rrd}"
+ (fstart, fend, data) = RRD.fetch(rrd, "--start", start_time.to_s, "--end", end_time.to_s, "AVERAGE")
+ puts "got #{data.length} data points from #{fstart} to #{fend}"
+ puts
+-
+-puts "generating graph #{name}.png"
+-RRD.graph(
+- "#{name}.png",
+- "--title", " RubyRRD Demo",
+- "--start", "#{start_time+3600}",
+- "--end", "start + 1000 min",
+- "--interlaced",
+- "--imgformat", "PNG",
+- "--width=450",
+- "DEF:a=#{rrd}:a:AVERAGE",
+- "DEF:b=#{rrd}:b:AVERAGE",
+- "CDEF:line=TIME,2400,%,300,LT,a,UNKN,IF",
+- "AREA:b#00b6e4:beta",
+- "AREA:line#0022e9:alpha",
+- "LINE3:line#ff0000")
+-puts
+-
+-# last method test
+-if end_time != RRD.last("#{rrd}").to_i
+- puts "last method expects #{Time.at(end_time)}."
+- puts " But #{RRD.last("#{rrd}")} returns."
+-end
+-puts
+-
+-# xport method test
+-puts "xporting data from #{rrd}"
+-(fstart,fend,step,col,legend,data)=RRD.xport(
+- "--start", start_time.to_s,
+- "--end", (start_time + 300 * 300).to_s,
+- "--step", 10.to_s,
+- "DEF:A=#{rrd}:a:AVERAGE",
+- "DEF:B=#{rrd}:b:AVERAGE",
+- "XPORT:A:a",
+- "XPORT:B:b")
+-puts "Xported #{col} columns(#{legend.join(", ")}) with #{data.length} rows from #{fstart} to #{fend} and step #{step}\n"
+-
+-print "This script has created #{name}.png in the current directory\n";
+-print "This demonstrates the use of the TIME and % RPN operators\n";
diff --git a/dev-ruby/rrdtool-bindings/rrdtool-bindings-1.9.0-r1.ebuild b/dev-ruby/rrdtool-bindings/rrdtool-bindings-1.9.0-r1.ebuild
new file mode 100644
index 000000000000..9d8f6d4b9754
--- /dev/null
+++ b/dev-ruby/rrdtool-bindings/rrdtool-bindings-1.9.0-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_P="${P/-bindings}"
+MY_P="${MY_P/_/-}"
+
+USE_RUBY="ruby31 ruby32 ruby33 ruby34"
+RUBY_FAKEGEM_TASK_DOC=""
+
+inherit ruby-ng
+
+DESCRIPTION="Ruby bindings for rrdtool"
+HOMEPAGE="https://oss.oetiker.ch/rrdtool/"
+SRC_URI="https://github.com/oetiker/${PN/-bindings}-1.x/releases/download/v${PV}/${MY_P}.tar.gz"
+RUBY_S="${MY_P}/bindings/ruby"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="graph test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ ~net-analyzer/rrdtool-${PV}
+"
+DEPEND="${RDEPEND}"
+
+all_ruby_prepare() {
+ eapply -p3 "${FILESDIR}"/${PN}-1.4.8-graph-ruby.patch
+ use !graph && eapply -p3 "${FILESDIR}"/${PN}-1.4.8-no-graph-ruby-test.patch
+}
+
+each_ruby_configure() {
+ rm ../../src/rrd_config.h || die
+ touch ../../src/rrd_config.h || die
+
+ ${RUBY} extconf.rb \
+ --with-cflags="${CFLAGS} $(usex graph -DHAVE_RRD_GRAPH -UHAVE_RRD_GRAPH)" || die
+}
+
+each_ruby_compile() {
+ emake V=1 ABS_TOP_SRCDIR="${PWD}/../.."
+}
+
+each_ruby_test() {
+ ${RUBY} -I. test.rb || die
+}
+
+all_ruby_install() {
+ dodoc CHANGES README
+}
+
+each_ruby_install() {
+ DESTDIR=${D} emake install
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-03-01 1:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-01 1:14 [gentoo-commits] repo/gentoo:master commit in: dev-ruby/rrdtool-bindings/files/, dev-ruby/rrdtool-bindings/ Conrad Kostecki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox