summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatsuu Takuto <matsuu@gentoo.org>2010-05-28 15:58:43 +0000
committerMatsuu Takuto <matsuu@gentoo.org>2010-05-28 15:58:43 +0000
commit9bc41e02ed34e07931f51f14692a950a02d14b20 (patch)
tree4ea9244d20a0429bb680f1bd121ae3bdb8e4ec9c /dev-ruby
parentversion bump - fix python deprecation stuff (#314061) (diff)
downloadgentoo-2-9bc41e02ed34e07931f51f14692a950a02d14b20.tar.gz
gentoo-2-9bc41e02ed34e07931f51f14692a950a02d14b20.tar.bz2
gentoo-2-9bc41e02ed34e07931f51f14692a950a02d14b20.zip
Convert to ruby-ng.
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby')
-rw-r--r--dev-ruby/ruby-tcpwrap/ChangeLog10
-rw-r--r--dev-ruby/ruby-tcpwrap/files/ruby-tcpwrap-0.6-ruby19.patch83
-rw-r--r--dev-ruby/ruby-tcpwrap/ruby-tcpwrap-0.6-r1.ebuild52
3 files changed, 143 insertions, 2 deletions
diff --git a/dev-ruby/ruby-tcpwrap/ChangeLog b/dev-ruby/ruby-tcpwrap/ChangeLog
index e6b5afeb0340..256abda1b2ac 100644
--- a/dev-ruby/ruby-tcpwrap/ChangeLog
+++ b/dev-ruby/ruby-tcpwrap/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-ruby/ruby-tcpwrap
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-tcpwrap/ChangeLog,v 1.15 2009/12/24 17:22:02 graaff Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-tcpwrap/ChangeLog,v 1.16 2010/05/28 15:58:42 matsuu Exp $
+
+*ruby-tcpwrap-0.6-r1 (27 May 2010)
+
+ 27 May 2010; MATSUU Takuto <matsuu@gentoo.org>
+ +ruby-tcpwrap-0.6-r1.ebuild, +files/ruby-tcpwrap-0.6-ruby19.patch:
+ Convert to ruby-ng.
24 Dec 2009; Hans de Graaff <graaff@gentoo.org> ruby-tcpwrap-0.6.ebuild:
Remove obsolete virtual/ruby dependency.
diff --git a/dev-ruby/ruby-tcpwrap/files/ruby-tcpwrap-0.6-ruby19.patch b/dev-ruby/ruby-tcpwrap/files/ruby-tcpwrap-0.6-ruby19.patch
new file mode 100644
index 000000000000..3f30d592a22c
--- /dev/null
+++ b/dev-ruby/ruby-tcpwrap/files/ruby-tcpwrap-0.6-ruby19.patch
@@ -0,0 +1,83 @@
+diff -Naur ruby-tcpwrap.orig//tcpwrap.c ruby-tcpwrap//tcpwrap.c
+--- ruby-tcpwrap.orig//tcpwrap.c 2003-08-20 12:30:10.000000000 +0900
++++ ruby-tcpwrap//tcpwrap.c 2010-05-28 08:08:49.000000000 +0900
+@@ -25,7 +25,11 @@
+ */
+
+ #include "ruby.h"
++#ifdef HAVE_RUBY_IO_H
++#include "ruby/io.h"
++#else
+ #include "rubyio.h"
++#endif
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+@@ -46,6 +50,10 @@
+
+ #define DEFAULT_RFC1413_QUERY_TIMEOUT 30
+
++#ifndef RSTRING_PTR
++#define RSTRING_PTR(str) RSTRING(str)->ptr
++#endif
++
+ int allow_severity = 0;
+ int deny_severity = 0;
+
+@@ -101,7 +109,7 @@
+ tcp_wrapper_t *tcpd;
+ VALUE sock;
+ int sockfd;
+- OpenFile *fptr;
++ rb_io_t *fptr;
+ struct sockaddr_storage addr;
+ char client_name[NI_MAXHOST] = STRING_UNKNOWN;
+ char client_addr[NI_MAXHOST] = STRING_UNKNOWN;
+@@ -113,7 +121,11 @@
+ again:
+ sock = rb_funcall(tcpd->server, rb_intern("accept"), 0);
+ GetOpenFile(sock, fptr);
++#ifdef HAVE_RUBY_IO_H
++ sockfd = fileno(fptr->fd);
++#else
+ sockfd = fileno(fptr->f);
++#endif
+ if (getpeername(sockfd, (struct sockaddr*) &addr, &len) < 0)
+ rb_sys_fail("getpeername(2)");
+ error = getnameinfo((struct sockaddr*) &addr, len,
+@@ -132,7 +144,7 @@
+ if (tcpd->ident_lookup)
+ client_user = ident_id(sockfd, tcpd->ident_timeout);
+ #endif
+- if (!hosts_ctl(RSTRING(tcpd->daemon)->ptr,
++ if (!hosts_ctl(RSTRING_PTR(tcpd->daemon),
+ client_name,
+ client_addr,
+ (client_user == NULL) ? STRING_UNKNOWN : client_user)) {
+@@ -157,7 +169,7 @@
+ static char hosts_allow[MAXPATHLEN];
+
+ Check_SafeStr(s);
+- snprintf(hosts_allow, sizeof(hosts_allow), "%s", RSTRING(s)->ptr);
++ snprintf(hosts_allow, sizeof(hosts_allow), "%s", RSTRING_PTR(s));
+ if(access(hosts_allow, R_OK) < 0)
+ rb_warning("cannot read %s", hosts_allow);
+ hosts_allow_table = hosts_allow;
+@@ -177,7 +189,7 @@
+ static char hosts_deny[MAXPATHLEN];
+
+ Check_SafeStr(s);
+- snprintf(hosts_deny, sizeof(hosts_deny), "%s", RSTRING(s)->ptr);
++ snprintf(hosts_deny, sizeof(hosts_deny), "%s", RSTRING_PTR(s));
+ if(access(hosts_deny, R_OK) < 0)
+ rb_warning("cannot read %s", hosts_deny);
+ hosts_deny_table = hosts_deny;
+@@ -196,7 +208,7 @@
+ {
+ if(NIL_P(s)) return STRING_UNKNOWN;
+ Check_Type(s, T_STRING);
+- return RSTRING(s)->ptr;
++ return RSTRING_PTR(s);
+ }
+
+ static VALUE
diff --git a/dev-ruby/ruby-tcpwrap/ruby-tcpwrap-0.6-r1.ebuild b/dev-ruby/ruby-tcpwrap/ruby-tcpwrap-0.6-r1.ebuild
new file mode 100644
index 000000000000..94be847a131c
--- /dev/null
+++ b/dev-ruby/ruby-tcpwrap/ruby-tcpwrap-0.6-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-tcpwrap/ruby-tcpwrap-0.6-r1.ebuild,v 1.1 2010/05/28 15:58:42 matsuu Exp $
+
+EAPI="2"
+USE_RUBY="ruby18 ruby19 ree18"
+
+inherit ruby-ng
+
+DESCRIPTION="A TCP wrappers library for Ruby"
+HOMEPAGE="http://raa.ruby-lang.org/list.rhtml?name=ruby-tcpwrap"
+SRC_URI="http://shugo.net/archive/ruby-tcpwrap/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND="net-libs/libident
+ sys-apps/tcp-wrappers"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+RUBY_PATCHES=( "${P}-ruby19.patch" )
+
+each_ruby_configure() {
+ ${RUBY} extconf.rb || die "extconf.rb failed"
+}
+
+each_ruby_compile() {
+ # We have injected --no-undefined in Ruby as a safety precaution
+ # against broken ebuilds, but the Ruby-Gnome bindings
+ # unfortunately rely on the lazy load of other extensions; see bug
+ # #320545.
+ find . -name Makefile -print0 | xargs -0 \
+ sed -i -e 's:-Wl,--no-undefined ::' || die "--no-undefined removal failed"
+
+ emake || die "emake failed"
+}
+
+each_ruby_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+}
+
+all_ruby_install() {
+ dodoc README* || die
+ dohtml doc/* || die
+
+ docinto sample
+ dodoc sample/* || die
+}