549 | | The old port (osxvnc) needs to be kept around for some time, and converted into a stub port marked as having been replaced by the new port, so that users who already had the old port installed will learn about the new port and will be prompted (via `port outdated`) to upgrade to it. There are several steps to this process: |
550 | | |
551 | | 1. Add the `replaced_by` line, indicating the name of the port by which this port has been replaced, for example `replaced_by vineserver`. This causes MacPorts, when running `sudo port upgrade osxvnc`, to deactivate osxvnc and to install vineserver in its place. In order for osxvnc to appear in `port outdated` in the first place, however, its `version`, `revision` or `epoch` must be increased, so: |
552 | | 1. Increase the port's `version`, `revision` or `epoch`. Customarily, the old port's version is set to the version of the replacement port. So, when osxvnc @3.0_1 was replaced by vineserver @3.1_0, osxvnc's `version` was set to 3.1 and its `revision` dropped to 0 to match the new vineserver port. If the software was only renamed, without changing its version number, then increase the old port's `revision`. |
553 | | 1. The above handles upgrades for users who already had the port installed, but does not prevent users from actually installing the old port. To prevent that, there should be a pre-configure block informing the user of the replacement and terminating the installation attempt; see the complete Portfile example below. Note that this should be a pre-configure block, not a pre-fetch block, because some users like to fetch all outdated ports' distfiles using `sudo port fetch outdated` (for example because they temporarily have access to a faster network connection) and we don't want to interrupt that. |
| 549 | The old port (osxvnc) should be kept around for a year, and converted into a stub port marked as having been replaced by the new port, so that users who already had the old port installed will learn about the new port and will be prompted (via `port outdated`) to upgrade to it. There are several steps to this process: |
| 550 | |
| 551 | 1. Add the `replaced_by` line, indicating the name of the port by which this port has been replaced, for example `replaced_by vineserver`. This causes MacPorts, when running `sudo port upgrade osxvnc`, to deactivate osxvnc and to install vineserver in its place. |
| 552 | 1. Use the obsolete 1.0 PortGroup. This will take care of things like removing livecheck and giving the user a message stating that the port is indeed obsolete. |
| 553 | 1. In a comment, mention the date, one year in the future, that the port can be removed. |
| 554 | 1. In order for osxvnc to appear in `port outdated`, increase the port's `version`, `revision` or `epoch`. Customarily, the old port's version is set to the version of the replacement port. So, when osxvnc @3.0_1 was replaced by vineserver @3.1_0, osxvnc's `version` was set to 3.1 and its `revision` dropped to 0 to match the new vineserver port. If the software was only renamed, without changing its version number, then increase the old port's `revision`. |
554 | 555 | 1. Remove all directives related to fetching and verifying files: `master_sites`, `patch_sites`, `checksums`, `fetch.*`, `cvs.*`, `svn.*`, `hg.*`, `git.*`, or `bzr.*` directives. Set just a single directive `distfiles` to indicate there are no distfiles to fetch. |
555 | 556 | 1. Remove any existing directives and blocks for any of the phases: fetch, extract, patch, configure, build, destroot, install, archive, activate and deactivate (other than the pre-configure block added above). |
556 | 557 | 1. Remove any `depends_*`, `PortGroup` and `notes` directives and any `variant` and `platform` blocks. |
557 | 558 | 1. Remove the `files` directory if present since those files are no longer needed. |
565 | | # $Id$ |
566 | | |
567 | | PortSystem 1.0 |
568 | | |
569 | | name osxvnc |
570 | | replaced_by vineserver |
571 | | version 3.1 |
572 | | categories aqua vnc |
573 | | platforms darwin |
574 | | maintainers ryandesign |
575 | | license GPL-2+ |
576 | | |
577 | | description a full-featured VNC server (formerly OSXvnc) |
578 | | |
579 | | long_description Vine Server (formerly OSXvnc) is a full-featured VNC \ |
580 | | server for Mac OS X providing remote access to the GUI, \ |
581 | | keyboard and mouse using any VNC client. |
582 | | |
583 | | homepage http://www.testplant.com/products/vine_server |
584 | | |
585 | | distfiles |
586 | | |
587 | | pre-configure { |
588 | | ui_error "${name} has been renamed to ${replaced_by}. Please install ${replaced_by} instead." |
589 | | return -code error "obsolete port" |
590 | | } |
591 | | |
592 | | livecheck.type none |
| 565 | # $Id: Portfile 106266 2013-05-20 23:09:23Z ryandesign@macports.org $ |
| 566 | |
| 567 | PortSystem 1.0 |
| 568 | |
| 569 | # This port can be removed on May 8, 2015. |
| 570 | replaced_by mysql55-server |
| 571 | PortGroup obsolete 1.0 |
| 572 | |
| 573 | name mysql5-server-devel |
| 574 | version 5.5.2-m2 |
| 575 | revision 3 |
| 576 | homepage http://www.mysql.com/ |
| 577 | categories databases |
| 578 | license GPL-2 |
597 | | Sometimes a port is replaced not because the software project was renamed, but because its functionality was rolled into another existing project. (For example, the functionality of the glut port was rolled into the mesa port.) The same process applies, except that the wording of the `ui_error` should be changed from "renamed to" to "replaced by". |
598 | | |
599 | | {{{ |
600 | | pre-configure { |
601 | | ui_error "${name} has been replaced by ${replaced_by}; please install ${replaced_by} instead." |
602 | | return -code error "obsolete port" |
603 | | } |
604 | | }}} |
605 | | |
606 | | This also applies in case a [ticket:14540 -devel port] was created but will no longer be updated and is being replaced by a corresponding non-devel port. (For example, the xz-devel port was replaced by the xz port.) |
| 583 | Sometimes a port is replaced because a [ticket:14540 -devel port] was created but will no longer be updated and is being replaced by a corresponding non-devel port. (For example, the xz-devel port was replaced by the xz port.) |