From sunpoet@sunpoet.net  Sun Mar 24 15:17:32 2013
Return-Path: <sunpoet@sunpoet.net>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id 32478639;
	Sun, 24 Mar 2013 15:17:32 +0000 (UTC)
	(envelope-from sunpoet@sunpoet.net)
Received: from sunpoet.net (sunpoet-1-pt.tunnel.tserv29.fmt1.ipv6.he.net [IPv6:2001:470:66:3a7::2])
	by mx1.freebsd.org (Postfix) with ESMTP id C3DAAF41;
	Sun, 24 Mar 2013 15:17:31 +0000 (UTC)
Received: by sunpoet.net (Postfix, from userid 1000)
	id 99250DB; Sun, 24 Mar 2013 23:17:43 +0800 (CST)
Message-Id: <20130324151743.99250DB@sunpoet.net>
Date: Sun, 24 Mar 2013 23:17:43 +0800 (CST)
From: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: knu@FreeBSD.org
Subject: [PATCH] databases/ruby-bdb: fix build with Ruby 2.0
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         177342
>Category:       ports
>Synopsis:       [PATCH] databases/ruby-bdb: fix build with Ruby 2.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    knu
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 24 15:20:00 UTC 2013
>Closed-Date:    Tue Apr 23 19:08:45 JST 2013
>Last-Modified:  Tue Apr 23 10:10:02 UTC 2013
>Originator:     Sunpoet Po-Chuan Hsieh
>Release:        FreeBSD 9.1-STABLE amd64
>Organization:
The FreeBSD Project
>Environment:
System: FreeBSD bonjour.sunpoet.net 9.1-STABLE FreeBSD 9.1-STABLE #0 r247564: Sat Mar  2 08:05:30
>Description:
- Fix build with Ruby 2.0
- Update COMMENT
- Convert to new options framework
- Minor Makefile cleanup
- Pet portlint

Port maintainer (knu@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99_7 (mode: change, diff: SVN)
>How-To-Repeat:
>Fix:

--- ruby20-bdb5-0.6.6.patch begins here ---
Index: Makefile
===================================================================
--- Makefile	(revision 315028)
+++ Makefile	(working copy)
@@ -1,24 +1,21 @@
-# New ports collection makefile for:	Ruby-BDB
-# Date created:		8 March 2001
-# Whom:			Akinori MUSHA aka knu <knu@idaemons.org>
-#
+# Created by: Akinori MUSHA aka knu <knu@idaemons.org>
 # $FreeBSD$
-#
 
 PORTNAME=	bdb
 PORTVERSION=	0.6.6
 CATEGORIES=	databases ruby
 MASTER_SITES=	ftp://ftp.idaemons.org/pub/distfiles/ruby/ \
 		http://idaemons.org/distfiles/ruby/ \
-		${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR=	knu
+		LOCAL/knu
 PKGNAMEPREFIX=	${RUBY_PKGNAMEPREFIX}
 PKGNAMESUFFIX=	${WITH_BDB_VER}
 DIST_SUBDIR=	ruby
 
 MAINTAINER=	knu@FreeBSD.org
-COMMENT=	Ruby interface to Sleepycat's Berkeley DB revision 2 or later
+COMMENT=	Ruby interface to Oracle Berkeley DB revision 2 or later
 
+OPTIONS_DEFINE=	DOCS EXAMPLES
+
 USE_BDB=	yes
 USE_BZIP2=	yes
 
@@ -32,44 +29,40 @@
 		--with-db-lib=${BDB_LIB_DIR}
 INSTALL_TARGET=	site-install
 
-DOCS=	Changes \
-	README.en \
-	bdb.rd \
-	docs/*.rd
+DOCS=		Changes README.en bdb.rd docs/*.rd
+DOCSDIR=	${RUBY_MODDOCDIR}
+EXAMPLESDIR=	${RUBY_MODEXAMPLESDIR}
+PLIST_FILES=	%%RUBY_SITEARCHLIBDIR%%/bdb.so
+PORTDOCS=	*
+PORTEXAMPLES=	*
 
 .include <bsd.port.pre.mk>
 
-PLIST_FILES=	%%RUBY_SITEARCHLIBDIR%%/bdb.so
-
-.if !defined(NOPORTDOCS)
-DOCSDIR=	${RUBY_MODDOCDIR}
-PORTDOCS=	*
+post-patch:
+.if ${RUBY_VER} == 2.0
+	@${REINPLACE_CMD} -e '/remove_const/d' ${WRKSRC}/src/features.rb
 .endif
-.if !defined(NOPORTEXAMPLES)
-EXAMPLESDIR=	${RUBY_MODEXAMPLESDIR}
-PORTEXAMPLES=	*
-.endif
 
 post-build:
-.if !defined(NOPORTDOCS)
-	( cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} \
-	${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} rdoc )
+.if ${PORT_OPTIONS:MDOCS}
+	(cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} \
+	${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} rdoc)
 .endif
 
 post-install:
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	${MKDIR} ${DOCSDIR}/doc
-	(cd ${WRKSRC} && ${INSTALL_MAN} ${DOCS} ${DOCSDIR})
-	(cd ${WRKSRC}/docs/doc && ${COPYTREE_SHARE} \* ${DOCSDIR}/doc)
+	(cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR})
+	(cd ${WRKSRC}/docs/doc && ${COPYTREE_SHARE} . ${DOCSDIR}/doc)
 .endif
-.if !defined(NOPORTEXAMPLES)
+.if ${PORT_OPTIONS:MEXAMPLES}
 	${MKDIR} ${EXAMPLESDIR}/
-	(cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${EXAMPLESDIR} "! -empty")
+	(cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${EXAMPLESDIR} "! -empty")
 .endif
 
-regression-test:
+regression-test: build
 	@${MKDIR} ${BUILD_WRKSRC}/tmp
-	( cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} \
-	${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test )
+	(cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} \
+	${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test)
 
 .include <bsd.port.post.mk>
Index: pkg-descr
===================================================================
--- pkg-descr	(revision 315028)
+++ pkg-descr	(working copy)
@@ -2,5 +2,4 @@
 later.  DB >= 2 is required. (some functionalities like join are not
 available with DB < 2.6)
 
-Author:	Guy Decoux <ts@moulon.inra.fr>
-WWW:	http://moulon.inra.fr/ruby/bdb.html
+WWW: http://moulon.inra.fr/ruby/bdb.html
--- ruby20-bdb5-0.6.6.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->knu 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Mar 24 15:20:08 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=177342 
State-Changed-From-To: open->closed 
State-Changed-By: knu 
State-Changed-When: Tue Apr 23 19:08:26 JST 2013 
State-Changed-Why:  
Committed, thanks so much! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=177342 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/177342: commit references a PR
Date: Tue, 23 Apr 2013 10:08:17 +0000 (UTC)

 Author: knu
 Date: Tue Apr 23 10:08:09 2013
 New Revision: 316332
 URL: http://svnweb.freebsd.org/changeset/ports/316332
 
 Log:
   Correct the credit as follows, and bump PORTREVISION for the previous change.
   
   PR:		ports/177342
   Submitted by:	Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
 
 Modified:
   head/databases/ruby-bdb/Makefile
 
 Modified: head/databases/ruby-bdb/Makefile
 ==============================================================================
 --- head/databases/ruby-bdb/Makefile	Tue Apr 23 10:07:55 2013	(r316331)
 +++ head/databases/ruby-bdb/Makefile	Tue Apr 23 10:08:09 2013	(r316332)
 @@ -3,6 +3,7 @@
  
  PORTNAME=	bdb
  PORTVERSION=	0.6.6
 +PORTREVISION=	1
  CATEGORIES=	databases ruby
  MASTER_SITES=	ftp://ftp.idaemons.org/pub/distfiles/ruby/ \
  		http://idaemons.org/distfiles/ruby/ \
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/177342: commit references a PR
Date: Tue, 23 Apr 2013 10:04:52 +0000 (UTC)

 Author: knu
 Date: Tue Apr 23 10:04:39 2013
 New Revision: 316330
 URL: http://svnweb.freebsd.org/changeset/ports/316330
 
 Log:
   Fix build with Ruby 2.0 and follow the ports framework updates.
   
   - Update COMMENT
   - Update pkg-descr
   - Convert to new options framework
   - Minor Makefile cleanup
   - Pet portlint
   
   PR:		ports/177342
   Submitted by:	tentative
 
 Modified:
   head/databases/ruby-bdb/Makefile
   head/databases/ruby-bdb/pkg-descr
 
 Modified: head/databases/ruby-bdb/Makefile
 ==============================================================================
 --- head/databases/ruby-bdb/Makefile	Tue Apr 23 10:00:22 2013	(r316329)
 +++ head/databases/ruby-bdb/Makefile	Tue Apr 23 10:04:39 2013	(r316330)
 @@ -1,29 +1,26 @@
 -# New ports collection makefile for:	Ruby-BDB
 -# Date created:		8 March 2001
 -# Whom:			Akinori MUSHA aka knu <knu@idaemons.org>
 -#
 +# Created by: Akinori MUSHA aka knu <knu@idaemons.org>
  # $FreeBSD$
 -#
  
  PORTNAME=	bdb
  PORTVERSION=	0.6.6
  CATEGORIES=	databases ruby
  MASTER_SITES=	ftp://ftp.idaemons.org/pub/distfiles/ruby/ \
  		http://idaemons.org/distfiles/ruby/ \
 -		${MASTER_SITE_LOCAL}
 -MASTER_SITE_SUBDIR=	knu
 +		LOCAL/knu
  PKGNAMEPREFIX=	${RUBY_PKGNAMEPREFIX}
  PKGNAMESUFFIX=	${WITH_BDB_VER}
  DIST_SUBDIR=	ruby
  
  MAINTAINER=	knu@FreeBSD.org
 -COMMENT=	Ruby interface to Sleepycat's Berkeley DB revision 2 or later
 +COMMENT=	Ruby interface to Oracle Berkeley DB revision 2 or later
  
  USE_BDB=	yes
  USE_BZIP2=	yes
  
  CONFLICTS=	${PKGNAMEPREFIX}${PORTNAME}[2-4]*
  
 +OPTIONS_DEFINE=	DOCS EXAMPLES
 +
  USE_RUBY=		yes
  USE_RUBY_EXTCONF=	yes
  USE_RUBY_RDOC=		yes
 @@ -32,44 +29,40 @@ CONFIGURE_ARGS=	--with-db-include=${BDB_
  		--with-db-lib=${BDB_LIB_DIR}
  INSTALL_TARGET=	site-install
  
 -DOCS=	Changes \
 -	README.en \
 -	bdb.rd \
 -	docs/*.rd
 -
 -.include <bsd.port.pre.mk>
 -
 -PLIST_FILES=	%%RUBY_SITEARCHLIBDIR%%/bdb.so
 -
 -.if !defined(NOPORTDOCS)
 +DOCS=		Changes README.en bdb.rd docs/*.rd
  DOCSDIR=	${RUBY_MODDOCDIR}
 -PORTDOCS=	*
 -.endif
 -.if !defined(NOPORTEXAMPLES)
  EXAMPLESDIR=	${RUBY_MODEXAMPLESDIR}
 +PLIST_FILES=	%%RUBY_SITEARCHLIBDIR%%/bdb.so
 +PORTDOCS=	*
  PORTEXAMPLES=	*
 +
 +.include <bsd.port.pre.mk>
 +
 +post-patch:
 +.if ${RUBY_VER} == 2.0
 +	@${REINPLACE_CMD} -e '/remove_const/d' ${WRKSRC}/src/features.rb
  .endif
  
  post-build:
 -.if !defined(NOPORTDOCS)
 -	( cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} \
 -	${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} rdoc )
 +.if ${PORT_OPTIONS:MDOCS}
 +	(cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} \
 +	${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} rdoc)
  .endif
  
  post-install:
 -.if !defined(NOPORTDOCS)
 +.if ${PORT_OPTIONS:MDOCS}
  	${MKDIR} ${DOCSDIR}/doc
 -	(cd ${WRKSRC} && ${INSTALL_MAN} ${DOCS} ${DOCSDIR})
 -	(cd ${WRKSRC}/docs/doc && ${COPYTREE_SHARE} \* ${DOCSDIR}/doc)
 +	(cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR})
 +	(cd ${WRKSRC}/docs/doc && ${COPYTREE_SHARE} . ${DOCSDIR}/doc)
  .endif
 -.if !defined(NOPORTEXAMPLES)
 +.if ${PORT_OPTIONS:MEXAMPLES}
  	${MKDIR} ${EXAMPLESDIR}/
 -	(cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${EXAMPLESDIR} "! -empty")
 +	(cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${EXAMPLESDIR} "! -empty")
  .endif
  
 -regression-test:
 +regression-test: build
  	@${MKDIR} ${BUILD_WRKSRC}/tmp
 -	( cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} \
 -	${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test )
 +	(cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} \
 +	${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test)
  
  .include <bsd.port.post.mk>
 
 Modified: head/databases/ruby-bdb/pkg-descr
 ==============================================================================
 --- head/databases/ruby-bdb/pkg-descr	Tue Apr 23 10:00:22 2013	(r316329)
 +++ head/databases/ruby-bdb/pkg-descr	Tue Apr 23 10:04:39 2013	(r316330)
 @@ -2,5 +2,4 @@ Ruby-bdb is an interface to Sleepycat's 
  later.  DB >= 2 is required. (some functionalities like join are not
  available with DB < 2.6)
  
 -Author:	Guy Decoux <ts@moulon.inra.fr>
 -WWW:	http://moulon.inra.fr/ruby/bdb.html
 +WWW: https://github.com/knu/ruby-bdb
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
