Re: How to specify commandline options to git for the fetch phase of a port?

2014-11-12 Thread Craig Treleaven

At 3:35 PM + 11/12/14, William Gallafent wrote:
On 12 November 2014 15:26, Daniel J. Luke 
<dl...@geeklair.net> 
wrote:
 > On Nov 12, 2014, at 5:45 AM, William 
Gallafent 
<will...@gallaf.net> 
wrote:
 According to 
https://guide.macports.org/#reference.phases.fetch.git 
I am able to set the url and tag to fetch Š but 
for a particular port I'm playing with I also 
need to add the "--recursive" option in order 
to get the submodules in place. Alternatively, 
I would need to run "git submodule update 
--init --recursive" immediately after the fetch.


 Any thoughts or advice?


First, be sure you actually need to use git to 
fetch the source (it's /much/ better to pull a 
tarball than to pull source from 
git/mercurial/svn/cvs/whatever).


Fair point! The only links given to source for 
this project are to git repositories, 
unfortunately - 
http://www.linphone.org/technical-corner/linphone/downloads 
Š if there's a location from which I may 
download source tarballs, then so much the 
better, but I haven't found one yet!


What's wrong with:

http://download-mirror.savannah.gnu.org/releases/linphone/3.7.x/sources/linphone-3.7.0.tar.gz

Craig
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: How to specify commandline options to git for the fetch phase of a port?

2014-11-12 Thread William Gallafent
On 12 November 2014 15:26, Daniel J. Luke  wrote:

> > On Nov 12, 2014, at 5:45 AM, William Gallafent 
> wrote:
> > According to https://guide.macports.org/#reference.phases.fetch.git I
> am able to set the url and tag to fetch … but for a particular port I'm
> playing with I also need to add the “--recursive” option in order to get
> the submodules in place. Alternatively, I would need to run “git submodule
> update --init --recursive” immediately after the fetch.
> >
> > Any thoughts or advice?
>
> First, be sure you actually need to use git to fetch the source (it's
> /much/ better to pull a tarball than to pull source from
> git/mercurial/svn/cvs/whatever).
>

Fair point! The only links given to source for this project are to git
repositories, unfortunately -
http://www.linphone.org/technical-corner/linphone/downloads … if there's a
location from which I may download source tarballs, then so much the
better, but I haven't found one yet!

There's a ticket open to update the linphone port already, incidentally,
but I decided not to hold my breath (that ticket has been open for 16
months …), and to update the port myself.

I'm not sure if there's a hook for you to pass in additional git args, but
> even if there isn't - it should be relatively trivial for youu to add a
> 'post-fetch' phase to do whatever you want to have happen right after the
> fetch.

[snip explanation]

That looks rather like just the ticket. Thanks for the pointers!

-- 
Bill Gallafent.
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: How to specify commandline options to git for the fetch phase of a port?

2014-11-12 Thread Daniel J. Luke
> On Nov 12, 2014, at 5:45 AM, William Gallafent  wrote:
> According to https://guide.macports.org/#reference.phases.fetch.git I am able 
> to set the url and tag to fetch … but for a particular port I'm playing with 
> I also need to add the “--recursive” option in order to get the submodules in 
> place. Alternatively, I would need to run “git submodule update --init 
> --recursive” immediately after the fetch.
> 
> Any thoughts or advice?

First, be sure you actually need to use git to fetch the source (it's /much/ 
better to pull a tarball than to pull source from 
git/mercurial/svn/cvs/whatever).

I'm not sure if there's a hook for you to pass in additional git args, but even 
if there isn't - it should be relatively trivial for youu to add a 'post-fetch' 
phase to do whatever you want to have happen right after the fetch.

Note that the github portgroup says this:

# Some projects' tag- or commit-based distfiles will not contain all the
# necessary files, if the project uses git submodules. If available, use a
# distfile from "releases" or "downloads" instead, as described above. If the
# project does not provide those, encourage the project's developers to provide
# releases. Until they do, fetch from git instead of from a distfile, and add a
# post-fetch block to fetch the submodules:
#
#   fetch.type  git
#
#   post-fetch {
#   system -W ${worksrcpath} "git submodule update --init"
#   }

--
Daniel J. Luke  
 
++  
  
| * dl...@geeklair.net * |  

| *-- http://www.geeklair.net -* |  

++  
  
|   Opinions expressed are mine and do not necessarily   |  

|  reflect the opinions of my employer.  |  

++




___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev