From owner-freebsd-perl@FreeBSD.ORG Mon Feb 21 16:33:42 2011 Return-Path: Delivered-To: freebsd-perl@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 414DB1065670 for ; Mon, 21 Feb 2011 16:33:42 +0000 (UTC) (envelope-from andrej.zverev@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id E60068FC17 for ; Mon, 21 Feb 2011 16:33:41 +0000 (UTC) Received: by vxc34 with SMTP id 34so455295vxc.13 for ; Mon, 21 Feb 2011 08:33:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Sa4vzbpg6r1hP7v+Zlq8MWO2viCFrnfRRFs0WnfpG10=; b=SIE6Gry/dQS6LLELJ+Kht+CRHVUN25edchqxbma1OD46tUgdLyr8XvdudaZghK6bEK QMfpS//uOSFtFkJGfqlFj3rTg9QLvKgmfqxnupjQgIr+ptDr0L5Y8pPu04f9f++dKwIx SvBRtLXh64Gxxtx8S/pe3+AmwUm1SCsFQrAwE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=wTOLWa0IvdNpS61L8dlRlGUDNXqluRQcTeWXKvnlebZKSSvAQAKVqmQlo9T6SrvK2k QPUCOoH8xbUCXoEG7TIoX629mUzu6+vZiJuHPUaVS5Z+SHO/3pbSnqAEkq+XkC0sfKuE xvDcf10HxW6QNC2GyzoAmjyHfr6PMPSYv+mIk= MIME-Version: 1.0 Received: by 10.220.177.203 with SMTP id bj11mr346953vcb.18.1298306020577; Mon, 21 Feb 2011 08:33:40 -0800 (PST) Received: by 10.220.183.75 with HTTP; Mon, 21 Feb 2011 08:33:40 -0800 (PST) In-Reply-To: <4D614914.8020603@p6m7g8.com> References: <20110210091512.GE81862@hal.rescomp.berkeley.edu> <20110210093934.GA75152@heechee.tobez.org> <4D5F3AE6.1010304@p6m7g8.com> <4D614898.8090501@p6m7g8.com> <4D614914.8020603@p6m7g8.com> Date: Mon, 21 Feb 2011 19:33:40 +0300 Message-ID: From: Andrej Zverev To: "Philip M. Gollucci" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-perl@freebsd.org Subject: Re: MASTER_SITES/MASTER_SITE_SUBDIR for perl ports X-BeenThere: freebsd-perl@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: maintainer of a number of perl-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Feb 2011 16:33:42 -0000 On Sun, Feb 20, 2011 at 8:02 PM, Philip M. Gollucci wrote: > On 2/20/2011 12:00 PM, Philip M. Gollucci wrote: > > On 2/19/2011 2:42 AM, Andrej Zverev wrote: > >> Do we need take some action for that situation? At current moment > normaly to > >> put inside Makefile MASTER_SITES=CPAN/../../ or same via subdir. Ideally > for > >> me is to bring some magic inside Mk. For example if MASTER_SITES = CPAN > let > >> MASTER_SITE_SUBDIR contain CPAN AUTHOR NAME. > > .............. > > > >> Example: > >> MASTER_SITES= CPAN > >> MASTER_SITE_SUBDIR= CPAN:DDUMONT > >> > >> Inside Mk parse DDUMONT to id/D/DD/DDUMONT and concatenate with > MASTER_SITE > >> (like right now). It looks more universal. CPAN: - keyword tell us to > use > >> new logic otherwise use old one. > > This is the same issue of pulling the CPAN dependency bits right? > > The list changes hourly. If we could keep the meta info up-to-date > > I think thats a great idea. tobez would have some thoughts here. > > > > > Bah, UI misread that. DDUMONT contains all the info you need. So I'm > in favor of it. > > Here is patch ( http://people.freebsd.org/~az/bsd.sites.mk.diff.txt )which implement stuff described above. Since my make(1) skill almost zero I don't know about correct writing such things. But it can work as proof-of-concept :-) And i do my copy-paste in inline :-) MASTER_SITE_SUBDIR= CPAN:DDUMONT Same as MASTER_SITE_SUBDIR= ../../authors/id/D/DD/DDUMONT diff -r d8f71caf03dd -r a4026a5097b8 Mk/bsd.sites.mk --- a/Mk/bsd.sites.mk Mon Feb 21 16:56:30 2011 +0300 +++ b/Mk/bsd.sites.mk Mon Feb 21 19:14:11 2011 +0300 @@ -913,7 +913,9 @@ .endif .if !defined(IGNORE_MASTER_SITE_PERL_CPAN) -MASTER_SITE_PERL_CPAN+= \ + +# Allow override +MASTER_SITE_PERL_CPAN?= \ ftp://ftp.cpan.org/pub/CPAN/modules/by-module/%SUBDIR%/ \ http://www.cpan.dk/modules/by-module/%SUBDIR%/ \ ${MASTER_SITE_RINGSERVER:S,%SUBDIR%,lang/perl/CPAN/modules/by-module/&,} \ @@ -928,6 +930,24 @@ http://backpan.cpan.org/modules/by-module/%SUBDIR%/ \ ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module/%SUBDIR%/ \ http://cpan.nctu.edu.tw/modules/by-module/%SUBDIR%/ + +MASTER_SITE_PERL_CPAN_BY_ID+= \ + # Here we don't need %SUBDIR% + http://www.cpan.dk/modules/by-authors/id/${_PERL_CPAN_ID}/ \ + ftp://ftp.cpan.org/pub/CPAN/modules/by-authors/id/${_PERL_CPAN_ID} + http://backpan.cpan.org/modules/by-authors/id/${_PERL_CPAN_ID}/ \ + ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-authors/id/${_PERL_CPAN_ID}/ \ + +# Cut out our FLAG +_PERL_CPAN_FLAG = ${MASTER_SITE_SUBDIR:C/(CPAN):(.*)/\1/} +# Concat right ID (eg FLORA = F/FL/FLORA) +_PERL_CPAN_ID = ${MASTER_SITE_SUBDIR:C/^CPAN:(.)(.)(.*)$/\1\/\1\2\/\1\2\3/} + +# Apply only if CPAN:NAME found, otherwise use old way +.if !empty(_PERL_CPAN_ID) && ${_PERL_CPAN_FLAG} == "CPAN" + MASTER_SITE_PERL_CPAN=${MASTER_SITE_PERL_CPAN_BY_ID} +.endif + .endif #