tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Go packages with many dependencies



* On 2018-08-15 at 04:25 BST, Roland Illig wrote:

> Am 14. August 2018 11:45:44 MESZ schrieb Jonathan Perkin <jperkin%joyent.com@localhost>:
> >I wrote a small bit of infrastructure to go-package.mk that allows you
> >to specify these dependencies in a package Makefile and will add them
> >as additional DISTFILES to be built within the package.
> >
> >  https://gist.github.com/jperkin/e55797d996e07c460e07b8ffc4c71b1a
> 
> I like it.
> 
> >GO_GITHUB_DEPS+=
> >collectd/go-collectd=collectd.org:2ce144541b8903101fb8f1483cc0497a68798122
> 
> What about this variant:
> 
> GO_DEPS+= github.com/user/repo:sha1:dir
> 
> I moved the GitHub into the variable value, to have more lowercase letters and because it matches the Godeps file.

Yeh, seems reasonable.

> I moved the :dir to the end, so that the three fields are in chronological order: where from, what exactly, where to. And to have the optional field at the end.
> 
> I prefer a uniform field separator. Isn't there some Make feature to access the n'th word of a variable? Like ${dep:S,:, ,g:[2]}? I think it's easier to read than the :C modifier.

I came to this same conclusion.  We discussed on IRC that in theory we
should be able to use the :tsc and :[range] operators to do something
like this:

  VAR:ts::[1]

to easily extract out a field, but it appears that doesn't work even
though it should.  With having to support NetBSD make, even if we fix
this bug now it will still be years until we can use it in pkgsrc, so
for now I'll just use the long form.

Thanks!

-- 
Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com


Home | Main Index | Thread Index | Old Index