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

(-)databases/beansdb/Makefile (-7 / +8 lines)
Lines 2-11 Link Here
2
# $FreeBSD: head/databases/beansdb/Makefile 385620 2015-05-07 10:52:15Z amdmi3 $
2
# $FreeBSD: head/databases/beansdb/Makefile 385620 2015-05-07 10:52:15Z amdmi3 $
3
3
4
PORTNAME=	beansdb
4
PORTNAME=	beansdb
5
PORTVERSION=	0.5.3
5
PORTVERSION=	0.6.0
6
DISTVERSIONPREFIX=	v
6
CATEGORIES=	databases
7
CATEGORIES=	databases
7
MASTER_SITES=	GOOGLE_CODE \
8
MASTER_SITES=	GH
8
		http://mirror.amdmi3.ru/googlecode/
9
9
10
MAINTAINER=	ports@FreeBSD.org
10
MAINTAINER=	ports@FreeBSD.org
11
COMMENT=	Yet another distributed key-value storage system from Douban Inc
11
COMMENT=	Yet another distributed key-value storage system from Douban Inc
Lines 13-23 Link Here
13
LICENSE=	BSD3CLAUSE
13
LICENSE=	BSD3CLAUSE
14
LICENSE_FILE=	${WRKSRC}/LICENSE
14
LICENSE_FILE=	${WRKSRC}/LICENSE
15
15
16
USE_GITHUB=	yes
17
GH_ACCOUNT=	douban
18
19
USES=		autoreconf
16
GNU_CONFIGURE=	yes
20
GNU_CONFIGURE=	yes
17
USE_CSTD=	gnu89
18
LDFLAGS+=	-lpthread
19
21
20
PLIST_FILES=	bin/beansdb \
22
PLIST_FILES=	bin/beansdb man/man1/beansdb.1.gz
21
		man/man1/beansdb.1.gz
22
23
23
.include <bsd.port.mk>
24
.include <bsd.port.mk>
(-)databases/beansdb/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (beansdb-0.5.3.tar.gz) = 5b0927c80e279750285bc05473369b45552c2af235634a234f2aaefbc98d6edc
1
SHA256 (douban-beansdb-v0.6.0_GH0.tar.gz) = 64817d3c4dfde3342a2194e39becd17763a8dd854688fe47011017548b6247d8
2
SIZE (beansdb-0.5.3.tar.gz) = 144363
2
SIZE (douban-beansdb-v0.6.0_GH0.tar.gz) = 151711
(-)databases/beansdb/files/patch-configure.ac (+10 lines)
Line 0 Link Here
1
--- configure.ac.orig	2013-07-17 08:09:12 UTC
2
+++ configure.ac
3
@@ -1,6 +1,6 @@
4
 AC_PREREQ(2.61)
5
 AC_INIT([beansdb], [0.6.0], [davies.liu@gmail.com])
6
-AM_INIT_AUTOMAKE([-Wall -Werror foreign])
7
+AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
8
 AC_PROG_CC
9
 AM_PROG_CC_C_O
10
 AC_CONFIG_HEADERS([config.h])
(-)databases/beansdb/files/patch-src__bitcask.c (+26 lines)
Line 0 Link Here
1
--- src/bitcask.c.orig	2013-07-17 08:09:12 UTC
2
+++ src/bitcask.c
3
@@ -99,12 +99,12 @@ Bitcask* bc_open2(Mgr *mgr, int depth, i
4
     return bc;
5
 }
6
 
7
-inline bool file_exists(const char *path) {
8
+static inline bool file_exists(const char *path) {
9
     struct stat st;
10
     return stat(path, &st) == 0;
11
 }
12
 
13
-inline char *gen_path(char *dst, const char *base, const char *fmt, int i)
14
+static inline char *gen_path(char *dst, const char *base, const char *fmt, int i)
15
 {
16
     static char path[256];
17
     char name[16];
18
@@ -114,7 +114,7 @@ inline char *gen_path(char *dst, const c
19
     return dst;
20
 }
21
 
22
-inline char *new_path(char *dst, Mgr *mgr, const char *fmt, int i)
23
+static inline char *new_path(char *dst, Mgr *mgr, const char *fmt, int i)
24
 {
25
     char *path = gen_path(dst, mgr_base(mgr), fmt, i);
26
     if (!file_exists(dst)) {
(-)databases/beansdb/files/patch-src__codec.c (+11 lines)
Line 0 Link Here
1
--- src/codec.c.orig	2013-07-17 08:09:12 UTC
2
+++ src/codec.c
3
@@ -28,7 +28,7 @@ typedef struct {
4
     char fmt[7];
5
 } Fmt;
6
 
7
-inline int fmt_size(Fmt *fmt) {
8
+static inline int fmt_size(Fmt *fmt) {
9
     return sizeof(Fmt) + strlen(fmt->fmt) - 7 + 1;
10
 }
11
 
(-)databases/beansdb/files/patch-src__hstore.c (+19 lines)
Line 0 Link Here
1
--- src/hstore.c.orig	2013-07-17 08:09:12 UTC
2
+++ src/hstore.c
3
@@ -45,14 +45,14 @@ struct t_hstore {
4
     Bitcask* bitcasks[];
5
 };
6
 
7
-inline int get_index(HStore *store, char *key)
8
+static inline int get_index(HStore *store, char *key)
9
 {
10
     if (store->height == 0) return 0;
11
     uint32_t h = fnv1a(key, strlen(key));
12
     return h >> ((8 - store->height) * 4);
13
 }
14
 
15
-inline pthread_mutex_t* get_mutex(HStore *store, char *key)
16
+static inline pthread_mutex_t* get_mutex(HStore *store, char *key)
17
 {
18
     uint32_t i = fnv1a(key, strlen(key)) % NUM_OF_MUTEX;
19
     return &store->locks[i];
(-)databases/beansdb/files/patch-src__htree.c (+67 lines)
Line 0 Link Here
1
--- src/htree.c.orig	2013-07-17 08:09:12 UTC
2
+++ src/htree.c
3
@@ -74,23 +74,23 @@ static void split_node(HTree *tree, Node
4
 static void merge_node(HTree *tree, Node *node);
5
 static void update_node(HTree *tree, Node *node);
6
 
7
-inline uint32_t get_pos(HTree *tree, Node *node)
8
+static inline uint32_t get_pos(HTree *tree, Node *node)
9
 {
10
     return (node - tree->root) - g_index[(int)node->depth];
11
 }
12
 
13
-inline Node *get_child(HTree *tree, Node *node, int b)
14
+static inline Node *get_child(HTree *tree, Node *node, int b)
15
 {
16
     int i = g_index[node->depth + 1] + (get_pos(tree, node) << 4) + b;
17
     return tree->root + i;
18
 }
19
 
20
-inline Data* get_data(Node *node)
21
+static inline Data* get_data(Node *node)
22
 {
23
     return node->data;
24
 }
25
 
26
-inline void set_data(Node *node, Data *data)
27
+static inline void set_data(Node *node, Data *data)
28
 {
29
     if (data != node->data) {
30
         if (node->data) free(node->data);
31
@@ -98,7 +98,7 @@ inline void set_data(Node *node, Data *d
32
     }
33
 }
34
 
35
-inline uint32_t key_hash(HTree *tree, Item* it)
36
+static inline uint32_t key_hash(HTree *tree, Item* it)
37
 {
38
     char buf[255];
39
     int n = dc_decode(tree->dc, buf, it->key, KEYLENGTH(it));
40
@@ -256,8 +256,7 @@ static void merge_node(HTree *tree, Node
41
     for (i=0; i<BUCKET_SIZE; i++){
42
         Data *data = get_data(child+i); 
43
         Item *it = data->head;
44
-        int count = (child+i)->count;
45
-        for (j=0; j < count; j++){
46
+        for (j=0; j < data->count; j++){
47
             if (it->ver > 0) {
48
                 add_item(tree, node, it, key_hash(tree, it), false);
49
             } // drop deleted items, ver < 0
50
@@ -315,7 +314,7 @@ static Item* get_item_hash(HTree* tree, 
51
     return r;
52
 }
53
 
54
-inline int hex2int(char b)
55
+static inline int hex2int(char b)
56
 {
57
     if (('0'<=b && b<='9') || ('a'<=b && b<='f')) {
58
         return (b>='a') ?  (b-'a'+10) : (b-'0');
59
@@ -690,7 +689,7 @@ void ht_destroy(HTree *tree)
60
     free(tree);
61
 }
62
 
63
-inline uint32_t keyhash(const char *s, int len)
64
+static inline uint32_t keyhash(const char *s, int len)
65
 {
66
     return fnv1a(s, len);
67
 }
(-)databases/beansdb/pkg-descr (-4 / +4 lines)
Lines 1-6 Link Here
1
BeansDB is a major amount of data for large, high-availability storage systems
1
BeansDB is a major amount of data for large, high-availability storage
2
distributed KeyValue using HashTree and simplified version number to
2
systems distributed KeyValue using HashTree and simplified version
3
quickly synchronize to ensure consistency in the final (weak),
3
number to quickly synchronize to ensure consistency in the final (weak),
4
a simplified version of the Dynamo.
4
a simplified version of the Dynamo.
5
5
6
WWW:	http://code.google.com/p/beansdb/
6
WWW: http://github.com/douban/beansdb/

Return to bug 200296