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

Collapse All | Expand All

(-)b/net/onedrive/Makefile (-4 / +2 lines)
Lines 1-6 Link Here
1
PORTNAME=	onedrive
1
PORTNAME=	onedrive
2
DISTVERSIONPREFIX=	v
2
DISTVERSIONPREFIX=	v
3
DISTVERSION=	2.5.2
3
DISTVERSION=	2.5.4
4
CATEGORIES=	net
4
CATEGORIES=	net
5
5
6
MAINTAINER=	hiroo.ono+freebsd@gmail.com
6
MAINTAINER=	hiroo.ono+freebsd@gmail.com
Lines 40-49 NOTIFY_CONFIGURE_ENABLE= notifications Link Here
40
40
41
ONEDRIVE_LOGDIR=	/var/log/${PORTNAME}
41
ONEDRIVE_LOGDIR=	/var/log/${PORTNAME}
42
42
43
post-extract:
44
	${CP} ${FILESDIR}/freebsd_inotify.d ${WRKSRC}/src
45
46
post-install:
43
post-install:
44
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/onedrive
47
	${INSTALL} -d -m 0775 ${STAGEDIR}${ONEDRIVE_LOGDIR}
45
	${INSTALL} -d -m 0775 ${STAGEDIR}${ONEDRIVE_LOGDIR}
48
46
49
.include <bsd.port.mk>
47
.include <bsd.port.mk>
(-)b/net/onedrive/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1727676524
1
TIMESTAMP = 1738636238
2
SHA256 (abraunegg-onedrive-v2.5.2_GH0.tar.gz) = 2abad70160853a25b6784025ef7e7636fcb077b5623c8fe521df9e3aa8089a89
2
SHA256 (abraunegg-onedrive-v2.5.4_GH0.tar.gz) = c11605fb0ad1b5cd1da9a34ebfb036bd743d42b84417385cf3f077383970f426
3
SIZE (abraunegg-onedrive-v2.5.2_GH0.tar.gz) = 4129032
3
SIZE (abraunegg-onedrive-v2.5.4_GH0.tar.gz) = 4169512
(-)a/net/onedrive/files/freebsd_inotify.d (-70 lines)
Removed Link Here
1
/**
2
 * D header file for libinotify (incomplete)
3
 */
4
5
module freebsd_inotify;
6
7
import core.stdc.stdint;
8
9
struct inotify_event
10
{
11
	int wd;          /* Watch descriptor.  */
12
	uint32_t mask;   /* Watch mask.  */
13
	uint32_t cookie; /* Cookie to synchronize two events.  */
14
	uint32_t len;    /* Length (including NULLs) of name.  */
15
	char[0] name;     /* Name.  */
16
17
	@disable this(this);
18
};
19
20
21
/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH.  */
22
enum IN_ACCESS =      0x00000001; /* File was accessed.  */
23
enum IN_MODIFY =      0x00000002; /* File was modified.  */
24
enum IN_ATTRIB =      0x00000004; /* Metadata changed.  */
25
enum IN_CLOSE_WRITE = 0x00000008; /* Writtable file was closed.  */
26
enum IN_CLOSE_NOWRITE = 0x00000010; /* Unwrittable file closed.  */
27
enum IN_CLOSE =       (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE); /* Close.  */
28
enum IN_OPEN  =       0x00000020; /* File was opened.  */
29
enum IN_MOVED_FROM =  0x00000040; /* File was moved from X.  */
30
enum IN_MOVED_TO =    0x00000080; /* File was moved to Y.  */
31
enum IN_MOVE =        (IN_MOVED_FROM | IN_MOVED_TO); /* Moves.  */
32
enum IN_CREATE =      0x00000100; /* Subfile was created.  */
33
enum IN_DELETE =      0x00000200; /* Subfile was deleted.  */
34
enum IN_DELETE_SELF = 0x00000400; /* Self was deleted.  */
35
enum IN_MOVE_SELF =   0x00000800; /* Self was moved.  */
36
37
/* Additional events and flags. Some of these flags are unsupported,
38
      but still should be present */
39
enum IN_UNMOUNT =     0x00002000;    /* Backing fs was unmounted.  */
40
enum IN_Q_OVERFLOW =  0x00004000;    /* Event queued overflowed.  */
41
enum IN_IGNORED =     0x00008000;    /* File was ignored.  */
42
43
enum IN_ONLYDIR =     0x01000000;    /* Only watch the path if it is a
44
                                        directory.  */
45
enum IN_DONT_FOLLOW = 0x02000000;    /* Do not follow a sym link.  */
46
enum IN_EXCL_UNLINK = 0x04000000;    /* Exclude events on unlinked
47
                                        objects.  */
48
enum IN_MASK_ADD =    0x20000000;    /* Add to the mask of an already
49
                                        existing watch.  */
50
enum IN_ISDIR =       0x40000000;    /* Event occurred against dir.  */
51
enum IN_ONESHOT =     0x80000000;    /* Only send event once.  */
52
53
enum IN_ALL_EVENTS = (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM | IN_MOVE_SELF | IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF);
54
55
/* Create and initialize inotify-kqueue instance. */
56
extern (C) int inotify_init ();
57
58
/* Create and initialize inotify-kqueue instance. */
59
extern (C) int inotify_init1 (int flags);
60
61
/* Add watch of object NAME to inotify-kqueue instance FD. Notify about
62
      events specified by MASK. */
63
extern (C) int inotify_add_watch (int fd, const char *name, uint32_t mask);
64
65
/* Remove the watch specified by WD from the inotify instance FD. */
66
extern (C) int inotify_rm_watch (int fd, int wd);
67
68
/* Libinotify specific. Set inotify instance parameter. */
69
extern (C) int inotify_set_param (int fd, int param, intptr_t value);
70
(-)a/net/onedrive/files/patch-Makefile.in (-55 lines)
Removed Link Here
1
--- Makefile.in.orig	2024-09-16 01:14:46 UTC
2
+++ Makefile.in
3
@@ -25,6 +25,7 @@ notify_LIBS = @notify_LIBS@
4
 curl_LIBS = @curl_LIBS@
5
 sqlite_LIBS = @sqlite_LIBS@
6
 notify_LIBS = @notify_LIBS@
7
+inotify_LIBS = @inotify_LIBS@
8
 COMPLETIONS = @COMPLETIONS@
9
 BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@
10
 ZSH_COMPLETION_DIR = @ZSH_COMPLETION_DIR@
11
@@ -84,6 +85,7 @@ SOURCES = \
12
 	src/sqlite.d \
13
 	src/clientSideFiltering.d \
14
 	src/monitor.d \
15
+	src/freebsd_inotify.d \
16
 	src/arsd/cgi.d
17
 
18
 ifeq ($(NOTIFICATIONS),yes)
19
@@ -107,14 +109,15 @@ onedrive: $(SOURCES)
20
 	else \
21
 		echo $(version) > version ; \
22
 	fi
23
-	$(DC) $(DCFLAGS) $(addprefix -L,$(curl_LIBS)) $(addprefix -L,$(sqlite_LIBS)) $(addprefix -L,$(notify_LIBS)) -L-ldl $(SOURCES) -of$@
24
+	$(DC) $(DCFLAGS) $(addprefix -L,$(curl_LIBS)) $(addprefix -L,$(sqlite_LIBS)) $(addprefix -L,$(notify_LIBS)) -$(addprefix -L,$(inotify_LIBS)) -L-ldl $(SOURCES) -of$@
25
 
26
 install: all
