pkgsrc-Changes archive

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

CVS commit: pkgsrc/pkgtools/plist-utils



Module Name:    pkgsrc
Committed By:   adam
Date:           Sat Sep 30 13:23:06 UTC 2017

Modified Files:
        pkgsrc/pkgtools/plist-utils: Makefile
        pkgsrc/pkgtools/plist-utils/files: plist_tree.c

Log Message:
plist-utils: update to 20170813

20170813:
Deal with ${PYSITELIB}.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/pkgtools/plist-utils/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/pkgtools/plist-utils/files/plist_tree.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/plist-utils/Makefile
diff -u pkgsrc/pkgtools/plist-utils/Makefile:1.2 pkgsrc/pkgtools/plist-utils/Makefile:1.3
--- pkgsrc/pkgtools/plist-utils/Makefile:1.2    Fri Dec 16 00:01:04 2016
+++ pkgsrc/pkgtools/plist-utils/Makefile        Sat Sep 30 13:23:05 2017
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.2 2016/12/16 00:01:04 joerg Exp $
-#
+# $NetBSD: Makefile,v 1.3 2017/09/30 13:23:05 adam Exp $
 
-PKGNAME=       plist-utils-20161216
+PKGNAME=       plist-utils-20170813
 CATEGORIES=    pkgtools
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
@@ -10,7 +9,7 @@ COMMENT=       Utility to facilitate managemen
 LICENSE=       2-clause-bsd
 
 USE_BSD_MAKEFILE=      yes
-USE_TOOLS=             nroff
+USE_TOOLS+=            nroff
 
 INSTALLATION_DIRS+=    bin ${PKGMANDIR}/man1
 PKGSRC_LOCKTYPE=       none    # avoid "bootstrapping problem"

Index: pkgsrc/pkgtools/plist-utils/files/plist_tree.c
diff -u pkgsrc/pkgtools/plist-utils/files/plist_tree.c:1.2 pkgsrc/pkgtools/plist-utils/files/plist_tree.c:1.3
--- pkgsrc/pkgtools/plist-utils/files/plist_tree.c:1.2  Thu Jun  8 18:14:51 2017
+++ pkgsrc/pkgtools/plist-utils/files/plist_tree.c      Sat Sep 30 13:23:06 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: plist_tree.c,v 1.2 2017/06/08 18:14:51 adam Exp $ */
+/* $NetBSD: plist_tree.c,v 1.3 2017/09/30 13:23:06 adam Exp $ */
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: plist_tree.c,v 1.2 2017/06/08 18:14:51 adam Exp $");
+__RCSID("$NetBSD: plist_tree.c,v 1.3 2017/09/30 13:23:06 adam Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -128,16 +128,15 @@ plist_tree_init(void)
 char *
 get_key(const char *entry)
 {
-       char *copy;
+       char *copy, *s;
        size_t n = 0;
-       char *s;
        regmatch_t rm[10];
        int ret;
        size_t i;
 
        assert(entry);
 
-       /* 1. Strip all ${PLIST.option}-like strings */
+       /* Strip all ${PLIST.option}-like strings */
        ret = regexec(&plist_tree_singleton.plist_regex_options, entry,
                      sizeof(rm)/sizeof(rm[0]), rm, 0);
        if (!ret) { /* Something found! */
@@ -150,10 +149,16 @@ get_key(const char *entry)
                }
        }
 
-       /* Set copy that now contains an entry with removed '${PLIST.*}' */
-       copy = strdup(entry + n);
+       /* ${PYSITELIB} -> lib/python/site-packages */
+       if (strncmp("${PYSITELIB}", entry + n, 12) == 0) {
+               asprintf(&copy, "lib/python/site-packages%s", entry + n + 12);
+       }
+       else {
+               /* Set copy that now contains an entry with removed '${PLIST.*}' */
+               copy = strdup(entry + n);
+       }
        if (copy == NULL)
-               err(EXIT_FAILURE, "strdup");
+               err(EXIT_FAILURE, "strdup/asprintf");
 
        return copy;
 }



Home | Main Index | Thread Index | Old Index