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

(-)Makefile (-4 / +4 lines)
Lines 1-8 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	ccnet
3
PORTNAME=	ccnet
4
PORTVERSION=	3.1.4
4
PORTVERSION=	4.0.6
5
PORTREVISION=	4
5
PORTREVISION=	5
6
CATEGORIES=	net-mgmt devel
6
CATEGORIES=	net-mgmt devel
7
7
8
MAINTAINER=	yan_jingfeng@yahoo.com
8
MAINTAINER=	yan_jingfeng@yahoo.com
Lines 23-30 Link Here
23
23
24
USE_GITHUB=	yes
24
USE_GITHUB=	yes
25
GH_ACCOUNT=	haiwen
25
GH_ACCOUNT=	haiwen
26
GH_TAGNAME=	v3.1.4
26
GH_TAGNAME=	v${PORTVERSION}-server
27
GH_COMMIT=	6b55658
27
GH_COMMIT=	1e1aeae
28
28
29
USES=		autoreconf libtool pkgconfig pathfix python:2
29
USES=		autoreconf libtool pkgconfig pathfix python:2
30
PATHFIX_MAKEFILEIN=	Makefile.am
30
PATHFIX_MAKEFILEIN=	Makefile.am
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (ccnet-3.1.4.tar.gz) = 5838cff989fe1910aeda5a2801f331d479f76e7d2c00cb8d87f016a7e9b0ea8d
1
SHA256 (ccnet-4.0.6.tar.gz) = 4030d931c2aaad5d2d783c4afb2e2cda556a91307c26a378c91602540255b7eb
2
SIZE (ccnet-3.1.4.tar.gz) = 216920
2
SIZE (ccnet-4.0.6.tar.gz) = 218569
(-)files/patch-Makefile.am (+18 lines)
Line 0 Link Here
1
--- Makefile.am.orig	2015-01-27 22:28:22.000000000 -0500
2
+++ Makefile.am	2015-01-27 22:33:35.000000000 -0500
3
@@ -24,9 +24,13 @@
4
 install-data-local:
5
 if MACOS
6
 	sed -i '' -e "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
7
+else 
8
+if BSD
9
+	sed -i '' "s|(DESTDIR)|${PREFIX}|g" $(pcfiles)
10
 else
11
 	${SED} -i "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
12
 endif
13
+endif
14
 
15
 dist-hook:
16
-	git log --format='%H' -1 > $(distdir)/latest_commit
17
\ No newline at end of file
18
+	git log --format='%H' -1 > $(distdir)/latest_commit
(-)files/patch-configure.ac (-6 / +73 lines)
Lines 1-11 Link Here
1
--- configure.ac.orig   2014-06-10 04:41:45.000000000 -0400
1
--- configure.ac.orig	2014-12-03 21:47:39.000000000 -0500
2
+++ configure.ac    2014-08-26 18:17:12.161128916 -0400
2
+++ configure.ac	2015-01-27 23:56:25.000000000 -0500
3
@@ -218,7 +218,7 @@
3
@@ -51,8 +51,16 @@
4
   AC_MSG_RESULT(no)
5
 fi
6
 
7
+AC_MSG_CHECKING(for BSD)
8
+if test `uname | grep -e BSD -e DragonFly | wc -l` = "1"; then
9
+  bbsd=true
10
+  AC_MSG_RESULT(compile in BSD)
11
+else
12
+  AC_MSG_RESULT(no)
13
+fi
14
+
15
 AC_MSG_CHECKING(for Linux)
16
-if test "$bmac" != "true" -a "$bwin32" != "true"; then
17
+if test "$bmac" != "true" -a "$bwin32" != "true" -a "$bbsd" != "true"; then
18
   blinux=true
19
   AC_MSG_RESULT(compile in linux)
20
 else
21
@@ -154,6 +162,7 @@
22
 AM_CONDITIONAL([WIN32], [test "$bwin32" = "true"])
23
 AM_CONDITIONAL([MACOS], [test "$bmac" = "true"])
24
 AM_CONDITIONAL([LINUX], [test "$blinux" = "true"])
25
+AM_CONDITIONAL([BSD], [test "$bbsd" = "true"])
26
 
27
 
28
 # check libraries
29
@@ -192,6 +201,7 @@
30
   LIBS=
31
   LIB_RESOLV=
32
   LIB_UUID=-lrpcrt4
33
+  LIB_KVM=
34
   LIB_IPHLPAPI=-liphlpapi
35
   LIB_SHELL32=-lshell32
36
   LIB_PSAPI=-lpsapi
37
@@ -204,11 +214,25 @@
38
   LIB_INTL=
39
   LIB_RESOLV=-lresolv
40
   LIB_UUID=
41
+  LIB_KVM=
42
   LIB_IPHLPAPI=
43
   LIB_SHELL32=
44
   LIB_PSAPI=
45
   MSVC_CFLAGS=
46
   LIB_DIRWATCH="-framework CoreServices"
47
+elif test "$bbsd" = true ; then
48
+  LIB_WS32=
49
+  LIB_GDI32=
50
+  LIB_RT=
51
+  LIB_INTL=
52
+  LIB_RESOLV=
53
+  LIB_UUID=-luuid
54
+  LIB_KVM=-lkvm
55
+  LIB_IPHLPAPI=
56
+  LIB_SHELL32=
57
+  LIB_PSAPI=
58
+  MSVC_CFLAGS=
59
+  LIB_DIRWATCH=
60
 else
61
   LIB_WS32=
4
   LIB_GDI32=
62
   LIB_GDI32=
5
   LIB_RT=
63
@@ -216,6 +240,7 @@
6
   LIB_INTL=
64
   LIB_INTL=
7
-  LIB_RESOLV=-lresolv
65
   LIB_RESOLV=-lresolv
8
+  LIB_RESOLV=
9
   LIB_UUID=-luuid
66
   LIB_UUID=-luuid
67
+  LIB_KVM=
10
   LIB_IPHLPAPI=
68
   LIB_IPHLPAPI=
11
   LIB_SHELL32=
69
   LIB_SHELL32=
70
   LIB_PSAPI=
71
@@ -229,6 +254,7 @@
72
 AC_SUBST(LIB_INTL)
73
 AC_SUBST(LIB_RESOLV)
74
 AC_SUBST(LIB_UUID)
75
+AC_SUBST(LIB_KVM)
76
 AC_SUBST(LIB_IPHLPAPI)
77
 AC_SUBST(LIB_SHELL32)
78
 AC_SUBST(LIB_PSAPI)
(-)files/patch-lib_Makefile.am (-50 / +5 lines)
Lines 1-55 Link Here
1
--- lib/Makefile.am.orig	2014-11-11 10:10:39.971972968 -0500
1
--- lib/Makefile.am.orig	2015-01-27 22:48:22.000000000 -0500
2
+++ lib/Makefile.am	2014-11-11 10:37:36.712929368 -0500
2
+++ lib/Makefile.am	2015-01-27 22:49:06.000000000 -0500
3
@@ -19,7 +19,6 @@
3
@@ -61,6 +61,7 @@
4
 	peer-common.h \
5
 	string-util.h \
6
 	libccnet_utils.h \
7
-	ccnet-object.h \
8
 	rpc-common.h \
9
 	net.h \
10
 	utils.h \
11
@@ -60,12 +59,14 @@
12
 
13
 libccnetd_la_LDFLAGS = -no-undefined
4
 libccnetd_la_LDFLAGS = -no-undefined
14
 libccnetd_la_LIBADD = @GLIB2_LIBS@  @GOBJECT_LIBS@ @SSL_LIBS@ @LIB_GDI32@ \
5
 libccnetd_la_LIBADD = @GLIB2_LIBS@  @GOBJECT_LIBS@ @SSL_LIBS@ @LIB_GDI32@ \
