Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jan 2006 19:10:04 +0100 (CET)
From:      Roderick van Domburg <roderick@developer.nedforce.nl>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/92072: databases/rubygem-activerecord: MySQL options & portlint(1) cleanup
Message-ID:  <200601201810.k0KIA4NW082721@developer.nedforce.nl>
Resent-Message-ID: <200601201920.k0KJK49Z030579@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         92072
>Category:       ports
>Synopsis:       databases/rubygem-activerecord: MySQL options & portlint(1) cleanup
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 20 19:20:03 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Roderick van Domburg
>Release:        FreeBSD 6.0-STABLE sparc64
>Organization:
University of Twente
>Environment:
System: FreeBSD developer.nedforce.nl 6.0-STABLE FreeBSD 6.0-STABLE #1: Thu Jan 12 10:47:03 CET 2006 roderick@developer.nedforce.nl:/usr/obj/usr/src/sys/DEVELOPER sparc64


	
>Description:
This patch adds a nifty options screen so that users can pull in the native
MySQL bindings. These bindings increase Rails' database performance by a
said 10-15%.

I turned the option off by default, to prevent annoyances for non-MySQL
users. While I was here, I fixed several portlint(1) warnings as well.
	
>How-To-Repeat:
	
>Fix:

	

--- patch-rubygem-activerecord-mysql begins here ---
diff -ruN rubygem-activerecord.bak/Makefile rubygem-activerecord/Makefile
--- rubygem-activerecord.bak/Makefile	Fri Jan 20 18:29:48 2006
+++ rubygem-activerecord/Makefile	Fri Jan 20 19:02:56 2006
@@ -6,17 +6,27 @@
 
 PORTNAME=	activerecord
 PORTVERSION=	1.13.2
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	databases ruby
+MASTER_SITES=	http://rubyforge.org/frs/download.php/7641/
 
 MAINTAINER=	jw@innerewut.de
 COMMENT=	Object-relational mapping layer for Rails MVC Framework
 
-MASTER_SITES=	http://rubyforge.org/frs/download.php/7641/
-
 BUILD_DEPENDS=	${LOCALBASE}/${SPEC_DIR}/activesupport-1.2.5.gemspec:${PORTSDIR}/devel/rubygem-activesupport
 RUN_DEPENDS=	${BUILD_DEPENDS}
 
+OPTIONS=	NATIVE_MYSQL "Use native MySQL bindings (faster)" Off
+OPTIONSFILE=	${PORT_DBDIR}/rubygem-${PORTNAME}/options
+
+# to get RUBY_SITEARCHLIBDIR
+USE_RUBY=	yes
+
 .include <bsd.port.pre.mk>
+
+.if defined(WITH_NATIVE_MYSQL)
+RUN_DEPENDS+=	${RUBY_SITEARCHLIBDIR}/mysql.so:${PORTSDIR}/databases/ruby-mysql
+.endif
+
 .include "${PORTSDIR}/devel/ruby-gems/Makefile.common"
 .include <bsd.port.post.mk>
--- patch-rubygem-activerecord-mysql ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



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