Opened 12 years ago

Closed 9 years ago

#35589 closed enhancement (wontfix)

Add optional --patch parameter to `port install`

Reported by: chocolate.camera@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.1.2
Keywords: Cc:
Port:

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Add an optional argument to the install command to apply a patch before compiling.

Building custom versions of a port is a pain when it could perfectly be automated considering the procedure is always identical.

  1. Open the port's Portfile directory
  2. Create the files subdirectory
  3. Copy the patch into it
  4. Edit the Portfile file and add the patchfiles directive.
  5. Execute the command port install portname

Most of 1-4 cannot be done with the Finder or most Cocoa editors since those actions require root (or sudo).

It would nicer to be able to do it on 1 stroke at install time with a command-line argument:

sudo port install portname --patch /path/to/myPatch

Or is there a similar way that I am missing?

Change History (3)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Type: requestenhancement

I think our answer to this use case is for the user to create a local copy of the Portfile with whatever modifications they want.

comment:2 Changed 12 years ago by chocolate.camera@…

I wrote the feature request precisely after reading that, and considering it a pain. I think that it should be more handy that Macports itself handled that by using a command-line parameter.

My need for it is not so much because it would be useful to me, but that it would be easier for me to tell other non-Terminal-savvy users how to install a custom port by simply sending them the patch and giving them the command line to execute. The suggested method is completely out of those user's abilities.

comment:3 Changed 9 years ago by larryv (Lawrence Velázquez)

Resolution: wontfix
Status: newclosed

I don't see us implementing this. There isn’t demand.

Another option would be to provide your own modified Portfile and have users run sudo port install from the directory containing it.

Note: See TracTickets for help on using tickets.