pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/url2pkg url2pkg 2.30:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/061631acbe5a
branches:  trunk
changeset: 334354:061631acbe5a
user:      maya <maya%pkgsrc.org@localhost>
date:      Sat May 25 03:58:49 2019 +0000

description:
url2pkg 2.30:
- Support for creating much of the necessary makefile for a Rust Cargo package

Correct package license

diffstat:

 pkgtools/url2pkg/Makefile         |   7 +++----
 pkgtools/url2pkg/files/url2pkg.pl |  18 +++++++++++++++++-
 2 files changed, 20 insertions(+), 5 deletions(-)

diffs (60 lines):

diff -r ba660706fb39 -r 061631acbe5a pkgtools/url2pkg/Makefile
--- a/pkgtools/url2pkg/Makefile Sat May 25 01:41:35 2019 +0000
+++ b/pkgtools/url2pkg/Makefile Sat May 25 03:58:49 2019 +0000
@@ -1,13 +1,12 @@
-# $NetBSD: Makefile,v 1.90 2019/05/23 19:23:13 rillig Exp $
+# $NetBSD: Makefile,v 1.91 2019/05/25 03:58:49 maya Exp $
 
-PKGNAME=       url2pkg-2.29
-PKGREVISION=   1
+PKGNAME=       url2pkg-2.30
 CATEGORIES=    pkgtools
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      http://www.NetBSD.org/docs/pkgsrc/creating.html
 COMMENT=       Tool to automate initial steps in building a package
-LICENSE=       original-bsd
+LICENSE=       2-clause-bsd
 
 WRKSRC=                ${WRKDIR}
 NO_CHECKSUM=   yes
diff -r ba660706fb39 -r 061631acbe5a pkgtools/url2pkg/files/url2pkg.pl
--- a/pkgtools/url2pkg/files/url2pkg.pl Sat May 25 01:41:35 2019 +0000
+++ b/pkgtools/url2pkg/files/url2pkg.pl Sat May 25 03:58:49 2019 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: url2pkg.pl,v 1.38 2018/08/22 20:48:38 maya Exp $
+# $NetBSD: url2pkg.pl,v 1.39 2019/05/25 03:58:50 maya Exp $
 #
 
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -207,6 +207,21 @@
        $pkgname = "p5-\${DISTNAME}";
 }
 
+sub magic_cargo() {
+       open(CONF, "<", "${abs_wrksrc}/Cargo.lock") or return;
+
+       while (defined(my $line = <CONF>)) {
+               # "checksum cargo-package-name cargo-package-version
+               if ($line =~ m/("checksum)\s(\S+)\s(\S+)/) {
+                       push(@build_vars, ["CARGO_CRATE_DEPENDS", "$2-$3"]);
+               }
+       }
+       close(CONF);
+
+       push(@includes, "../../lang/rust/cargo.mk");
+}
+
+
 sub magic_pkg_config() {
        my @pkg_config_files = grep { /\.pc\.in$/ && ! /-uninstalled\.pc\.in$/ } @wrksrc_files;
        if (@pkg_config_files) {
@@ -449,6 +464,7 @@
        magic_gconf2_schemas();
        magic_libtool();
        magic_perlmod();
+       magic_cargo();
        magic_pkg_config();
        magic_po();
        magic_use_languages();



Home | Main Index | Thread Index | Old Index