Question about creating a port for saga gis
Rainer Hurling
rhurlin at gwdg.de
Fri Nov 13 10:54:10 UTC 2009
Eygene and Sergey,
thank you for your answers. Now I am able to fetch directly :-)
Am 13.11.2009 11:42 (UTC+1) schrieb Eygene Ryabinkin:
> Rainer, good day.
>
> Fri, Nov 13, 2009 at 10:48:15AM +0100, Rainer Hurling wrote:
>> Unfortunately I have problems to let the port fetch the distfile. I
>> tried many ways described in the porters handbook without success.
>>
>> The distfile is located at
>>
>> http://sourceforge.net/projects/saga-gis/files/SAGA%20-%202.0/SAGA%202.0.4/saga_2.0.4_src_linux.tar.gz/download
>
> No, this is the location of the fancy page with ads that will allow one
> to select mirrors and other stuff. It will select the mirror
> automatically, so you're seeing it as the download URL, but it's not so,
> it is just a redirector.
I knew of the redirection method (because it had been discussed on
ports@ for some days in september) but had no clues for the right
notation ;-)
>> I tried for example with combinations of
>>
>> PORTNAME= saga
>> PORTVERSION= 2.0.4
>> DISTNAME= saga_2.0.4_src_linux
>> MASTER_SITES=
>> http://sourceforge.net/projects/saga-gis/files/SAGA%20-%202.0/SAGA%202.0.4/
>>
>> but the main problem seems to be the '/download' after the filename.
>>
>> Fetching the file by hand works but I have no clue how to describe this
>> path in the ports Makefile.
>
> The following mini-Makefile does the trick for me:
> -----
> PORTNAME= saga
> PORTVERSION= 2.0.4
> DISTNAME= saga_2.0.4_src_linux
> MASTER_SITES= SF/saga-gis/SAGA%20-%20${PORTVERSION:C/\.[[:digit:]]*$//}/SAGA%20${PORTVERSION}/
>
> CATEGORIES= devel
>
> .include <bsd.port.mk>
> -----
>
> Please, note that the "SF" word is expanded to the full list of the
> SourceForge mirrors known to the FreeBSD ports subsystem, so you need
> not to explicitely list any URLs -- just use "SF" for SourceForce
> mirrors.
>
> And the snippet I showed above is yet better rewritten as
> -----
> PORTNAME= saga
> PORTVERSION= 2.0.4
> DISTNAME= saga_2.0.4_src_linux
> MASTER_SITES= SF
> MASTER_SITE_SUBDIR= saga-gis/SAGA%20-%20${PORTVERSION:C/\.[[:digit:]]*$//}/SAGA%20${PORTVERSION}
I will apply this version with SUBDIR. It shows clearer the use of a
mirror list for me.
> CATEGORIES= devel
My plans are to use math for SAGA GIS because there is no 'gis'
category. And 'graphics' or 'database' do not suit well enough I think.
> .include <bsd.port.mk>
> -----
> It does the same, but has better semantics.
Many thanks again,
Rainer
More information about the freebsd-ports
mailing list