oce: add 0.18 and fix patching (#2844)

* oce: add 0.18 and fix patching

* oce: simplify the patch
This commit is contained in:
Denis Davydov 2017-01-17 23:40:07 +01:00 committed by becker33
parent a1f7006400
commit a040c8c743
2 changed files with 10 additions and 40 deletions

View File

@ -32,8 +32,9 @@ class Oce(Package):
Open CASCADE library. Open CASCADE library.
""" """
homepage = "https://github.com/tpaviot/oce" homepage = "https://github.com/tpaviot/oce"
url = "https://github.com/tpaviot/oce/archive/OCE-0.17.tar.gz" url = "https://github.com/tpaviot/oce/archive/OCE-0.18.tar.gz"
version('0.18', '226e45e77c16a4a6e127c71fefcd171410703960ae75c7ecc7eb68895446a993')
version('0.17.2', 'bf2226be4cd192606af677cf178088e5') version('0.17.2', 'bf2226be4cd192606af677cf178088e5')
version('0.17.1', '36c67b87093c675698b483454258af91') version('0.17.1', '36c67b87093c675698b483454258af91')
version('0.17', 'f1a89395c4b0d199bea3db62b85f818d') version('0.17', 'f1a89395c4b0d199bea3db62b85f818d')
@ -56,8 +57,9 @@ class Oce(Package):
# fix build with Xcode 8 "previous definition of CLOCK_REALTIME" # fix build with Xcode 8 "previous definition of CLOCK_REALTIME"
# reported 27 Sep 2016 https://github.com/tpaviot/oce/issues/643 # reported 27 Sep 2016 https://github.com/tpaviot/oce/issues/643
if (platform.system() == "Darwin") and (platform.mac_ver()[0] == '10.12'): if (platform.system() == "Darwin") and (
patch('sierra.patch') '.'.join(platform.mac_ver()[0].split('.')[:2]) == '10.12'):
patch('sierra.patch', when='@0.17.2:0.18')
def install(self, spec, prefix): def install(self, spec, prefix):
options = [] options = []
@ -89,4 +91,5 @@ def install(self, spec, prefix):
cmake('.', *options) cmake('.', *options)
make("install/strip") make("install/strip")
if self.run_tests:
make("test") make("test")

View File

@ -1,45 +1,12 @@
diff --git a/adm/cmake/TKernel/CMakeLists.txt b/adm/cmake/TKernel/CMakeLists.txt
index 54e241e..72873c6 100644
--- a/adm/cmake/TKernel/CMakeLists.txt
+++ b/adm/cmake/TKernel/CMakeLists.txt
@@ -29,7 +29,7 @@ if(WIN32)
set(TOOLKIT_LIBS ${TOOLKIT_LIBS} ${CSF_SOCKETLibs_LIB} ${CSF_advapi32_LIB} ${CSF_gdi32_LIB} ${CSF_user32_LIB} ${CSF_kernel32_LIB} ${CSF_psapi_LIB})
else(WIN32)
#  An implementation for Mac OS X has been added in src/OSD/gettime_osx.h
- if(NOT APPLE)
+ if(APPLE)
include( CheckFunctionExists )
check_function_exists( clock_gettime CLOCK_GETTIME_IN_LIBC )
if(NOT CLOCK_GETTIME_IN_LIBC)
@@ -40,7 +40,7 @@ else(WIN32)
endif(NOT CLOCK_GETTIME_IN_LIBRT)
set(TOOLKIT_LIBS ${TOOLKIT_LIBS} rt)
endif(NOT CLOCK_GETTIME_IN_LIBC)
- endif(NOT APPLE)
+ endif(APPLE)
endif(WIN32)
# Adde-DHAVE_TBB in TKernel in order to benefit from Standard_MMgrTBBalloc
@@ -70,4 +70,3 @@ if (OCE_BUILD_TKERNEL_WITH_INSTALL_RPATH)
set_target_properties_install_rpath(${TOOLKIT} "${OCE_INSTALL_LIB_DIR_RPATH};${OCE_INSTALL_PACKAGE_LIB_DIR_RPATH}")
set_target_properties(${TOOLKIT} PROPERTIES BUILD_WITH_INSTALL_RPATH ON)
endif ()
-
diff --git a/src/OSD/OSD_Chronometer.cxx b/src/OSD/OSD_Chronometer.cxx diff --git a/src/OSD/OSD_Chronometer.cxx b/src/OSD/OSD_Chronometer.cxx
index 444f844..25970d0 100644 index f7374fb..63ac140 100644
--- a/src/OSD/OSD_Chronometer.cxx --- a/src/OSD/OSD_Chronometer.cxx.old
+++ b/src/OSD/OSD_Chronometer.cxx +++ b/src/OSD/OSD_Chronometer.cxx
@@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
#include <mach/mach.h> #include <mach/mach.h>
#endif #endif
-#if defined(__APPLE__) && defined(__MACH__) -#if defined(__APPLE__) && defined(__MACH__)
+#if defined(__OOOOPPLE__) && defined(__MACH__) +#if defined(__APPLE__) && !defined(__MAC_10_12)
#include "gettime_osx.h" #include "gettime_osx.h"
#endif #endif
@@ -283,4 +283,3 @@ void OSD_Chronometer::Show (Standard_Real& user,
system = Cumul_sys;
if (!StopSav) Start();
}
-