[pkg-remote-commits] [freerdp2] 08/12: debian/patches: Add 1003_fix-FTBFS-on-kFreeBSD.patch, 1004_FreeBSD-is-not-kFreeBSD.patch. Fix upstream passages for building against GNU/kFreeBSD.

Mike Gabriel sunweaver at debian.org
Sat Oct 21 22:31:42 UTC 2017


This is an automated email from the git hooks/post-receive script.

sunweaver pushed a commit to branch master
in repository freerdp2.

commit a6a93b5d4fb44466f4c346cabfe2a0234187f972
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sat Oct 21 23:09:31 2017 +0200

    debian/patches: Add 1003_fix-FTBFS-on-kFreeBSD.patch, 1004_FreeBSD-is-not-kFreeBSD.patch. Fix upstream passages for building against GNU/kFreeBSD.
---
 debian/patches/1003_fix-FTBFS-on-kFreeBSD.patch   | 81 +++++++++++++++++++++++
 debian/patches/1004_FreeBSD-is-not-kFreeBSD.patch | 30 +++++++++
 debian/patches/series                             |  2 +
 3 files changed, 113 insertions(+)

diff --git a/debian/patches/1003_fix-FTBFS-on-kFreeBSD.patch b/debian/patches/1003_fix-FTBFS-on-kFreeBSD.patch
new file mode 100644
index 0000000..d06a20f
--- /dev/null
+++ b/debian/patches/1003_fix-FTBFS-on-kFreeBSD.patch
@@ -0,0 +1,81 @@
+Description: Handle GNU/kFreeBSD the same way as other BSD variants
+Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+
+Index: freerdp2-2.0.0~git20170725.1.1648deb+dfsg1/winpr/libwinpr/file/file.c
+===================================================================
+--- freerdp2-2.0.0~git20170725.1.1648deb+dfsg1.orig/winpr/libwinpr/file/file.c
++++ freerdp2-2.0.0~git20170725.1.1648deb+dfsg1/winpr/libwinpr/file/file.c
+@@ -23,6 +23,10 @@
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+ 
++#if defined(__FreeBSD_kernel__) && defined(__GLIBC__)
++#define _GNU_SOURCE
++#endif
++
+ #include <winpr/crt.h>
+ #include <winpr/file.h>
+ 
+@@ -384,7 +388,7 @@ static BOOL FileSetFileTime(HANDLE hFile
+                             const FILETIME* lpLastAccessTime, const FILETIME* lpLastWriteTime)
+ {
+ 	int rc;
+-#if defined(__APPLE__) || defined(ANDROID) || defined(__FreeBSD__)
++#if defined(__APPLE__) || defined(ANDROID) || defined(__FreeBSD__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
+ 	struct stat buf;
+ 	/* OpenBSD, NetBSD and DragonflyBSD support POSIX futimens */
+ 	struct timeval timevals[2];
+@@ -396,7 +400,7 @@ static BOOL FileSetFileTime(HANDLE hFile
+ 	if (!hFile)
+ 		return FALSE;
+ 
+-#if defined(__APPLE__) || defined(ANDROID) || defined(__FreeBSD__)
++#if defined(__APPLE__) || defined(ANDROID) || defined(__FreeBSD__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
+ 	rc = fstat(fileno(pFile->fp), &buf);
+ 
+ 	if (rc < 0)
+@@ -406,7 +410,7 @@ static BOOL FileSetFileTime(HANDLE hFile
+ 
+ 	if (!lpLastAccessTime)
+ 	{
+-#if defined(__FreeBSD__) || defined(__APPLE__)
++#if defined(__FreeBSD__) || defined(__APPLE__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
+ 		timevals[0].tv_sec = buf.st_atime;
+ #ifdef _POSIX_SOURCE
+ 		TIMESPEC_TO_TIMEVAL(&timevals[0], &buf.st_atim);
+@@ -424,7 +428,7 @@ static BOOL FileSetFileTime(HANDLE hFile
+ 	else
+ 	{
+ 		UINT64 tmp = FileTimeToUS(lpLastAccessTime);
+-#if defined(ANDROID) || defined(__FreeBSD__) || defined(__APPLE__)
++#if defined(ANDROID) || defined(__FreeBSD__) || defined(__APPLE__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
+ 		timevals[0].tv_sec = tmp / 1000000ULL;
+ 		timevals[0].tv_usec = tmp % 1000000ULL;
+ #else
+@@ -435,7 +439,7 @@ static BOOL FileSetFileTime(HANDLE hFile
+ 
+ 	if (!lpLastWriteTime)
+ 	{
+-#if defined(__FreeBSD__) || defined(__APPLE__)
++#if defined(__FreeBSD__) || defined(__APPLE__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
+ 		timevals[1].tv_sec = buf.st_mtime;
+ #ifdef _POSIX_SOURCE
+ 		TIMESPEC_TO_TIMEVAL(&timevals[1], &buf.st_mtim);
+@@ -453,7 +457,7 @@ static BOOL FileSetFileTime(HANDLE hFile
+ 	else
+ 	{
+ 		UINT64 tmp = FileTimeToUS(lpLastWriteTime);
+-#if defined(ANDROID) || defined(__FreeBSD__) || defined(__APPLE__)
++#if defined(ANDROID) || defined(__FreeBSD__) || defined(__APPLE__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
+ 		timevals[1].tv_sec = tmp / 1000000ULL;
+ 		timevals[1].tv_usec = tmp % 1000000ULL;
+ #else
+@@ -463,7 +467,7 @@ static BOOL FileSetFileTime(HANDLE hFile
+ 	}
+ 
+ 	// TODO: Creation time can not be handled!
+-#if defined(ANDROID) || defined(__FreeBSD__) || defined(__APPLE__)
++#if defined(ANDROID) || defined(__FreeBSD__) || defined(__APPLE__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
+ 	rc = utimes(pFile->lpFileName, timevals);
+ #else
+ 	rc = futimens(fileno(pFile->fp), times);
diff --git a/debian/patches/1004_FreeBSD-is-not-kFreeBSD.patch b/debian/patches/1004_FreeBSD-is-not-kFreeBSD.patch
new file mode 100644
index 0000000..5918773
--- /dev/null
+++ b/debian/patches/1004_FreeBSD-is-not-kFreeBSD.patch
@@ -0,0 +1,30 @@
+Description: GNU/kFreeBSD != FreeBSD
+Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+
+Index: freerdp2-2.0.0~git20170725.1.1648deb+dfsg1/CMakeLists.txt
+===================================================================
+--- freerdp2-2.0.0~git20170725.1.1648deb+dfsg1.orig/CMakeLists.txt
++++ freerdp2-2.0.0~git20170725.1.1648deb+dfsg1/CMakeLists.txt
+@@ -158,6 +158,9 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
+ 	if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+ 		set(FREEBSD TRUE)
+ 	endif()
++	if(${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD")
++		set(KFREEBSD TRUE)
++	endif()
+ 	if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
+ 		set(OPENBSD TRUE)
+ 	endif()
+Index: freerdp2-2.0.0~git20170725.1.1648deb+dfsg1/winpr/libwinpr/utils/CMakeLists.txt
+===================================================================
+--- freerdp2-2.0.0~git20170725.1.1648deb+dfsg1.orig/winpr/libwinpr/utils/CMakeLists.txt
++++ freerdp2-2.0.0~git20170725.1.1648deb+dfsg1/winpr/libwinpr/utils/CMakeLists.txt
+@@ -141,7 +141,7 @@ if(UNIX)
+ 	winpr_library_add(m)
+ endif()
+ 
+-if(FREEBSD)
++if((FREEBSD) AND (NOT KFREEBSD))
+ 	winpr_library_add(execinfo)
+ endif()
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 7d0a59d..9353ec6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,5 @@
 0001-Fix-gstreamer-1.0-detection.patch
 1001_Typo-Fixes.patch
 1002_macro-fix-in-man-pages.patch
+1003_fix-FTBFS-on-kFreeBSD.patch
+1004_FreeBSD-is-not-kFreeBSD.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-remote/freerdp2.git



More information about the pkg-remote-commits mailing list