Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Mar 2016 07:41:18 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r410810 - in head/sysutils/freefilesync: . files
Message-ID:  <201603110741.u2B7fINY013082@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Fri Mar 11 07:41:18 2016
New Revision: 410810
URL: https://svnweb.freebsd.org/changeset/ports/410810

Log:
  mainsysutils/freefilesync: unbreak build on 10.x
  
  error: invalid value 'c++14' in '-std=c++14'
  
  ../../zen/file_access.cpp:893:15: error: no member named 'futimens' in the global namespace
          if (::futimens(fdFile, newTimes) != 0)
              ~~^
  ../../zen/file_access.cpp:898:15: error: no member named 'utimensat' in the global namespace
          if (::utimensat(AT_FDCWD, filePath.c_str(), newTimes, AT_SYMLINK_NOFOLLOW) != 0)
              ~~^
  2 errors generated.
  
  PR:		207879
  Reported by:	pkg-fallout
  Approved by:	kevlo (maintainer, previous version)

Added:
  head/sysutils/freefilesync/files/patch-zen_file__access.cpp   (contents, props changed)
Modified:
  head/sysutils/freefilesync/Makefile   (contents, props changed)

Modified: head/sysutils/freefilesync/Makefile
==============================================================================
--- head/sysutils/freefilesync/Makefile	Fri Mar 11 07:27:16 2016	(r410809)
+++ head/sysutils/freefilesync/Makefile	Fri Mar 11 07:41:18 2016	(r410810)
@@ -18,10 +18,15 @@ LIB_DEPENDS=	libboost_system.so:${PORTSD
 
 WRKSRC=		${WRKDIR}/FreeFileSync/Source
 
-USES=		compiler:c++11-lang dos2unix gmake pkgconfig zip
+USES=		compiler:c++14-lang dos2unix gmake pkgconfig zip
 USE_LDCONFIG=	yes
 USE_WX=		3.0+
 
+pre-patch:
+# XXX Pretend USES=dos2unix supports DOS2UNIX_WRKSRC=${WRKDIR}
+	@${SED} 's/^+++ //; /^\.\./!d; s,^,${PATCH_WRKSRC}/,' \
+		${PATCHDIR}/patch-* | ${XARGS} ${REINPLACE_CMD} 's/
$$//'
+
 post-patch:
 	@${REINPLACE_CMD} -e 's/wx-config/$${WX_CONFIG:T}/' \
 		-e 's,g++,$${CXX},' ${WRKSRC}/Makefile

Added: head/sysutils/freefilesync/files/patch-zen_file__access.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/freefilesync/files/patch-zen_file__access.cpp	Fri Mar 11 07:41:18 2016	(r410810)
@@ -0,0 +1,23 @@
+--- ../../zen/file_access.cpp.orig	2016-01-11 12:13:10 UTC
++++ ../../zen/file_access.cpp
+@@ -877,6 +877,11 @@ void setFileTimeRaw(const Zstring& fileP
+     //https://sourceforge.net/p/freefilesync/discussion/open-discussion/thread/218564cf/
+     newTimes[1] = modTime; //modification time
+ 
++#if defined(__FreeBSD__)
++#include <osreldate.h>
++#if __FreeBSD_version < 1002506 || (__FreeBSD_version >= 1100000 && __FreeBSD_version < 1100056)
++    throw ErrorLinuxFallbackToUtimes(L"");
++#else
+     //=> using open()/futimens() for regular files and utimensat(AT_SYMLINK_NOFOLLOW) for symlinks is consistent with "cp" and "touch"!
+     if (procSl == ProcSymlink::FOLLOW)
+     {
+@@ -898,6 +903,8 @@ void setFileTimeRaw(const Zstring& fileP
+         if (::utimensat(AT_FDCWD, filePath.c_str(), newTimes, AT_SYMLINK_NOFOLLOW) != 0)
+             THROW_LAST_FILE_ERROR(replaceCpy(_("Cannot write modification time of %x."), L"%x", fmtPath(filePath)), L"utimensat");
+     }
++#endif
++#endif
+ }
+ 
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603110741.u2B7fINY013082>