From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 80F741582EF for ; Sat, 01 Mar 2025 01:14:46 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 663003430C2 for ; Sat, 01 Mar 2025 01:14:46 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 308E11102D2; Sat, 01 Mar 2025 01:14:41 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 26AEE1102D2 for ; Sat, 01 Mar 2025 01:14:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C85773430AA for ; Sat, 01 Mar 2025 01:14:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 31B612779 for ; Sat, 01 Mar 2025 01:14:39 +0000 (UTC) From: "Conrad Kostecki" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Conrad Kostecki" Message-ID: <1740790229.1ddc26a9000679faf0a9d1d2bf18cec9dece1025.conikost@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/rrdtool-bindings/files/, dev-ruby/rrdtool-bindings/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-ruby/rrdtool-bindings/files/rrdtool-bindings-1.4.8-no-graph-ruby-test.patch dev-ruby/rrdtool-bindings/rrdtool-bindings-1.9.0-r1.ebuild X-VCS-Directories: dev-ruby/rrdtool-bindings/ dev-ruby/rrdtool-bindings/files/ X-VCS-Committer: conikost X-VCS-Committer-Name: Conrad Kostecki X-VCS-Revision: 1ddc26a9000679faf0a9d1d2bf18cec9dece1025 X-VCS-Branch: master Date: Sat, 01 Mar 2025 01:14:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4905465b-ce09-40ab-8094-9af97d90d3d1 X-Archives-Hash: ac6a96e3bcb8aca83c844b1aee03ea5e commit: 1ddc26a9000679faf0a9d1d2bf18cec9dece1025 Author: Alfred Wingate protonmail com> AuthorDate: Sat Feb 15 05:02:31 2025 +0000 Commit: Conrad Kostecki gentoo 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 protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/40579 Signed-off-by: Conrad Kostecki 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 +}