[Midnightbsd-cvs] mports [16707] trunk/databases/ruby-bdb: patch for newer ruby versions
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri Aug 29 21:01:35 EDT 2014
Revision: 16707
http://svnweb.midnightbsd.org/mports/?rev=16707
Author: laffer1
Date: 2014-08-29 21:01:34 -0400 (Fri, 29 Aug 2014)
Log Message:
-----------
patch for newer ruby versions
Modified Paths:
--------------
trunk/databases/ruby-bdb/Makefile
Added Paths:
-----------
trunk/databases/ruby-bdb/files/
trunk/databases/ruby-bdb/files/patch-bdbxml1__bdbxml.cc
trunk/databases/ruby-bdb/files/patch-bdbxml2__bdbxml.cc
trunk/databases/ruby-bdb/files/patch-extconf.rb
trunk/databases/ruby-bdb/files/patch-src__bdb.c
Modified: trunk/databases/ruby-bdb/Makefile
===================================================================
--- trunk/databases/ruby-bdb/Makefile 2014-08-30 00:57:17 UTC (rev 16706)
+++ trunk/databases/ruby-bdb/Makefile 2014-08-30 01:01:34 UTC (rev 16707)
@@ -2,6 +2,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/ \
@@ -11,13 +12,11 @@
DIST_SUBDIR= ruby
MAINTAINER= ports at MidnightBSD.org
-COMMENT= Ruby interface to Oracle's Berkeley DB revision 2 or later
+COMMENT= Ruby interface to Oracle Berkeley DB revision 2 or later
-LICENSE= gpl2
-# same terms as ruby
+LICENSE= ruby
USE_BDB= yes
-USES= tar:bzip2
OPTIONS_DEFINE= DOCS EXAMPLES
OPTIONSFILE= ${PORT_DBDIR}/ruby-${PORTNAME}/options
@@ -36,30 +35,49 @@
PLIST_FILES= %%RUBY_SITEARCHLIBDIR%%/bdb.so
PORTDOCS= *
PORTEXAMPLES= *
+USES= shebangfix tar:bzip2
+SHEBANG_FILES= examples/record.rb \
+ examples/recno.rb \
+ examples/zeroc.rb \
+ examples/txn.rb \
+ examples/queue.rb \
+ examples/cats.rb \
+ examples/log.rb \
+ examples/cursor.rb \
+ examples/func.rb \
+ examples/replication/mgr/b.rb \
+ examples/replication/base/op.rb \
+ examples/replication/base/cl.rb \
+ examples/replication/base/b.rb \
+ examples/replication/base/ma.rb \
+ examples/replication/base/mc.rb \
+ examples/join.rb \
+ examples/basic.rb \
+ examples/lock.rb
+
+
.include <bsd.port.pre.mk>
post-patch:
-.if ${RUBY_VER} == 2.0
+.if ${RUBY_VER} >= 2.0
@${REINPLACE_CMD} -e '/remove_const/d' ${WRKSRC}/src/features.rb
.endif
+.if ${RUBY_VER} >= 2.1
+ @${REINPLACE_CMD} -e 's|RBASIC(obj)->klass = \(.*\);|RBASIC_SET_CLASS_RAW(obj, \1);|' -e 's|RCLASS(\([[:alnum:]_]*\))->m_tbl|RCLASS_M_TBL(\1)|g' ${WRKSRC}/bdbxml2/bdbxml.h ${WRKSRC}/src/common.c
+.endif
post-build:
-.if ${PORT_OPTIONS:MDOCS}
(cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} \
${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} rdoc)
-.endif
post-install:
-.if ${PORT_OPTIONS:MDOCS}
- ${MKDIR} ${DOCSDIR}/doc
- (cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR})
- (cd ${WRKSRC}/docs/doc && ${COPYTREE_SHARE} . ${DOCSDIR}/doc)
-.endif
-.if ${PORT_OPTIONS:MEXAMPLES}
- ${MKDIR} ${EXAMPLESDIR}/
- (cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${EXAMPLESDIR} "! -empty")
-.endif
+ ${STRIP_CMD} ${STAGEDIR}${RUBY_SITEARCHLIBDIR}/bdb.so
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}/doc
+ (cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR})
+ (cd ${WRKSRC}/docs/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/doc)
+ ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/
+ (cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} "! -empty")
regression-test: build
@${MKDIR} ${BUILD_WRKSRC}/tmp
Added: trunk/databases/ruby-bdb/files/patch-bdbxml1__bdbxml.cc
===================================================================
--- trunk/databases/ruby-bdb/files/patch-bdbxml1__bdbxml.cc (rev 0)
+++ trunk/databases/ruby-bdb/files/patch-bdbxml1__bdbxml.cc 2014-08-30 01:01:34 UTC (rev 16707)
@@ -0,0 +1,29 @@
+--- ./bdbxml1/bdbxml.cc.orig 2011-04-06 19:35:39.000000000 +0000
++++ ./bdbxml1/bdbxml.cc 2014-01-03 01:47:58.535201285 +0000
+@@ -2340,18 +2340,16 @@
+ major = NUM2INT(rb_const_get(xb_mDb, rb_intern("VERSION_MAJOR")));
+ minor = NUM2INT(rb_const_get(xb_mDb, rb_intern("VERSION_MINOR")));
+ patch = NUM2INT(rb_const_get(xb_mDb, rb_intern("VERSION_PATCH")));
+- if (major != DB_VERSION_MAJOR || minor != DB_VERSION_MINOR
+- || patch != DB_VERSION_PATCH) {
+- rb_raise(rb_eNotImpError, "\nBDB::XML needs compatible versions of BDB\n\tyou have BDB::XML version %d.%d.%d and BDB version %d.%d.%d\n",
+- DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
+- major, minor, patch);
++ if (major != DB_VERSION_MAJOR || minor != DB_VERSION_MINOR) {
++ rb_raise(rb_eNotImpError, "\nBDB::XML needs compatible versions of BDB\n\tyou have BDB::XML version %d.%d and BDB version %d.%d\n",
++ DB_VERSION_MAJOR, DB_VERSION_MINOR,
++ major, minor);
+ }
+ version = rb_tainted_str_new2(dbxml_version(&major, &minor, &patch));
+- if (major != DBXML_VERSION_MAJOR || minor != DBXML_VERSION_MINOR
+- || patch != DBXML_VERSION_PATCH) {
+- rb_raise(rb_eNotImpError, "\nBDB::XML needs compatible versions of DbXml\n\tyou have DbXml.hpp version %d.%d.%d and libdbxml version %d.%d.%d\n",
+- DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
+- major, minor, patch);
++ if (major != DBXML_VERSION_MAJOR || minor != DBXML_VERSION_MINOR) {
++ rb_raise(rb_eNotImpError, "\nBDB::XML needs compatible versions of DbXml\n\tyou have DbXml.hpp version %d.%d and libdbxml version %d.%d\n",
++ DB_VERSION_MAJOR, DB_VERSION_MINOR,
++ major, minor);
+ }
+
+ xb_eFatal = rb_const_get(xb_mDb, rb_intern("Fatal"));
Added: trunk/databases/ruby-bdb/files/patch-bdbxml2__bdbxml.cc
===================================================================
--- trunk/databases/ruby-bdb/files/patch-bdbxml2__bdbxml.cc (rev 0)
+++ trunk/databases/ruby-bdb/files/patch-bdbxml2__bdbxml.cc 2014-08-30 01:01:34 UTC (rev 16707)
@@ -0,0 +1,29 @@
+--- ./bdbxml2/bdbxml.cc.orig 2011-04-06 19:35:39.000000000 +0000
++++ ./bdbxml2/bdbxml.cc 2014-01-03 01:49:02.080197786 +0000
+@@ -5536,18 +5536,16 @@
+ major = NUM2INT(rb_const_get(xb_mDb, rb_intern("VERSION_MAJOR")));
+ minor = NUM2INT(rb_const_get(xb_mDb, rb_intern("VERSION_MINOR")));
+ patch = NUM2INT(rb_const_get(xb_mDb, rb_intern("VERSION_PATCH")));
+- if (major != DB_VERSION_MAJOR || minor != DB_VERSION_MINOR
+- || patch != DB_VERSION_PATCH) {
+- rb_raise(rb_eNotImpError, "\nBDB::XML needs compatible versions of BDB\n\tyou have BDB::XML version %d.%d.%d and BDB version %d.%d.%d\n",
+- DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
+- major, minor, patch);
++ if (major != DB_VERSION_MAJOR || minor != DB_VERSION_MINOR) {
++ rb_raise(rb_eNotImpError, "\nBDB::XML needs compatible versions of BDB\n\tyou have BDB::XML version %d.%d and BDB version %d.%d\n",
++ DB_VERSION_MAJOR, DB_VERSION_MINOR,
++ major, minor);
+ }
+ version = rb_tainted_str_new2(dbxml_version(&major, &minor, &patch));
+- if (major != DBXML_VERSION_MAJOR || minor != DBXML_VERSION_MINOR
+- || patch != DBXML_VERSION_PATCH) {
+- rb_raise(rb_eNotImpError, "\nBDB::XML needs compatible versions of DbXml\n\tyou have DbXml.hpp version %d.%d.%d and libdbxml version %d.%d.%d\n",
+- DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
+- major, minor, patch);
++ if (major != DBXML_VERSION_MAJOR || minor != DBXML_VERSION_MINOR) {
++ rb_raise(rb_eNotImpError, "\nBDB::XML needs compatible versions of DbXml\n\tyou have DbXml.hpp version %d.%d and libdbxml version %d.%d\n",
++ DB_VERSION_MAJOR, DB_VERSION_MINOR,
++ major, minor);
+ }
+
+ xb_mObs = rb_const_get(rb_cObject, rb_intern("ObjectSpace"));
Added: trunk/databases/ruby-bdb/files/patch-extconf.rb
===================================================================
--- trunk/databases/ruby-bdb/files/patch-extconf.rb (rev 0)
+++ trunk/databases/ruby-bdb/files/patch-extconf.rb 2014-08-30 01:01:34 UTC (rev 16707)
@@ -0,0 +1,11 @@
+--- ./extconf.rb.orig 2011-04-06 19:35:39.000000000 +0000
++++ ./extconf.rb 2014-01-03 01:45:56.334209519 +0000
+@@ -50,7 +50,7 @@
+ rdoc: docs/doc/index.html
+
+ docs/doc/index.html: $(RDOC)
+-\t at -(cd docs; rdoc .)
++\t at -(cd docs; ${RUBY_RDOC} .)
+
+ ri:
+ \t at -(rdoc -r docs/*rb)
Added: trunk/databases/ruby-bdb/files/patch-src__bdb.c
===================================================================
--- trunk/databases/ruby-bdb/files/patch-src__bdb.c (rev 0)
+++ trunk/databases/ruby-bdb/files/patch-src__bdb.c 2014-08-30 01:01:34 UTC (rev 16707)
@@ -0,0 +1,18 @@
+--- ./src/bdb.c.orig 2011-04-06 19:35:39.000000000 +0000
++++ ./src/bdb.c 2014-01-03 01:45:56.336210315 +0000
+@@ -166,11 +166,10 @@
+ rb_raise(rb_eNameError, "module already defined");
+ }
+ version = rb_tainted_str_new2(db_version(&major, &minor, &patch));
+- if (major != DB_VERSION_MAJOR || minor != DB_VERSION_MINOR
+- || patch != DB_VERSION_PATCH) {
+- rb_raise(rb_eNotImpError, "\nBDB needs compatible versions of libdb & db.h\n\tyou have db.h version %d.%d.%d and libdb version %d.%d.%d\n",
+- DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
+- major, minor, patch);
++ if (major != DB_VERSION_MAJOR || minor != DB_VERSION_MINOR) {
++ rb_raise(rb_eNotImpError, "\nBDB needs compatible versions of libdb & db.h\n\tyou have db.h version %d.%d and libdb version %d.%d\n",
++ DB_VERSION_MAJOR, DB_VERSION_MINOR,
++ major, minor);
+ }
+ bdb_mMarshal = rb_const_get(rb_cObject, rb_intern("Marshal"));
+ bdb_id_current_db = rb_intern("__bdb_current_db__");
More information about the Midnightbsd-cvs
mailing list