On 2018-3-7 01:58 , Ken Cunningham wrote: > It would be nice to have a command like > > port create URL > > that would download the URL, calc the checksums for it, and build a basic > Portfile for it. > > It could ask for a category to use for the Port. > > In a more advance version, it could extract the URL and do some quick > analysis on it. > > if there's a CMakeLists.txt file in the root, do the right things to make it > a cmake based port. > > If there's a configure file in the root, do the right things for that. > > Might make things faster and easier for people to get started and up and > running. > > Certainly would make it easier for people who want to use MacPorts > infrastructure to build their own files, as many don't know how to properly > set up the include and lib directories, etc.
There's a fairly basic tool called portfile-gen in contrib. Improvements are certainly welcome. I'd advise not just blindly setting whatever checksums the downloaded file happens to have though; the maintainer should be getting those from a secure source (e.g. https web site) and verifying that they match, or verifying the distfile against a gpg signature. If that can be automated somehow then great, but let's not encourage skipping it. - Josh
