pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/plist-utils plist-utils: update to 20170813
details: https://anonhg.NetBSD.org/pkgsrc/rev/71221cf8b9c8
branches: trunk
changeset: 369538:71221cf8b9c8
user: adam <adam%pkgsrc.org@localhost>
date: Sat Sep 30 13:23:05 2017 +0000
description:
plist-utils: update to 20170813
20170813:
Deal with ${PYSITELIB}.
diffstat:
pkgtools/plist-utils/Makefile | 7 +++----
pkgtools/plist-utils/files/plist_tree.c | 21 +++++++++++++--------
2 files changed, 16 insertions(+), 12 deletions(-)
diffs (79 lines):
diff -r 5fc1524aacb7 -r 71221cf8b9c8 pkgtools/plist-utils/Makefile
--- a/pkgtools/plist-utils/Makefile Sat Sep 30 13:13:15 2017 +0000
+++ b/pkgtools/plist-utils/Makefile Sat Sep 30 13:23:05 2017 +0000
@@ -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 @@
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"
diff -r 5fc1524aacb7 -r 71221cf8b9c8 pkgtools/plist-utils/files/plist_tree.c
--- a/pkgtools/plist-utils/files/plist_tree.c Sat Sep 30 13:13:15 2017 +0000
+++ b/pkgtools/plist-utils/files/plist_tree.c Sat Sep 30 13:23:05 2017 +0000
@@ -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 @@
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 @@
}
}
- /* 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(©, "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