From owner-freebsd-ports@FreeBSD.ORG Fri May 5 15:28:48 2006 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBB9D16A403 for ; Fri, 5 May 2006 15:28:48 +0000 (UTC) (envelope-from infofarmer@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 86B9C43D49 for ; Fri, 5 May 2006 15:28:47 +0000 (GMT) (envelope-from infofarmer@gmail.com) Received: by nz-out-0102.google.com with SMTP id o37so717766nzf for ; Fri, 05 May 2006 08:28:42 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WZjOyrydAHJck5RP2DmpFaCCov208Jf2O+lJYWigwDN6rOygQn7G9D4wuQWI8J6RrIeqrb9VpOIGwOhsDFHPZ8PPC0dNMYn71RgT5DBExq/yVb+XvOsYysJ91VvT3LPUlpVPLOIYgykMnd7u1xkhXJDaTC2Wb0WiRvFuR42MzEQ= Received: by 10.64.148.19 with SMTP id v19mr575054qbd; Fri, 05 May 2006 08:28:42 -0700 (PDT) Received: by 10.65.240.12 with HTTP; Fri, 5 May 2006 08:28:42 -0700 (PDT) Message-ID: Date: Fri, 5 May 2006 19:28:42 +0400 From: "Andrew Pantyukhin" To: "Ion-Mihai Tetcu" In-Reply-To: <20060505165738.1965f74f@it.buh.cameradicommercio.ro> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <127FEBDA-4446-47DB-B6CA-4AB6A5CE8562@FreeBSD.org> <20060428003008.19f61dbc@it.buh.tecnik93.com> <20060505165738.1965f74f@it.buh.cameradicommercio.ro> Cc: FreeBSD Ports , Sam Lawrance Subject: Re: sourceforge subdir default X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 May 2006 15:28:48 -0000 On 5/5/06, Ion-Mihai Tetcu wrote: > On Fri, 5 May 2006 17:50:37 +0400 > "Andrew Pantyukhin" wrote: > > > On 4/28/06, Ion-Mihai Tetcu wrote: > > > On Thu, 27 Apr 2006 19:27:38 +0400 > > > "Andrew Pantyukhin" wrote: > > > > Okay, I wonder if we can set M_S_SUBDIR to PORTNAME > > > > by default no matter what MASTER_SITES we have. I mean > > > > if there's a %SUBDIR% to replace, PORTNAME seems to be > > > > a reasonable default value, doesn't it? > > > > > > I've been thinking about the same thing for some time. > > > > > > Care to provide: > > > a) patch for b.p.m > > > b) patch for affected ports where this is true > > > ( c) the rest of M_S_SF ports should work w/o modifications ) ? > > > > > > I'll do a test for all the affected ports. > > > > % find /usr/ports -iname Makefile\* -exec egrep -H > > '^MASTER_SITE_SUBDIR=3D[[:space:]]*\$\{PORTNAME\}$' {} + | wc -l > > 1357 > > > > So I think I won't provide a patch for the ports, we'll do patching > > step-by-step later (in the manner of USE_REINPLACE deprecation) > > > > Attached is a very simple diff. Even without any testing, I don't see > > how it can break anything at all. I'll submit a pr some time later. > > I'll run a (partial) test tonight or tomorrow; first step would be to > find for how many ports this default is true and if we shouldn't rather > set a default for each MASTER_SITE_* Since I have a free minute, I'll do this mega-research for you. There are 1372 makefiles in /usr/ports that match '^MASTER_SITE_SUBDIR=3D[[:space:]]*\$\{PORTNAME\}$' These don't include those where portname is spelled explicitly (instead of ${PORTNAME}) 1212 of these use SOURCEFORGE (1153 exclusively and 59 with other sites) The rest is: _GNU (with derivatives) - 53 _SAVANNAH - 39 _MOZDEV - 4 and others 34 of these ports use %SUBDIR% in custom URLs. 6676 ports use _SUBDIR macro. Over 20% can be simplified after this patch is applied. Mind you, it's not easy (read earlier in this thread) to define SUBDIR default based on MASTER_SITE macro in use. If all goes well, I'll work on a slightly more complicated patch that will provide correct defaults for about 2000 p5 ports.