Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jul 2014 15:02:20 +0000 (UTC)
From:      Hajimu UMEMOTO <ume@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r362546 - head/databases/ruby-bdb
Message-ID:  <201407221502.s6MF2KL6034547@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ume
Date: Tue Jul 22 15:02:19 2014
New Revision: 362546
URL: http://svnweb.freebsd.org/changeset/ports/362546
QAT: https://qat.redports.org/buildarchive/r362546/

Log:
  Make it buildable with Ruby 2.1.
  
  PR:		187652
  Submitted by:	Yasuhiro KIMURA <yasu__at__utahime.org>
  Approved by:	knu (maintainer timeout)

Modified:
  head/databases/ruby-bdb/Makefile

Modified: head/databases/ruby-bdb/Makefile
==============================================================================
--- head/databases/ruby-bdb/Makefile	Tue Jul 22 14:45:40 2014	(r362545)
+++ head/databases/ruby-bdb/Makefile	Tue Jul 22 15:02:19 2014	(r362546)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407221502.s6MF2KL6034547>