[25709] trunk/dports/ruby/rb-dbd-pg/Portfile

source_changes at macosforge.org source_changes at macosforge.org
Mon May 28 21:20:03 PDT 2007


Revision: 25709
          http://trac.macosforge.org/projects/macports/changeset/25709
Author:   boeyms at macports.org
Date:     2007-05-28 21:20:03 -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-pg/Portfile

Modified: trunk/dports/ruby/rb-dbd-pg/Portfile
===================================================================
--- trunk/dports/ruby/rb-dbd-pg/Portfile	2007-05-29 04:19:47 UTC (rev 25708)
+++ trunk/dports/ruby/rb-dbd-pg/Portfile	2007-05-29 04:20:03 UTC (rev 25709)
@@ -1,22 +1,64 @@
 # $Id$
 PortSystem		1.0
-PortGroup		ruby 1.0
+#PortGroup		ruby 1.0
 
-ruby.setup		{dbd-pg ruby-dbi-all} 0.0.23 setup.rb \
-				{README doc/DBD_SPEC doc/html/DBD_SPEC.html} \
-				rubyforge:557:ruby-dbi
-revision		1
+name            rb-dbd-pg
+version         0.0.23
+#ruby.setup		{dbd-pg ruby-dbi-all} 0.0.23 setup.rb \
+#				{README doc/DBD_SPEC doc/html/DBD_SPEC.html} \
+#				rubyforge:557:ruby-dbi
+revision		2
 maintainers		shu at rufuran.org
-description		DBI driver for PostgreSQL
+description		Ruby DBI driver for PostgreSQL. OBSOLETE: please use dbd_pg variant of rb-dbi
 long_description	${description}
 categories-append	databases
-checksums		md5 ba4097c5ccd0405701db5a6e2018f425
+checksums		md5 7a713494d84bd4f5b877496970bcf13c
 platforms		darwin
 
-worksrcdir		${ruby.filename}
+#worksrcdir		${ruby.filename}
 
-depends_lib-append		port:rb-dbi \
-				port:rb-postgres
+#depends_lib-append		port:rb-dbi \
+#				port:rb-postgres
 
-configure.args-append	--with=dbd_pg
+#configure.args-append	--with=dbd_pg
+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_pg 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_pg* [lindex $output $rb_dbi_version_compound]]} {
+			ui_msg "# As rb-dbi is already installed with the dbd_pg 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_pg variant added."
+		ui_msg "######################################################################"
+		}
+	} else {
+		ui_msg "# You will now need to manually install rb-dbi with the dbd_pg\
+			\n# variant added."
+		ui_msg "######################################################################"
+	}
+}
+activate {}

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


More information about the macports-changes mailing list