delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/09/26/07:52:25

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SARE_SUB_ENC_UTF8,SPF_HELO_PASS
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Achim Gratz <Stromeko AT NexGo DOT DE>
Subject: [RFE][PATCH] cygport: allow for subdirectory specification via =?utf-8?b?Q1BBTl9BVVRIT1I=?=
Date: Wed, 26 Sep 2012 11:51:43 +0000 (UTC)
Lines: 45
Message-ID: <loom.20120926T132447-881@post.gmane.org>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://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

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:

    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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019