ports/177342: [PATCH] databases/ruby-bdb: fix build with Ruby 2.0
Sunpoet Po-Chuan Hsieh
sunpoet at FreeBSD.org
Sun Mar 24 15:20:00 UTC 2013
>Number: 177342
>Category: ports
>Synopsis: [PATCH] databases/ruby-bdb: fix build with Ruby 2.0
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Mar 24 15:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>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 at 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 at idaemons.org>
-#
+# Created by: Akinori MUSHA aka knu <knu at 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 at 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 at 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:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list