27
-	$(INSTALL) -D onedrive $(DESTDIR)$(bindir)/onedrive
28
-	$(INSTALL) -D -m 0644 onedrive.1 $(DESTDIR)$(mandir)/man1/onedrive.1
29
-	$(INSTALL) -D -m 0644 contrib/logrotate/onedrive.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/onedrive
30
+	$(INSTALL) -s onedrive $(DESTDIR)$(bindir)/onedrive
31
+	$(INSTALL) -m 0644 onedrive.1 $(DESTDIR)$(mandir)/man1/onedrive.1
32
+	mkdir -p $(DESTDIR)$(sysconfdir)/logrotate.d
33
+	$(INSTALL) -m 0644 contrib/logrotate/onedrive.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/onedrive
34
 	mkdir -p $(DESTDIR)$(docdir)
35
-	$(INSTALL) -D -m 0644 $(DOCFILES) $(DESTDIR)$(docdir)
36
+	$(INSTALL) -m 0644 $(DOCFILES) $(DESTDIR)$(docdir)
37
 ifeq ($(HAVE_SYSTEMD),yes)
38
 	$(INSTALL) -d -m 0755 $(DESTDIR)$(systemduserunitdir) $(DESTDIR)$(systemdsystemunitdir)
39
 ifeq ($(RHEL),1)
40
@@ -131,9 +134,12 @@ ifeq ($(COMPLETIONS),yes)
41
 endif
42
 endif
43
 ifeq ($(COMPLETIONS),yes)
44
-	$(INSTALL) -D -m 0644 contrib/completions/complete.zsh $(DESTDIR)$(ZSH_COMPLETION_DIR)/_onedrive
45
-	$(INSTALL) -D -m 0644 contrib/completions/complete.bash $(DESTDIR)$(BASH_COMPLETION_DIR)/onedrive
46
-	$(INSTALL) -D -m 0644 contrib/completions/complete.fish $(DESTDIR)$(FISH_COMPLETION_DIR)/onedrive.fish
47
+	mkdir -p $(DESTDIR)$(ZSH_COMPLETION_DIR)
48
+	$(INSTALL) -m 0644 contrib/completions/complete.zsh $(DESTDIR)$(ZSH_COMPLETION_DIR)/_onedrive
49
+	mkdir -p $(DESTDIR)$(BASH_COMPLETION_DIR)
50
+	$(INSTALL) -m 0644 contrib/completions/complete.bash $(DESTDIR)$(BASH_COMPLETION_DIR)/onedrive
51
+	mkdir -p $(DESTDIR)$(FISH_COMPLETION_DIR)
52
+	$(INSTALL) -m 0644 contrib/completions/complete.fish $(DESTDIR)$(FISH_COMPLETION_DIR)/onedrive.fish
53
 endif
54
 
55
 uninstall:
(-)a/net/onedrive/files/patch-configure.ac (-10 lines)
Removed Link Here
1
--- configure.ac.orig	2020-04-21 17:07:18 UTC
2
+++ configure.ac
3
@@ -144,6 +144,7 @@
4
 dnl Check for required modules: curl and sqlite at the moment
5
 PKG_CHECK_MODULES([curl],[libcurl])
6
 PKG_CHECK_MODULES([sqlite],[sqlite3])
7
+PKG_CHECK_MODULES([inotify],[libinotify])
8
 
9
 dnl
10
 dnl systemd and unit file directories
(-)a/net/onedrive/files/patch-src_monitor.d (-12 lines)
Removed Link Here
1
--- src/monitor.d.orig	2024-09-18 07:16:29 UTC
2
+++ src/monitor.d
3
@@ -4,7 +4,8 @@ import core.stdc.stdlib;
4
 // What does this module require to function?
5
 import core.stdc.errno;
6
 import core.stdc.stdlib;
7
-import core.sys.linux.sys.inotify;
8
+// import core.sys.linux.sys.inotify;
9
+import freebsd_inotify;
10
 import core.sys.posix.poll;
11
 import core.sys.posix.unistd;
12
 import core.sys.posix.sys.select;

Return to bug 284555