From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Sep 2 19:30:12 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EE0E1065689 for ; Fri, 2 Sep 2011 19:30:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5C0C48FC14 for ; Fri, 2 Sep 2011 19:30:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p82JUCP1028434 for ; Fri, 2 Sep 2011 19:30:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p82JUCTC028432; Fri, 2 Sep 2011 19:30:12 GMT (envelope-from gnats) Resent-Date: Fri, 2 Sep 2011 19:30:12 GMT Resent-Message-Id: <201109021930.p82JUCTC028432@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Mikhail T." Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8498106566C for ; Fri, 2 Sep 2011 19:21:27 +0000 (UTC) (envelope-from mi@aldan.algebra.com) Received: from smtp02.lnh.mail.rcn.net (smtp02.lnh.mail.rcn.net [207.172.157.102]) by mx1.freebsd.org (Postfix) with ESMTP id 5F1168FC08 for ; Fri, 2 Sep 2011 19:21:27 +0000 (UTC) Received: from mr16.lnh.mail.rcn.net ([207.172.157.36]) by smtp02.lnh.mail.rcn.net with ESMTP; 02 Sep 2011 15:21:27 -0400 Received: from smtp01.lnh.mail.rcn.net (smtp01.lnh.mail.rcn.net [207.172.4.11]) by mr16.lnh.mail.rcn.net (MOS 4.2.3-GA) with ESMTP id BGW30228; Fri, 2 Sep 2011 15:21:26 -0400 Received: from 209-6-61-133.c3-0.sbo-ubr1.sbo.ma.cable.rcn.com (HELO narawntapu.narawntapu) ([209.6.61.133]) by smtp01.lnh.mail.rcn.net with ESMTP; 02 Sep 2011 15:21:26 -0400 Received: from narawntapu.narawntapu (localhost [127.0.0.1]) by narawntapu.narawntapu (8.14.4/8.14.4) with ESMTP id p82JKaZE028371 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Sep 2011 15:20:36 -0400 (EDT) (envelope-from mi@narawntapu.narawntapu) Received: (from mi@localhost) by narawntapu.narawntapu (8.14.4/8.14.4/Submit) id p82JKaLq028370; Fri, 2 Sep 2011 15:20:36 -0400 (EDT) (envelope-from mi) Message-Id: <201109021920.p82JKaLq028370@narawntapu.narawntapu> Date: Fri, 2 Sep 2011 15:20:36 -0400 (EDT) From: "Mikhail T." To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: portmgr@FreeBSD.org Subject: ports/160404: Unbreaking databases/ruby-bdb1 for Ruby-1.9 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2011 19:30:12 -0000 >Number: 160404 >Category: ports >Synopsis: Unbreaking databases/ruby-bdb1 for Ruby-1.9 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Sep 02 19:30:11 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Mikhail T. >Release: FreeBSD 8.2-STABLE amd64 >Organization: Virtual Estates, Inc. http://sybpipe.com/ >Environment: System: FreeBSD narawntapu 8.2-STABLE FreeBSD 8.2-STABLE #0: Sun Jun 12 22:48:33 EDT 2011 root@narawntapu:/usr/obj/home/src/sys/POWEREDGE2900 amd64 >Description: The below patches allow ruby-bdb1 to compile against Ruby-1.9. They also add the "regression-test" target to the port's Makefile. (When the RUBY_VER is 1.8, the test-target is automatically triggered after build.) Although some of the regression tests still fail under Ruby-1.9, the binary is now "good enough" for portupgrade to work (an upgrade is running here as I type this.) Thus, ruby-bdb1 will not be any worse, than ruby-bdb, which, currently, also has numerous problems with Ruby-1.9, see: http://www.freebsd.org/cgi/query-pr.cgi?pr=160402 >How-To-Repeat: >Fix: Index: Makefile =================================================================== RCS file: /home/pcvs/ports/databases/ruby-bdb1/Makefile,v retrieving revision 1.21 diff -U 2 -r1.21 Makefile --- Makefile 4 Jul 2011 17:46:08 -0000 1.21 +++ Makefile 2 Sep 2011 19:14:27 -0000 @@ -32,4 +32,7 @@ docs/doc +test regression-test check: + ${MAKE} -C ${WRKSRC} test + post-build: .if !defined(NOPORTDOCS) @@ -49,5 +52,13 @@ .include .if ${RUBY_VER} == 1.9 -BROKEN= does not build with ruby 1.9 +pre-everything:: + ######################################################## + # Although it is now possible to compile ${PORTNAME} + # against Ruby-${RUBY_VER}, the resulting binary is not + # fully functional due to changes in Ruby API. + # Use of Ruby-1.8 is recommended for full compatibility. + ######################################################## +.elif ${RUBY_VER} == 1.8 +post-build: test .endif .include Index: files/patch-delegate =================================================================== RCS file: files/patch-delegate diff -N files/patch-delegate --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-delegate 2 Sep 2011 19:14:27 -0000 @@ -0,0 +1,10 @@ +--- src/delegate.c 2006-09-19 13:06:40.000000000 -0400 ++++ src/delegate.c 2011-09-02 13:28:23.000000000 -0400 +@@ -171,5 +171,6 @@ + ary = rb_class_instance_methods(1, &tmp, rb_mKernel); + for (i = 0; i < RARRAY_LEN(ary); i++) { +- method = StringValuePtr(RARRAY_PTR(ary)[i]); ++ tmp = rb_obj_as_string(RARRAY_PTR(ary)[i]); ++ method = StringValuePtr(tmp); + if (!strcmp(method, "==") || + !strcmp(method, "===") || !strcmp(method, "=~")) continue; Index: files/patch-super =================================================================== RCS file: files/patch-super diff -N files/patch-super --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-super 2 Sep 2011 19:14:27 -0000 @@ -0,0 +1,16 @@ +The RCLASS_SUPER define is present in both Ruby 1.8 and 1.9. + +Direct access to "super" no longer works in 1.9 (the field is +not there), but the define continues to work properly. + + -mi + +--- src/bdb1.c 2006-09-20 12:41:01.000000000 -0400 ++++ src/bdb1.c 2011-09-02 12:27:34.000000000 -0400 +@@ -692,5 +692,5 @@ + break; + } +- cl = RCLASS(cl)->super; ++ cl = RCLASS_SUPER(cl); + } + if (!cl) { >Release-Note: >Audit-Trail: >Unformatted: