Import oce-0.15.

Opencascade Community Edition project gathers patches/changes/improvements
from the OCC community over the latest release.

Open CASCADE Technology is a software development platform freely available
in open source. It includes C++ components for 3D surface and solid modeling,
visualization, data exchange and rapid application development.
This commit is contained in:
Filip Hajny 2014-05-30 11:21:00 +00:00 committed by Thomas Klausner
parent 2b0aea7b65
commit 2801e56575
11 changed files with 14345 additions and 0 deletions

6
oce/DESCR Normal file
View file

@ -0,0 +1,6 @@
Opencascade Community Edition project gathers patches/changes/improvements
from the OCC community over the latest release.
Open CASCADE Technology is a software development platform freely available
in open source. It includes C++ components for 3D surface and solid modeling,
visualization, data exchange and rapid application development.

26
oce/Makefile Normal file
View file

@ -0,0 +1,26 @@
# $NetBSD: Makefile,v 1.1 2014/05/30 11:21:00 fhajny Exp $
DISTNAME= OCE-0.15
PKGNAME= ${DISTNAME:tl}
CATEGORIES= cad
MASTER_SITES= https://github.com/tpaviot/oce/archive/
MAINTAINER= filip@joyent.com
HOMEPAGE= http://github.com/tpaviot/oce/
COMMENT= Open CASCADE Community Edition
LICENSE= gnu-lgpl-v2.1
WRKSRC= ${WRKDIR}/oce-${DISTNAME}
USE_CMAKE= yes
USE_LANGUAGES= c c++
USE_LIBTOOL= yes
# mk/configure/cmake.mk disable rpath handling
# but we need it for a lib subpath
LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/oce
CMAKE_ARGS+= -DOCE_INSTALL_PREFIX:PATH=${PREFIX}
.include "options.mk"
.include "../../mk/bsd.pkg.mk"

14144
oce/PLIST Normal file

File diff suppressed because it is too large Load diff

19
oce/buildlink3.mk Normal file
View file

@ -0,0 +1,19 @@
# $NetBSD: buildlink3.mk,v 1.1 2014/05/30 11:21:00 fhajny Exp $
BUILDLINK_TREE+= oce
.if !defined(OCE_BUILDLINK3_MK)
OCE_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.oce+= oce>=0.15
BUILDLINK_PKGSRCDIR.oce?= ../../wip/oce
.if !empty(PKG_OPTIONS:Mx11)
.include "../../graphics/Mesa/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../lang/tcl/buildlink3.mk"
.include "../../x11/tk/buildlink3.mk"
.endif
.endif # OCE_BUILDLINK3_MK
BUILDLINK_TREE+= -oce

10
oce/distinfo Normal file
View file

@ -0,0 +1,10 @@
$NetBSD: distinfo,v 1.1 2014/05/30 11:21:00 fhajny Exp $
SHA1 (OCE-0.15.tar.gz) = 3036ca47202bdffdef79a65c314a446424ac47f1
RMD160 (OCE-0.15.tar.gz) = be53cced4d5463d466fd17c3f721ae56fb89e32b
Size (OCE-0.15.tar.gz) = 24341270 bytes
SHA1 (patch-CMakeLists.txt) = 35c51b9a3f9620bb1caa121cc2fd251daab2dccc
SHA1 (patch-src_OSD_OSD__signal.cxx) = 1138a73e280f30edefdb532ec81e09865da781a2
SHA1 (patch-src_OpenGl_OpenGl__Context.hxx) = f603b285d5790ceebd7c3bf3f48697c3e24ffa0b
SHA1 (patch-src_Standard_Standard__CLocaleSentry.hxx) = 50e5bb748d23eb7e913d40e3c43dd4b50d8ace4a
SHA1 (patch-src_Standard_Standard__PrimitiveTypes.hxx) = 791ad1d8120c43aadb3e321c72bf217dc1057e58

29
oce/options.mk Normal file
View file

@ -0,0 +1,29 @@
# $NetBSD: options.mk,v 1.1 2014/05/30 11:21:00 fhajny Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.oce
PKG_SUPPORTED_OPTIONS= draw x11
PKG_SUGGESTED_OPTIONS= x11
.include "../../mk/bsd.options.mk"
PLIST_VARS+= draw x11
.if !empty(PKG_OPTIONS:Mx11)
CMAKE_ARGS+= -DFREETYPE_INCLUDE_DIRS:PATH=${BUILDLINK_PREFIX.freetype2}/include
PLIST.x11= yes
. include "../../graphics/Mesa/buildlink3.mk"
. include "../../graphics/freetype2/buildlink3.mk"
.else
CMAKE_ARGS+= -DOCE_DISABLE_X11=ON
.endif
.if !empty(PKG_OPTIONS:Mdraw)
. if !empty(PKG_OPTIONS:Mx11)
CMAKE_ARGS+= -DOCE_DRAW:BOOL=ON
PLIST.draw= yes
. include "../../lang/tcl/buildlink3.mk"
. include "../../x11/tk/buildlink3.mk"
. else
PKG_FAIL_REASON+= "The 'draw' option requires the 'x11' option"
. endif
.endif

View file

@ -0,0 +1,32 @@
$NetBSD: patch-CMakeLists.txt,v 1.1 2014/05/30 11:21:00 fhajny Exp $
Do not version lib and share subdirs.
--- CMakeLists.txt.orig 2014-02-12 20:06:33.000000000 +0000
+++ CMakeLists.txt
@@ -1005,7 +1005,7 @@ if(MSVC)
endif(NOT DEFINED OCE_INSTALL_PACKAGE_LIB_DIR)
else(MSVC)
if(NOT DEFINED OCE_INSTALL_PACKAGE_LIB_DIR)
- set(OCE_INSTALL_PACKAGE_LIB_DIR ${OCE_INSTALL_LIB_DIR}/oce-${OCE_VERSION})
+ set(OCE_INSTALL_PACKAGE_LIB_DIR ${OCE_INSTALL_LIB_DIR}/oce)
endif(NOT DEFINED OCE_INSTALL_PACKAGE_LIB_DIR)
endif(MSVC)
@@ -1035,7 +1035,7 @@ endif(NOT DEFINED OCE_INSTALL_SCRIPT_DIR
# Data
if(NOT DEFINED OCE_INSTALL_DATA_DIR)
if(NOT MSVC)
- set(OCE_INSTALL_DATA_DIR share/oce-${OCE_VERSION})
+ set(OCE_INSTALL_DATA_DIR share/oce)
else ()
set(OCE_INSTALL_DATA_DIR "share/oce")
endif(NOT MSVC)
@@ -1060,7 +1060,7 @@ if(NOT DEFINED OCE_INSTALL_CMAKE_DATA_DI
OCE.framework/Versions/${OCE_VERSION}/Resources)
else(APPLE)
set(OCE_INSTALL_CMAKE_DATA_DIR
- lib${LIB_SUFFIX}/oce-${OCE_VERSION})
+ lib${LIB_SUFFIX}/oce)
endif(APPLE)
endif(WIN32)
endif(NOT DEFINED OCE_INSTALL_CMAKE_DATA_DIR)

View file

@ -0,0 +1,14 @@
$NetBSD: patch-src_OSD_OSD__signal.cxx,v 1.1 2014/05/30 11:21:00 fhajny Exp $
Respect the reality as CMake found it, there might not be libsunmath.
--- src/OSD/OSD_signal.cxx.orig 2014-02-12 20:06:33.000000000 +0000
+++ src/OSD/OSD_signal.cxx
@@ -422,7 +422,7 @@ void OSD::SetSignal(const Standard_Boole
if( aFloatingSignal ) {
//==== Enable the floating point exceptions ===============
-#if defined (__sun) || defined (SOLARIS)
+#if ( defined (__sun) || defined (SOLARIS) ) && HAVE_SUNMATH
sigfpe_handler_type PHandler = (sigfpe_handler_type) Handler ;
stat = ieee_handler("set", "invalid", PHandler);
stat = ieee_handler("set", "division", PHandler) || stat;

View file

@ -0,0 +1,16 @@
$NetBSD: patch-src_OpenGl_OpenGl__Context.hxx,v 1.1 2014/05/30 11:21:00 fhajny Exp $
We need alloca.h.
--- src/OpenGl/OpenGl_Context.hxx.orig 2014-02-12 20:06:33.000000000 +0000
+++ src/OpenGl/OpenGl_Context.hxx
@@ -34,6 +34,10 @@
#include <Handle_OpenGl_Context.hxx>
#include <OpenGl_Clipping.hxx>
+#if defined(__sun)
+#include <alloca.h>
+#endif
+
//! Forward declarations
struct OpenGl_GlCore12;
struct OpenGl_GlCore13;

View file

@ -0,0 +1,14 @@
$NetBSD: patch-src_Standard_Standard__CLocaleSentry.hxx,v 1.1 2014/05/30 11:21:00 fhajny Exp $
SunOS just doesn't have xlocale.h.
--- src/Standard/Standard_CLocaleSentry.hxx.orig 2014-02-12 20:06:33.000000000 +0000
+++ src/Standard/Standard_CLocaleSentry.hxx
@@ -25,7 +25,7 @@
//! Notice that this is impossible to test (_POSIX_C_SOURCE >= 200809L)
//! since POSIX didn't declared such identifier.
//! We check _GNU_SOURCE for glibc extensions here and it is always defined by g++ compiler.
-#if defined(__APPLE__) || defined(_GNU_SOURCE) || defined(HAVE_XLOCALE_H)
+#if defined(__APPLE__) || (defined(_GNU_SOURCE) && !defined(__sun)) || defined(HAVE_XLOCALE_H)
#include <xlocale.h>
#ifndef HAVE_XLOCALE_H
#define HAVE_XLOCALE_H

View file

@ -0,0 +1,35 @@
$NetBSD: patch-src_Standard_Standard__PrimitiveTypes.hxx,v 1.1 2014/05/30 11:21:00 fhajny Exp $
Undefine SunOS registers that are forcibly pulled in by headers,
and clash with some OpenCASCADE variables.
--- src/Standard/Standard_PrimitiveTypes.hxx.orig 2014-02-12 20:06:33.000000000 +0000
+++ src/Standard/Standard_PrimitiveTypes.hxx
@@ -18,6 +18,28 @@
#include <stddef.h>
#include <stdlib.h>
+#if defined(__sun)
+#undef CS
+#undef DS
+#undef ES
+#undef FS
+#undef GS
+#undef SS
+#undef EAX
+#undef EBP
+#undef EBX
+#undef ECX
+#undef EDI
+#undef EEDX
+#undef EFL
+#undef EIP
+#undef ERR
+#undef ESI
+#undef ESP
+#undef TRAPNO
+#undef UESP
+#endif
+
class Standard_Type;
class Handle_Standard_Type;