diff -urN opencascade-6.2.orig/ros/adm/make/DRAWEXE/Makefile.in opencascade-6.2/ros/adm/make/DRAWEXE/Makefile.in --- opencascade-6.2.orig/ros/adm/make/DRAWEXE/Makefile.in Wed Mar 21 22:14:25 2007 +++ opencascade-6.2/ros/adm/make/DRAWEXE/Makefile.in Sun Apr 1 11:13:18 2007 @@ -255,7 +255,7 @@ done DRAWEXE$(EXEEXT): $(DRAWEXE_OBJECTS) $(DRAWEXE_DEPENDENCIES) @rm -f DRAWEXE$(EXEEXT) - $(CXXLINK) $(DRAWEXE_LDFLAGS) $(DRAWEXE_OBJECTS) $(DRAWEXE_LDADD) $(LIBS) + $(CXXLINK) $(DRAWEXE_LDFLAGS) $(DRAWEXE_OBJECTS) $(DRAWEXE_LDADD) $(LIBS) $(PTHREAD_LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core diff -urN opencascade-6.2.orig/ros/adm/make/WOKSH/Makefile.in opencascade-6.2/ros/adm/make/WOKSH/Makefile.in --- opencascade-6.2.orig/ros/adm/make/WOKSH/Makefile.in Wed Mar 21 22:14:26 2007 +++ opencascade-6.2/ros/adm/make/WOKSH/Makefile.in Sun Apr 1 11:13:18 2007 @@ -91,7 +91,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = @LIBS@ $(PTHREAD_LIBS) LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ diff -urN opencascade-6.2.orig/ros/configure opencascade-6.2/ros/configure --- opencascade-6.2.orig/ros/configure Wed Mar 21 22:14:31 2007 +++ opencascade-6.2/ros/configure Sun Apr 1 11:13:19 2007 @@ -1038,7 +1038,7 @@ --with-gnu-ld assume the C compiler uses GNU ld default=no --with-pic try to use only PIC/non-PIC objects default=use both --with-x use the X Window System - --with-tcl directory containing tcl configuration (tclConfig.sh) + --with-tcl directory containing tcl configuration (tclConfig-threads.sh) --with-tk directory containing tk configuration (tkConfig.sh) --with-gl-include=DIR The directory where the OpenGL headers are found --with-gl-library=DIR The directory where the OpenGL libraries are found @@ -12213,7 +12213,7 @@ # This section of configure.in is snipped from TclX source. #------------------------------------------------------------------------------ # Get location of Tcl source directory and configuration information from -# tclConfig.sh. +# tclConfig-threads.sh. #------------------------------------------------------------------------------ @@ -12241,11 +12241,11 @@ # First check to see if --with-tclconfig was specified. if test x"${with_tclconfig}" != x ; then - if test -f "${with_tclconfig}/tclConfig.sh" ; then + if test -f "${with_tclconfig}/tclConfig-threads.sh" ; then ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` else - { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5 -echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;} + { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig-threads.sh" >&5 +echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig-threads.sh" >&2;} { (exit 1); exit 1; }; } fi fi @@ -12259,7 +12259,7 @@ `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ ../../../tcl \ `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do - if test -f "$i/unix/tclConfig.sh" ; then + if test -f "$i/unix/tclConfig-threads.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break fi @@ -12273,7 +12273,7 @@ `ls -d /usr/lib 2>/dev/null` \ `ls -d /opt/sfw/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` ; do - if test -f "$i/tclConfig.sh" ; then + if test -f "$i/tclConfig-threads.sh" ; then ac_cv_c_tclconfig=`(cd $i; pwd)` break fi @@ -12285,7 +12285,7 @@ for i in \ ${srcdir}/../tcl \ `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do - if test -f "$i/unix/tclConfig.sh" ; then + if test -f "$i/unix/tclConfig-threads.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break fi @@ -12303,19 +12303,19 @@ else no_tcl= TCL_BIN_DIR=${ac_cv_c_tclconfig} - echo "$as_me:$LINENO: result: found $TCL_BIN_DIR/tclConfig.sh" >&5 -echo "${ECHO_T}found $TCL_BIN_DIR/tclConfig.sh" >&6 + echo "$as_me:$LINENO: result: found $TCL_BIN_DIR/tclConfig-threads.sh" >&5 +echo "${ECHO_T}found $TCL_BIN_DIR/tclConfig-threads.sh" >&6 fi fi - echo "$as_me:$LINENO: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 -echo $ECHO_N "checking for existence of $TCL_BIN_DIR/tclConfig.sh... $ECHO_C" >&6 + echo "$as_me:$LINENO: checking for existence of $TCL_BIN_DIR/tclConfig-threads.sh" >&5 +echo $ECHO_N "checking for existence of $TCL_BIN_DIR/tclConfig-threads.sh... $ECHO_C" >&6 - if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then + if test -f "$TCL_BIN_DIR/tclConfig-threads.sh" ; then echo "$as_me:$LINENO: result: loading" >&5 echo "${ECHO_T}loading" >&6 - . $TCL_BIN_DIR/tclConfig.sh + . $TCL_BIN_DIR/tclConfig-threads.sh else echo "$as_me:$LINENO: result: file not found" >&5 echo "${ECHO_T}file not found" >&6 @@ -12480,6 +12480,8 @@ case $platform in Linux*) CXXFLAGS="$CXXFLAGS -DLIN -DLININTEL -D_GNU_SOURCE=1" CFLAGS="$CFLAGS -DLIN -DLININTEL -fexceptions";; + FreeBSD*) CXXFLAGS="$CXXFLAGS -DFREEBSD -D$ARCH -D_GNU_SOURCE=1" + CFLAGS="$CFLAGS -DFREEBSD -D$ARCH -fexceptions";; SunOS*) CXXFLAGS="$CXXFLAGS -Usun -DSOLARIS" CFLAGS="$CFLAGS -Usun -DSOLARIS";; OSF1*) CXXFLAGS="$CXXFLAGS -DDECOSF1 -D__USE_STD_IOSTREAM -D_RWSTD_NO_EXCEPTIONS" @@ -14722,8 +14724,8 @@ INCLUDE="$STLPort_INCLUDES $INCLUDE" CPPFLAGS_save=$CPPFLAGS CPPFLAGS="$INCLUDE $CPPFLAGS" -CXXFLAGS_save=$CPPFLAGS -CXXFLAGS="$INCLUDE $CPPFLAGS" +CXXFLAGS_save=$CXXFLAGS +CXXFLAGS="$INCLUDE $CXXFLAGS" LDFLAGS_save=$LDFLAGS if test -d "${with_stlport_library}" ; then STLPort_LIB="-L`(cd ${with_stlport_library}; pwd)` -l$STLPort_LIB_CC" diff -urN opencascade-6.2.orig/ros/env.csh opencascade-6.2/ros/env.csh --- opencascade-6.2.orig/ros/env.csh Wed Mar 21 22:14:25 2007 +++ opencascade-6.2/ros/env.csh Sun Apr 1 11:13:19 2007 @@ -1,16 +1,18 @@ #!/bin/csh -f -setenv CASROOT /usr/ports/cad/opencascade/work/opencascade-6.2/ros +setenv /usr/local/OpenCAS/ros set OS_NAME=`uname` if ( $?PATH ) then - setenv PATH $CASROOT/../3rdparty/$OS_NAME/tcltk/bin:$CASROOT/$OS_NAME/bin:$PATH + setenv PATH /usr/local/bin:$CASROOT/$OS_NAME/bin:$PATH else - setenv PATH $CASROOT/../3rdparty/$OS_NAME/tcltk/bin:$CASROOT/$OS_NAME/bin + setenv PATH /usr/local/bin:$CASROOT/$OS_NAME/bin endif -if ( $?LD_LIBRARY_PATH ) then +if ( $OS_NAME != "FreeBSD" ) then + if ( $?LD_LIBRARY_PATH ) then setenv LD_LIBRARY_PATH $CASROOT/../3rdparty/$OS_NAME/tcltk/lib:$CASROOT/$OS_NAME/lib:$LD_LIBRARY_PATH -else + else setenv LD_LIBRARY_PATH $CASROOT/../3rdparty/$OS_NAME/tcltk/lib:$CASROOT/$OS_NAME/lib + endif endif setenv CSF_MDTVFontDirectory $CASROOT/src/FontMFT setenv CSF_LANGUAGE us @@ -30,7 +32,7 @@ setenv CSF_STEPDefaults $CASROOT/src/XSTEPResource setenv CSF_XmlOcafResource $CASROOT/src/XmlOcafResource -setenv TCLHOME $CASROOT/../3rdparty/$OS_NAME/tcltk +setenv TCLHOME /usr/local setenv TCLLIBPATH $TCLHOME/lib if ( $OS_NAME == "SunOS" ) then setenv ITK_LIBRARY $TCLLIBPATH/itk3.2 @@ -38,6 +40,12 @@ setenv TIX_LIBRARY $TCLLIBPATH/tix8.1 setenv TK_LIBRARY $TCLLIBPATH/tk8.4 setenv TCL_LIBRARY $TCLLIBPATH/tcl8.4 +else if ( $OS_NAME == "FreeBSD" ) then + setenv ITK_LIBRARY $TCLLIBPATH/itk3.3 + setenv ITCL_LIBRARY $TCLLIBPATH/itcl3 + setenv TIX_LIBRARY $TCLLIBPATH/tix8.1 + setenv TK_LIBRARY /usr/local/lib/tk8.4 + setenv TCL_LIBRARY /usr/local/lib/tcl8.4 else if ( $OS_NAME == "Linux" ) then setenv ITK_LIBRARY $TCLLIBPATH/itk3.2 setenv ITCL_LIBRARY $TCLLIBPATH/itcl3.2 diff -urN opencascade-6.2.orig/ros/env.ksh opencascade-6.2/ros/env.ksh --- opencascade-6.2.orig/ros/env.ksh Wed Mar 21 22:14:25 2007 +++ opencascade-6.2/ros/env.ksh Sun Apr 1 11:13:19 2007 @@ -1,17 +1,19 @@ -#!/bin/ksh -f +#! /usr/local/bin/ksh -f -export CASROOT=/usr/ports/cad/opencascade/work/opencascade-6.2/ros +export CASROOT=/usr/local/OpenCAS/ros OS_NAME=`uname` if [ -z "PATH" ]; -then PATH=$CASROOT/../3rdparty/$OS_NAME/tcltk/bin:$CASROOT/$OS_NAME/bin; -else PATH=$CASROOT/../3rdparty/$OS_NAME/tcltk/bin:$CASROOT/$OS_NAME/bin:$PATH; +then PATH=/usr/local/bin:$CASROOT/$OS_NAME/bin; +else PATH=/usr/local/bin:$CASROOT/$OS_NAME/bin:$PATH; fi export PATH -if [ -z "LD_LIBRARY_PATH" ]; -then LD_LIBRARY_PATH=$CASROOT/../3rdparty/$OS_NAME/tcltk/lib:$CASROOT/$OS_NAME/lib; -else LD_LIBRARY_PATH=$CASROOT/../3rdparty/$OS_NAME/tcltk/lib:$CASROOT/$OS_NAME/lib:$LD_LIBRARY_PATH; +if [ $OS_NAME != "FreeBSD" ]; then + if [ -z "LD_LIBRARY_PATH" ]; + then LD_LIBRARY_PATH $CASROOT/../3rdparty/$OS_NAME/tcltk/lib:$CASROOT/$OS_NAME/lib; + else LD_LIBRARY_PATH $CASROOT/../3rdparty/$OS_NAME/tcltk/lib:$CASROOT/$OS_NAME/lib:$LD_LIBRARY_PATH; + fi + export LD_LIBRARY_PATH fi -export LD_LIBRARY_PATH export CSF_MDTVFontDirectory=$CASROOT/src/FontMFT export CSF_LANGUAGE=us export MMGT_CLEAR=1 @@ -30,7 +32,7 @@ export CSF_STEPDefaults=$CASROOT/src/XSTEPResource export CSF_XmlOcafResource=$CASROOT/src/XmlOcafResource -export TCLHOME=$CASROOT/../3rdparty/$OS_NAME/tcltk +export TCLHOME=/usr/local export TCLLIBPATH=$TCLHOME/lib if [ $OS_NAME = "SunOS" ]; then export ITK_LIBRARY=$TCLLIBPATH/itk3.2 @@ -38,6 +40,12 @@ export TIX_LIBRARY=$TCLLIBPATH/tix8.1 export TK_LIBRARY=$TCLLIBPATH/tk8.4 export TCL_LIBRARY=$TCLLIBPATH/tcl8.4; +elif [ $OS_NAME = "FreeBSD" ]; then + export ITK_LIBRARY=$TCLLIBPATH/itk3.3 + export ITCL_LIBRARY=$TCLLIBPATH/itcl3 + export TIX_LIBRARY=$TCLLIBPATH/tix8.1 + export TK_LIBRARY=/usr/local/lib/tk8.4 + export TCL_LIBRARY=/usr/local/lib/tcl8.4 elif [ $OS_NAME = "Linux" ]; then export ITK_LIBRARY=$TCLLIBPATH/itk3.2 export ITCL_LIBRARY=$TCLLIBPATH/itcl3.2 diff -urN opencascade-6.2.orig/ros/inc/config.h opencascade-6.2/ros/inc/config.h --- opencascade-6.2.orig/ros/inc/config.h Wed Mar 21 22:14:19 2007 +++ opencascade-6.2/ros/inc/config.h Sun Apr 1 11:13:19 2007 @@ -331,6 +331,366 @@ /* End Linux Part */ +/*-----------------------------------------------------------*/ +/* This part is extracted from config.h generated on FreeBSD */ +/*-----------------------------------------------------------*/ + +#elif FREEBSD + +/* config.h. Generated by configure. */ +/* config.h.in. Generated from configure.in by autoheader. */ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* define if the compiler allows redefinition of stream input and output */ +/* #undef DEF_IOS_OK */ + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BITS_SIGSET_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BSTRING_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DPS_DPSXCLIENT_H 1 + +/* Define if we have a function called "finite" in -lm. */ +#define HAVE_FINITE + +/* Define to 1 if you have the header file. */ +#define HAVE_FLOATINGPOINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FLOAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FSTREAM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FSTREAM_H 1 + +/* Define to 1 if you have the `gethostname' function. */ +#define HAVE_GETHOSTNAME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IEEEFP_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IOMANIP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IOMANIP_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IOS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IOSTREAM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IOSTREAM_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IOS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ISTREAM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ISTREAM_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LIBC_H */ + +/* Define to 1 if you have the `e' library (-le). */ +/* #undef HAVE_LIBE */ + +/* Define to 1 if you have the `inks' library (-links). */ +/* #undef HAVE_LIBINKS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if we have a function called "mallinfo" in -lmalloc. */ +/* #undef HAVE_MALLINFO */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MALLOC_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NET_IF_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OSFCN_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_OSTREAM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OSTREAM_H 1 + +/* Define to 1 if you have the `putenv' function. */ +/* #undef HAVE_PUTENV */ + +/* Define to 1 if you have the header file. */ +#define HAVE_PWD_H 1 + +/* Define to 1 if you have the `regcomp' function. */ +#define HAVE_REGCOMP 1 + +/* Define to 1 if you have the `re_comp' function. */ +/* #undef HAVE_RE_COMP */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SIGFPE_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SIGINFO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SIGNAL_H 1 + +/* Define to 1 if you have the `statfs' function. */ +#define HAVE_STATFS 1 + +/* Define to 1 if you have the `statvfs' function. */ +#define HAVE_STATVFS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strcspn' function. */ +#define HAVE_STRCSPN 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STREAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STRSTREAM_H */ + +/* Define to 1 if you have the `strtol' function. */ +/* #undef HAVE_STRTOL */ + +/* Define if we have a function called "ieee_handler" in -lsunmath. */ +/* #undef HAVE_SUNMATH */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYSENT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_DIR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IPC_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_MACHSIG_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SEM_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SIGINFO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SIGNAL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STATVFS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SYSTEMINFO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIMES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UTSNAME_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_VFS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_VNODE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VALUES_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_X11_EXTENSIONS_MULTIBUF_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_X11_EXTENSIONS_READDISPLAY_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_X11_EXTENSIONS_TRANSOVL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_XMU_EDITRES_H 1 + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +/* #undef NO_MINUS_C_MINUS_O */ + +/* define if the class ostream has member function form */ +/* #undef OSTREAM_FORM_OK */ + +/* Name of package */ +#define PACKAGE "OpenCAS" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "" + +/* Define if compiler has function prototypes */ +#define PROTOTYPES 1 + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void + +/* define if the function semctl takes a value */ +/* #undef SEMCTL_NO_REFERENCE */ + +/* define if the function semop takes a value */ +/* #undef SEMOP_NO_REFERENCE */ + +/* define if semun has member __buf */ +/* #undef SEMUN_BUF_DEFINED */ + +/* define if the union semun is in sys/sem.h */ +#define SEMUN_DEFINED + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if your declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Version number of package */ +#define VERSION "5.0DVP1" + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +/* #undef WORDS_BIGENDIAN */ + +/* Define to 1 if on AIX 3. + System headers sometimes define this. + We just want to avoid a redefinition error message. */ +#ifndef _ALL_SOURCE +/* # undef _ALL_SOURCE */ +#endif + +/* Define to `unsigned' if does not define. */ +/* #undef size_t */ + +/* End FreeBSD Part */ + /*---------------------------------------------------------*/ /* This part is extracted from config.h generated on SOLARIS */ /*---------------------------------------------------------*/ diff -urN opencascade-6.2.orig/ros/src/DrawResources/InitEnvironment.tcl opencascade-6.2/ros/src/DrawResources/InitEnvironment.tcl --- opencascade-6.2.orig/ros/src/DrawResources/InitEnvironment.tcl Wed Mar 21 22:14:20 2007 +++ opencascade-6.2/ros/src/DrawResources/InitEnvironment.tcl Sun Apr 1 11:13:18 2007 @@ -7,6 +7,8 @@ set LINE_FROM_UNAME [ exec uname -a ] ; if { [ regexp SunOS $LINE_FROM_UNAME ] } { return "sun" + } elseif { [ regexp FreeBSD $LINE_FROM_UNAME ] } { + return "bsd" } elseif { [ regexp IRIX $LINE_FROM_UNAME ] } { return "sil" } elseif { [ regexp OSF $LINE_FROM_UNAME ] } { diff -urN opencascade-6.2.orig/ros/src/DrawResources/WOKcomplement.tcl opencascade-6.2/ros/src/DrawResources/WOKcomplement.tcl --- opencascade-6.2.orig/ros/src/DrawResources/WOKcomplement.tcl Wed Mar 21 22:14:20 2007 +++ opencascade-6.2/ros/src/DrawResources/WOKcomplement.tcl Sun Apr 1 11:13:18 2007 @@ -6,7 +6,10 @@ set LINE_FROM_UNAME [ exec uname -a ] ; if { [ regexp SunOS $LINE_FROM_UNAME ] } { return "sun" - } + } + elseif { [ regexp FreeBSD $LINE_FROM_UNAME ] } { + return "bsd" + } elseif { [ regexp IRIX $LINE_FROM_UNAME ] } { return "sil" } diff -urN opencascade-6.2.orig/ros/src/IncludeLibrary/IncludeLibrary_NTD_interface.h opencascade-6.2/ros/src/IncludeLibrary/IncludeLibrary_NTD_interface.h --- opencascade-6.2.orig/ros/src/IncludeLibrary/IncludeLibrary_NTD_interface.h Wed Mar 21 22:13:14 2007 +++ opencascade-6.2/ros/src/IncludeLibrary/IncludeLibrary_NTD_interface.h Sun Apr 1 11:13:18 2007 @@ -352,7 +352,7 @@ int k_synch , PREAD_AST_MBX func, PSTATUS sts); -#if !defined(__hpux) && !defined(HPUX) && !defined(__osf__) && !defined(DECOSF1) && !defined(WNT) && !defined(LIN) && !defined(linux) && !defined(AIX) && !defined(_AIX) +#if !defined(__hpux) && !defined(HPUX) && !defined(__osf__) && !defined(DECOSF1) && !defined(WNT) && !defined(LIN) && !defined(linux) && !defined(AIX) && !defined(_AIX) && !defined(__FreeBSD__) extern #ifdef CSF1 "C" { diff -urN opencascade-6.2.orig/ros/src/IncludeLibrary/IncludeLibrary_osd_dlopen.h opencascade-6.2/ros/src/IncludeLibrary/IncludeLibrary_osd_dlopen.h --- opencascade-6.2.orig/ros/src/IncludeLibrary/IncludeLibrary_osd_dlopen.h Wed Mar 21 22:13:14 2007 +++ opencascade-6.2/ros/src/IncludeLibrary/IncludeLibrary_osd_dlopen.h Sun Apr 1 11:13:18 2007 @@ -83,7 +83,7 @@ // return cxxshl_load( Path , BIND_IMMEDIATE ,0L); // ===> findsym( &NULL ... for HP -#elif defined(sun) || defined(SOLARIS) || defined(IRIX) || defined(sgi) || defined(linux) || defined(LIN) +#elif defined(sun) || defined(SOLARIS) || defined(IRIX) || defined(sgi) || defined(linux) || defined(LIN) || defined(__FreeBSD__) if ( Path != NULL ) { if ( LazyMode ) handle = dlopen( Path , RTLD_LAZY | RTLD_GLOBAL ); diff -urN opencascade-6.2.orig/ros/src/IncludeLibrary/IncludeLibrary_stsgrpdef.h opencascade-6.2/ros/src/IncludeLibrary/IncludeLibrary_stsgrpdef.h --- opencascade-6.2.orig/ros/src/IncludeLibrary/IncludeLibrary_stsgrpdef.h Wed Mar 21 22:13:14 2007 +++ opencascade-6.2/ros/src/IncludeLibrary/IncludeLibrary_stsgrpdef.h Sun Apr 1 11:13:18 2007 @@ -103,6 +103,10 @@ #define GRP_OSD GRP_OSD_WNT #define GRP_NTD GRP_NTD_WNT +# elif __FreeBSD__ +#define GRP_OSD GRP_OSD_UNX +#define GRP_NTD GRP_NTD_UNX + # elif UNX #define GRP_OSD GRP_OSD_UNX #define GRP_NTD GRP_NTD_UNX diff -urN opencascade-6.2.orig/ros/src/OS/ApplicationFramework.tcl opencascade-6.2/ros/src/OS/ApplicationFramework.tcl --- opencascade-6.2.orig/ros/src/OS/ApplicationFramework.tcl Wed Mar 21 22:14:18 2007 +++ opencascade-6.2/ros/src/OS/ApplicationFramework.tcl Sun Apr 1 11:13:19 2007 @@ -68,6 +68,12 @@ lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" } + FreeBSD { + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include" + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/freebsd" + lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" + lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" + } SunOS { lappend l "/usr/openwin/include" lappend l "/usr/dt/include" @@ -98,6 +104,11 @@ } Linux { lappend l /usr/X11R6/lib + } + FreeBSD { + lappend l /usr/X11R6/lib + lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltcl" + lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltk" } SunOS { lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltcl" diff -urN opencascade-6.2.orig/ros/src/OS/DataExchange.tcl opencascade-6.2/ros/src/OS/DataExchange.tcl --- opencascade-6.2.orig/ros/src/OS/DataExchange.tcl Wed Mar 21 22:14:18 2007 +++ opencascade-6.2/ros/src/OS/DataExchange.tcl Sun Apr 1 11:13:18 2007 @@ -59,6 +59,12 @@ lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" } + FreeBSD { + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include" + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/freebsd" + lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" + lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" + } SunOS { lappend l "/usr/openwin/include" lappend l "/usr/dt/include" @@ -86,6 +92,8 @@ HP-UX { } Linux { + } + FreeBSD { } SunOS { lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltcl" diff -urN opencascade-6.2.orig/ros/src/OS/Draw.tcl opencascade-6.2/ros/src/OS/Draw.tcl --- opencascade-6.2.orig/ros/src/OS/Draw.tcl Wed Mar 21 22:14:18 2007 +++ opencascade-6.2/ros/src/OS/Draw.tcl Sun Apr 1 11:13:19 2007 @@ -50,6 +50,13 @@ lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" } + FreeBSD { + lappend l "-I/usr/local/include" + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include" + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/freebsd" + lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" + lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" + } SunOS { lappend l "/usr/openwin/include" lappend l "/usr/dt/include" @@ -79,6 +86,12 @@ HP-UX { } Linux { + lappend l -L/usr/X11R6/lib + lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib" + lappend l "-L[wokparam -v %STLPortHome]/lib" + } + FreeBSD { + lappend l -L/usr/local/lib lappend l -L/usr/X11R6/lib lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib" lappend l "-L[wokparam -v %STLPortHome]/lib" diff -urN opencascade-6.2.orig/ros/src/OS/FoundationClasses.tcl opencascade-6.2/ros/src/OS/FoundationClasses.tcl --- opencascade-6.2.orig/ros/src/OS/FoundationClasses.tcl Wed Mar 21 22:14:18 2007 +++ opencascade-6.2/ros/src/OS/FoundationClasses.tcl Sun Apr 1 11:13:18 2007 @@ -44,7 +44,13 @@ } Linux { lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include" - lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/inclide/linux" + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/linux" + lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" + lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" + } + FreeBSD { + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include" + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/FreeBSD" lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" } @@ -53,7 +59,7 @@ lappend l "/usr/dt/include" lappend l "[lindex [wokparam -v %CSF_CXX_INCLUDE] 0]" lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include" - lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/inclide/solaris" + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/solaris" lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" } IRIX { @@ -75,6 +81,8 @@ HP-UX { } Linux { + } + FreeBSD { } SunOS { } diff -urN opencascade-6.2.orig/ros/src/OS/ModelingAlgorithms.tcl opencascade-6.2/ros/src/OS/ModelingAlgorithms.tcl --- opencascade-6.2.orig/ros/src/OS/ModelingAlgorithms.tcl Wed Mar 21 22:14:18 2007 +++ opencascade-6.2/ros/src/OS/ModelingAlgorithms.tcl Sun Apr 1 11:13:18 2007 @@ -45,10 +45,16 @@ HP-UX { } Linux { - lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include" - lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/solaris" - lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" - lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include" + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/linux" + lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" + lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" + } + FreeBSD { + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include" + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/freebsd" + lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" + lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" } SunOS { lappend l "/usr/openwin/include" @@ -77,6 +83,8 @@ HP-UX { } Linux { + } + FreeBSD { } SunOS { lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltcl" diff -urN opencascade-6.2.orig/ros/src/OS/ModelingData.tcl opencascade-6.2/ros/src/OS/ModelingData.tcl --- opencascade-6.2.orig/ros/src/OS/ModelingData.tcl Wed Mar 21 22:14:18 2007 +++ opencascade-6.2/ros/src/OS/ModelingData.tcl Sun Apr 1 11:13:18 2007 @@ -43,6 +43,12 @@ lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" } + FreeBSD { + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include" + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/freebsd" + lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" + lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" + } SunOS { lappend l "/usr/openwin/include" lappend l "/usr/dt/include" @@ -70,6 +76,8 @@ HP-UX { } Linux { + } + FreeBSD { } SunOS { lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltcl" diff -urN opencascade-6.2.orig/ros/src/OS/OS.tcl opencascade-6.2/ros/src/OS/OS.tcl --- opencascade-6.2.orig/ros/src/OS/OS.tcl Wed Mar 21 22:14:18 2007 +++ opencascade-6.2/ros/src/OS/OS.tcl Sun Apr 1 11:13:18 2007 @@ -1163,7 +1163,11 @@ SunOS { set litm [list sun wsn] } - + + FreeBSD { + set litm [list bsd wfb] + } + Linux { set litm [list lin wln] } @@ -2308,6 +2312,7 @@ set do_nothing_here [list IRIX AIX HP-UX] ;# ne pas toucher aux .lnk de pop ici ;#puts "plat $plat" if { "$plat" == "SunOS"} { set OsName "solaris" } + if { "$plat" == "FreeBSD"} { set OsName "freebsd" } if { "$plat" == "Linux"} { set OsName "linux" } if { "$plat" == "WindowsNT"} {set OsName "win32"} ;#puts [OS:procs $module $plat] @@ -2480,7 +2485,15 @@ } if [regexp -- {/cc} $compiler all find] { set compstring "\${CCOMP} " - } + } + } + if {$plat == "FreeBSD"} { + if [regexp -- {/CC} $compiler all find] { + set compstring "\${CXXCOMP} " + } + if [regexp -- {/cc} $compiler all find] { + set compstring "\${CCOMP} " + } } if {$plat == "Linux"} { if [regexp -- {/gcc} $compiler all find] { @@ -2568,6 +2581,11 @@ set compstring "\${CXXCOMP} " } } + if {$plat == "FreeBSD"} { + if [regexp -- {/CC} $compiler all find] { + set compstring "\${CXXCOMP} " + } + } if {$plat == "Linux"} { if [regexp -- {/g} $compiler all find] { set compstring "\${CXXCOMP} " @@ -2643,6 +2661,11 @@ set compstring "\${CXXCOMP} " } } + if {$plat == "FreeBSD"} { + if [regexp -- {/CC} $compiler all find] { + set compstring "\${CXXCOMP} " + } + } if {$plat == "Linux"} { if [regexp -- {/g} $compiler all find] { set compstring "\${CXXCOMP} " @@ -3166,6 +3189,8 @@ ;# set A(runtime,Linux) lin set A(wokadm,Linux) wln ;# au lieu de LIN + set A(runtime,FreeBSD) bsd + set A(wokadm,FreeBSD) wfb ;# au lieu de FREEBSD set A(runtime,SunOS) sun set A(wokadm,SunOS) wsn ;# au lieu de SUN set A(runtime,IRIX) sil @@ -3539,10 +3564,12 @@ ;# ;# ce qui suit veut dire que: ;# on substitue /adv_11/KAS/C30/ref par TOSUBSTITUTE ET /adv_11/KAS/C30/UpdateC31 par TOSUBSTITUTE etc.. -;# sur la plateforme correspondante. +;# sur la plate-forme correspondante. ;# set TOTRIM(wokadm,WindowsNT) nothing,nothing set TOTRIM(wokadm,SunOS) \ + /dn01/KAS/dev/roc,TOSUBSTITUTE,/adv_11/KAS/C30/UpdateC31,TOSUBSTITUTE,/adv_10/KAS/C30/UpdateC31,TOSUBSTITUTE + set TOTRIM(wokadm,FreeBSD) \ /dn01/KAS/dev/roc,TOSUBSTITUTE,/adv_11/KAS/C30/UpdateC31,TOSUBSTITUTE,/adv_10/KAS/C30/UpdateC31,TOSUBSTITUTE set TOTRIM(wokadm,IRIX) \ /dn01/KAS/dev/ros,TOSUBSTITUTE,/adv_11/KAS/C30/UpdateC31,TOSUBSTITUTE,/adv_10/KAS/C30/UpdateC31,TOSUBSTITUTE diff -urN opencascade-6.2.orig/ros/src/OS/Visualization.tcl opencascade-6.2/ros/src/OS/Visualization.tcl --- opencascade-6.2.orig/ros/src/OS/Visualization.tcl Wed Mar 21 22:14:18 2007 +++ opencascade-6.2/ros/src/OS/Visualization.tcl Sun Apr 1 11:13:19 2007 @@ -47,6 +47,12 @@ lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" } + FreeBSD { + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include" + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/freebsd" + lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" + lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" + } SunOS { lappend l "\$OPENWINHOME/include" lappend l "/usr/openwin/include/X11" @@ -76,6 +82,11 @@ } Linux { lappend l /usr/X11R6/lib + } + FreeBSD { + lappend l /usr/X11R6/lib + lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltcl" + lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltk" } SunOS { lappend l "-L[wokparam -v %CSF_TCL_HOME]/lib -R[wokparam -v %CSF_TCL_HOME]/lib -ltcl" diff -urN opencascade-6.2.orig/ros/src/OS/WOK.tcl opencascade-6.2/ros/src/OS/WOK.tcl --- opencascade-6.2.orig/ros/src/OS/WOK.tcl Wed Mar 21 22:14:18 2007 +++ opencascade-6.2/ros/src/OS/WOK.tcl Sun Apr 1 11:13:19 2007 @@ -69,6 +69,13 @@ lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" } + FreeBSD { + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include" + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/freebsd" + lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" + lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" + } + SunOS { lappend l "/usr/openwin/include" lappend l "/usr/dt/include" @@ -95,6 +102,10 @@ HP-UX { } Linux { + lappend l /usr/X11R6/lib + } + + FreeBSD { lappend l /usr/X11R6/lib } diff -urN opencascade-6.2.orig/ros/src/OS/Wrappers.tcl opencascade-6.2/ros/src/OS/Wrappers.tcl --- opencascade-6.2.orig/ros/src/OS/Wrappers.tcl Wed Mar 21 22:14:18 2007 +++ opencascade-6.2/ros/src/OS/Wrappers.tcl Sun Apr 1 11:13:18 2007 @@ -48,6 +48,12 @@ lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" } + FreeBSD { + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include" + lappend l "-I[lindex [wokparam -v %CSF_JavaHome] 0]/include/freebsd" + lappend l "[lindex [wokparam -v %CSF_TCL_HOME] 0]/include" + lappend l "[lindex [lindex [wokparam -v %STLPortInclude] 0] 0]" + } SunOS { lappend l "/usr/openwin/include" lappend l "/usr/dt/include" @@ -75,6 +81,8 @@ HP-UX { } Linux { + } + FreeBSD { } SunOS { } diff -urN opencascade-6.2.orig/ros/src/OSD/OSD_Chronometer.cxx opencascade-6.2/ros/src/OSD/OSD_Chronometer.cxx --- opencascade-6.2.orig/ros/src/OSD/OSD_Chronometer.cxx Wed Mar 21 22:12:48 2007 +++ opencascade-6.2/ros/src/OSD/OSD_Chronometer.cxx Sun Apr 1 11:13:18 2007 @@ -104,7 +104,7 @@ // (man times,limits.h, man sysconf) // cout << "Nombre de clicks par seconde : " << CLK_TCK << endl; //modified by NIZNHY-PKV Fri Mar 25 17:15:12 2005f -#if defined(LIN) || defined(linux) +#if defined(LIN) || defined(linux) || defined(__FreeBSD__) static long aCLK_TCK=sysconf(_SC_CLK_TCK); // Cumul_user += (Standard_Real) diffr_user / aCLK_TCK ; diff -urN opencascade-6.2.orig/ros/src/OpenGl/OpenGl_togl_begin_layer_mode.c opencascade-6.2/ros/src/OpenGl/OpenGl_togl_begin_layer_mode.c --- opencascade-6.2.orig/ros/src/OpenGl/OpenGl_togl_begin_layer_mode.c Wed Mar 21 22:13:06 2007 +++ opencascade-6.2/ros/src/OpenGl/OpenGl_togl_begin_layer_mode.c Sun Apr 1 11:13:18 2007 @@ -19,7 +19,7 @@ * Includes */ -#include +#include #include diff -urN opencascade-6.2.orig/ros/src/OpenGl/OpenGl_togl_markercontextgroup.c opencascade-6.2/ros/src/OpenGl/OpenGl_togl_markercontextgroup.c --- opencascade-6.2.orig/ros/src/OpenGl/OpenGl_togl_markercontextgroup.c Wed Mar 21 22:13:05 2007 +++ opencascade-6.2/ros/src/OpenGl/OpenGl_togl_markercontextgroup.c Sun Apr 1 11:13:18 2007 @@ -39,7 +39,11 @@ #include #include -#include +#ifdef __FreeBSD__ +# include +#else +# include +#endif typedef struct { diff -urN opencascade-6.2.orig/ros/src/Standard/Standard_ErrorHandler.cxx opencascade-6.2/ros/src/Standard/Standard_ErrorHandler.cxx --- opencascade-6.2.orig/ros/src/Standard/Standard_ErrorHandler.cxx Wed Mar 21 22:13:14 2007 +++ opencascade-6.2/ros/src/Standard/Standard_ErrorHandler.cxx Sun Apr 1 11:13:18 2007 @@ -33,7 +33,7 @@ static inline Standard_Integer GetThreadID() { #ifndef WNT - return pthread_self(); + return (Standard_Integer) pthread_self(); #else return GetCurrentThreadId(); #endif diff -urN opencascade-6.2.orig/ros/src/Standard/Standard_ExtString.cxx opencascade-6.2/ros/src/Standard/Standard_ExtString.cxx --- opencascade-6.2.orig/ros/src/Standard/Standard_ExtString.cxx Wed Mar 21 22:13:14 2007 +++ opencascade-6.2/ros/src/Standard/Standard_ExtString.cxx Sun Apr 1 11:13:18 2007 @@ -40,7 +40,7 @@ if ((ptrdiff_t(Value) & 3 ) == 2) { aHashCode = Value[ 0 ] ; -#if defined(WNT) || defined(DECOSF1) || defined(LININTEL) +#if defined(WNT) || defined(DECOSF1) || defined(LININTEL) || defined(__FreeBSD__) aHashCode = aHashCode << 16 ; #endif aValue = &Value[1] ; diff -urN opencascade-6.2.orig/ros/src/Standard/Standard_MMgrOpt.cxx opencascade-6.2/ros/src/Standard/Standard_MMgrOpt.cxx --- opencascade-6.2.orig/ros/src/Standard/Standard_MMgrOpt.cxx Wed Mar 21 22:13:14 2007 +++ opencascade-6.2/ros/src/Standard/Standard_MMgrOpt.cxx Sun Apr 1 11:13:18 2007 @@ -258,7 +258,7 @@ perror("ERR_MEMRY_FAIL"); #endif -#if defined(IRIX) || defined(__sgi) || defined(SOLARIS) || defined(__sun) || defined(LIN) || defined(linux) +#if defined(IRIX) || defined(__sgi) || defined(SOLARIS) || defined(__sun) || defined(LIN) || defined(linux) || defined(__FreeBSD__) if ((myMMap = open ("/dev/zero", O_RDWR)) < 0) { if ((myMMap = open ("/dev/null", O_RDWR)) < 0){ myMMap = 0; diff -urN opencascade-6.2.orig/ros/src/WOKBuilderDef/CMPLRS.edl opencascade-6.2/ros/src/WOKBuilderDef/CMPLRS.edl --- opencascade-6.2.orig/ros/src/WOKBuilderDef/CMPLRS.edl Wed Mar 21 22:14:18 2007 +++ opencascade-6.2/ros/src/WOKBuilderDef/CMPLRS.edl Sun Apr 1 11:13:19 2007 @@ -491,6 +491,160 @@ +-- ###### ##### ###### -- +-- # # # # # # -- +-- # # # # # -- +-- ###### ##### # # -- +-- # # # # # -- +-- # # # # # # -- +-- ###### ##### ###### -- + + + @if ( %Station == "bsd" ) then + + @template CMPLRS_C_DTmpFile (%TmpFile) is + $>& %TmpFile \ + @end; + + @template CMPLRS_CXX_DTmpFile (%TmpFile) is + $>& %TmpFile \ + @end; + + @template CMPLRS_F77_DTmpFile (%TmpFile) is + $ \ + @end; + + @if ( %DebugMode == "True" ) then + @set %CMPLRS_CXX_ModeOpt = "-g -O0 -DDEB -D_DEBUG"; + @set %CMPLRS_C_ModeOpt = "-g -O0 -DDEB -D_DEBUG"; + @set %CMPLRS_F77_ModeOpt = "-g -DDEB -D_DEBUG"; + @else + @set %CMPLRS_CXX_ModeOpt = "-O2 -fno-strict-aliasing -pipe -march=pentiumpro -DNDEBUG -DNo_Exception"; + @set %CMPLRS_C_ModeOpt = "-O2 -fno-strict-aliasing -pipe -march=pentiumpro -DNDEBUG -DNo_Exception"; + @set %CMPLRS_F77_ModeOpt = "-O -DNDEBUG -DNo_Exception"; + @endif; + + @set %CMPLRS_CXX_WOKDirectives = "-MD "; + @set %CMPLRS_C_WOKDirectives = "-MD "; + @set %CMPLRS_F77_WOKDirectives = ""; + + + @template CMPLRS_F77_OptLine ( + %CMPLRS_F77_COMPILER , + %CMPLRS_F77_SysOptions , + %CMPLRS_F77_ModeOpt + ) is + $Following parameters make up F77 compilation command in this order: + $CMPLRS_F77_COMPILER = %CMPLRS_F77_COMPILER + $CMPLRS_F77_SysOptions = %CMPLRS_F77_SysOptions + $CMPLRS_F77_ModeOpt = %CMPLRS_F77_ModeOpt + @end; + + @template CMPLRS_F77_CmdLine ( %CMPLRS_F77_COMPILER , %CMPLRS_F77_SysOptions , %CMPLRS_F77_ModeOpt , + %CMPLRS_F77_WOKDirectives , %Source , %OutputDir , %BaseName , %Entity ) is + $%CMPLRS_F77_COMPILER %CMPLRS_F77_SysOptions %CMPLRS_F77_ModeOpt %CMPLRS_F77_WOKDirectives -c %Source -o %OutputDir/%BaseName.o + $echo '$F77_COMPILER %CMPLRS_F77_SysOptions %CMPLRS_F77_ModeOpt $INCDIRS -c $SOURCE -o $OBJECT' > %OutputDir/../%Entity/.adm/f77.compile + $ touch %OutputDir/%BaseName.m + @end; + + + @template CMPLRS_C_OptLine (%CMPLRS_C_COMPILER , + %CMPLRS_C_SysOptions , + %CMPLRS_C_Options , + %CMPLRS_C_ModeOpt , + %CMPLRS_C_INCLUDE , + %IncDirectives , + %CMPLRS_Unit_C_Options , + %CMPLRS_C_WOKDirectives , + %Entity ) is + $Following parameters make up C compilation command in this order: + $CMPLRS_C_COMPILER = %CMPLRS_C_COMPILER + $CMPLRS_C_SysOptions = %CMPLRS_C_SysOptions + $CMPLRS_C_Options = %CMPLRS_C_Options + $CMPLRS_Unit_C_Options = %CMPLRS_Unit_C_Options + $CMPLRS_C_INCLUDE = %CMPLRS_C_INCLUDE + $CMPLRS_C_WOKDirectives= %CMPLRS_C_WOKDirectives + $Dynamic include directives are : + $%IncDirectives + @end; + @template CMPLRS_C_CmdLine ( %CMPLRS_C_COMPILER , + %CMPLRS_C_SysOptions , + %CMPLRS_C_Options , + %CMPLRS_C_ModeOpt , + %CMPLRS_CXX_DBMSOpt , +-- %C_Export , + %CMPLRS_C_INCLUDE , + %IncDirectives , + %CMPLRS_Unit_C_Options , + %CMPLRS_C_WOKDirectives , + %Source , + %BaseName, + %OutputDir , + %TmpFile , %Entity ) is + $cd %OutputDir && %CMPLRS_C_COMPILER %CMPLRS_C_SysOptions %CMPLRS_C_Options %CMPLRS_C_ModeOpt %CMPLRS_C_INCLUDE %CMPLRS_CXX_DBMSOpt %IncDirectives %CMPLRS_Unit_C_Options %CMPLRS_C_WOKDirectives -c %Source -o %OutputDir/%BaseName.o + $set stat = $status + $echo '$C_COMPILER %CMPLRS_C_SysOptions %CMPLRS_C_Options $INCDIRS %CMPLRS_C_ModeOpt %CMPLRS_C_INCLUDE %CMPLRS_CXX_DBMSOpt %CMPLRS_Unit_C_Options %CMPLRS_C_WOKDirectives -c $SOURCE -o $OBJECT' > %OutputDir/../%Entity/.adm/c.compile + $if ( $stat == 0 ) then + $ if ( -e %OutputDir/%BaseName.d ) then + $ sed -e '/:/d' -e 's/\\/ /g' %OutputDir/%BaseName.d | tr ' ' '\012' | sort -u > %OutputDir/%BaseName.m + $ endif + $endif + $set status = $stat + @end; + + @template CMPLRS_CXX_OptLine (%CMPLRS_CXX_COMPILER, + %CMPLRS_CXX_SysOptions , + %CMPLRS_CXX_Options , + %CMPLRS_CXX_ModeOpt , %CMPLRS_CXX_DBMSOpt , + %CMPLRS_CXX_INCLUDE , + %CMPLRS_CXX_WOKDirectives , + %IncDirectives , + %DBDirectives , + %Entity ) is + $Following parameters make up C++ compilation command in this order: + $CMPLRS_CXX_COMPILER = %CMPLRS_CXX_COMPILER + $CMPLRS_CXX_SysOptions = %CMPLRS_CXX_SysOptions + $CMPLRS_CXX_Options = %CMPLRS_CXX_Options + $CMPLRS_CXX_ModeOpt = %CMPLRS_CXX_ModeOpt + $CMPLRS_CXX_DBMSOpt = %CMPLRS_CXX_DBMSOpt + $CMPLRS_CXX_INCLUDE = %CMPLRS_CXX_INCLUDE + $CMPLRS_CXX_WOKDirectives = %CMPLRS_CXX_WOKDirectives + $Dynamic include directives are : + $%IncDirectives + @end; + + @template CMPLRS_CXX_CmdLine ( %CMPLRS_CXX_COMPILER, + %CMPLRS_CXX_SysOptions , + %CMPLRS_CXX_Options , + %CMPLRS_CXX_ModeOpt , + %CMPLRS_CXX_DBMSOpt , + %CMPLRS_CXX_INCLUDE , + %CMPLRS_CXX_WOKDirectives , + %IncDirectives , + %DBDirectives , + %Source, + %BaseName, + %OutputDir , + %TmpFile , %Entity ) is + $cd %OutputDir && %CMPLRS_CXX_COMPILER %CMPLRS_CXX_SysOptions %CMPLRS_CXX_Options %CMPLRS_CXX_INCLUDE %CMPLRS_CXX_DBMSOpt %CMPLRS_CXX_ModeOpt %IncDirectives %DBDirectives %CMPLRS_CXX_WOKDirectives -c %Source -o %OutputDir/%BaseName.o >& %TmpFile + $set stat = $status + + $if ( $stat == 0 ) then + $ if ( -e %OutputDir/%BaseName.d ) then + $ sed -e '/:/d' -e 's/\\/ /g' %OutputDir/%BaseName.d | tr ' ' '\012' | sort -u > %OutputDir/%BaseName.m + $ endif + $endif + $if( -e %TmpFile ) grep ':' %TmpFile + $/bin/rm -f %TmpFile + $set status = $stat + + @end; + + + @endif; + + + -- ##### # # # # -- -- # # # # ## # -- -- # # # # # # -- diff -urN opencascade-6.2.orig/ros/src/WOKBuilderDef/CSF.edl opencascade-6.2/ros/src/WOKBuilderDef/CSF.edl --- opencascade-6.2.orig/ros/src/WOKBuilderDef/CSF.edl Wed Mar 21 22:14:18 2007 +++ opencascade-6.2/ros/src/WOKBuilderDef/CSF.edl Sun Apr 1 11:13:19 2007 @@ -125,7 +125,7 @@ @endif; --<< TODO : If applicable , modify the location of the C++ compiler. - @set %CSF_CXX_COMPILER = "/usr/bin/g++ "; + @set %CSF_CXX_COMPILER = "c++ "; -->> END TODO @set %STLPortHome = ""; @if ( %STLPortHome != "") then @@ -142,7 +142,7 @@ @set %CSF_CXX_ModeOptDeb = " -g -O0 -DDEB -D_DEBUG "; --<< TODO : If applicable , modify the location of the c compiler. - @set %CSF_C_COMPILER = "/usr/bin/gcc "; + @set %CSF_C_COMPILER = "cc "; @string %CSF_C_INCLUDE += ""; -->> END TODO @@ -153,7 +153,7 @@ @set %CSF_C_ModeOptDeb = " -g -O0 -DDEB -D_DEBUG "; --<< TODO : If applicable , modify the location of the Fortran compiler. - @set %CSF_F77_COMPILER = "/usr/bin/f77 "; + @set %CSF_F77_COMPILER = "gfortran42 "; -->> END TODO @set %CSF_F77_SysOptions = "-fPIC "; @@ -161,7 +161,7 @@ @set %CSF_F77_ModeOpt = " -O3 -DNDEBUG -DNo_Exception "; @set %CSF_F77_ModeOptDeb = " -g -DDEB -D_DEBUG "; - @string %CSF_LINKER = "/usr/bin/ld " %STLPortLib; + @string %CSF_LINKER = "ld " %STLPortLib; @set %CSF_CXX_COMPILERLINKER = %CSF_CXX_COMPILER ; @set %CSF_LINKER_DBMSOpt = ""; @set %CSF_LINKER_SysShared = "-shared "; @@ -204,6 +204,83 @@ @endif; -- + -- For FreeBSD platforms + -- + @if ( %Station == "bsd" ) then + @if ( %DBMS == "OBJS" ) then + @set %CSF_OODBLibs = ""; + @endif; + + --<< TODO : If applicable , modify the location of the C++ compiler. + @set %CSF_CXX_COMPILER = "c++ "; + -->> END TODO + @set %STLPortHome = ""; + @if ( %STLPortHome != "") then + @string %STLPortInclude = "-I" %STLPortHome "/stlport "; + @string %STLPortLib = "-L" %STLPortHome "/lib -lstlport_gcc"; + @else + @set %STLPortInclude = "/usr/local/include/stlport"; + @string %STLPortLib = "-L/usr/local/lib -lstlport_gcc"; + @endif; + @set %CSF_CXX_SysOptions = "-O2 -fno-strict-aliasing -pipe -march=pentiumpro -fPIC -funsigned-char -Wall -fmessage-length=0"; + @string %CSF_CXX_Options = "-DLIN -DLININTEL -DNO_CXX_EXCEPTION " %STLPortInclude; + + --<< TODO : If applicable , modify the location of the C compiler. + @set %CSF_C_COMPILER = "cc "; + @string %CSF_C_INCLUDE += ""; + -->> END TODO + + @set %CSF_C_SysOptions = "-O2 -fno-strict-aliasing -pipe -march=pentiumpro -fPIC -funsigned-char -Wall"; + @set %CSF_C_Options = "-DLIN -DLININTEL "; + + --<< TODO : If applicable , modify the location of the Fortran compiler. + @set %CSF_F77_COMPILER = "gfortran42 "; + -->> END TODO + + @set %CSF_F77_SysOptions = "-O -fPIC "; + + @set %CSF_LINKER = "ld "; + @set %CSF_CXX_COMPILERLINKER = %CSF_CXX_COMPILER ; + @set %CSF_LINKER_DBMSOpt = ""; + @set %CSF_LINKER_SysShared = "-shared "; + @set %CSF_LINKER_SysExe = ""; + @set %CSF_LINKER_SysOpt = ""; + @set %CSF_LINKER_SysLib = "-ldl -lc "; + @set %CSF_LINKER_CheckOpt = " -nostartfiles "; + @set %CSF_LINKER_CheckOut = " -o /dev/null "; + @set %CSF_SOCKETLibs = " -ldl" ; + + --<< TODO : If applicable , modify the root location where TCL is installed. + @set %CSF_TCL_HOME = "/usr/local"; + -->> END TODO + + @string %CSF_TCL_INCLUDE = "/usr/local/include/tcl8.4 "; + + --<< TODO : If applicable , modify the root location where Java is installed. + @set %CSF_JavaHome = "/usr/local/diablo-jdk1.5.0"; + -->> END TODO + + @string %CSF_JAVA_INCLUDE = "-I" %CSF_JavaHome "/include -I" %CSF_JavaHome "/include/freebsd "; + @set %CSF_JAVA_COMPILER = "javac"; + @set %CSF_JAVA_JNI = "javah"; + + @set %CSF_DOXIGEN = "/usr/local/bin/doxygen"; + @set %CSF_GRAPHVIZ_HOME = "/usr/local/lib/graphviz"; + + @set %CSF_X11_INCLUDE = "-I/usr/X11R6/include "; + @set %CSF_OPENGL_INCLUDE = "-I/usr/X11R6/include "; + + @set %X11_LIB = "/usr/X11R6/lib"; + + @string %CSF_XwLibs = "-L" %X11_LIB " -lX11 -lXext -lXmu -lXi "; + + @string %CSF_OpenGlLibs = "-L" %X11_LIB " -lGLU -lGL " ; + + @string %CSF_TclLibs = "-L" %CSF_TCL_HOME "/lib -ltcl "; + @string %CSF_TclTkLibs = "-L" %CSF_TCL_HOME "/lib -ltk -L" %X11_LIB " -lX11"; + @endif; + + -- -- For SunOS platforms -- @if ( %Station == "sun" ) then @@ -472,7 +549,7 @@ @set %CSF_F77_ModeOpt = " -O3 "; @set %CSF_F77_ModeOptDeb = " -g "; - @set %CSF_LINKER = "/usr/bin/ld"; + @set %CSF_LINKER = "ld"; @set %CSF_CXX_COMPILERLINKER = %CSF_CXX_COMPILER ; @set %CSF_LINKER_SysShared = " -shared "; @set %CSF_LINKER_SysExe = ""; @@ -576,7 +653,7 @@ @set %CSF_C_COMPILER = "xlC_r "; @string %CSF_C_INCLUDE += ""; @set %CSF_CXX_COMPILER = "xlC_r "; - @set %CSF_F77_COMPILER = "/usr/bin/f77 "; + @set %CSF_F77_COMPILER = "gfortran42 "; @set %STLPortHome = ""; @if ( %STLPortHome != "") then diff -urN opencascade-6.2.orig/ros/src/WOKBuilderDef/JAVA.edl opencascade-6.2/ros/src/WOKBuilderDef/JAVA.edl --- opencascade-6.2.orig/ros/src/WOKBuilderDef/JAVA.edl Wed Mar 21 22:14:18 2007 +++ opencascade-6.2/ros/src/WOKBuilderDef/JAVA.edl Sun Apr 1 11:13:19 2007 @@ -32,6 +32,10 @@ @string %CXX_JAVA += " -I" %CSF_JavaHome "/include/solaris "; @endif; +@if ( %Station == "bsd" ) then + @string %CXX_JAVA += " -I" %CSF_JavaHome "/include/freebsd "; +@endif; + @if ( %Station == "lin" ) then @string %CXX_JAVA += " -I" %CSF_JavaHome "/include/linux "; @endif; diff -urN opencascade-6.2.orig/ros/src/WOKBuilderDef/LD.edl opencascade-6.2/ros/src/WOKBuilderDef/LD.edl --- opencascade-6.2.orig/ros/src/WOKBuilderDef/LD.edl Wed Mar 21 22:14:18 2007 +++ opencascade-6.2/ros/src/WOKBuilderDef/LD.edl Sun Apr 1 11:13:19 2007 @@ -70,6 +70,13 @@ @endif; +-- Definition du Link FreeBSD + @if ( %Station == "bsd" ) then + @template LD_Footer ( %Station ) is + $ ; + @end; + @endif; + -- Definition du Link Sun/Solaris 2.4 @if ( %Station == "sun" ) then diff -urN opencascade-6.2.orig/ros/src/WOKBuilderDef/LDAR.edl opencascade-6.2/ros/src/WOKBuilderDef/LDAR.edl --- opencascade-6.2.orig/ros/src/WOKBuilderDef/LDAR.edl Wed Mar 21 22:14:18 2007 +++ opencascade-6.2/ros/src/WOKBuilderDef/LDAR.edl Sun Apr 1 11:13:19 2007 @@ -20,7 +20,7 @@ @if( %Station != "sun" ) then @set %RmCmd = "/usr/bin/rm"; - @if ( %Station == "hp" || %Station == "lin" ) then + @if ( %Station == "hp" || %Station == "lin" || %Station == "bsd" ) then @set %RmCmd = "/bin/rm"; @endif; diff -urN opencascade-6.2.orig/ros/src/WOKBuilderDef/LDEXE.edl opencascade-6.2/ros/src/WOKBuilderDef/LDEXE.edl --- opencascade-6.2.orig/ros/src/WOKBuilderDef/LDEXE.edl Wed Mar 21 22:14:18 2007 +++ opencascade-6.2/ros/src/WOKBuilderDef/LDEXE.edl Sun Apr 1 11:13:19 2007 @@ -84,7 +84,13 @@ @if( %Station == "lin" ) then @template LDEXE_Header ( %Target , %STLPortLib ) is - $/usr/bin/g++ -o %Target %STLPortLib \ + $c++ -o %Target %STLPortLib \ + @end; + @endif; + + @if( %Station == "bsd" ) then + @template LDEXE_Header ( %Target , %STLPortLib ) is + $c++ -o %Target %STLPortLib \ @end; @endif; diff -urN opencascade-6.2.orig/ros/src/WOKBuilderDef/LDSHR.edl opencascade-6.2/ros/src/WOKBuilderDef/LDSHR.edl --- opencascade-6.2.orig/ros/src/WOKBuilderDef/LDSHR.edl Wed Mar 21 22:14:18 2007 +++ opencascade-6.2/ros/src/WOKBuilderDef/LDSHR.edl Sun Apr 1 11:13:19 2007 @@ -56,7 +56,7 @@ @end; @template LDSHR_Header ( %Target, %LDSHR_DBMSOpt, %CSF_LINKER_SysShared ) is - $/usr/bin/g++ %CSF_LINKER_SysShared %LDSHR_DBMSOpt -o %Target \ + $c++ %CSF_LINKER_SysShared %LDSHR_DBMSOpt -o %Target \ @end; @template LDSHR_Footer () is @@ -65,7 +65,35 @@ @end; @template LDSHR_CheckUndefHeader ( %Target, %LDSHR_DBMSOpt,%CSF_LINKER_CheckOpt ) is - $/usr/bin/ld %CSF_LINKER_CheckOpt %LDSHR_DBMSOpt -o %Target \ + $ld %CSF_LINKER_CheckOpt %LDSHR_DBMSOpt -o %Target \ + @end; + + @template LDSHR_CheckUndefFooter () is + $ ; + $ set status=$ld_status; + @end; + @endif; + + + @if ( %Station == "bsd" ) then + @set %LDSHR_Footer = "LDSHR_Footer"; + @set %LDSHR_ArchiveFullPath = "LDSHR_ArchiveFullPath"; + + @template LDSHR_ArchiveFullPath ( %LibDir, %LibName ) is + $\^ + @end; + + @template LDSHR_Header ( %Target, %LDSHR_DBMSOpt, %CSF_LINKER_SysShared ) is + $c++ %CSF_LINKER_SysShared %LDSHR_DBMSOpt -o %Target \ + @end; + + @template LDSHR_Footer () is + $ ; + $ set ld_status=$status; + @end; + + @template LDSHR_CheckUndefHeader ( %Target, %LDSHR_DBMSOpt,%CSF_LINKER_CheckOpt ) is + $ld %CSF_LINKER_CheckOpt %LDSHR_DBMSOpt -o %Target \ @end; @template LDSHR_CheckUndefFooter () is diff -urN opencascade-6.2.orig/ros/src/WOKBuilderDef/LINKSHR.edl opencascade-6.2/ros/src/WOKBuilderDef/LINKSHR.edl --- opencascade-6.2.orig/ros/src/WOKBuilderDef/LINKSHR.edl Wed Mar 21 22:14:18 2007 +++ opencascade-6.2/ros/src/WOKBuilderDef/LINKSHR.edl Sun Apr 1 11:13:19 2007 @@ -257,6 +257,38 @@ $%CSF_LINKER %CSF_LINKER_CheckOpt %CSF_LINKER_CheckOut \ @end; + @if ( %Station == "bsd" ) then + @set %LINKSHR_Footer = "LINKSHR_Footer"; + @set %LINKSHR_ArchiveFullPath = "LINKSHR_ArchiveFullPath"; + + @template LINKSHR_ArchiveFullPath () is + $\^ + @end; + + @template LINKSHR_Header (%CSF_CXX_COMPILERLINKER, %Target, %LINKSHR_DBMSOpt, %CSF_LINKER_SysShared ) is + $%CSF_CXX_COMPILERLINKER %CSF_LINKER_SysShared %LINKSHR_DBMSOpt -o %Target \ + @end; + + @template LINKSHR_Footer (%CSF_LINKER_SysLib) is + $ %CSF_LINKER_SysLib; + $ set ld_status=$status + $ if ( $?LD_LIBRARY_PATH ) then + $ set ld_library_path=$LD_LIBRARY_PATH + $ endif + @end; + + @template LINKSHR_CheckUndefHeader ( + %Target, %LINKSHR_DBMSOpt, %LD_LIBRARY_PATH, %CSF_LINKER_CheckOpt, %CSF_LINKER_CheckOut, %CSF_LINKER + ) is + $if ( $?LD_LIBRARY_PATH ) then + $ setenv LD_LIBRARY_PATH %LD_LIBRARY_PATH:${LD_LIBRARY_PATH} + $else + $ setenv LD_LIBRARY_PATH %LD_LIBRARY_PATH + $endif + $echo "Check of undefined symbols with LD_LIBRARY_PATH : $LD_LIBRARY_PATH" + $%CSF_LINKER %CSF_LINKER_CheckOpt %CSF_LINKER_CheckOut \ + @end; + @template LINKSHR_CheckUndefFooter () is $ ; $ if ( $status ) then diff -urN opencascade-6.2.orig/ros/src/WOKLibs/pkgIndex.tcl opencascade-6.2/ros/src/WOKLibs/pkgIndex.tcl --- opencascade-6.2.orig/ros/src/WOKLibs/pkgIndex.tcl Wed Mar 21 22:13:34 2007 +++ opencascade-6.2/ros/src/WOKLibs/pkgIndex.tcl Sun Apr 1 11:13:19 2007 @@ -30,6 +30,36 @@ ########################################### +if { $tcl_platform(os) == "FreeBSD" } { +package ifneeded Woktools 2.0 "tclPkgSetup $dir/bsd Woktools 2.0 { + {libwoktoolscmd.so load { + msgprint msgisset msgissetcmd msgissetlong msgset msgsetcmd + msgsetlong msgunset msgunsetcmd msgunsetlong msgsetheader + msgunsetheader msgissetheader msginfo}}}" + +package ifneeded Wokutils 2.0 "tclPkgSetup $dir Wokutils 2.0 { + {libwokutilscmd.so load { wokcmp} } }" + +package ifneeded Wok 2.0 "package require Woktools; + tclPkgSetup $dir/bsd Wok 2.0 { + {libwokcmd.so load { + Sinfo Wcreate Winfo Wrm Wdeclare fcreate finfo frm pinfo screate + sinfo srm ucreate uinfo umpmake umake urm w_info wcreate + wokcd wokclose wokinfo wokparam wokprofile wokenv wrm wmove + stepinputaddstepinputinfo stepoutputadd stepoutputinfo stepaddexecdepitem }}}" + +package ifneeded Ms 2.0 "package require Woktools; + tclPkgSetup $dir/bsd Ms 2.0 { + {libmscmd.so load { + mscheck msclear msclinfo msextract msgeninfo msinfo msinstinfo + msmmthinfo msmthinfo mspkinfo msschinfo msrm msstdinfo + mstranslate msxmthinfo}}}" + + + } + +########################################### + if { $tcl_platform(os) == "SunOS" } { package ifneeded Woktools 2.0 "tclPkgSetup $dir/sun Woktools 2.0 { {libwoktoolscmd.so load { diff -urN opencascade-6.2.orig/ros/src/WOKTclLib/config.h opencascade-6.2/ros/src/WOKTclLib/config.h --- opencascade-6.2.orig/ros/src/WOKTclLib/config.h Wed Mar 21 22:14:19 2007 +++ opencascade-6.2/ros/src/WOKTclLib/config.h Sun Apr 1 11:13:19 2007 @@ -331,6 +331,366 @@ /* End Linux Part */ +/*-----------------------------------------------------------*/ +/* This part is extracted from config.h generated on FreeBSD */ +/*-----------------------------------------------------------*/ + +#elif FREEBSD + +/* config.h. Generated by configure. */ +/* config.h.in. Generated from configure.in by autoheader. */ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* define if the compiler allows redefinition of stream input and output */ +/* #undef DEF_IOS_OK */ + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BITS_SIGSET_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BSTRING_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DPS_DPSXCLIENT_H 1 + +/* Define if we have a function called "finite" in -lm. */ +#define HAVE_FINITE + +/* Define to 1 if you have the header file. */ +#define HAVE_FLOATINGPOINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FLOAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FSTREAM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FSTREAM_H 1 + +/* Define to 1 if you have the `gethostname' function. */ +#define HAVE_GETHOSTNAME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IEEEFP_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IOMANIP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IOMANIP_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IOS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IOSTREAM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IOSTREAM_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IOS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ISTREAM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ISTREAM_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LIBC_H */ + +/* Define to 1 if you have the `e' library (-le). */ +/* #undef HAVE_LIBE */ + +/* Define to 1 if you have the `inks' library (-links). */ +/* #undef HAVE_LIBINKS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if we have a function called "mallinfo" in -lmalloc. */ +/* #undef HAVE_MALLINFO */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MALLOC_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NET_IF_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OSFCN_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_OSTREAM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OSTREAM_H 1 + +/* Define to 1 if you have the `putenv' function. */ +/* #undef HAVE_PUTENV */ + +/* Define to 1 if you have the header file. */ +#define HAVE_PWD_H 1 + +/* Define to 1 if you have the `regcomp' function. */ +#define HAVE_REGCOMP 1 + +/* Define to 1 if you have the `re_comp' function. */ +/* #undef HAVE_RE_COMP */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SIGFPE_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SIGINFO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SIGNAL_H 1 + +/* Define to 1 if you have the `statfs' function. */ +#define HAVE_STATFS 1 + +/* Define to 1 if you have the `statvfs' function. */ +#define HAVE_STATVFS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strcspn' function. */ +#define HAVE_STRCSPN 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STREAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STRSTREAM_H */ + +/* Define to 1 if you have the `strtol' function. */ +/* #undef HAVE_STRTOL */ + +/* Define if we have a function called "ieee_handler" in -lsunmath. */ +/* #undef HAVE_SUNMATH */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYSENT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_DIR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IPC_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_MACHSIG_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SEM_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SIGINFO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SIGNAL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STATVFS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SYSTEMINFO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIMES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UTSNAME_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_VFS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_VNODE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VALUES_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_X11_EXTENSIONS_MULTIBUF_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_X11_EXTENSIONS_READDISPLAY_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_X11_EXTENSIONS_TRANSOVL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_XMU_EDITRES_H 1 + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +/* #undef NO_MINUS_C_MINUS_O */ + +/* define if the class ostream has member function form */ +/* #undef OSTREAM_FORM_OK */ + +/* Name of package */ +#define PACKAGE "OpenCAS" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "" + +/* Define if compiler has function prototypes */ +#define PROTOTYPES 1 + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void + +/* define if the function semctl takes a value */ +/* #undef SEMCTL_NO_REFERENCE */ + +/* define if the function semop takes a value */ +/* #undef SEMOP_NO_REFERENCE */ + +/* define if semun has member __buf */ +/* #undef SEMUN_BUF_DEFINED */ + +/* define if the union semun is in sys/sem.h */ +#define SEMUN_DEFINED + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if your declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Version number of package */ +#define VERSION "5.0DVP1" + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +/* #undef WORDS_BIGENDIAN */ + +/* Define to 1 if on AIX 3. + System headers sometimes define this. + We just want to avoid a redefinition error message. */ +#ifndef _ALL_SOURCE +/* # undef _ALL_SOURCE */ +#endif + +/* Define to `unsigned' if does not define. */ +/* #undef size_t */ + +/* End FreeBSD Part */ + /*---------------------------------------------------------*/ /* This part is extracted from config.h generated on SOLARIS */ /*---------------------------------------------------------*/ diff -urN opencascade-6.2.orig/ros/src/WOKTclLib/wutils.tcl opencascade-6.2/ros/src/WOKTclLib/wutils.tcl --- opencascade-6.2.orig/ros/src/WOKTclLib/wutils.tcl Wed Mar 21 22:14:19 2007 +++ opencascade-6.2/ros/src/WOKTclLib/wutils.tcl Sun Apr 1 11:13:19 2007 @@ -1770,7 +1770,7 @@ } command { - set fid [open "| /usr/lib/sendmail -oi -t" "w"] + set fid [open "| /usr/sbin/sendmail -oi -t" "w"] puts $fid "To: $to" if {[string length $from] > 0} { puts $fid "From: $from" diff -urN opencascade-6.2.orig/ros/src/WOKTools/WOKTools_Options.cxx opencascade-6.2/ros/src/WOKTools/WOKTools_Options.cxx --- opencascade-6.2.orig/ros/src/WOKTools/WOKTools_Options.cxx Wed Mar 21 22:12:54 2007 +++ opencascade-6.2/ros/src/WOKTools/WOKTools_Options.cxx Sun Apr 1 11:13:19 2007 @@ -52,6 +52,8 @@ myerrflg = Standard_False; #if !defined( WNT ) && !defined( __GNUC__ ) optind = 1; +#elif defined(__FreeBSD__) + optind = 1; #else optind = 0; #endif // WNT diff -urN opencascade-6.2.orig/ros/src/WOKsite/wok.csh opencascade-6.2/ros/src/WOKsite/wok.csh --- opencascade-6.2.orig/ros/src/WOKsite/wok.csh Wed Mar 21 22:14:23 2007 +++ opencascade-6.2/ros/src/WOKsite/wok.csh Sun Apr 1 11:13:19 2007 @@ -57,6 +57,9 @@ case SunOS: setenv WOKSTATION "sun" breaksw + case FreeBSD: + setenv WOKSTATION "bsd" + breaksw case Linux: setenv WOKSTATION "lin" breaksw @@ -74,4 +77,4 @@ endsw setenv LD_LIBRARY_PATH "${TCLLIB}:${WOKHOME}/lib/${WOKSTATION}:${LD_LIBRARY_PATH}:" -${TCLBIN}/tclsh +/usr/local/bin/tclsh8.4-threads diff -urN opencascade-6.2.orig/ros/src/WOKsite/wokinit.csh opencascade-6.2/ros/src/WOKsite/wokinit.csh --- opencascade-6.2.orig/ros/src/WOKsite/wokinit.csh Wed Mar 21 22:14:23 2007 +++ opencascade-6.2/ros/src/WOKsite/wokinit.csh Sun Apr 1 11:13:19 2007 @@ -5,24 +5,26 @@ set OS_PLATFORM="" if ( $OS_NAME == "SunOS" ) then set OS_PLATFORM="sun" +else if ( $OS_NAME == "FreeBSD" ) then + set OS_PLATFORM="bsd" else if ( $OS_NAME == "Linux" ) then set OS_PLATFORM="lin" endif setenv WOKHOME ${CASROOT}/../wok setenv HOME ${WOKHOME}/site -setenv WOK_LIBPATH ${WOKHOME}/lib/${OS_PLATFORM} +setenv WOK_LIBPATH ${WOKHOME}/lib/ setenv WOK_ROOTADMDIR ${WOKHOME}/wok_entities setenv WOK_SESSIONID ${HOME} -setenv TCLHOME ${CASROOT}/../3rdparty/${OS_NAME}/tcltk -setenv TCLLIBPATH "${TCLHOME}/lib:${WOK_LIBPATH}" +setenv TCLHOME ${WOK_LIBPATH} +setenv TCLLIBPATH "${WOK_LIBPATH}" set TCLLIB=${TCLHOME}/lib set TCLBIN=${TCLHOME}/bin -setenv LD_LIBRARY_PATH "/usr/lib:/usr/X11R6/lib:/lib:${TCLLIB}:${WOKHOME}/lib/:${WOKHOME}/lib/${OS_PLATFORM}" +setenv LD_LIBRARY_PATH "/usr/lib:/usr/X11R6/lib:/lib:${TCLLIB}:${WOKHOME}/lib/:${WOKHOME}/lib/${OS_PLATFORM}/" setenv path "/usr/bin /bin /usr/bin /sbin /usr/sbin /usr/local/bin /usr/local/sbin /usr/X11R6/bin /etc" setenv PATH "/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11R6/bin:/etc" @@ -32,5 +34,8 @@ cd ${WOK_ROOTADMDIR} +if ( $OS_NAME == "FreeBSD" ) then +/usr/local/bin/tclsh8.4-threads < ${WOKHOME}/site/CreateFactory.tcl +else ${TCLBIN}/tclsh < ${WOKHOME}/site/CreateFactory.tcl - +endif diff -urN opencascade-6.2.orig/ros/src/jcas/jcas_CMPLRS.edl opencascade-6.2/ros/src/jcas/jcas_CMPLRS.edl --- opencascade-6.2.orig/ros/src/jcas/jcas_CMPLRS.edl Wed Mar 21 22:12:52 2007 +++ opencascade-6.2/ros/src/jcas/jcas_CMPLRS.edl Sun Apr 1 11:13:19 2007 @@ -6,6 +6,10 @@ @string %CMPLRS_CXX_Options += " -I" %CSF_JavaHome "/include/solaris"; @endif; +@if ( %Station == "bsd" ) then + @string %CMPLRS_CXX_Options += " -I" %CSF_JavaHome "/include/freebsd"; +@endif; + @if ( %Station == "lin" ) then @string %CMPLRS_CXX_Options += " -I" %CSF_JavaHome "/include/linux"; @endif; diff -urN opencascade-6.2.orig/wok/lib/CMPLRS.edl opencascade-6.2/wok/lib/CMPLRS.edl --- opencascade-6.2.orig/wok/lib/CMPLRS.edl Wed Mar 21 22:14:51 2007 +++ opencascade-6.2/wok/lib/CMPLRS.edl Sun Apr 1 11:13:19 2007 @@ -491,6 +491,160 @@ +-- ###### ##### ###### -- +-- # # # # # # -- +-- # # # # # -- +-- ###### ##### # # -- +-- # # # # # -- +-- # # # # # # -- +-- ###### ##### ###### -- + + + @if ( %Station == "bsd" ) then + + @template CMPLRS_C_DTmpFile (%TmpFile) is + $>& %TmpFile \ + @end; + + @template CMPLRS_CXX_DTmpFile (%TmpFile) is + $>& %TmpFile \ + @end; + + @template CMPLRS_F77_DTmpFile (%TmpFile) is + $ \ + @end; + + @if ( %DebugMode == "True" ) then + @set %CMPLRS_CXX_ModeOpt = "-g -O0 -DDEB -D_DEBUG"; + @set %CMPLRS_C_ModeOpt = "-g -O0 -DDEB -D_DEBUG"; + @set %CMPLRS_F77_ModeOpt = "-g -DDEB -D_DEBUG"; + @else + @set %CMPLRS_CXX_ModeOpt = "-O2 -fno-strict-aliasing -pipe -march=pentiumpro -DNDEBUG -DNo_Exception"; + @set %CMPLRS_C_ModeOpt = "-O2 -fno-strict-aliasing -pipe -march=pentiumpro -DNDEBUG -DNo_Exception"; + @set %CMPLRS_F77_ModeOpt = "-O -DNDEBUG -DNo_Exception"; + @endif; + + @set %CMPLRS_CXX_WOKDirectives = "-MD "; + @set %CMPLRS_C_WOKDirectives = "-MD "; + @set %CMPLRS_F77_WOKDirectives = ""; + + + @template CMPLRS_F77_OptLine ( + %CMPLRS_F77_COMPILER , + %CMPLRS_F77_SysOptions , + %CMPLRS_F77_ModeOpt + ) is + $Following parameters make up F77 compilation command in this order: + $CMPLRS_F77_COMPILER = %CMPLRS_F77_COMPILER + $CMPLRS_F77_SysOptions = %CMPLRS_F77_SysOptions + $CMPLRS_F77_ModeOpt = %CMPLRS_F77_ModeOpt + @end; + + @template CMPLRS_F77_CmdLine ( %CMPLRS_F77_COMPILER , %CMPLRS_F77_SysOptions , %CMPLRS_F77_ModeOpt , + %CMPLRS_F77_WOKDirectives , %Source , %OutputDir , %BaseName , %Entity ) is + $%CMPLRS_F77_COMPILER %CMPLRS_F77_SysOptions %CMPLRS_F77_ModeOpt %CMPLRS_F77_WOKDirectives -c %Source -o %OutputDir/%BaseName.o + $echo '$F77_COMPILER %CMPLRS_F77_SysOptions %CMPLRS_F77_ModeOpt $INCDIRS -c $SOURCE -o $OBJECT' > %OutputDir/../%Entity/.adm/f77.compile + $ touch %OutputDir/%BaseName.m + @end; + + + @template CMPLRS_C_OptLine (%CMPLRS_C_COMPILER , + %CMPLRS_C_SysOptions , + %CMPLRS_C_Options , + %CMPLRS_C_ModeOpt , + %CMPLRS_C_INCLUDE , + %IncDirectives , + %CMPLRS_Unit_C_Options , + %CMPLRS_C_WOKDirectives , + %Entity ) is + $Following parameters make up C compilation command in this order: + $CMPLRS_C_COMPILER = %CMPLRS_C_COMPILER + $CMPLRS_C_SysOptions = %CMPLRS_C_SysOptions + $CMPLRS_C_Options = %CMPLRS_C_Options + $CMPLRS_Unit_C_Options = %CMPLRS_Unit_C_Options + $CMPLRS_C_INCLUDE = %CMPLRS_C_INCLUDE + $CMPLRS_C_WOKDirectives= %CMPLRS_C_WOKDirectives + $Dynamic include directives are : + $%IncDirectives + @end; + @template CMPLRS_C_CmdLine ( %CMPLRS_C_COMPILER , + %CMPLRS_C_SysOptions , + %CMPLRS_C_Options , + %CMPLRS_C_ModeOpt , + %CMPLRS_CXX_DBMSOpt , +-- %C_Export , + %CMPLRS_C_INCLUDE , + %IncDirectives , + %CMPLRS_Unit_C_Options , + %CMPLRS_C_WOKDirectives , + %Source , + %BaseName, + %OutputDir , + %TmpFile , %Entity ) is + $cd %OutputDir && %CMPLRS_C_COMPILER %CMPLRS_C_SysOptions %CMPLRS_C_Options %CMPLRS_C_ModeOpt %CMPLRS_C_INCLUDE %CMPLRS_CXX_DBMSOpt %IncDirectives %CMPLRS_Unit_C_Options %CMPLRS_C_WOKDirectives -c %Source -o %OutputDir/%BaseName.o + $set stat = $status + $echo '$C_COMPILER %CMPLRS_C_SysOptions %CMPLRS_C_Options $INCDIRS %CMPLRS_C_ModeOpt %CMPLRS_C_INCLUDE %CMPLRS_CXX_DBMSOpt %CMPLRS_Unit_C_Options %CMPLRS_C_WOKDirectives -c $SOURCE -o $OBJECT' > %OutputDir/../%Entity/.adm/c.compile + $if ( $stat == 0 ) then + $ if ( -e %OutputDir/%BaseName.d ) then + $ sed -e '/:/d' -e 's/\\/ /g' %OutputDir/%BaseName.d | tr ' ' '\012' | sort -u > %OutputDir/%BaseName.m + $ endif + $endif + $set status = $stat + @end; + + @template CMPLRS_CXX_OptLine (%CMPLRS_CXX_COMPILER, + %CMPLRS_CXX_SysOptions , + %CMPLRS_CXX_Options , + %CMPLRS_CXX_ModeOpt , %CMPLRS_CXX_DBMSOpt , + %CMPLRS_CXX_INCLUDE , + %CMPLRS_CXX_WOKDirectives , + %IncDirectives , + %DBDirectives , + %Entity ) is + $Following parameters make up C++ compilation command in this order: + $CMPLRS_CXX_COMPILER = %CMPLRS_CXX_COMPILER + $CMPLRS_CXX_SysOptions = %CMPLRS_CXX_SysOptions + $CMPLRS_CXX_Options = %CMPLRS_CXX_Options + $CMPLRS_CXX_ModeOpt = %CMPLRS_CXX_ModeOpt + $CMPLRS_CXX_DBMSOpt = %CMPLRS_CXX_DBMSOpt + $CMPLRS_CXX_INCLUDE = %CMPLRS_CXX_INCLUDE + $CMPLRS_CXX_WOKDirectives = %CMPLRS_CXX_WOKDirectives + $Dynamic include directives are : + $%IncDirectives + @end; + + @template CMPLRS_CXX_CmdLine ( %CMPLRS_CXX_COMPILER, + %CMPLRS_CXX_SysOptions , + %CMPLRS_CXX_Options , + %CMPLRS_CXX_ModeOpt , + %CMPLRS_CXX_DBMSOpt , + %CMPLRS_CXX_INCLUDE , + %CMPLRS_CXX_WOKDirectives , + %IncDirectives , + %DBDirectives , + %Source, + %BaseName, + %OutputDir , + %TmpFile , %Entity ) is + $cd %OutputDir && %CMPLRS_CXX_COMPILER %CMPLRS_CXX_SysOptions %CMPLRS_CXX_Options %CMPLRS_CXX_INCLUDE %CMPLRS_CXX_DBMSOpt %CMPLRS_CXX_ModeOpt %IncDirectives %DBDirectives %CMPLRS_CXX_WOKDirectives -c %Source -o %OutputDir/%BaseName.o >& %TmpFile + $set stat = $status + + $if ( $stat == 0 ) then + $ if ( -e %OutputDir/%BaseName.d ) then + $ sed -e '/:/d' -e 's/\\/ /g' %OutputDir/%BaseName.d | tr ' ' '\012' | sort -u > %OutputDir/%BaseName.m + $ endif + $endif + $if( -e %TmpFile ) grep ':' %TmpFile + $/bin/rm -f %TmpFile + $set status = $stat + + @end; + + + @endif; + + + -- ##### # # # # -- -- # # # # ## # -- -- # # # # # # -- diff -urN opencascade-6.2.orig/wok/lib/CSF.edl opencascade-6.2/wok/lib/CSF.edl --- opencascade-6.2.orig/wok/lib/CSF.edl Wed Mar 21 22:14:51 2007 +++ opencascade-6.2/wok/lib/CSF.edl Sun Apr 1 11:13:19 2007 @@ -125,7 +125,7 @@ @endif; --<< TODO : If applicable , modify the location of the C++ compiler. - @set %CSF_CXX_COMPILER = "/usr/bin/g++ "; + @set %CSF_CXX_COMPILER = "c++ "; -->> END TODO @set %STLPortHome = ""; @if ( %STLPortHome != "") then @@ -142,7 +142,7 @@ @set %CSF_CXX_ModeOptDeb = " -g -O0 -DDEB -D_DEBUG "; --<< TODO : If applicable , modify the location of the c compiler. - @set %CSF_C_COMPILER = "/usr/bin/gcc "; + @set %CSF_C_COMPILER = "cc "; @string %CSF_C_INCLUDE += ""; -->> END TODO @@ -153,7 +153,7 @@ @set %CSF_C_ModeOptDeb = " -g -O0 -DDEB -D_DEBUG "; --<< TODO : If applicable , modify the location of the Fortran compiler. - @set %CSF_F77_COMPILER = "/usr/bin/f77 "; + @set %CSF_F77_COMPILER = "gfortran42 "; -->> END TODO @set %CSF_F77_SysOptions = "-fPIC "; @@ -161,7 +161,7 @@ @set %CSF_F77_ModeOpt = " -O3 -DNDEBUG -DNo_Exception "; @set %CSF_F77_ModeOptDeb = " -g -DDEB -D_DEBUG "; - @string %CSF_LINKER = "/usr/bin/ld "; + @string %CSF_LINKER = "ld "; @set %CSF_CXX_COMPILERLINKER = %CSF_CXX_COMPILER ; @set %CSF_LINKER_DBMSOpt = ""; @set %CSF_LINKER_SysShared = "-shared "; @@ -204,6 +204,83 @@ @endif; -- + -- For FreeBSD platforms + -- + @if ( %Station == "bsd" ) then + @if ( %DBMS == "OBJS" ) then + @set %CSF_OODBLibs = ""; + @endif; + + --<< TODO : If applicable , modify the location of the C++ compiler. + @set %CSF_CXX_COMPILER = "c++ "; + -->> END TODO + @set %STLPortHome = ""; + @if ( %STLPortHome != "") then + @string %STLPortInclude = "-I" %STLPortHome "/stlport "; + @string %STLPortLib = "-L" %STLPortHome "/lib -lstlport_gcc"; + @else + @set %STLPortInclude = "/usr/local/include/stlport"; + @string %STLPortLib = "-L/usr/local/lib -lstlport_gcc"; + @endif; + @set %CSF_CXX_SysOptions = "-O2 -fno-strict-aliasing -pipe -march=pentiumpro -fPIC -funsigned-char -Wall -fmessage-length=0"; + @string %CSF_CXX_Options = "-DLIN -DLININTEL -DNO_CXX_EXCEPTION " %STLPortInclude; + + --<< TODO : If applicable , modify the location of the C compiler. + @set %CSF_C_COMPILER = "cc "; + @string %CSF_C_INCLUDE += ""; + -->> END TODO + + @set %CSF_C_SysOptions = "-O2 -fno-strict-aliasing -pipe -march=pentiumpro -fPIC -funsigned-char -Wall"; + @set %CSF_C_Options = "-DLIN -DLININTEL "; + + --<< TODO : If applicable , modify the location of the Fortran compiler. + @set %CSF_F77_COMPILER = "gfortran42 "; + -->> END TODO + + @set %CSF_F77_SysOptions = "-O -fPIC "; + + @set %CSF_LINKER = "ld "; + @set %CSF_CXX_COMPILERLINKER = %CSF_CXX_COMPILER ; + @set %CSF_LINKER_DBMSOpt = ""; + @set %CSF_LINKER_SysShared = "-shared "; + @set %CSF_LINKER_SysExe = ""; + @set %CSF_LINKER_SysOpt = ""; + @set %CSF_LINKER_SysLib = "-ldl -lc "; + @set %CSF_LINKER_CheckOpt = " -nostartfiles "; + @set %CSF_LINKER_CheckOut = " -o /dev/null "; + @set %CSF_SOCKETLibs = " -ldl" ; + + --<< TODO : If applicable , modify the root location where TCL is installed. + @set %CSF_TCL_HOME = "/usr/local"; + -->> END TODO + + @string %CSF_TCL_INCLUDE = "/usr/local/include/tcl8.4 "; + + --<< TODO : If applicable , modify the root location where Java is installed. + @set %CSF_JavaHome = "/usr/local/diablo-jdk1.5.0"; + -->> END TODO + + @string %CSF_JAVA_INCLUDE = "-I" %CSF_JavaHome "/include -I" %CSF_JavaHome "/include/freebsd "; + @set %CSF_JAVA_COMPILER = "javac"; + @set %CSF_JAVA_JNI = "javah"; + + @set %CSF_DOXIGEN = "/usr/local/bin/doxygen"; + @set %CSF_GRAPHVIZ_HOME = "/usr/local/lib/graphviz"; + + @set %CSF_X11_INCLUDE = "-I/usr/X11R6/include "; + @set %CSF_OPENGL_INCLUDE = "-I/usr/X11R6/include "; + + @set %X11_LIB = "/usr/X11R6/lib"; + + @string %CSF_XwLibs = "-L" %X11_LIB " -lX11 -lXext -lXmu -lXi "; + + @string %CSF_OpenGlLibs = "-L" %X11_LIB " -lGLU -lGL " ; + + @string %CSF_TclLibs = "-L" %CSF_TCL_HOME "/lib -ltcl "; + @string %CSF_TclTkLibs = "-L" %CSF_TCL_HOME "/lib -ltk -L" %X11_LIB " -lX11"; + @endif; + + -- -- For SunOS platforms -- @if ( %Station == "sun" ) then @@ -472,7 +549,7 @@ @set %CSF_F77_ModeOpt = " -O3 "; @set %CSF_F77_ModeOptDeb = " -g "; - @set %CSF_LINKER = "/usr/bin/ld"; + @set %CSF_LINKER = "ld"; @set %CSF_CXX_COMPILERLINKER = %CSF_CXX_COMPILER ; @set %CSF_LINKER_SysShared = " -shared "; @set %CSF_LINKER_SysExe = ""; @@ -576,7 +653,7 @@ @set %CSF_C_COMPILER = "xlC_r "; @string %CSF_C_INCLUDE += ""; @set %CSF_CXX_COMPILER = "xlC_r "; - @set %CSF_F77_COMPILER = "/usr/bin/f77 "; + @set %CSF_F77_COMPILER = "gfortran42 "; @set %STLPortHome = ""; @if ( %STLPortHome != "") then diff -urN opencascade-6.2.orig/wok/lib/JAVA.edl opencascade-6.2/wok/lib/JAVA.edl --- opencascade-6.2.orig/wok/lib/JAVA.edl Wed Mar 21 22:14:50 2007 +++ opencascade-6.2/wok/lib/JAVA.edl Sun Apr 1 11:13:19 2007 @@ -32,6 +32,10 @@ @string %CXX_JAVA += " -I" %CSF_JavaHome "/include/solaris "; @endif; +@if ( %Station == "bsd" ) then + @string %CXX_JAVA += " -I" %CSF_JavaHome "/include/freebsd "; +@endif; + @if ( %Station == "lin" ) then @string %CXX_JAVA += " -I" %CSF_JavaHome "/include/linux "; @endif; diff -urN opencascade-6.2.orig/wok/lib/LD.edl opencascade-6.2/wok/lib/LD.edl --- opencascade-6.2.orig/wok/lib/LD.edl Wed Mar 21 22:14:50 2007 +++ opencascade-6.2/wok/lib/LD.edl Sun Apr 1 11:13:19 2007 @@ -70,6 +70,13 @@ @endif; +-- Definition du Link FreeBSD + @if ( %Station == "bsd" ) then + @template LD_Footer ( %Station ) is + $ ; + @end; + @endif; + -- Definition du Link Sun/Solaris 2.4 @if ( %Station == "sun" ) then diff -urN opencascade-6.2.orig/wok/lib/LDAR.edl opencascade-6.2/wok/lib/LDAR.edl --- opencascade-6.2.orig/wok/lib/LDAR.edl Wed Mar 21 22:14:51 2007 +++ opencascade-6.2/wok/lib/LDAR.edl Sun Apr 1 11:13:19 2007 @@ -20,7 +20,7 @@ @if( %Station != "sun" ) then @set %RmCmd = "/usr/bin/rm"; - @if ( %Station == "hp" || %Station == "lin" ) then + @if ( %Station == "hp" || %Station == "lin" || %Station == "bsd" ) then @set %RmCmd = "/bin/rm"; @endif; diff -urN opencascade-6.2.orig/wok/lib/LDEXE.edl opencascade-6.2/wok/lib/LDEXE.edl --- opencascade-6.2.orig/wok/lib/LDEXE.edl Wed Mar 21 22:14:51 2007 +++ opencascade-6.2/wok/lib/LDEXE.edl Sun Apr 1 11:13:19 2007 @@ -84,7 +84,13 @@ @if( %Station == "lin" ) then @template LDEXE_Header ( %Target , %STLPortLib ) is - $/usr/bin/g++ -o %Target %STLPortLib \ + $c++ -o %Target %STLPortLib \ + @end; + @endif; + + @if( %Station == "bsd" ) then + @template LDEXE_Header ( %Target , %STLPortLib ) is + $c++ -o %Target %STLPortLib \ @end; @endif; diff -urN opencascade-6.2.orig/wok/lib/LDSHR.edl opencascade-6.2/wok/lib/LDSHR.edl --- opencascade-6.2.orig/wok/lib/LDSHR.edl Wed Mar 21 22:14:51 2007 +++ opencascade-6.2/wok/lib/LDSHR.edl Sun Apr 1 11:13:19 2007 @@ -56,7 +56,7 @@ @end; @template LDSHR_Header ( %Target, %LDSHR_DBMSOpt, %CSF_LINKER_SysShared ) is - $/usr/bin/g++ %CSF_LINKER_SysShared %LDSHR_DBMSOpt -o %Target \ + $c++ %CSF_LINKER_SysShared %LDSHR_DBMSOpt -o %Target \ @end; @template LDSHR_Footer () is @@ -65,7 +65,35 @@ @end; @template LDSHR_CheckUndefHeader ( %Target, %LDSHR_DBMSOpt,%CSF_LINKER_CheckOpt ) is - $/usr/bin/ld %CSF_LINKER_CheckOpt %LDSHR_DBMSOpt -o %Target \ + $ld %CSF_LINKER_CheckOpt %LDSHR_DBMSOpt -o %Target \ + @end; + + @template LDSHR_CheckUndefFooter () is + $ ; + $ set status=$ld_status; + @end; + @endif; + + + @if ( %Station == "bsd" ) then + @set %LDSHR_Footer = "LDSHR_Footer"; + @set %LDSHR_ArchiveFullPath = "LDSHR_ArchiveFullPath"; + + @template LDSHR_ArchiveFullPath ( %LibDir, %LibName ) is + $\^ + @end; + + @template LDSHR_Header ( %Target, %LDSHR_DBMSOpt, %CSF_LINKER_SysShared ) is + $c++ %CSF_LINKER_SysShared %LDSHR_DBMSOpt -o %Target \ + @end; + + @template LDSHR_Footer () is + $ ; + $ set ld_status=$status; + @end; + + @template LDSHR_CheckUndefHeader ( %Target, %LDSHR_DBMSOpt,%CSF_LINKER_CheckOpt ) is + $ld %CSF_LINKER_CheckOpt %LDSHR_DBMSOpt -o %Target \ @end; @template LDSHR_CheckUndefFooter () is diff -urN opencascade-6.2.orig/wok/lib/LINKSHR.edl opencascade-6.2/wok/lib/LINKSHR.edl --- opencascade-6.2.orig/wok/lib/LINKSHR.edl Wed Mar 21 22:14:50 2007 +++ opencascade-6.2/wok/lib/LINKSHR.edl Sun Apr 1 11:13:19 2007 @@ -257,6 +257,38 @@ $%CSF_LINKER %CSF_LINKER_CheckOpt %CSF_LINKER_CheckOut \ @end; + @if ( %Station == "bsd" ) then + @set %LINKSHR_Footer = "LINKSHR_Footer"; + @set %LINKSHR_ArchiveFullPath = "LINKSHR_ArchiveFullPath"; + + @template LINKSHR_ArchiveFullPath () is + $\^ + @end; + + @template LINKSHR_Header (%CSF_CXX_COMPILERLINKER, %Target, %LINKSHR_DBMSOpt, %CSF_LINKER_SysShared ) is + $%CSF_CXX_COMPILERLINKER %CSF_LINKER_SysShared %LINKSHR_DBMSOpt -o %Target \ + @end; + + @template LINKSHR_Footer (%CSF_LINKER_SysLib) is + $ %CSF_LINKER_SysLib; + $ set ld_status=$status + $ if ( $?LD_LIBRARY_PATH ) then + $ set ld_library_path=$LD_LIBRARY_PATH + $ endif + @end; + + @template LINKSHR_CheckUndefHeader ( + %Target, %LINKSHR_DBMSOpt, %LD_LIBRARY_PATH, %CSF_LINKER_CheckOpt, %CSF_LINKER_CheckOut, %CSF_LINKER + ) is + $if ( $?LD_LIBRARY_PATH ) then + $ setenv LD_LIBRARY_PATH %LD_LIBRARY_PATH:${LD_LIBRARY_PATH} + $else + $ setenv LD_LIBRARY_PATH %LD_LIBRARY_PATH + $endif + $echo "Check of undefined symbols with LD_LIBRARY_PATH : $LD_LIBRARY_PATH" + $%CSF_LINKER %CSF_LINKER_CheckOpt %CSF_LINKER_CheckOut \ + @end; + @template LINKSHR_CheckUndefFooter () is $ ; $ if ( $status ) then diff -urN opencascade-6.2.orig/wok/lib/WOKSteps_toolkit.edl opencascade-6.2/wok/lib/WOKSteps_toolkit.edl --- opencascade-6.2.orig/wok/lib/WOKSteps_toolkit.edl Wed Mar 21 22:14:51 2007 +++ opencascade-6.2/wok/lib/WOKSteps_toolkit.edl Sun Apr 1 11:13:19 2007 @@ -97,7 +97,24 @@ @endif; @endif; - + + @if ( %Station == "bsd" ) then + @string %WOKSteps_LibGroup += " lib.arx "; + @set %WOKSteps_lib_build = "WOKStep_DynamicLibrary(lib.list,lib.arx)"; + + @ifnotdefined ( %WOKSteps_LinkShr ) then + @string %WOKSteps_LibGroup += " lib.build "; + @set %WOKSteps_lib_build = "WOKStep_DynamicLibrary(lib.list,lib.arx)"; + @else + @string %WOKSteps_LibGroup += " lib.libs "; + @string %WOKSteps_LibGroup += " lib.tks "; + @string %WOKSteps_LibGroup += " lib.build "; + @set %WOKSteps_lib_libs = "WOKStep_DirectLinkList(obj.idep,lib.list,lib.arx)"; + @set %WOKSteps_lib_tks = "*WOKStep_DirectTKReplace(lib.libs)"; + @set %WOKSteps_lib_build = "WOKStep_LibLink(lib.tks)"; + @endif; + @endif; + @if ( %Station == "lin" ) then @string %WOKSteps_LibGroup += " lib.arx "; @set %WOKSteps_lib_build = "WOKStep_DynamicLibrary(lib.list,lib.arx)"; diff -urN opencascade-6.2.orig/wok/lib/config.h opencascade-6.2/wok/lib/config.h --- opencascade-6.2.orig/wok/lib/config.h Wed Mar 21 22:14:51 2007 +++ opencascade-6.2/wok/lib/config.h Sun Apr 1 11:13:19 2007 @@ -331,6 +331,366 @@ /* End Linux Part */ +/*-----------------------------------------------------------*/ +/* This part is extracted from config.h generated on FreeBSD */ +/*-----------------------------------------------------------*/ + +#elif FREEBSD + +/* config.h. Generated by configure. */ +/* config.h.in. Generated from configure.in by autoheader. */ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* define if the compiler allows redefinition of stream input and output */ +/* #undef DEF_IOS_OK */ + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BITS_SIGSET_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BSTRING_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DPS_DPSXCLIENT_H 1 + +/* Define if we have a function called "finite" in -lm. */ +#define HAVE_FINITE + +/* Define to 1 if you have the header file. */ +#define HAVE_FLOATINGPOINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FLOAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FSTREAM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FSTREAM_H 1 + +/* Define to 1 if you have the `gethostname' function. */ +#define HAVE_GETHOSTNAME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IEEEFP_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IOMANIP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IOMANIP_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IOS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IOSTREAM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IOSTREAM_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IOS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ISTREAM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ISTREAM_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LIBC_H */ + +/* Define to 1 if you have the `e' library (-le). */ +/* #undef HAVE_LIBE */ + +/* Define to 1 if you have the `inks' library (-links). */ +/* #undef HAVE_LIBINKS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if we have a function called "mallinfo" in -lmalloc. */ +/* #undef HAVE_MALLINFO */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MALLOC_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NET_IF_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OSFCN_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_OSTREAM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OSTREAM_H 1 + +/* Define to 1 if you have the `putenv' function. */ +/* #undef HAVE_PUTENV */ + +/* Define to 1 if you have the header file. */ +#define HAVE_PWD_H 1 + +/* Define to 1 if you have the `regcomp' function. */ +#define HAVE_REGCOMP 1 + +/* Define to 1 if you have the `re_comp' function. */ +/* #undef HAVE_RE_COMP */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SIGFPE_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SIGINFO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SIGNAL_H 1 + +/* Define to 1 if you have the `statfs' function. */ +#define HAVE_STATFS 1 + +/* Define to 1 if you have the `statvfs' function. */ +#define HAVE_STATVFS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strcspn' function. */ +#define HAVE_STRCSPN 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STREAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STRSTREAM_H */ + +/* Define to 1 if you have the `strtol' function. */ +/* #undef HAVE_STRTOL */ + +/* Define if we have a function called "ieee_handler" in -lsunmath. */ +/* #undef HAVE_SUNMATH */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYSENT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_DIR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IPC_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_MACHSIG_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SEM_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SIGINFO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SIGNAL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STATVFS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SYSTEMINFO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIMES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UTSNAME_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_VFS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_VNODE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VALUES_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_X11_EXTENSIONS_MULTIBUF_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_X11_EXTENSIONS_READDISPLAY_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_X11_EXTENSIONS_TRANSOVL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_XMU_EDITRES_H 1 + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +/* #undef NO_MINUS_C_MINUS_O */ + +/* define if the class ostream has member function form */ +/* #undef OSTREAM_FORM_OK */ + +/* Name of package */ +#define PACKAGE "OpenCAS" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "" + +/* Define if compiler has function prototypes */ +#define PROTOTYPES 1 + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void + +/* define if the function semctl takes a value */ +/* #undef SEMCTL_NO_REFERENCE */ + +/* define if the function semop takes a value */ +/* #undef SEMOP_NO_REFERENCE */ + +/* define if semun has member __buf */ +/* #undef SEMUN_BUF_DEFINED */ + +/* define if the union semun is in sys/sem.h */ +#define SEMUN_DEFINED + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if your declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Version number of package */ +#define VERSION "5.0DVP1" + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +/* #undef WORDS_BIGENDIAN */ + +/* Define to 1 if on AIX 3. + System headers sometimes define this. + We just want to avoid a redefinition error message. */ +#ifndef _ALL_SOURCE +/* # undef _ALL_SOURCE */ +#endif + +/* Define to `unsigned' if does not define. */ +/* #undef size_t */ + +/* End FreeBSD Part */ + /*---------------------------------------------------------*/ /* This part is extracted from config.h generated on SOLARIS */ /*---------------------------------------------------------*/ diff -urN opencascade-6.2.orig/wok/lib/pkgIndex.tcl opencascade-6.2/wok/lib/pkgIndex.tcl --- opencascade-6.2.orig/wok/lib/pkgIndex.tcl Wed Mar 21 22:14:50 2007 +++ opencascade-6.2/wok/lib/pkgIndex.tcl Sun Apr 1 11:13:19 2007 @@ -30,6 +30,34 @@ ########################################### +if { $tcl_platform(os) == "FreeBSD" } { +package ifneeded Woktools 2.0 "tclPkgSetup $dir/bsd Woktools 2.0 { + {libwoktoolscmd.so load { + msgprint msgisset msgissetcmd msgissetlong msgset msgsetcmd + msgsetlong msgunset msgunsetcmd msgunsetlong msgsetheader + msgunsetheader msgissetheader msginfo}}}" + +package ifneeded Wokutils 2.0 "tclPkgSetup $dir Wokutils 2.0 { + {libwokutilscmd.so load { wokcmp} } }" + +package ifneeded Wok 2.0 "package require Woktools; + tclPkgSetup $dir/bsd Wok 2.0 { + {libwokcmd.so load { + Sinfo Wcreate Winfo Wrm Wdeclare fcreate finfo frm pinfo screate + sinfo srm ucreate uinfo umpmake umake urm w_info wcreate + wokcd wokclose wokinfo wokparam wokprofile wokenv wrm wmove + stepinputaddstepinputinfo stepoutputadd stepoutputinfo stepaddexecdepitem }}}" + +package ifneeded Ms 2.0 "package require Woktools; + tclPkgSetup $dir/bsd Ms 2.0 { + {libmscmd.so load { + mscheck msclear msclinfo msextract msgeninfo msinfo msinstinfo + msmmthinfo msmthinfo mspkinfo msschinfo msrm msstdinfo + mstranslate msxmthinfo}}}" + } + +########################################### + if { $tcl_platform(os) == "SunOS" } { package ifneeded Woktools 2.0 "tclPkgSetup $dir/sun Woktools 2.0 { {libwoktoolscmd.so load { diff -urN opencascade-6.2.orig/wok/lib/wokPRM.tcl opencascade-6.2/wok/lib/wokPRM.tcl --- opencascade-6.2.orig/wok/lib/wokPRM.tcl Wed Mar 21 22:14:50 2007 +++ opencascade-6.2/wok/lib/wokPRM.tcl Sun Apr 1 11:13:19 2007 @@ -188,7 +188,7 @@ tixForm $IWOK_GLOBALS(PRM,Modify,wrkst,but,all) -top 2 set prev {} ; set curr {} ;set curwrkst [wokprofile -s] - foreach x [list sun sil ao1 hp wnt lin] { + foreach x [list sun bsd sil ao1 hp wnt lin] { set curr [string tolower ${wrkst}.${x}] checkbutton $curr -text $x -variable IWOK_GLOBALS(PRM,Modify,wrkst,$x) -command wokPRM:wrkst diff -urN opencascade-6.2.orig/wok/lib/wutils.tcl opencascade-6.2/wok/lib/wutils.tcl --- opencascade-6.2.orig/wok/lib/wutils.tcl Wed Mar 21 22:14:50 2007 +++ opencascade-6.2/wok/lib/wutils.tcl Sun Apr 1 11:13:19 2007 @@ -1770,7 +1770,7 @@ } command { - set fid [open "| /usr/lib/sendmail -oi -t" "w"] + set fid [open "| /usr/sbin/sendmail -oi -t" "w"] puts $fid "To: $to" if {[string length $from] > 0} { puts $fid "From: $from" diff -urN opencascade-6.2.orig/wok/site/DEFAULT.edl opencascade-6.2/wok/site/DEFAULT.edl --- opencascade-6.2.orig/wok/site/DEFAULT.edl Wed Mar 21 22:14:51 2007 +++ opencascade-6.2/wok/site/DEFAULT.edl Sun Apr 1 11:13:19 2007 @@ -17,7 +17,7 @@ @end; @template DEFAULT_Stations ( %Entity ) is -$sun lin wnt\^ +$sun bsd lin wnt\^ @end; @template DEFAULT_DBMSystems ( %Entity ) is @@ -37,6 +37,10 @@ @end; @template DEFAULT_DFLT ( %Entity_Home ) is +$%Entity_Home\^ +@end; + +@template DEFAULT_DFLT_bsd ( %Entity_Home ) is $%Entity_Home\^ @end; diff -urN opencascade-6.2.orig/wok/site/wok.csh opencascade-6.2/wok/site/wok.csh --- opencascade-6.2.orig/wok/site/wok.csh Wed Mar 21 22:14:52 2007 +++ opencascade-6.2/wok/site/wok.csh Sun Apr 1 11:13:19 2007 @@ -57,6 +57,9 @@ case SunOS: setenv WOKSTATION "sun" breaksw + case FreeBSD: + setenv WOKSTATION "bsd" + breaksw case Linux: setenv WOKSTATION "lin" breaksw @@ -74,4 +77,4 @@ endsw setenv LD_LIBRARY_PATH "${TCLLIB}:${WOKHOME}/lib/${WOKSTATION}:${LD_LIBRARY_PATH}:" -${TCLBIN}/tclsh +/usr/local/bin/tclsh8.4-threads diff -urN opencascade-6.2.orig/wok/site/wokinit.csh opencascade-6.2/wok/site/wokinit.csh --- opencascade-6.2.orig/wok/site/wokinit.csh Wed Mar 21 22:14:52 2007 +++ opencascade-6.2/wok/site/wokinit.csh Sun Apr 1 11:13:19 2007 @@ -5,24 +5,26 @@ set OS_PLATFORM="" if ( $OS_NAME == "SunOS" ) then set OS_PLATFORM="sun" +else if ( $OS_NAME == "FreeBSD" ) then + set OS_PLATFORM="bsd" else if ( $OS_NAME == "Linux" ) then set OS_PLATFORM="lin" endif setenv WOKHOME ${CASROOT}/../wok setenv HOME ${WOKHOME}/site -setenv WOK_LIBPATH ${WOKHOME}/lib/${OS_PLATFORM} +setenv WOK_LIBPATH ${WOKHOME}/lib/ setenv WOK_ROOTADMDIR ${WOKHOME}/wok_entities setenv WOK_SESSIONID ${HOME} -setenv TCLHOME ${CASROOT}/../3rdparty/${OS_NAME}/tcltk -setenv TCLLIBPATH "${TCLHOME}/lib:${WOK_LIBPATH}" +setenv TCLHOME ${WOK_LIBPATH} +setenv TCLLIBPATH "${WOK_LIBPATH}" set TCLLIB=${TCLHOME}/lib set TCLBIN=${TCLHOME}/bin -setenv LD_LIBRARY_PATH "/usr/lib:/usr/X11R6/lib:/lib:${TCLLIB}:${WOKHOME}/lib/:${WOKHOME}/lib/${OS_PLATFORM}" +setenv LD_LIBRARY_PATH "/usr/lib:/usr/X11R6/lib:/lib:${TCLLIB}:${WOKHOME}/lib/:${WOKHOME}/lib/${OS_PLATFORM}/" setenv path "/usr/bin /bin /usr/bin /sbin /usr/sbin /usr/local/bin /usr/local/sbin /usr/X11R6/bin /etc" setenv PATH "/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11R6/bin:/etc" @@ -32,5 +34,8 @@ cd ${WOK_ROOTADMDIR} +if ( $OS_NAME == "FreeBSD" ) then +/usr/local/bin/tclsh8.4-threads < ${WOKHOME}/site/CreateFactory.tcl +else ${TCLBIN}/tclsh < ${WOKHOME}/site/CreateFactory.tcl - +endif