15
-	                  -lsqlite3 -levent @LIB_WS32@ @LIB_UUID@ \
6
 	                  -lsqlite3 @LIBEVENT_LIBS@ @LIB_WS32@ @LIB_UUID@ \
16
+	                  -lsqlite3 -levent @LIB_WS32@ @LIB_UUID@ -lkvm \
7
+			@LIB_KVM@ \
17
 					  @LIB_SHELL32@ @LIB_PSAPI@ @SEARPC_LIBS@
8
 					  @LIB_SHELL32@ @LIB_PSAPI@ @SEARPC_LIBS@
18
 
9
 
19
 
10
 
20
 ccnet_object_define = ccnetobj.vala
21
 
22
+valac_gen = ccnetobj.c ccnet-object.h
23
+
24
 ccnet-client.c: ccnet-object.h
25
 
26
 ccnet-object.h: ${ccnet_object_define}
27
@@ -78,15 +79,23 @@
28
 
29
 searpc_gen = searpc-signature.h searpc-marshal.h
30
 
31
-gensource: ${searpc_gen}
32
+gensource: ${searpc_gen} ${valac_gen}
33
 
34
-${searpc_gen}: $(top_srcdir)/lib/rpc_table.py
35
+rpc_table.stamp: ${top_srcdir}/lib/rpc_table.py
36
+	@rm -f rpc_table.tmp
37
+	@touch rpc_table.tmp
38
 	@echo "[libsearpc]: generating rpc header files"
39
-	@PYTHON@ `which searpc-codegen.py` $(top_srcdir)/lib/rpc_table.py
40
+	@PYTHON@ `which searpc-codegen.py` ${top_srcdir}/lib/rpc_table.py
41
 	@echo "[libsearpc]: done"
42
+	@mv -f rpc_table.tmp $@
43
+
44
+${searpc_gen}: rpc_table.stamp
45
 
46
 clean-local:
47
 	rm -f ${searpc_gen}
48
-	rm -f $(top_srcdir)/lib/rpc_table.pyc
49
+	rm -f rpc_table.pyc
50
+	rm -f rpc_table.stamp
51
+	rm -f rpc_table.tmp
52
+	rm -f ${valac_gen}
53
 
54
-CLEANFILES = ${searpc_gen}
55
+CLEANFILES = ${searpc_gen} ${valac_gen}
(-)files/patch-lib_net.c (-4 / +7 lines)
Lines 1-11 Link Here
1
--- lib/net.c.orig	2014-09-02 21:06:10.181095833 -0400
1
--- lib/net.c.orig	2015-01-27 23:18:59.000000000 -0500
2
+++ lib/net.c	2014-09-02 21:06:40.052390263 -0400
2
+++ lib/net.c	2015-01-27 23:23:04.000000000 -0500
3
@@ -154,7 +154,7 @@
3
@@ -152,7 +152,11 @@
4
 
4
 
5
     snprintf (buf, sizeof(buf), "%d", port);
5
     snprintf (buf, sizeof(buf), "%d", port);
6
 
6
 
