[25708] trunk/dports/ruby/rb-dbd-mysql/Portfile

source_changes at macosforge.org source_changes at macosforge.org
Mon May 28 21:19:47 PDT 2007


Revision: 25708
          http://trac.macosforge.org/projects/macports/changeset/25708
Author:   boeyms at macports.org
Date:     2007-05-28 21:19:47 -0700 (Mon, 28 May 2007)

Log Message:
-----------
ruby/rb-dbd-mysql:
 * Revise port to indicate its obsolescence, uninstall any installed versions,
   and tell the user what to do to replace its functionality (my attempts to do
   this automatically hanged intermittently in testing for reasons that I could
   not reliably reproduce, so I have chosen not to do so).

Modified Paths:
--------------
    trunk/dports/ruby/rb-dbd-mysql/Portfile

Modified: trunk/dports/ruby/rb-dbd-mysql/Portfile
===================================================================
--- trunk/dports/ruby/rb-dbd-mysql/Portfile	2007-05-29 04:06:42 UTC (rev 25707)
+++ trunk/dports/ruby/rb-dbd-mysql/Portfile	2007-05-29 04:19:47 UTC (rev 25708)
@@ -1,22 +1,64 @@
 # $Id$
 PortSystem		1.0
-PortGroup		ruby 1.0
+#PortGroup		ruby 1.0
 
-ruby.setup		{dbd-mysql ruby-dbi-all} 0.0.23 setup.rb \
-				{README doc/DBD_SPEC doc/html/DBD_SPEC.html} \
-				rubyforge:655:ruby-dbi
-revision		2
+name			rb-dbd-mysql
+version			0.0.23
+#ruby.setup		{dbd-mysql ruby-dbi-all} 0.0.23 setup.rb \
+#				{README doc/DBD_SPEC doc/html/DBD_SPEC.html} \
+#				rubyforge:655:ruby-dbi
+revision		3
 maintainers		roberto at freebsd.org
-description		DBI driver for Mysql
+description		Ruby DBI driver for Mysql. OBSOLETE: please use dbd_mysql variant of rb-dbi
 long_description	${description}
 categories-append	databases
 checksums		md5 7a713494d84bd4f5b877496970bcf13c
 platforms		darwin
 
-worksrcdir		${ruby.filename}
+#worksrcdir		${ruby.filename}
 
-depends_lib-append		port:rb-dbi \
-				port:rb-mysql
+#depends_lib-append		port:rb-dbi port:rb-mysql
 
-configure.args-append	--with=dbd_mysql
+#configure.args-append	--with=dbd_mysql
 
+use_configure	no
+
+fetch {}
+checksum {}
+extract {}
+build {}
+destroot {}
+install {
+	catch "exec port echo installed" output
+	set rb_dbi_index [lsearch ${output} rb-dbi] 
+	set rb_dbi_version_compound [expr ${rb_dbi_index} + 1]
+	set is_installed [lsearch $output ${name}]
+	ui_msg "######################################################################"
+	ui_msg "# The ${name} port has been made obsolete by the dbd_mysql variant of\
+		\n# the rb-dbi port.  This revision of ${name} will uninstall any current\
+		\n# installation of ${name} and advise you of what you need to do to replace\
+		\n# its functionality."
+	ui_msg "######################################################################"
+	if {${is_installed} >= 0} {
+		ui_msg "# As you currently have ${name} installed, MacPorts will now uninstall it."
+		system "port uninstall ${name}"
+		ui_msg "${name} is now uninstalled."
+		ui_msg "######################################################################"
+	}
+	if {${rb_dbi_index} >= 0} {
+		if {[string match @*+dbd_mysql* [lindex $output $rb_dbi_version_compound]]} {
+			ui_msg "# As rb-dbi is already installed with the dbd_mysql variant,\
+				\n# you do not need to do anything else."
+		ui_msg "######################################################################"
+		} else {
+			ui_msg "# You will now need to manually uninstall rb-dbi and reinstall it\
+				\n# with the +dbd_mysql variant added."
+		ui_msg "######################################################################"
+		}
+	} else {
+		ui_msg "# You will now need to manually install rb-dbi with the dbd_mysql\
+			\n# variant added."
+		ui_msg "######################################################################"
+	}
+}
+activate {}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070528/7dff249f/attachment.html


More information about the macports-changes mailing list