summaryrefslogtreecommitdiff
path: root/pkgtools/url2pkg/files
diff options
context:
space:
mode:
authorcheusov <cheusov>2011-05-30 07:28:21 +0000
committercheusov <cheusov>2011-05-30 07:28:21 +0000
commit4739dde3a46c3f90f72d35182185351670273be5 (patch)
tree2d4550968d7b0b28967dbbf1750504d5d97ca557 /pkgtools/url2pkg/files
parent72570879867da1fb8b8aa5bf68ea61c59afb8a46 (diff)
downloadpkgsrc-4739dde3a46c3f90f72d35182185351670273be5.tar.gz
Add LICENSE
Update to 2.13: HOMEPAGE is detected correctly for code.google.com projects USE_CMAKE is to yes for cmake-based projects
Diffstat (limited to 'pkgtools/url2pkg/files')
-rw-r--r--pkgtools/url2pkg/files/url2pkg.pl20
1 files changed, 19 insertions, 1 deletions
diff --git a/pkgtools/url2pkg/files/url2pkg.pl b/pkgtools/url2pkg/files/url2pkg.pl
index e09f70460a2..73046ed2387 100644
--- a/pkgtools/url2pkg/files/url2pkg.pl
+++ b/pkgtools/url2pkg/files/url2pkg.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: url2pkg.pl,v 1.17 2010/02/24 22:27:11 joerg Exp $
+# $NetBSD: url2pkg.pl,v 1.18 2011/05/30 07:28:23 cheusov Exp $
#
# Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -140,6 +140,13 @@ sub magic_configure() {
push(@build_vars, [$varname, "yes"]);
}
+sub magic_cmake() {
+ open(CONF, "<", "${abs_wrksrc}/CMakeLists.txt") or return;
+ close(CONF);
+
+ push(@build_vars, ["USE_CMAKE", "yes"]);
+}
+
sub magic_gconf2_schemas() {
my @gconf2_files = grep(/schemas(?:\.in.*)$/, @wrksrc_files);
if (@gconf2_files) {
@@ -281,6 +288,16 @@ sub generate_initial_package($) {
}
if (!$found) {
+ if ($url =~ qr"^http://([^.]*).googlecode\.com/files/(.*$)") {
+ my $pkgbase = $1;
+ $distfile = $2;
+ $master_sites = "http://${pkgbase}.googlecode.com/files/";
+ $homepage = "http://code.google.com/p/${pkgbase}/";
+ $found = true;
+ }
+ }
+
+ if (!$found) {
if ($url =~ qr"^(.*/)(.*)$") {
($master_sites, $distfile) = ($1, $2);
$homepage = $master_sites;
@@ -375,6 +392,7 @@ sub adjust_package_from_extracted_distfiles()
chomp(@wrksrc_dirs = `cd "${abs_wrksrc}" && find * -type d`);
magic_configure();
+ magic_cmake();
magic_gconf2_schemas();
magic_libtool();
magic_perlmod();