[153016] trunk/dports/science/bladeRF

michaelld at macports.org michaelld at macports.org
Thu Sep 22 05:28:34 PDT 2016


Revision: 153016
          https://trac.macports.org/changeset/153016
Author:   michaelld at macports.org
Date:     2016-09-22 05:28:34 -0700 (Thu, 22 Sep 2016)
Log Message:
-----------
bladerf: add temporary patch to fix use of clock_gettime.

Modified Paths:
--------------
    trunk/dports/science/bladeRF/Portfile

Added Paths:
-----------
    trunk/dports/science/bladeRF/files/
    trunk/dports/science/bladeRF/files/patch-clock_gettime.diff

Modified: trunk/dports/science/bladeRF/Portfile
===================================================================
--- trunk/dports/science/bladeRF/Portfile	2016-09-22 11:34:56 UTC (rev 153015)
+++ trunk/dports/science/bladeRF/Portfile	2016-09-22 12:28:34 UTC (rev 153016)
@@ -20,6 +20,10 @@
 depends_build-append port:pkgconfig
 depends_lib-append  path:lib/libusb-1.0.dylib:libusb
 
+# temporary patch to fix use of clock_gettime
+
+patchfiles-append   patch-clock_gettime.diff
+
 # do VPATH (out of source tree) build
 
 cmake.out_of_source yes

Added: trunk/dports/science/bladeRF/files/patch-clock_gettime.diff
===================================================================
--- trunk/dports/science/bladeRF/files/patch-clock_gettime.diff	                        (rev 0)
+++ trunk/dports/science/bladeRF/files/patch-clock_gettime.diff	2016-09-22 12:28:34 UTC (rev 153016)
@@ -0,0 +1,29 @@
+--- host/CMakeLists.txt.orig
++++ host/CMakeLists.txt
+@@ -152,6 +152,11 @@
+             ${CMAKE_CURRENT_LIST_DIR}/common/include/osx
+     )
+ 
++    # 'clock_gettime' and related are defined on OSX as of 10.12.0 (16.0.0)
++    if(${CMAKE_SYSTEM_VERSION} VERSION_LESS 16.0.0)
++        add_definitions(-D_OSX_NEED_CLOCK_GETTIME)
++    endif()
++
+ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+     set(BLADERF_OS_WINDOWS 1)
+ 
+--- host/common/include/osx/clock_gettime.h.orig
++++ host/common/include/osx/clock_gettime.h
+@@ -35,10 +35,12 @@
+ #   error "This file is intended for use with OSX systems only."
+ #endif
+ 
++#ifdef _OSX_NEED_CLOCK_GETTIME
+ typedef int clockid_t;
+ #define CLOCK_REALTIME 0
+ 
+ int clock_gettime(clockid_t clk_id, struct timespec *tp);
++#endif /* _OSX_NEED_CLOCK_GETTIME */
+ 
+ #ifdef __cplusplus
+ } /* extern "C" */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160922/64c5be29/attachment.html>


More information about the macports-changes mailing list