[99790] branches/pixilla-mysqls-55/dports/_resources/port1.0/group/ obsolete-1.0.tcl
pixilla at macports.org
pixilla at macports.org
Sat Nov 17 13:45:50 PST 2012
Revision: 99790
https://trac.macports.org/changeset/99790
Author: pixilla at macports.org
Date: 2012-11-17 13:45:50 -0800 (Sat, 17 Nov 2012)
Log Message:
-----------
_resources/port1.0/group:
- Add readme option to PortGroup obsolete; allowing builds to continue by depending on replaced_by
instead of producing a ui_error.
Modified Paths:
--------------
branches/pixilla-mysqls-55/dports/_resources/port1.0/group/obsolete-1.0.tcl
Modified: branches/pixilla-mysqls-55/dports/_resources/port1.0/group/obsolete-1.0.tcl
===================================================================
--- branches/pixilla-mysqls-55/dports/_resources/port1.0/group/obsolete-1.0.tcl 2012-11-17 17:53:12 UTC (rev 99789)
+++ branches/pixilla-mysqls-55/dports/_resources/port1.0/group/obsolete-1.0.tcl 2012-11-17 21:45:50 UTC (rev 99790)
@@ -35,11 +35,20 @@
#
# replaced_by name-of-port-that-deprecated-this-port
# PortGroup obsolete 1.0
+#
+# obsolete.action error
# set a number of reasonable defaults for a port that is only there to
# inform users that they should uninstall it and install something else
# instead; you might want to override some of the defaults though.
+# Option for stopping with ui_error; or installing stub README allowing for depending on the
+# replaced port.
+# Possible values are "error", "readme", an empty value or anything else.
+# If the value is anything other then "error" or "readme" the user can do something different.
+options obsolete.action
+default obsolete.action {error}
+
platforms darwin
maintainers nomaintainer
supported_archs noarch
@@ -53,9 +62,19 @@
archive_sites
distfiles
-pre-configure {
- ui_error "${subport} has been made obsolete by the port ${replaced_by}. Please install ${replaced_by} instead."
- return -code error "obsolete port"
+if {${obsolete.action} == "error"} {
+ pre-configure {
+ ui_error "${subport} has been made obsolete by the port ${replaced_by}. Please install ${replaced_by} instead."
+ return -code error "obsolete port"
+ }
+} elseif {${obsolete.action} == "readme"} {
+ depends_lib-append port:${replaced_by}
+ use_configure no
+ build {}
+ destroot {
+ xinstall -d -m 755 ${destroot}${prefix}/share/doc/${subport}
+ system "echo $name is a stub port > ${destroot}${prefix}/share/doc/${subport}/README"
+ }
}
livecheck.type none
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121117/e88abf4e/attachment.html>
More information about the macports-changes
mailing list