diff options
-rw-r--r-- | pkgtools/url2pkg/Makefile | 5 | ||||
-rw-r--r-- | pkgtools/url2pkg/files/url2pkg.pl | 20 |
2 files changed, 22 insertions, 3 deletions
diff --git a/pkgtools/url2pkg/Makefile b/pkgtools/url2pkg/Makefile index afb9481b532..3393ce81d6f 100644 --- a/pkgtools/url2pkg/Makefile +++ b/pkgtools/url2pkg/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.60 2009/11/20 11:49:18 rillig Exp $ +# $NetBSD: Makefile,v 1.61 2011/05/30 07:28:21 cheusov Exp $ # -DISTNAME= url2pkg-2.12 +DISTNAME= url2pkg-2.13 CATEGORIES= pkgtools MASTER_SITES= # none DISTFILES= # none @@ -9,6 +9,7 @@ DISTFILES= # none MAINTAINER= rillig@NetBSD.org HOMEPAGE= http://www.NetBSD.org/docs/pkgsrc/creating.html COMMENT= Tool to automate initial steps in building a package +LICENSE= original-bsd PKG_INSTALLATION_TYPES= overwrite pkgviews PKG_DESTDIR_SUPPORT= user-destdir 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(); |