7
-    if ( (n = getaddrinfo(NULL, buf, &hints, &res) ) != 0) {
7
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
8
+    if ( (n = getaddrinfo("0.0.0.0", buf, &hints, &res) ) != 0) {
8
+    if ( (n = getaddrinfo("0.0.0.0", buf, &hints, &res) ) != 0) {
9
+#else
10
     if ( (n = getaddrinfo(NULL, buf, &hints, &res) ) != 0) {
11
+#endif
9
         ccnet_warning ("getaddrinfo fails: %s\n", gai_strerror(n));
12
         ccnet_warning ("getaddrinfo fails: %s\n", gai_strerror(n));
10
         return -1;
13
         return -1;
11
     }
14
     }
(-)files/patch-lib_utils.c (-7 / +8 lines)
Lines 1-5 Link Here
1
--- lib/utils.c.orig	2014-07-31 06:20:28.000000000 -0400
1
--- lib/utils.c.orig	2015-01-27 23:13:50.000000000 -0500
2
+++ lib/utils.c	2014-11-21 23:06:33.789257323 -0500
2
+++ lib/utils.c	2015-01-27 23:18:04.000000000 -0500
3
@@ -43,6 +43,16 @@
3
@@ -43,6 +43,16 @@
4
 
4
 
5
 #include <event2/util.h>
5
 #include <event2/util.h>
Lines 17-27 Link Here
17
 extern int inet_pton(int af, const char *src, void *dst);
17
 extern int inet_pton(int af, const char *src, void *dst);
18
 
18
 
19
 
19
 
20
@@ -1465,14 +1475,19 @@
20
@@ -1465,14 +1475,20 @@
21
 }
21
 }
22
 #endif  /* ifdef WIN32 */
22
 #endif  /* ifdef WIN32 */
23
 
23
 
24
-#ifdef __linux__
24
-#ifdef __linux__
25
+
25
 /* read the link of /proc/123/exe and compare with `process_name' */
26
 /* read the link of /proc/123/exe and compare with `process_name' */
26
 static int
27
 static int
27
-find_process_in_dirent(struct dirent *dir, const char *process_name)
28
-find_process_in_dirent(struct dirent *dir, const char *process_name)
Lines 39-45 Link Here
39
         return -1;
40
         return -1;
40
     }
41
     }
41
 
42
 
42
@@ -1496,7 +1511,8 @@
43
@@ -1496,7 +1512,8 @@
43
 }
44
 }
44
 
45
 
45
 /* read the /proc fs to determine whether some process is running */
46
 /* read the /proc fs to determine whether some process is running */
Lines 49-55 Link Here
49
 {
50
 {
50
     DIR *proc_dir = opendir("/proc");
51
     DIR *proc_dir = opendir("/proc");
51
     if (!proc_dir) {
52
     if (!proc_dir) {
52
@@ -1510,7 +1526,7 @@
53
@@ -1510,7 +1527,7 @@
53
         /* /proc/[1-9][0-9]* */
54
         /* /proc/[1-9][0-9]* */
54
         if (first > '9' || first < '1')
55
         if (first > '9' || first < '1')
55
             continue;
56
             continue;
Lines 58-64 Link Here
58
         if (pid > 0) {
59
         if (pid > 0) {
59
             closedir(proc_dir);
60
             closedir(proc_dir);
60
             return TRUE;
61
             return TRUE;
61
@@ -1520,6 +1536,18 @@
62
@@ -1520,6 +1537,18 @@
62
     closedir(proc_dir);
63
     closedir(proc_dir);
63
     return FALSE;
64
     return FALSE;
64
 }
65
 }
Lines 77-83 Link Here
77
 #endif
78
 #endif
78
 
79
 
79
 #ifdef __APPLE__
80
 #ifdef __APPLE__
80
@@ -1530,6 +1558,108 @@
81
@@ -1530,6 +1559,108 @@
81
 }
82
 }
82
 #endif
83
 #endif
83
 
84
 
(-)files/patch-makefile.am (-17 lines)
Lines 1-17 Link Here
1
--- Makefile.am.orig	2014-07-21 07:24:46.000000000 -0400
2
+++ Makefile.am	2014-07-21 07:25:02.000000000 -0400
3
@@ -22,11 +22,7 @@
4
 ACLOCAL_AMFLAGS = -I m4
5
 
6
 install-data-local:
7
-if MACOS
8
-	sed -i '' -e "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
9
-else
10
-	sed -i "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
11
-endif
12
+	sed -i '' "s|(DESTDIR)|${PREFIX}|g" $(pcfiles)
13
 
14
 dist-hook:
15
-	git log --format='%H' -1 > $(distdir)/latest_commit
16
\ No newline at end of file
17
+	git log --format='%H' -1 > $(distdir)/latest_commit
(-)files/patch-net_common_getgateway.c (-2 / +2 lines)
Lines 1-5 Link Here
1
--- net/common/getgateway.c.orig	2014-07-28 14:30:13.000000000 -0400
1
--- net/common/getgateway.c.orig	2015-01-27 23:26:41.000000000 -0500
2
+++ net/common/getgateway.c	2014-07-28 14:30:29.000000000 -0400
2
+++ net/common/getgateway.c	2015-01-27 23:27:58.000000000 -0500
3
@@ -34,7 +34,7 @@
3
@@ -34,7 +34,7 @@
4
 #undef USE_SYSCTL_NET_ROUTE
4
 #undef USE_SYSCTL_NET_ROUTE
5
 #endif
5
 #endif
(-)files/patch-net_common_processors_rcvcmd-proc.c (-45 lines)
Lines 1-45 Link Here
1
--- net/common/processors/rcvcmd-proc.c.orig	2014-09-02 15:49:07.244090539 -0400
2
+++ net/common/processors/rcvcmd-proc.c	2014-09-02 15:52:55.749963338 -0400
3
@@ -221,7 +221,7 @@
4
     int i;
5
 
6
     commands = g_strsplit_set (line, " \t", 10);
7
-    for (i=0, pcmd = commands; *pcmd; pcmd++)
8
+    for (i = 0, pcmd = commands; *pcmd; pcmd++)
9
         i++;
10
     
11
     if (i == 0) {
12
@@ -234,7 +234,6 @@
13
     if (c == NULL) {
14
         ccnet_processor_send_response (processor, SC_UNKNONW_CMD, 
15
                                        SS_UNKNONW_CMD, NULL, 0);
16
-        return;
17
     } else
18
         c->handler (processor, i, commands);
19
 
20
@@ -534,7 +533,7 @@
21
     ret = -1;
22
 
23
 out:
24
-    g_free (addr);
25
+    g_free (addr_port);
26
     g_free (role);
27
     g_free (peer_id);
28
     if (peer) g_object_unref (peer);
29
@@ -707,6 +706,7 @@
30
     if (addr_port) {
31
         peer = ccnet_peer_manager_add_resolve_peer (
32
             processor->session->peer_mgr, addr, port);
33
+        g_free (peer->intend_role);
34
         peer->intend_role = g_strdup(role);
35
         ccnet_processor_send_response (processor, SC_OK, SS_OK, NULL, 0);
36
         ret = 0;
37
@@ -736,7 +736,7 @@
38
     ret = -1;
39
 
40
 out:
41
-    g_free (addr);
42
+    g_free (addr_port);
43
     g_free (role);
44
     g_free (peer_id);
45
     if (peer) g_object_unref (peer);
(-)files/patch-net_common_processors_service-proxy-proc.c (-11 lines)
Lines 1-11 Link Here
1
--- net/common/processors/service-proxy-proc.c.orig	2014-09-02 15:47:22.827928455 -0400
2
+++ net/common/processors/service-proxy-proc.c	2014-09-02 15:47:36.619949159 -0400
3
@@ -43,7 +43,7 @@
4
 {
5
     ServiceProxyPriv *priv = GET_PRIV(processor);
6
     if (priv->name) {
7
-        free (priv->name);
8
+        g_free (priv->name);
9
         priv->name = NULL;
10
     }
11
 
(-)files/patch-net_common_session.c (-10 lines)
Lines 1-10 Link Here
1
--- net/common/session.c.orig	2014-09-03 04:04:21.072122386 -0400
2
+++ net/common/session.c	2014-09-03 04:04:58.071390609 -0400
3
@@ -168,6 +168,7 @@
4
     g_free (name);
5
     g_free (user_name);
6
     g_free (port_str);
7
+    g_free (lport_str);
8
 #ifdef CCNET_SERVER
9
     g_free (service_url);
10
 #endif

Return to bug 197979