From e5e145c7e7e25293d26591f787b4103152b280f1 Mon Sep 17 00:00:00 2001 From: landry Date: Thu, 1 Jul 2010 15:49:24 +0000 Subject: [PATCH] Add a -ruby subpackage providing rrdruby (aka RRD.so ruby module), not the same interface as ruby-rrdtool. General mumbling of agreement from msf@ bernd@ sthen@ --- net/rrdtool/Makefile | 18 ++++++++++++------ .../patches/patch-bindings_ruby_extconf_rb | 12 ++++++++++++ net/rrdtool/pkg/DESCR-ruby | 1 + net/rrdtool/pkg/PLIST-ruby | 6 ++++++ 4 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 net/rrdtool/patches/patch-bindings_ruby_extconf_rb create mode 100644 net/rrdtool/pkg/DESCR-ruby create mode 100644 net/rrdtool/pkg/PLIST-ruby diff --git a/net/rrdtool/Makefile b/net/rrdtool/Makefile index 8bb095fff0c..2382bbddb47 100644 --- a/net/rrdtool/Makefile +++ b/net/rrdtool/Makefile @@ -1,16 +1,18 @@ -# $OpenBSD: Makefile,v 1.47 2009/06/08 10:00:37 sthen Exp $ +# $OpenBSD: Makefile,v 1.48 2010/07/01 15:49:24 landry Exp $ SHARED_ONLY= Yes COMMENT-main= system to store and display time-series data COMMENT-perl= perl interface to librrd -COMMENT-python= python interface to librrd +COMMENT-python= python interface to librrd +COMMENT-ruby= ruby interface to librrd VERSION= 1.2.30 DISTNAME= rrdtool-${VERSION} -PKGNAME-main= rrdtool-${VERSION} +PKGNAME-main= rrdtool-${VERSION}p0 PKGNAME-perl= p5-RRD-${VERSION} PKGNAME-python= py-rrd-${VERSION}p0 +PKGNAME-ruby= ruby-rrd-${VERSION} SHARED_LIBS+= rrd 3.0 SHARED_LIBS+= rrd_th 3.0 @@ -32,15 +34,15 @@ USE_GMAKE= Yes USE_X11= Yes USE_LIBTOOL= Yes -MULTI_PACKAGES= -main -perl -python +MULTI_PACKAGES= -main -perl -python -ruby -MODULES= lang/python +MODULES= lang/python lang/ruby CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \ --enable-perl-site-install \ --enable-python \ - --disable-ruby \ + --enable-ruby-site-install \ --disable-tcl CPPFLAGS+= -I${LOCALBASE}/include/libart-2.0 \ -I${LOCALBASE}/include/libpng \ @@ -62,4 +64,8 @@ LIB_DEPENDS-python= rrd:rrdtool-${VERSION}:net/rrdtool RUN_DEPENDS-python= ${MODPY_RUN_DEPENDS} MODPY_EGG_VERSION= 0.2.1 +LIB_DEPENDS-ruby= rrd:rrdtool-${VERSION}:net/rrdtool \ + ${MODRUBY_LIB_DEPENDS} +WANTLIB-ruby= c m + .include diff --git a/net/rrdtool/patches/patch-bindings_ruby_extconf_rb b/net/rrdtool/patches/patch-bindings_ruby_extconf_rb new file mode 100644 index 00000000000..d0b66a087e9 --- /dev/null +++ b/net/rrdtool/patches/patch-bindings_ruby_extconf_rb @@ -0,0 +1,12 @@ +$OpenBSD: patch-bindings_ruby_extconf_rb,v 1.1 2010/07/01 15:49:24 landry Exp $ +doesnt find the lib it just created for whatever reason... +--- bindings/ruby/extconf.rb.orig Mon Jun 21 14:39:16 2010 ++++ bindings/ruby/extconf.rb Mon Jun 21 14:39:31 2010 +@@ -13,6 +13,5 @@ elsif /aix/ =~ RUBY_PLATFORM + $LDFLAGS += '-Wl,-blibpath:$(EPREFIX)/lib' + end + +-dir_config("rrd","../../src","../../src/.libs") +-have_library("rrd", "rrd_create") ++$LDFLAGS+= ' -lrrd' + create_makefile("RRD") diff --git a/net/rrdtool/pkg/DESCR-ruby b/net/rrdtool/pkg/DESCR-ruby new file mode 100644 index 00000000000..e64db4d7587 --- /dev/null +++ b/net/rrdtool/pkg/DESCR-ruby @@ -0,0 +1 @@ +ruby binding for librrd diff --git a/net/rrdtool/pkg/PLIST-ruby b/net/rrdtool/pkg/PLIST-ruby new file mode 100644 index 00000000000..71cd588665c --- /dev/null +++ b/net/rrdtool/pkg/PLIST-ruby @@ -0,0 +1,6 @@ +@comment $OpenBSD: PLIST-ruby,v 1.1 2010/07/01 15:49:24 landry Exp $ +lib/ruby/ +lib/ruby/site_ruby/ +lib/ruby/site_ruby/${MODRUBY_REV}/ +lib/ruby/site_ruby/${MODRUBY_REV}/${MODRUBY_ARCH} +lib/ruby/site_ruby/${MODRUBY_REV}/${MODRUBY_ARCH}/RRD.so