View | Details | Raw Unified | Return to bug 246642
Collapse All | Expand All

(-)b/devel/jansson/Makefile (-2 / +8 lines)
Lines 1-22 Link Here
1
# Created by: vanilla@
1
# Created by: vanilla@
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	jansson
4
PORTNAME=	jansson
5
PORTVERSION=	2.12
5
PORTVERSION=	2.13.1
6
CATEGORIES=	devel
6
CATEGORIES=	devel
7
MASTER_SITES=	http://www.digip.org/jansson/releases/
7
MASTER_SITES=	http://www.digip.org/jansson/releases/
8
8
9
MAINTAINER=	vanilla@FreeBSD.org
9
MAINTAINER=	vanilla@FreeBSD.org
10
COMMENT=	C library for encoding, decoding, and manipulating JSON data
10
COMMENT=	C library for encoding, decoding, and manipulating JSON data
11
11
12
LICENSE=	MIT
12
LICENSE=	MIT
13
LICENSE_FILE=	${WRKSRC}/LICENSE
13
LICENSE_FILE=	${WRKSRC}/LICENSE
14
14
15
USES=		cpe pathfix pkgconfig tar:bzip2 libtool
15
TEST_DEPENDS=	bash>=0:shells/bash
16
17
USES=		cpe pathfix pkgconfig tar:bzip2 libtool shebangfix
18
SHEBANG_FILES=	scripts/clang-format scripts/clang-format-check
16
USE_LDCONFIG=	yes
19
USE_LDCONFIG=	yes
20
17
GNU_CONFIGURE=	yes
21
GNU_CONFIGURE=	yes
22
18
CPE_VENDOR=	jansson_project
23
CPE_VENDOR=	jansson_project
24
19
INSTALL_TARGET=	install-strip
25
INSTALL_TARGET=	install-strip
20
TEST_TARGET=	check
26
TEST_TARGET=	check
21
27
22
.include <bsd.port.mk>
28
.include <bsd.port.mk>
(-)b/devel/jansson/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1543358593
1
TIMESTAMP = 1590071298
2
SHA256 (jansson-2.12.tar.bz2) = 645d72cc5dbebd4df608d33988e55aa42a7661039e19a379fcbe5c79d1aee1d2
2
SHA256 (jansson-2.13.1.tar.bz2) = ee90a0f879d2b7b7159124ff22b937a2a9a8c36d3bb65d1da7dd3f04370a10bd
3
SIZE (jansson-2.12.tar.bz2) = 404669
3
SIZE (jansson-2.13.1.tar.bz2) = 430215
(-)a/devel/jansson/files/patch-src_hashtable.c (-56 lines)
Removed Link Here
1
--- src/hashtable.c.orig	2018-02-08 09:05:40 UTC
2
+++ src/hashtable.c
3
@@ -108,10 +108,10 @@ static int hashtable_do_del(hashtable_t *hashtable,
4
 {
5
     pair_t *pair;
6
     bucket_t *bucket;
7
-    size_t index;
8
+    size_t idx;
9
 
10
-    index = hash & hashmask(hashtable->order);
11
-    bucket = &hashtable->buckets[index];
12
+    idx = hash & hashmask(hashtable->order);
13
+    bucket = &hashtable->buckets[idx];
14
 
15
     pair = hashtable_find_pair(hashtable, bucket, key, hash);
16
     if(!pair)
17
@@ -154,7 +154,7 @@ static int hashtable_do_rehash(hashtable_t *hashtable)
18
 {
19
     list_t *list, *next;
20
     pair_t *pair;
21
-    size_t i, index, new_size, new_order;
22
+    size_t i, idx, new_size, new_order;
23
     struct hashtable_bucket *new_buckets;
24
 
25
     new_order = hashtable->order + 1;
26
@@ -180,8 +180,8 @@ static int hashtable_do_rehash(hashtable_t *hashtable)
27
     for(; list != &hashtable->list; list = next) {
28
         next = list->next;
29
         pair = list_to_pair(list);
30
-        index = pair->hash % new_size;
31
-        insert_to_bucket(hashtable, &hashtable->buckets[index], &pair->list);
32
+        idx = pair->hash % new_size;
33
+        insert_to_bucket(hashtable, &hashtable->buckets[idx], &pair->list);
34
     }
35
 
36
     return 0;
37
@@ -220,7 +220,7 @@ int hashtable_set(hashtable_t *hashtable, const char *
38
 {
39
     pair_t *pair;
40
     bucket_t *bucket;
41
-    size_t hash, index;
42
+    size_t hash, idx;
43
 
44
     /* rehash if the load ratio exceeds 1 */
45
     if(hashtable->size >= hashsize(hashtable->order))
46
@@ -228,8 +228,8 @@ int hashtable_set(hashtable_t *hashtable, const char *
47
             return -1;
48
 
49
     hash = hash_str(key);
50
-    index = hash & hashmask(hashtable->order);
51
-    bucket = &hashtable->buckets[index];
52
+    idx = hash & hashmask(hashtable->order);
53
+    bucket = &hashtable->buckets[idx];
54
     pair = hashtable_find_pair(hashtable, bucket, key, hash);
55
 
56
     if(pair)
(-)a/devel/jansson/files/patch-src_jansson.h (-33 lines)
Removed Link Here
1
--- src/jansson.h.orig	2018-11-26 08:10:21 UTC
2
+++ src/jansson.h
3
@@ -219,10 +219,10 @@ int json_object_iter_set_new(json_t *object, void *ite
4
         key = json_object_iter_key(n), \
5
             n = json_object_iter_next(object, json_object_key_to_iter(key)))
6
 
7
-#define json_array_foreach(array, index, value) \
8
-	for(index = 0; \
9
-		index < json_array_size(array) && (value = json_array_get(array, index)); \
10
-		index++)
11
+#define json_array_foreach(array, idx, value) \
12
+	for(idx = 0; \
13
+		idx < json_array_size(array) && (value = json_array_get(array, idx)); \
14
+		idx++)
15
 
16
 static JSON_INLINE
17
 int json_object_set(json_t *object, const char *key, json_t *value)
18
@@ -243,11 +243,11 @@ int json_object_iter_set(json_t *object, void *iter, j
19
 }
20
 
21
 size_t json_array_size(const json_t *array);
22
-json_t *json_array_get(const json_t *array, size_t index) JANSSON_ATTRS(warn_unused_result);
23
-int json_array_set_new(json_t *array, size_t index, json_t *value);
24
+json_t *json_array_get(const json_t *array, size_t idx) JANSSON_ATTRS(warn_unused_result);
25
+int json_array_set_new(json_t *array, size_t idx, json_t *value);
26
 int json_array_append_new(json_t *array, json_t *value);
27
-int json_array_insert_new(json_t *array, size_t index, json_t *value);
28
-int json_array_remove(json_t *array, size_t index);
29
+int json_array_insert_new(json_t *array, size_t idx, json_t *value);
30
+int json_array_remove(json_t *array, size_t idx);
31
 int json_array_clear(json_t *array);
32
 int json_array_extend(json_t *array, json_t *other);
33
 
(-)a/devel/jansson/files/patch-src_value.c (-110 lines)
Removed Link Here
1
--- src/value.c.orig	2018-11-26 08:10:21 UTC
2
+++ src/value.c
3
@@ -374,20 +374,20 @@ size_t json_array_size(const json_t *json)
4
     return json_to_array(json)->entries;
5
 }
6
 
7
-json_t *json_array_get(const json_t *json, size_t index)
8
+json_t *json_array_get(const json_t *json, size_t idx)
9
 {
10
     json_array_t *array;
11
     if(!json_is_array(json))
12
         return NULL;
13
     array = json_to_array(json);
14
 
15
-    if(index >= array->entries)
16
+    if(idx >= array->entries)
17
         return NULL;
18
 
19
-    return array->table[index];
20
+    return array->table[idx];
21
 }
22
 
23
-int json_array_set_new(json_t *json, size_t index, json_t *value)
24
+int json_array_set_new(json_t *json, size_t idx, json_t *value)
25
 {
26
     json_array_t *array;
27
 
28
@@ -401,14 +401,14 @@ int json_array_set_new(json_t *json, size_t index, jso
29
     }
30
     array = json_to_array(json);
31
 
32
-    if(index >= array->entries)
33
+    if(idx >= array->entries)
34
     {
35
         json_decref(value);
36
         return -1;
37
     }
38
 
39
-    json_decref(array->table[index]);
40
-    array->table[index] = value;
41
+    json_decref(array->table[idx]);
42
+    array->table[idx] = value;
43
 
44
     return 0;
45
 }
46
@@ -480,7 +480,7 @@ int json_array_append_new(json_t *json, json_t *value)
47
     return 0;
48
 }
49
 
50
-int json_array_insert_new(json_t *json, size_t index, json_t *value)
51
+int json_array_insert_new(json_t *json, size_t idx, json_t *value)
52
 {
53
     json_array_t *array;
54
     json_t **old_table;
55
@@ -494,7 +494,7 @@ int json_array_insert_new(json_t *json, size_t index, 
56
     }
57
     array = json_to_array(json);
58
 
59
-    if(index > array->entries) {
60
+    if(idx > array->entries) {
61
         json_decref(value);
62
         return -1;
63
     }
64
@@ -506,21 +506,21 @@ int json_array_insert_new(json_t *json, size_t index, 
65
     }
66
 
67
     if(old_table != array->table) {
68
-        array_copy(array->table, 0, old_table, 0, index);
69
-        array_copy(array->table, index + 1, old_table, index,
70
-                   array->entries - index);
71
+        array_copy(array->table, 0, old_table, 0, idx);
72
+        array_copy(array->table, idx + 1, old_table, idx,
73
+                   array->entries - idx);
74
         jsonp_free(old_table);
75
     }
76
     else
77
-        array_move(array, index + 1, index, array->entries - index);
78
+        array_move(array, idx + 1, idx, array->entries - idx);
79
 
80
-    array->table[index] = value;
81
+    array->table[idx] = value;
82
     array->entries++;
83
 
84
     return 0;
85
 }
86
 
87
-int json_array_remove(json_t *json, size_t index)
88
+int json_array_remove(json_t *json, size_t idx)
89
 {
90
     json_array_t *array;
91
 
92
@@ -528,14 +528,14 @@ int json_array_remove(json_t *json, size_t index)
93
         return -1;
94
     array = json_to_array(json);
95
 
96
-    if(index >= array->entries)
97
+    if(idx >= array->entries)
98
         return -1;
99
 
100
-    json_decref(array->table[index]);
101
+    json_decref(array->table[idx]);
102
 
103
     /* If we're removing the last element, nothing has to be moved */
104
-    if(index < array->entries - 1)
105
-        array_move(array, index, index + 1, array->entries - index - 1);
106
+    if(idx < array->entries - 1)
107
+        array_move(array, idx, idx + 1, array->entries - idx - 1);
108
 
109
     array->entries--;
110
 
(-)b/devel/jansson/pkg-plist (-1 / +1 lines)
Lines 1-7 Link Here
1
include/jansson.h
1
include/jansson.h
2
include/jansson_config.h
2
include/jansson_config.h
3
lib/libjansson.a
3
lib/libjansson.a
4
lib/libjansson.so
4
lib/libjansson.so
5
lib/libjansson.so.4
5
lib/libjansson.so.4
6
lib/libjansson.so.4.11.1
6
lib/libjansson.so.4.13.0
7
libdata/pkgconfig/jansson.pc
7
libdata/pkgconfig/jansson.pc

Return to bug 246642