summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2007-01-12 21:35:52 +0000
committerrillig <rillig@pkgsrc.org>2007-01-12 21:35:52 +0000
commit472c69388c68d83cfc488e66b39cb6bd24206a3d (patch)
tree9009945a96d8a3fa948ecba4af13af1ae796fe50 /pkgtools
parentcecb4b62db9f771aa8634c9d203606a5f51cdc74 (diff)
downloadpkgsrc-472c69388c68d83cfc488e66b39cb6bd24206a3d.tar.gz
Updated url2pkg to 2.3.
Changes since 2.2: - Detect more sourceforge download URLs. - wrksrc_files and wrksrc_dirs are looked for in WRKSRC, not in WRKDIR. - When the URL is being read in and an EOF occurs, the program exits.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/url2pkg/Makefile4
-rw-r--r--pkgtools/url2pkg/files/url2pkg.pl16
2 files changed, 13 insertions, 7 deletions
diff --git a/pkgtools/url2pkg/Makefile b/pkgtools/url2pkg/Makefile
index 24f09670135..2e6ec0fd67a 100644
--- a/pkgtools/url2pkg/Makefile
+++ b/pkgtools/url2pkg/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.46 2006/12/06 01:00:41 rillig Exp $
+# $NetBSD: Makefile,v 1.47 2007/01/12 21:35:52 rillig Exp $
#
-DISTNAME= url2pkg-2.2
+DISTNAME= url2pkg-2.3
CATEGORIES= pkgtools
MASTER_SITES= # none
DISTFILES= # none
diff --git a/pkgtools/url2pkg/files/url2pkg.pl b/pkgtools/url2pkg/files/url2pkg.pl
index 4a6ff00e657..ceee57eb0d5 100644
--- a/pkgtools/url2pkg/files/url2pkg.pl
+++ b/pkgtools/url2pkg/files/url2pkg.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: url2pkg.pl,v 1.3 2006/12/06 01:00:41 rillig Exp $
+# $NetBSD: url2pkg.pl,v 1.4 2007/01/12 21:35:52 rillig Exp $
#
use strict;
@@ -238,7 +238,7 @@ sub generate_initial_package($) {
}
if (!$found) {
- if ($url =~ qr"^http://prdownloads\.sourceforge\.net/([^/]*)/([^/]+)\?download$") {
+ if ($url =~ qr"^http://(?:pr)?downloads\.sourceforge\.net/([^/]*)/([^/]+)\?(?:download|use_mirror=.*)$") {
my $pkgbase = $1;
$distfile = $2;
@@ -337,8 +337,8 @@ sub adjust_package_from_extracted_distfiles()
$abs_wrksrc = $abs_wrkdir;
}
- chomp(@wrksrc_files = `cd "${abs_wrkdir}" && find * -type f`);
- chomp(@wrksrc_dirs = `cd "${abs_wrkdir}" && find * -type d`);
+ chomp(@wrksrc_files = `cd "${abs_wrksrc}" && find * -type f`);
+ chomp(@wrksrc_dirs = `cd "${abs_wrksrc}" && find * -type d`);
magic_configure();
magic_gconf2_schemas();
@@ -417,7 +417,13 @@ sub main() {
if (scalar(@extract_cookie) == 0) {
if (scalar(@ARGV) == 0) {
print("URL: ");
- $url = <STDIN>;
+ # Pressing Ctrl-D is considered equivalent to
+ # aborting the process.
+ if (!defined($url = <STDIN>)) {
+ print("\n");
+ print("No URL given -- aborting.\n");
+ exit(0);
+ }
} else {
$url = shift(@ARGV);
}