[25233] trunk/dports/ruby/rb-dbi/Portfile

source_changes at macosforge.org source_changes at macosforge.org
Tue May 15 23:48:05 PDT 2007


Revision: 25233
          http://trac.macosforge.org/projects/macports/changeset/25233
Author:   boeyms at macports.org
Date:     2007-05-15 23:48:05 -0700 (Tue, 15 May 2007)

Log Message:
-----------
ruby/rb-dbi:
 * Add mysql, postgresql and odbc variants so that simultaneous support for
   multiple databases is possible (it is not with the current separate
   rb-dbd-mysql and rb-dbd-pg ports; these should now be obsoleted and
   eventually deleted, but I will need to think about how to get them to find
   out if both ports are installed so that the upgrade can occur automatically).

Modified Paths:
--------------
    trunk/dports/ruby/rb-dbi/Portfile

Modified: trunk/dports/ruby/rb-dbi/Portfile
===================================================================
--- trunk/dports/ruby/rb-dbi/Portfile	2007-05-16 06:44:18 UTC (rev 25232)
+++ trunk/dports/ruby/rb-dbi/Portfile	2007-05-16 06:48:05 UTC (rev 25233)
@@ -16,5 +16,32 @@
 
 worksrcdir		${ruby.filename}
 
-configure.args-append	--with=dbi
+# The conjuring with the dbi_conf_args variable to set configure.args is to cope
+# with the fact that setup.rb accepts a single "--with=<feature>,<feature>,..."
+# argument, with the last one overriding the rest.  We must therefore append to
+# the end of the string to get the desired variants, and for niceness we might
+# as well delete the obsoleted "--with" argument.
 
+set dbi_conf_args		--with=dbi
+configure.args-append	${dbi_conf_args}
+
+variant dbd_mysql {
+	depends_lib-append	port:rb-mysql
+	configure.args-delete	${dbi_conf_args}
+	append dbi_conf_args	,dbd_mysql
+	configure.args-append	${dbi_conf_args}
+}
+
+variant dbd_odbc {
+	depends_lib-append	port:rb-odbc
+	configure.args-delete	${dbi_conf_args}
+	append dbi_conf_args	,dbd_odbc
+	configure.args-append	${dbi_conf_args}
+}
+
+variant dbd_pg {
+	depends_lib-append	port:rb-postgres
+	configure.args-delete	${dbi_conf_args}
+	append dbi_conf_args	,dbd_pg
+	configure.args-append	${dbi_conf_args}
+}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070515/67d8cb50/attachment.html


More information about the macports-changes mailing list