request for port create command, to build a portfile from a URL
Enrico Maria Crisostomo
enrico.m.crisostomo at gmail.com
Sun Mar 11 22:54:22 UTC 2018
> On 11 Mar 2018, at 16:40, Rainer Müller <raimue at macports.org> wrote:
>
> On 2018-03-09 20:22, Enrico Maria Crisostomo wrote:
>> I pushed to GitHub a skeleton of the idea:
>>
>> https://github.com/emcrisostomo/macports-utils
>>
>> I've moved what I'm using to a new script to see what the end result looked like. If you want to try it, just grab the release tarball here (if you don't have the Autotools installed):
>>
>> ./configure && make install
>>
>> otherwise just clone the repo, bootstrap it and use it:
>>
>> ./autogen.sh && ./configure && make install
>>
>> An example:
>>
>> $ port-gen --url https://github.com/emcrisostomo/semver-utils/releases/download/1.1.3/semver-utils-1.1.3.tar.gz
>
> Nice work! Looks already very polished for a prototype.
Thanks Rainer.
>
> I think it would be even nicer to just specify the URL to the project
> (or to the tag) and it will find the latest distfile to download itself.
Yes.
>
> However, when we are going to add more templates, lots of options will
> be repeated in each of them. If we are later going to change any of
> these, we have to do this in all templates. I am not sure how much of a
> problem that will be.
>
> Also, such a template approach will never allow to combine different
> features, like using github port group for fetching, but the python port
> group for building the port.
>
The prototype uses just one monolithic template, but I'd expect the following to be true:
* Templates may not need to be one per possible output, they could be finer grained and get concatenated.
* Dynamic content could be generated and interleaved with template output, if necessary.
I think I share your feelings about templates, and I have little idea about how complex the output can/should be.
> Rainer
More information about the macports-dev
mailing list