Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Nov 2009 11:54:08 +0100
From:      Rainer Hurling <rhurlin@gwdg.de>
To:        rea-fbsd@codelabs.ru
Cc:        sergey.dyatko@gmail.com, freebsd-ports@freebsd.org
Subject:   Re: Question about creating a port for saga gis
Message-ID:  <4AFD3AD0.6020107@gwdg.de>
In-Reply-To: <WofN1E7q2ctl0/hiAzPWwBKqodE@8WwhI1BLREGYCErwiufUu0sfwBM>
References:  <4AFD2B5F.3070304@gwdg.de> <WofN1E7q2ctl0/hiAzPWwBKqodE@8WwhI1BLREGYCErwiufUu0sfwBM>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AFD3AD0.6020107>