From nobody@FreeBSD.org  Tue Apr 19 21:42:15 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E17E1106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 19 Apr 2011 21:42:15 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id D12778FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 19 Apr 2011 21:42:15 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p3JLgFEq025040
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 19 Apr 2011 21:42:15 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p3JLgFJa025039;
	Tue, 19 Apr 2011 21:42:15 GMT
	(envelope-from nobody)
Message-Id: <201104192142.p3JLgFJa025039@red.freebsd.org>
Date: Tue, 19 Apr 2011 21:42:15 GMT
From: Eric Freeman <freebsdports@chillibear.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] databases/ruby-cdb (patch to enable compiling with RUBY_VER 1.9)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         156507
>Category:       ports
>Synopsis:       [PATCH] databases/ruby-cdb (patch to enable compiling with RUBY_VER 1.9)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    swills
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 19 21:50:07 UTC 2011
>Closed-Date:    Tue May 03 03:05:24 UTC 2011
>Last-Modified:  Tue May 03 03:05:24 UTC 2011
>Originator:     Eric Freeman
>Release:        8.2
>Organization:
>Environment:
FreeBSD BSD8R.local 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Currently databases/ruby-cdb does not compile when using Ruby 1.9

This patch allows it to work when RUBY_VER is 1.9
>How-To-Repeat:
install ruby 1.9

cd /usr/ports/databases/ruby-cdb && make build RUBY_VER=1.9

fails
>Fix:
diff -ru ruby-cdb.orig/Makefile ruby-cdb/Makefile
--- ruby-cdb.orig/Makefile	2011-04-18 19:50:24.000000000 +0100
+++ ruby-cdb/Makefile	2011-04-18 19:51:18.000000000 +0100
@@ -28,6 +28,12 @@
 
 .include <bsd.port.pre.mk>
 
+post-patch:
+	${REINPLACE_CMD} -E \
+		-e 's|RSTRING\(([^)]+)\)->len|RSTRING_LEN(\1)|g' \
+		-e 's|RSTRING\(([^)]+)\)->ptr|RSTRING_PTR(\1)|g' \
+		${WRKSRC}/cdb.c
+
 post-extract:
 	${RM} -f ${WRKSRC}/cdb
 	${LN} -s `cd ${CDB_PORTDIR}; ${MAKE} -V WRKSRC` ${WRKSRC}/cdb

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->stas 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Apr 19 21:50:17 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=156507 
Responsible-Changed-From-To: stas->swills 
Responsible-Changed-By: swills 
Responsible-Changed-When: Tue May 3 02:56:42 UTC 2011 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=156507 
State-Changed-From-To: open->closed 
State-Changed-By: swills 
State-Changed-When: Tue May 3 03:05:21 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=156507 
>Unformatted:
