delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <50673513.9090307@x-ray.at> |
Date: | Sat, 29 Sep 2012 12:51:15 -0500 |
From: | Reini Urban <rurban AT x-ray DOT at> |
User-Agent: | Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: [RFE][PATCH] cygport: allow for subdirectory specification via CPAN_AUTHOR |
References: | <loom DOT 20120926T132447-881 AT post DOT gmane DOT org> |
In-Reply-To: | <loom.20120926T132447-881@post.gmane.org> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
On 09/26/2012 06:51 AM, Achim Gratz wrote: > > Hi Yaakov, > > several Perl distributions have chosen to put the actual archives in a > subdirectory (e.g. Inline::Files). So far I've dealt with those by editing > SRC_URI after "inherit perl", but I'd like something more straigtforward. I > propose that CPAN_AUTHOR should optionally include this additional subdirectory > as a "/subdir" suffix. Patch to that effect: Just for easier understanding: How would that look like for e.g. A/AM/AMBS/Inline/Inline-Files-0.68.tar.gz NAME=Inline-Files inherit perl CPAN_AUTHOR=AMBS/Inline Looks a bit weird. Don't we have a better field for this cpan quirks? Like a new CPAN_DIR which defaults to CPAN_AUTHOR? > Support subdirectories in CPAN download URL > > * cygclass/perl.cygclass: Allow CPAN_AUTHOR to have a /subdir suffix. > This is necessary for some modules that put the distribution files > in some subdirectory. Only upcase the actual author name (up until > the first "/") and preserve case for the suffix part. > > Modified cygclass/perl.cygclass > diff --git a/cygclass/perl.cygclass b/cygclass/perl.cygclass > index b4aecdf..4dbe824 100644 > --- a/cygclass/perl.cygclass > +++ b/cygclass/perl.cygclass > @@ -139,9 +139,12 @@ HOMEPAGE="http://search.cpan.org/dist/${ORIG_PN}/" > # SEE ALSO > # mirror_cpan > #**** > -cpan_author_ftp=${CPAN_AUTHOR^^} > -SRC_URI="mirror://cpan/authors/id/${cpan_author_ftp:0:1} > /${cpan_author_ftp:0:2}/${cpan_author_ftp} > /${ORIG_PN}-${PV}.${CPAN_TARBALL_SUFFIX:-tar.gz}" > +cpan_author_ftp="${CPAN_AUTHOR%%/*}" > +cpan_module_ftp="${CPAN_AUTHOR#${cpan_author_ftp}}" > +cpan_author_ftp="${cpan_author_ftp^^}" > +SRC_URI="mirror://cpan/authors/id/${cpan_author_ftp:0:1} > /${cpan_author_ftp:0:2}/${cpan_author_ftp}$cpan_module_ftp > /${ORIG_PN}-${PV}.${CPAN_TARBALL_SUFFIX:-tar.gz}" > unset cpan_author_ftp > +unset cpan_module_ftp > > fi # defined CPAN_AUTHOR > > > (Watch for the linewrap) > > Regards, > Achim > > > -- > Problem reports: http://cygwin.com/problems.html > FAQ: http://cygwin.com/faq/ > Documentation: http://cygwin.com/docs.html > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > > -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |