View | Details | Raw Unified | Return to bug 193134 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-32 / +26 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	seafile
3
PORTNAME=	seafile
4
PORTVERSION=	3.1.4
4
PORTVERSION=	3.1.4
5
CATEGORIES=	www
5
CATEGORIES=	net-mgmt devel
6
6
7
MAINTAINER=	yan_jingfeng@yahoo.com
7
MAINTAINER=	yan_jingfeng@yahoo.com
8
COMMENT=	Framework for writing networked applications
8
COMMENT=	Framework for writing networked applications
Lines 9-16 Link Here
9
9
10
LICENSE=	GPLv3
10
LICENSE=	GPLv3
11
11
12
BUILD_DEPENDS+=	valac:${PORTSDIR}/lang/vala
12
BUILD_DEPENDS=	valac:${PORTSDIR}/lang/vala
13
LIB_DEPENDS+=	libsearpc.so:${PORTSDIR}/www/libsearpc \
13
LIB_DEPENDS=	libsearpc.so:${PORTSDIR}/devel/libsearpc \
14
		libevhtp.so:${PORTSDIR}/www/libevhtp \
14
		libevhtp.so:${PORTSDIR}/www/libevhtp \
15
		libzdb.so:${PORTSDIR}/databases/libzdb \
15
		libzdb.so:${PORTSDIR}/databases/libzdb \
16
		libcrypto.so:${PORTSDIR}/security/openssl \
16
		libcrypto.so:${PORTSDIR}/security/openssl \
Lines 17-26 Link Here
17
		libarchive.so.13:${PORTSDIR}/archivers/libarchive \
17
		libarchive.so.13:${PORTSDIR}/archivers/libarchive \
18
		libfuse.so:${PORTSDIR}/sysutils/fusefs-libs \
18
		libfuse.so:${PORTSDIR}/sysutils/fusefs-libs \
19
		libinotify.so:${PORTSDIR}/devel/libinotify \
19
		libinotify.so:${PORTSDIR}/devel/libinotify \
20
		libccnet.so:${PORTSDIR}/www/ccnet
20
		libccnet.so:${PORTSDIR}/net-mgmt/ccnet
21
RUN_DEPENDS=	ccnet-server:${PORTSDIR}/www/ccnet \
21
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}eggtestinfo>0:${PORTSDIR}/devel/py-eggtestinfo \
22
		ccnet-init:${PORTSDIR}/www/ccnet \
23
		${PYTHON_PKGNAMEPREFIX}eggtestinfo>0:${PORTSDIR}/devel/py-eggtestinfo \
24
		${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging \
22
		${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging \
25
		${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \
23
		${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \
26
		bash:${PORTSDIR}/shells/bash
24
		bash:${PORTSDIR}/shells/bash
Lines 30-45 Link Here
30
GH_TAGNAME=	v3.1.4
28
GH_TAGNAME=	v3.1.4
31
GH_COMMIT=	ac58109
29
GH_COMMIT=	ac58109
32
30
33
USES=		libtool pkgconfig python:2 pathfix shebangfix
31
USES=		autoreconf libtool pkgconfig python:2 pathfix shebangfix
34
PATHFIX_MAKEFILEIN=	Makefile.am
32
PATHFIX_MAKEFILEIN=	Makefile.am
35
USE_LDCONFIG=	yes
33
USE_LDCONFIG=	yes
36
USE_AUTOTOOLS=	libtoolize aclocal autoheader automake autoconf
37
LIBTOOLIZE_ARGS=-i -c -f
38
ACLOCAL_ARGS=	-I m4
39
AUTOMAKE_ARGS=	--add-missing --gnu
40
34
41
CPPFLAGS+=	-I${LOCALBASE}/include -I${LOCALBASE}/include/event2
35
CPPFLAGS+=	-I${LOCALBASE}/include
42
LDFLAGS+=	-L${LOCALBASE}/lib -L${LOCALBASE}/lib/event2
36
LDFLAGS+=	-L${LOCALBASE}/lib
43
37
44
MAKE_JOBS_UNSAFE=yes
38
MAKE_JOBS_UNSAFE=yes
45
39
Lines 53-91 Link Here
53
WWWDIR=		${PREFIX}/www/haiwen/seafile-server
47
WWWDIR=		${PREFIX}/www/haiwen/seafile-server
54
48
55
post-install:
49
post-install:
56
	@${MKDIR} -m 0755 ${STAGEDIR}${WWWDIR}/seafile/bin
50
	@${MKDIR} ${STAGEDIR}${WWWDIR}/seafile/bin
57
	@${MKDIR} -m 0755 ${STAGEDIR}${WWWDIR}/seafile/share/doc/seafile
51
	@${MKDIR} ${STAGEDIR}${WWWDIR}/seafile/share/doc/seafile
58
	@${INSTALL} -m 0755 ${WRKSRC}/doc/seafile-tutorial.doc \
52
	${INSTALL_DATA} ${WRKSRC}/doc/seafile-tutorial.doc \
59
			${STAGEDIR}${WWWDIR}/seafile/share/doc/seafile/
53
			${STAGEDIR}${WWWDIR}/seafile/share/doc/seafile/
60
	@${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/fileserver \
54
	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/fileserver \
61
		${STAGEDIR}${WWWDIR}/seafile/bin/fileserver
55
		${STAGEDIR}${WWWDIR}/seafile/bin/fileserver
62
	@${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seaf-fsck \
56
	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seaf-fsck \
63
		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-fsck
57
		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-fsck
64
	@${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seafserv-gc \
58
	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seafserv-gc \
65
		${STAGEDIR}${WWWDIR}/seafile/bin/seafserv-gc
59
		${STAGEDIR}${WWWDIR}/seafile/bin/seafserv-gc
66
	@${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seaf-fuse \
60
	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seaf-fuse \
67
		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-fuse
61
		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-fuse
68
	@${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seaf-migrate \
62
	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seaf-migrate \
69
		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-migrate
63
		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-migrate
70
	@${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seaf-server \
64
	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seaf-server \
71
		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-server
65
		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-server
72
	@${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seaf-server-init \
66
	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seaf-server-init \
73
		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-server-init
67
		${STAGEDIR}${WWWDIR}/seafile/bin/seaf-server-init
74
	@${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seafile-controller \
68
	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seafile-controller \
75
		${STAGEDIR}${WWWDIR}/seafile/bin/seafile-controller
69
		${STAGEDIR}${WWWDIR}/seafile/bin/seafile-controller
76
	@${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/seafserv-tool \
70
	${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/seafserv-tool \
77
		${STAGEDIR}${WWWDIR}/seafile/bin/seafserv-tool
71
		${STAGEDIR}${WWWDIR}/seafile/bin/seafserv-tool
78
	@${INSTALL} -m 0755 ${WRKSRC}/scripts/*.py \
72
	${INSTALL_SCRIPT} ${WRKSRC}/scripts/*.py \
79
		${STAGEDIR}${WWWDIR}
73
		${STAGEDIR}${WWWDIR}
80
	@${INSTALL} -m 0755 ${WRKSRC}/scripts/*.sh \
74
	${INSTALL_SCRIPT} ${WRKSRC}/scripts/*.sh \
81
		${STAGEDIR}${WWWDIR}
75
		${STAGEDIR}${WWWDIR}
82
	@${INSTALL} -d -m 0755 ${WRKSRC}/scripts/upgrade/ \
76
	${INSTALL_DATA} -d ${WRKSRC}/scripts/upgrade/ \
83
		${STAGEDIR}${WWWDIR}/upgrade
77
		${STAGEDIR}${WWWDIR}/upgrade
84
	@${INSTALL} -m 0755 ${WRKSRC}/scripts/upgrade/*py \
78
	${INSTALL_SCRIPT} ${WRKSRC}/scripts/upgrade/*py \
85
		${STAGEDIR}${WWWDIR}/upgrade
79
		${STAGEDIR}${WWWDIR}/upgrade
86
	@${INSTALL} -m 0755 ${WRKSRC}/scripts/upgrade/*sh \
80
	${INSTALL_SCRIPT} ${WRKSRC}/scripts/upgrade/*sh \
87
		${STAGEDIR}${WWWDIR}/upgrade
81
		${STAGEDIR}${WWWDIR}/upgrade
88
	@${CP} -R ${WRKSRC}/scripts/upgrade/sql/ \
82
	${CP} -R ${WRKSRC}/scripts/upgrade/sql/ \
89
		${STAGEDIR}${WWWDIR}/upgrade/sql/
83
		${STAGEDIR}${WWWDIR}/upgrade/sql/
90
84
91
.include <bsd.port.mk>
85
.include <bsd.port.mk>
(-)files/patch-common_obj-backend-fs.c (-2 / +2 lines)
Lines 5-11 Link Here
5
 fsync_obj_contents (int fd)
5
 fsync_obj_contents (int fd)
6
 {
6
 {
7
-#ifdef __linux__
7
-#ifdef __linux__
8
+#if defined(__linux__) || defined(__FreeBSD__)
8
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
9
     /* Some file systems may not support fsync().
9
     /* Some file systems may not support fsync().
10
      * In this case, just skip the error.
10
      * In this case, just skip the error.
11
      */
11
      */
Lines 14-20 Link Here
14
 rename_and_sync (const char *tmp_path, const char *obj_path)
14
 rename_and_sync (const char *tmp_path, const char *obj_path)
15
 {
15
 {
16
-#ifdef __linux__
16
-#ifdef __linux__
17
+#if defined(__linux__) || defined(__FreeBSD__)
17
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
18
     char *parent_dir;
18
     char *parent_dir;
19
     int ret = 0;
19
     int ret = 0;
20
 
20
 
(-)files/patch-controller_seafile-controller.c (-2 / +2 lines)
Lines 4-10 Link Here
4
 #include "log.h"
4
 #include "log.h"
5
 #include "seafile-controller.h"
5
 #include "seafile-controller.h"
6
 
6
 
7
+#ifdef __FreeBSD__
7
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
8
+#include <sys/sysctl.h>
8
+#include <sys/sysctl.h>
9
+#endif
9
+#endif
10
+
10
+
Lines 17-23 Link Here
17
     GError *error = NULL;
17
     GError *error = NULL;
18
+#if defined(__linux__)
18
+#if defined(__linux__)
19
     char *executable = g_file_read_link ("/proc/self/exe", &error);
19
     char *executable = g_file_read_link ("/proc/self/exe", &error);
20
+#elif defined(__FreeBSD__)
20
+#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
21
+    char *executable = g_file_read_link ("/proc/curproc/file", &error);
21
+    char *executable = g_file_read_link ("/proc/curproc/file", &error);
22
+#endif
22
+#endif
23
     char *tmp = NULL;
23
     char *tmp = NULL;
(-)files/patch-daemon_repo-mgr.c (-3 / +3 lines)
Lines 5-11 Link Here
5
     gboolean update_mode_only = FALSE;
5
     gboolean update_mode_only = FALSE;
6
 
6
 
7
-#ifndef __linux__
7
-#ifndef __linux__
8
+#if defined(__linux__) || defined(__FreeBSD__)
8
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
9
+    path = build_checkout_path (worktree, name, strlen(name));
9
+    path = build_checkout_path (worktree, name, strlen(name));
10
+#else
10
+#else
11
     path = build_case_conflict_free_path (worktree, name,
11
     path = build_case_conflict_free_path (worktree, name,
Lines 21-27 Link Here
21
     gboolean case_conflict = FALSE;
21
     gboolean case_conflict = FALSE;
22
 
22
 
23
-#ifndef __linux__
23
-#ifndef __linux__
24
+#if defined(__linux__) || defined(__FreeBSD__)
24
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
25
+    path = build_checkout_path (worktree, name, strlen(name));
25
+    path = build_checkout_path (worktree, name, strlen(name));
26
+#else
26
+#else
27
     path = build_case_conflict_free_path (worktree, name,
27
     path = build_case_conflict_free_path (worktree, name,
Lines 37-43 Link Here
37
             char *new_path;
37
             char *new_path;
38
             gboolean case_conflict;
38
             gboolean case_conflict;
39
-#ifndef __linux__
39
-#ifndef __linux__
40
+#if defined(__linux__) || defined(__FreeBSD__)
40
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
41
+            new_path = build_checkout_path (worktree, de->new_name, strlen(de->new_name));
41
+            new_path = build_checkout_path (worktree, de->new_name, strlen(de->new_name));
42
+#else
42
+#else
43
             new_path = build_case_conflict_free_path (worktree, de->new_name,
43
             new_path = build_case_conflict_free_path (worktree, de->new_name,
(-)files/patch-daemon_vc-utils.c (-2 / +2 lines)
Lines 5-11 Link Here
5
 #endif  /* defined WIN32 || defined __APPLE__ */
5
 #endif  /* defined WIN32 || defined __APPLE__ */
6
 
6
 
7
-#ifdef __linux__
7
-#ifdef __linux__
8
+#if defined(__linux__) || defined(__FreeBSD__)
8
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
9
 
9
 
10
 static char *
10
 static char *
11
 build_checkout_path (const char *worktree, const char *ce_name, int len)
11
 build_checkout_path (const char *worktree, const char *ce_name, int len)
Lines 14-20 Link Here
14
 
14
 
15
     path_in = g_build_path ("/", o->base, ce->name, NULL);
15
     path_in = g_build_path ("/", o->base, ce->name, NULL);
16
-#ifndef __linux__
16
-#ifndef __linux__
17
+#if defined(__linux__) || defined(__FreeBSD__)
17
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
18
+    path = build_checkout_path (o->base, ce->name, ce_namelen(ce));
18
+    path = build_checkout_path (o->base, ce->name, ce_namelen(ce));
19
+#else
19
+#else
20
     path = build_case_conflict_free_path (o->base, ce->name,
20
     path = build_case_conflict_free_path (o->base, ce->name,
(-)files/patch-lib_utils.c (-2 / +2 lines)
Lines 5-11 Link Here
5
 #endif  /* ifdef WIN32 */
5
 #endif  /* ifdef WIN32 */
6
 
6
 
7
-#ifdef __linux__
7
-#ifdef __linux__
8
+#if defined(__linux__) || defined(__FreeBSD__)
8
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
9
 /* read the link of /proc/123/exe and compare with `process_name' */
9
 /* read the link of /proc/123/exe and compare with `process_name' */
10
 static int
10
 static int
11
 find_process_in_dirent(struct dirent *dir, const char *process_name)
11
 find_process_in_dirent(struct dirent *dir, const char *process_name)
Lines 15-21 Link Here
15
+#ifdef __linux__
15
+#ifdef __linux__
16
     if (sprintf (path, "/proc/%s/exe", dir->d_name) < 0) {
16
     if (sprintf (path, "/proc/%s/exe", dir->d_name) < 0) {
17
+#endif
17
+#endif
18
+#ifdef __FreeBSD__
18
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
19
+    if (sprintf (path, "/proc/%s/file", dir->d_name) < 0) {
19
+    if (sprintf (path, "/proc/%s/file", dir->d_name) < 0) {
20
+#endif
20
+#endif
21
         return -1;
21
         return -1;
(-)files/patch-lib_utils.h (-1 / +1 lines)
Lines 4-10 Link Here
4
 #ifndef CCNET_UTILS_H
4
 #ifndef CCNET_UTILS_H
5
 #define CCNET_UTILS_H
5
 #define CCNET_UTILS_H
6
 
6
 
7
+#ifdef __FreeBSD__
7
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
8
+#include <netinet/in.h>
8
+#include <netinet/in.h>
9
+#endif
9
+#endif
10
 #include <sys/time.h>
10
 #include <sys/time.h>
(-)pkg-plist (-31 lines)
Lines 94-127 Link Here
94
%%WWWDIR%%/upgrade/upgrade_2.1_2.2.sh
94
%%WWWDIR%%/upgrade/upgrade_2.1_2.2.sh
95
%%WWWDIR%%/upgrade/upgrade_2.2_3.0.sh
95
%%WWWDIR%%/upgrade/upgrade_2.2_3.0.sh
96
%%WWWDIR%%/upgrade/upgrade_3.0_3.1.sh
96
%%WWWDIR%%/upgrade/upgrade_3.0_3.1.sh
97
@dirrmtry include/seafile
98
@dirrmtry %%PYTHON_SITELIBDIR%%/seafile
99
@dirrmtry %%PYTHON_SITELIBDIR%%/seaserv
100
%%PORTDOCS%%@dirrmtry %%WWWDIR%%/seafile/%%DOCSDIR%%
101
@dirrmtry %%WWWDIR%%/seafile/share/doc
102
@dirrmtry %%WWWDIR%%/seafile/share
103
@dirrmtry %%WWWDIR%%/upgrade/sql/1.6.0/mysql
104
@dirrmtry %%WWWDIR%%/upgrade/sql/1.6.0/sqlite3
105
@dirrmtry %%WWWDIR%%/upgrade/sql/1.6.0
106
@dirrmtry %%WWWDIR%%/upgrade/sql/1.7.0/mysql
107
@dirrmtry %%WWWDIR%%/upgrade/sql/1.7.0/sqlite3
108
@dirrmtry %%WWWDIR%%/upgrade/sql/1.7.0
109
@dirrmtry %%WWWDIR%%/upgrade/sql/1.8.0/mysql
110
@dirrmtry %%WWWDIR%%/upgrade/sql/1.8.0/sqlite3
111
@dirrmtry %%WWWDIR%%/upgrade/sql/1.8.0
112
@dirrmtry %%WWWDIR%%/upgrade/sql/2.0.0/mysql
113
@dirrmtry %%WWWDIR%%/upgrade/sql/2.0.0/sqlite3
114
@dirrmtry %%WWWDIR%%/upgrade/sql/2.0.0
115
@dirrmtry %%WWWDIR%%/upgrade/sql/2.1.0/mysql
116
@dirrmtry %%WWWDIR%%/upgrade/sql/2.1.0/sqlite3
117
@dirrmtry %%WWWDIR%%/upgrade/sql/2.1.0
118
@dirrmtry %%WWWDIR%%/upgrade/sql/2.2.0/mysql
119
@dirrmtry %%WWWDIR%%/upgrade/sql/2.2.0
120
@dirrmtry %%WWWDIR%%/upgrade/sql/3.0.0/mysql
121
@dirrmtry %%WWWDIR%%/upgrade/sql/3.0.0/sqlite3
122
@dirrmtry %%WWWDIR%%/upgrade/sql/3.0.0
123
@dirrmtry %%WWWDIR%%/upgrade/sql/3.1.0/mysql
124
@dirrmtry %%WWWDIR%%/upgrade/sql/3.1.0/sqlite3
125
@dirrmtry %%WWWDIR%%/upgrade/sql/3.1.0
126
@dirrmtry %%WWWDIR%%/upgrade/sql
127
@dirrmtry %%WWWDIR%%/upgrade

Return to bug 193134