From owner-freebsd-ports@FreeBSD.ORG Fri Nov 13 10:42:11 2009 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C46EA1065670 for ; Fri, 13 Nov 2009 10:42:11 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 728BC8FC31 for ; Fri, 13 Nov 2009 10:42:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codelabs.ru; s=two; h=Date:From:To:Cc:Subject:Message-ID: Reply-To:References:MIME-Version:Content-Type:In-Reply-To: Sender; bh=Yi4vRx124hdZYmognXv4WGQe+y/0gOYtgiubBbKI/Co=; b=ajeXB pPKTElcP+7VpSYIWDSa+E5WRnfyMULpzbn1v6T+uSUnB6Ym6m0wqgQH9ffyV8zTv ysR5egYZb0sqqPf9f4DFSSypVuVC41XuOjxxvgRtz3cchHqsBIVDjh9YYb3ulj93 fAzU4hfcBGRl48eB2KTNlsaGqE8otINlLEoSMyRLhhZ/lSZZJXgiWun+9INFpE3p axAuRpzOvN2l5bPI8mDATCVm2fA7k8iwN33jkaCMzbUG+tuQS5H/hnOVD2RymZ6D rr8HG2YmkQKucFIFUyjfTo71cHEhS8iYy9c0XMQnXFAKmKkXYdb91t98sNmEoRa2 3ihkOPVzZX71KtsoQ== Received: from shadow.codelabs.ru (cdma-92-36-117-56.msk.skylink.ru [92.36.117.56]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1N8tbU-000LlY-Pp; Fri, 13 Nov 2009 13:42:10 +0300 Date: Fri, 13 Nov 2009 13:42:07 +0300 From: Eygene Ryabinkin To: Rainer Hurling Message-ID: References: <4AFD2B5F.3070304@gwdg.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AFD2B5F.3070304@gwdg.de> Sender: rea-fbsd@codelabs.ru Cc: freebsd-ports@freebsd.org Subject: Re: Question about creating a port for saga gis X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rea-fbsd@codelabs.ru List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Nov 2009 10:42:11 -0000 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 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 ----- 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} CATEGORIES= devel .include ----- It does the same, but has better semantics. -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ #