aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt
diff options
context:
space:
mode:
authorAndrej Zverev <az@FreeBSD.org>2014-07-27 15:33:13 +0000
committerAndrej Zverev <az@FreeBSD.org>2014-07-27 15:33:13 +0000
commit8451b85d1b2b0c65bbb59068858eb4829a423796 (patch)
tree3c6dc69dbebbd4f1608a35a7c352e8cf0390af75 /ports-mgmt
parente2aedd8abd3ca3fb06e9a7ca9ccb01278ff31386 (diff)
downloadports-8451b85d1b2b0c65bbb59068858eb4829a423796.tar.gz
ports-8451b85d1b2b0c65bbb59068858eb4829a423796.zip
Notes
Diffstat (limited to 'ports-mgmt')
-rw-r--r--ports-mgmt/pkg/Makefile1
-rw-r--r--ports-mgmt/pkg/files/patch-3f5668968
2 files changed, 69 insertions, 0 deletions
diff --git a/ports-mgmt/pkg/Makefile b/ports-mgmt/pkg/Makefile
index 9fd7f369baa9..952bc8e06116 100644
--- a/ports-mgmt/pkg/Makefile
+++ b/ports-mgmt/pkg/Makefile
@@ -1,6 +1,7 @@
# $FreeBSD$
PORTNAME= pkg
+PORTREVISION= 1
DISTVERSION= 1.3.1
CATEGORIES= ports-mgmt
MASTER_SITES= \
diff --git a/ports-mgmt/pkg/files/patch-3f56689 b/ports-mgmt/pkg/files/patch-3f56689
new file mode 100644
index 000000000000..626ebaaa7816
--- /dev/null
+++ b/ports-mgmt/pkg/files/patch-3f56689
@@ -0,0 +1,68 @@
+From 3f56689bff57e3db52ec8fd5c5f730a2aec64d3d Mon Sep 17 00:00:00 2001
+From: Baptiste Daroussin <bapt@FreeBSD.org>
+Date: Sun, 27 Jul 2014 16:12:07 +0200
+Subject: [PATCH] Fix reading pkg.conf
+
+---
+ libpkg/pkg_config.c | 38 +++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 37 insertions(+), 1 deletion(-)
+
+diff --git a/libpkg/pkg_config.c b/libpkg/pkg_config.c
+index 3ba3d0e..692c4dc 100644
+--- libpkg/pkg_config.c
++++ libpkg/pkg_config.c
+@@ -673,6 +673,42 @@ pkg_compiled_for_same_os_major(void)
+ #endif
+ }
+
++static ucl_object_t *
++ucl_dup(const ucl_object_t *from)
++{
++ ucl_object_t *ret;
++ const ucl_object_t *cur;
++ ucl_object_iter_t it;
++ const char *key;
++
++ switch (from->type) {
++ case UCL_BOOLEAN:
++ ret = ucl_object_frombool(ucl_object_toboolean(from));
++ break;
++ case UCL_INT:
++ ret = ucl_object_fromint(ucl_object_toint(from));
++ break;
++ case UCL_STRING:
++ ret = ucl_object_fromstring(ucl_object_tostring(from));
++ break;
++ case UCL_ARRAY:
++ ret = ucl_object_typed_new(from->type);
++ it = NULL;
++ while ((cur = ucl_iterate_object(from, &it, true)))
++ ucl_array_append(ret, ucl_object_ref(cur));
++ break;
++ case UCL_OBJECT:
++ ret = ucl_object_typed_new(from->type);
++ it = NULL;
++ while ((cur = ucl_iterate_object(from, &it, true))) {
++ key = ucl_object_key(cur);
++ ucl_object_insert_key(ret, ucl_object_ref(cur), key, strlen(key), true);
++ }
++ break;
++ }
++
++ return (ret);
++}
+
+ int
+ pkg_init(const char *path, const char *reposdir)
+@@ -802,7 +838,7 @@ pkg_init(const char *path, const char *reposdir)
+
+ if (ncfg == NULL)
+ ncfg = ucl_object_typed_new(UCL_OBJECT);
+- ucl_object_insert_key(ncfg, ucl_object_copy(cur), sbuf_data(ukey), sbuf_len(ukey), true);
++ ucl_object_insert_key(ncfg, ucl_dup(cur), sbuf_data(ukey), sbuf_len(ukey), true);
+ }
+
+ if (ncfg != NULL) {
+--
+1.9.3
+