aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2014-07-22 23:02:19 +0800
committerume <ume@FreeBSD.org>2014-07-22 23:02:19 +0800
commit3ec29e8644d7db50a9d381e2e653281933c5a434 (patch)
tree3832e682b6e776336787b159df5651cc57d5638d /databases
parenta47140cbda1b56d41edeb090b01df28b6979cd2d (diff)
downloadfreebsd-ports-gnome-3ec29e8644d7db50a9d381e2e653281933c5a434.tar.gz
freebsd-ports-gnome-3ec29e8644d7db50a9d381e2e653281933c5a434.tar.zst
freebsd-ports-gnome-3ec29e8644d7db50a9d381e2e653281933c5a434.zip
Make it buildable with Ruby 2.1.
PR: 187652 Submitted by: Yasuhiro KIMURA <yasu__at__utahime.org> Approved by: knu (maintainer timeout)
Diffstat (limited to 'databases')
-rw-r--r--databases/ruby-bdb/Makefile14
1 files changed, 6 insertions, 8 deletions
diff --git a/databases/ruby-bdb/Makefile b/databases/ruby-bdb/Makefile
index b418eb285d43..ebe056c01850 100644
--- a/databases/ruby-bdb/Makefile
+++ b/databases/ruby-bdb/Makefile
@@ -15,6 +15,8 @@ DIST_SUBDIR= ruby
MAINTAINER= knu@FreeBSD.org
COMMENT= Ruby interface to Oracle Berkeley DB revision 2 or later
+LICENSE= RUBY
+
USE_BDB= yes
OPTIONS_DEFINE= DOCS EXAMPLES
@@ -54,33 +56,29 @@ SHEBANG_FILES= examples/record.rb \
examples/basic.rb \
examples/lock.rb
-
NEED_ROOT= yes
.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:
${STRIP_CMD} ${STAGEDIR}${RUBY_SITEARCHLIBDIR}/bdb.so
-.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${STAGEDIR}${DOCSDIR}/doc
(cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR})
(cd ${WRKSRC}/docs/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/doc)
-.endif
-.if ${PORT_OPTIONS:MEXAMPLES}
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/
(cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} "! -empty")
-.endif
regression-test: build
@${MKDIR} ${BUILD_WRKSRC}/tmp