NetBSD Problem Report #49508

From www@NetBSD.org  Sun Dec 28 15:02:41 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 03041A582D
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 28 Dec 2014 15:02:41 +0000 (UTC)
Message-Id: <20141228150239.3D62EA65BB@mollari.NetBSD.org>
Date: Sun, 28 Dec 2014 15:02:39 +0000 (UTC)
From: venture37@geeklan.co.uk
Reply-To: venture37@geeklan.co.uk
To: gnats-bugs@NetBSD.org
Subject: Unbreak lang/ruby193-base on Mac OS X Tiger
X-Send-Pr-Version: www-1.0

>Number:         49508
>Category:       pkg
>Synopsis:       Unbreak lang/ruby193-base on Mac OS X Tiger
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bsiegert
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 28 15:05:00 +0000 2014
>Closed-Date:    Sun Dec 28 15:56:23 +0000 2014
>Last-Modified:  Sun Dec 28 15:56:23 +0000 2014
>Originator:     Sevan Janiyan
>Release:        pkgsrc-current
>Organization:
>Environment:
Darwin 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc
>Description:
As noted in extconf.rb, on Mac OS X, ndbm.h does not include db.h, this causes various test to fail hence dbm modules is never built & as a result generates a packing error during bulk builds.
Ruby 1.8 is not impacted by this issue as extconf.rb is patched by default to include db.h.
Bring forward this patch to Ruby 1.9
This will apply to the newer versions of Ruby but I've not had a chance to test yet.
>How-To-Repeat:

>Fix:
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/lang/ruby193-base/distinfo,v
retrieving revision 1.38
diff -u -r1.38 distinfo
--- distinfo    15 Nov 2014 14:39:09 -0000      1.38
+++ distinfo    28 Dec 2014 14:49:06 -0000
@@ -6,6 +6,7 @@
 SHA1 (patch-configure) = 0ef7e10bbff37118c48053e7189f87528a3e408b
 SHA1 (patch-configure.in) = 09dfe819b6a9bd7c9af704eeaef659857d33d0c3
 SHA1 (patch-defs_default__gems) = fb24111736f1a76a05e853aa068024dbdd24e5a5
+SHA1 (patch-ext_dbm_extconf.rb) = ecabf28a020f83e0262f6794f30962ad03b09c0a
 SHA1 (patch-ext_dl_extconf.rb) = aed210606893d2b9c463d794df039f06003848e4
 SHA1 (patch-lib_rdoc_ri_driver.rb) = acb4cb022893eb8dea2adf7564f5e5e1a0f1e9c8
 SHA1 (patch-lib_rubygems.rb) = e472c981e544b75c3762385895c9a0197be9badd
Index: patches/patch-ext_dbm_extconf.rb
===================================================================
RCS file: patches/patch-ext_dbm_extconf.rb
diff -N patches/patch-ext_dbm_extconf.rb
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-ext_dbm_extconf.rb    28 Dec 2014 14:49:06 -0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ext/dbm/extconf.rb.orig    2014-12-28 14:04:40.000000000 +0000
++++ ext/dbm/extconf.rb
+@@ -247,7 +247,7 @@ def headers.db_check2(db, hdr)
+     have_library("gdbm") or return false
+   end
+ 
+-  if have_type("DBM", hdr, hsearch) and
++  if have_type("DBM", ["db.h", hdr], hsearch) and
+      (db == 'libc' ? have_func('dbm_open("", 0, 0)', hdr, hsearch) :
+                      have_library(db, 'dbm_open("", 0, 0)', hdr, hsearch)) and
+      have_func('dbm_clearerr((DBM *)0)', hdr, hsearch) and

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->bsiegert
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Sun, 28 Dec 2014 15:15:18 +0000
Responsible-Changed-Why:
This looks fine to apply during the freeze.


From: "Benny Siegert" <bsiegert@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49508 CVS commit: pkgsrc/lang/ruby193-base
Date: Sun, 28 Dec 2014 15:51:01 +0000

 Module Name:	pkgsrc
 Committed By:	bsiegert
 Date:		Sun Dec 28 15:51:01 UTC 2014

 Modified Files:
 	pkgsrc/lang/ruby193-base: distinfo
 Added Files:
 	pkgsrc/lang/ruby193-base/patches: patch-ext_dbm_extconf.rb

 Log Message:
 Fix build error on older Mac OS versions, where ndbm.h does not include db.h.
 Patch from Sevan Janiyan in PR pkg/49508.


 To generate a diff of this commit:
 cvs rdiff -u -r1.39 -r1.40 pkgsrc/lang/ruby193-base/distinfo
 cvs rdiff -u -r0 -r1.3 \
     pkgsrc/lang/ruby193-base/patches/patch-ext_dbm_extconf.rb

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Sun, 28 Dec 2014 15:56:23 +0000
State-Changed-Why:
Fix committed, thanks!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.