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

(-)Makefile (-3 / +7 lines)
Lines 13-20 Link Here
13
LICENSE=	GPLv3
13
LICENSE=	GPLv3
14
LICENSE_FILE=	${WRKSRC}/LICENSE
14
LICENSE_FILE=	${WRKSRC}/LICENSE
15
15
16
BROKEN_FreeBSD_9=	does not build on FreeBSD < 10.x
17
18
BUILD_DEPENDS=	${LOCALBASE}/include/zenxml/xml.h:textproc/zenxml
16
BUILD_DEPENDS=	${LOCALBASE}/include/zenxml/xml.h:textproc/zenxml
19
LIB_DEPENDS=	libboost_system.so:devel/boost-libs \
17
LIB_DEPENDS=	libboost_system.so:devel/boost-libs \
20
		libnotify.so:devel/libnotify
18
		libnotify.so:devel/libnotify
Lines 29-34 Link Here
29
USE_LDCONFIG=	yes
27
USE_LDCONFIG=	yes
30
USE_WX=		3.0+
28
USE_WX=		3.0+
31
29
30
.include <bsd.port.pre.mk>
31
32
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1003000
33
BROKEN=		does not build on FreeBSD < 10.3 (lack of futimens(2))
34
.endif
35
32
post-patch:
36
post-patch:
33
	@${REINPLACE_CMD} -e 's/wx-config/$${WX_CONFIG:T}/' \
37
	@${REINPLACE_CMD} -e 's/wx-config/$${WX_CONFIG:T}/' \
34
		-e 's,g++,$${CXX},' ${WRKSRC}/Makefile
38
		-e 's,g++,$${CXX},' ${WRKSRC}/Makefile
Lines 38-41 Link Here
38
	@${REINPLACE_CMD} -e 's|CLOCK_MONOTONIC_RAW|CLOCK_MONOTONIC|' \
42
	@${REINPLACE_CMD} -e 's|CLOCK_MONOTONIC_RAW|CLOCK_MONOTONIC|' \
39
		${WRKDIR}/zen/tick_count.h
43
		${WRKDIR}/zen/tick_count.h
40
44
41
.include <bsd.port.mk>
45
.include <bsd.port.post.mk>
(-)files/patch-zen_file__access.cpp (-26 lines)
Lines 1-26 Link Here
1
--- ../../zen/file_access.cpp.orig	2016-01-11 12:13:10 UTC
2
+++ ../../zen/file_access.cpp
3
@@ -877,6 +877,15 @@ void setFileTimeRaw(const Zstring& fileP
4
     //https://sourceforge.net/p/freefilesync/discussion/open-discussion/thread/218564cf/
5
     newTimes[1] = modTime; //modification time
6
 
7
+#if defined(__FreeBSD__)
8
+// only defines __FreeBSD_version
9
+#include <osreldate.h>
10
+#endif
11
+
12
+#if (defined(__FreeBSD__) && (__FreeBSD_version < 1002506 || \
13
+  (__FreeBSD_version >= 1100000 && __FreeBSD_version < 1100056)))
14
+    throw ErrorLinuxFallbackToUtimes(L"");
15
+#else
16
     //=> using open()/futimens() for regular files and utimensat(AT_SYMLINK_NOFOLLOW) for symlinks is consistent with "cp" and "touch"!
17
     if (procSl == ProcSymlink::FOLLOW)
18
     {
19
@@ -898,6 +907,7 @@ void setFileTimeRaw(const Zstring& fileP
20
         if (::utimensat(AT_FDCWD, filePath.c_str(), newTimes, AT_SYMLINK_NOFOLLOW) != 0)
21
             THROW_LAST_FILE_ERROR(replaceCpy(_("Cannot write modification time of %x."), L"%x", fmtPath(filePath)), L"utimensat");
22
     }
23
+#endif
24
 }
25
 
26
 

Return to bug 211943