pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Don't have a file called "version", to avoid conflict with C++20 <version>.



Module Name:	pkgsrc-wip
Committed By:	davidsainty <david.sainty%gmail.com@localhost>
Pushed By:	dsainty
Date:		Thu Jan 20 13:41:58 2022 +1300
Changeset:	956ea31436339c1c1b11741da6e1bb1ff39943de

Added Files:
	zoneminder/patches/patch-CMakeLists.txt

Log Message:
Don't have a file called "version", to avoid conflict with C++20 <version>.

CMake will detect the MacOS 6-argument sendfile() support and configure
HAVE_SENDFILE, but the code itself doesn't support this interface.  So don't
probe for HAVE_SENDFILE if we HAVE_SENDFILE6_SUPPORT.

Just because librt doesn't exist does not mean that clock_gettime() doesn't
exist, so don't insist on librt being present.  Fixes the build on MacOS.

Let Pkgsrc be responsible for zm.conf into examples, rather than overwriting
the existing configuration file.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=956ea31436339c1c1b11741da6e1bb1ff39943de

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 zoneminder/patches/patch-CMakeLists.txt | 39 +++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diffs:
diff --git a/zoneminder/patches/patch-CMakeLists.txt b/zoneminder/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..c87baee878
--- /dev/null
+++ b/zoneminder/patches/patch-CMakeLists.txt
@@ -0,0 +1,39 @@
+$NetBSD$
+
+Don't have a file called "version", as XCode will attempt to include it.
+
+The MacOS sendfile() is not supported, so don't set HAVE_SENDFILE in that case.
+
+Just because librt doesn't exist does not mean that clock_gettime() doesn't
+exist, so don't insist on librt being present.  Fixes the build on MacOS.
+
+--- CMakeLists.txt.orig	2019-02-23 04:38:47.000000000 +1300
++++ CMakeLists.txt	2022-01-19 20:16:39.000000000 +1300
+@@ -4,7 +4,7 @@
+ #
+ cmake_minimum_required (VERSION 2.8.7)
+ project (zoneminder)
+-file (STRINGS "version" zoneminder_VERSION)
++file (STRINGS "version.txt" zoneminder_VERSION)
+ # make API version a minor of ZM version
+ set(zoneminder_API_VERSION "${zoneminder_VERSION}.1")
+ 
+@@ -226,7 +226,9 @@
+ check_include_file("sys/sendfile.h" HAVE_SYS_SENDFILE_H)
+ check_include_file("sys/syscall.h" HAVE_SYS_SYSCALL_H)
+ check_function_exists("syscall" HAVE_SYSCALL)
++if(NOT HAVE_SENDFILE6_SUPPORT)
+ check_function_exists("sendfile" HAVE_SENDFILE)
++endif(NOT HAVE_SENDFILE6_SUPPORT)
+ check_function_exists("posix_memalign" HAVE_POSIX_MEMALIGN)
+ check_type_size("siginfo_t" HAVE_SIGINFO_T)
+ check_type_size("ucontext_t" HAVE_UCONTEXT_T)
+@@ -237,7 +239,7 @@
+     include (CheckLibraryExists)
+     CHECK_LIBRARY_EXISTS(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME)
+     if(NOT HAVE_CLOCK_GETTIME)
+-        message(FATAL_ERROR "clock_gettime not found")
++        #message(FATAL_ERROR "clock_gettime not found")
+     else(NOT HAVE_CLOCK_GETTIME)
+         list(APPEND ZM_BIN_LIBS "-lrt")
+     endif(NOT HAVE_CLOCK_GETTIME)


Home | Main Index | Thread Index | Old Index