1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

science/salome-kernel: New port: Salome Project: Multi-physics simulations: Kernel

This commit is contained in:
Yuri Victorovich 2023-07-04 02:07:11 -07:00
parent bdbeacfc16
commit 5411099683
10 changed files with 1227 additions and 0 deletions

View File

@ -462,6 +462,7 @@
SUBDIR += rubygem-rgeo-shapefile
SUBDIR += rubygem-ruby-netcdf
SUBDIR += salome-configuration
SUBDIR += salome-kernel
SUBDIR += scidavis
SUBDIR += sciplot
SUBDIR += segyio

View File

@ -0,0 +1,60 @@
PORTNAME= salome-kernel
DISTVERSIONPREFIX= V
DISTVERSION= 9_11_0
CATEGORIES= science
MAINTAINER= yuri@FreeBSD.org
COMMENT= Salome Project: Multi-physics simulations: Kernel
WWW= https://www.salome-platform.org/
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/COPYING
FETCH_DEPENDS= git:devel/git
PY_DEPENDS= ${PYNUMPY} \
${PYTHON_PKGNAMEPREFIX}omniorb>0:devel/py-omniorb \
${PYTHON_PKGNAMEPREFIX}psutil>0:sysutils/py-psutil@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${PY_FLAVOR}
BUILD_DEPENDS= salome-configuration>0:science/salome-configuration \
swig:devel/swig \
${PY_DEPENDS}
LIB_DEPENDS= libboost_filesystem.so:devel/boost-libs \
libhdf5.so:science/hdf5 \
libomniORB4.so:devel/omniORB
RUN_DEPENDS= bash:shells/bash \
${PY_DEPENDS}
USES= cmake compiler:c++11-lang gnome python shebangfix
USE_GNOME= libxml2
USE_LDCONFIG= yes
SHEBANG_GLOB= *.py *.sh
SHEBANG_FILES= bin/appliskel/salome \
bin/appliskel/salome_mesa \
bin/appliskel/.salome_run \
bin/appliskel/.bashrc
GIT_URL= https://git.salome-platform.org/gitpub/modules/kernel # all Salome repositories: https://git.salome-platform.org/gitweb/
CMAKE_ARGS= -DCONFIGURATION_ROOT_DIR=${LOCALBASE}/share/salome/configuration \
-DOMNIORBPY_ROOT_DIR=${LOCALBASE} \
-DPython_EXECUTABLE=${PYTHON_CMD}
CMAKE_OFF= SALOME_BUILD_TESTS SALOME_BUILD_DOC
CFLAGS+= -DSIZEOF_INT=4 -DSIZEOF_LONG=4
LDFLAGS+= -lexecinfo
DATADIR= ${PREFIX}/share/salome
do-fetch:
@if [ "${FORCE_FETCH_ALL}" = "true" ] || ! [ -f "${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}${EXTRACT_SUFX}" ]; then \
${MKDIR} ${DISTDIR}/${DIST_SUBDIR} && \
cd ${DISTDIR}/${DIST_SUBDIR} && \
git clone -q ${GIT_URL} ${PORTNAME}-${DISTVERSIONFULL} && \
(cd ${PORTNAME}-${DISTVERSIONFULL} && git reset -q --hard ${DISTVERSIONFULL} && ${RM} -r .git) && \
${FIND} ${PORTNAME}-${DISTVERSIONFULL} -and -exec ${TOUCH} -h -d 1970-01-01T00:00:00Z {} \; && \
${FIND} ${PORTNAME}-${DISTVERSIONFULL} -print0 | LC_ALL=C ${SORT} -z | \
${TAR} czf ${PORTNAME}-${DISTVERSIONFULL}${EXTRACT_SUFX} --format=bsdtar --gid 0 --uid 0 --options gzip:!timestamp --no-recursion --null -T - && \
${RM} -r ${PORTNAME}-${DISTVERSIONFULL}; \
fi
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1688418727
SHA256 (salome-kernel-V9_11_0.tar.gz) = ab1ba2be6f48adc97497266f2b6db3b6878aceb8ce8732e496130bc4924ccb3d
SIZE (salome-kernel-V9_11_0.tar.gz) = 3435113

View File

@ -0,0 +1,68 @@
--- src/Container/Component_i.cxx.orig 2023-07-03 21:26:28 UTC
+++ src/Container/Component_i.cxx
@@ -401,14 +401,14 @@ bool Engines_Component_i::Kill_impl()
bool RetVal = false ;
#ifndef WIN32
- if ( _ThreadId > 0 && pthread_self() != _ThreadId )
+ if ( _ThreadId && pthread_self() != _ThreadId )
{
RetVal = Killer( _ThreadId , SIGUSR2 ) ;
_ThreadId = (pthread_t ) -1 ;
}
#else
- if ( _ThreadId > 0 && pthread_self().p != _ThreadId->p )
+ if ( _ThreadId && pthread_self().p != _ThreadId->p )
{
RetVal = Killer( *_ThreadId , 0 ) ;
_ThreadId = (pthread_t* ) 0 ;
@@ -443,13 +443,13 @@ bool Engines_Component_i::Stop_impl()
bool RetVal = false ;
#ifndef WIN32
- if ( _ThreadId > 0 && pthread_self() != _ThreadId )
+ if ( _ThreadId && pthread_self() != _ThreadId )
{
RetVal = Killer( _ThreadId , 0 ) ;
_ThreadId = (pthread_t ) -1 ;
}
#else
- if ( _ThreadId > 0 && pthread_self().p != _ThreadId->p )
+ if ( _ThreadId && pthread_self().p != _ThreadId->p )
{
RetVal = Killer( *_ThreadId , 0 ) ;
_ThreadId = (pthread_t* ) 0 ;
@@ -482,9 +482,9 @@ bool Engines_Component_i::Suspend_impl()
bool RetVal = false ;
#ifndef WIN32
- if ( _ThreadId > 0 && pthread_self() != _ThreadId )
+ if ( _ThreadId && pthread_self() != _ThreadId )
#else
- if ( _ThreadId > 0 && pthread_self().p != _ThreadId->p )
+ if ( _ThreadId && pthread_self().p != _ThreadId->p )
#endif
{
if ( _Sleeping )
@@ -528,9 +528,9 @@ bool Engines_Component_i::Resume_impl()
#endif
bool RetVal = false ;
#ifndef WIN32
- if ( _ThreadId > 0 && pthread_self() != _ThreadId )
+ if ( _ThreadId && pthread_self() != _ThreadId )
#else
- if ( _ThreadId > 0 && pthread_self().p != _ThreadId->p )
+ if ( _ThreadId && pthread_self().p != _ThreadId->p )
#endif
{
if ( _Sleeping )
@@ -557,7 +557,7 @@ CORBA::Long Engines_Component_i::CpuUsed_impl()
long cpu = 0 ;
if ( _ThreadId || _Executed )
{
- if ( _ThreadId > 0 )
+ if ( _ThreadId )
{
#ifndef WIN32
if ( pthread_self() != _ThreadId )

View File

@ -0,0 +1,11 @@
--- src/Container/SALOME_ContainerManager.cxx.orig 2023-07-03 21:24:41 UTC
+++ src/Container/SALOME_ContainerManager.cxx
@@ -64,6 +64,8 @@
#include "PaCOPP.hxx"
#endif
+#include <sys/wait.h> // for WEXITSTATUS
+
const int SALOME_ContainerManager::TIME_OUT_TO_LAUNCH_CONT=60;
const char *SALOME_ContainerManager::_ContainerManagerNameInNS =

View File

@ -0,0 +1,11 @@
--- src/DSC/DSC_User/Datastream/Calcium/fortoc.h.orig 2023-07-03 21:45:58 UTC
+++ src/DSC/DSC_User/Datastream/Calcium/fortoc.h
@@ -23,7 +23,7 @@
/* Operateur de concatenation */
#define _(A,B) A##B
-#if defined __linux || defined __APPLE__
+#if defined __linux || defined __FreeBSD__ || defined __APPLE__
#define F_FUNC(lname,uname) _(lname,_) /* Fortran function name */
#define F_CALL(lname,uname) _(lname,_) /* Fortran function call */
#define STR_PSTR(str) char *str /* fortran string arg pointer */

View File

@ -0,0 +1,20 @@
--- src/Launcher/SALOME_ExternalServerLauncher.cxx.orig 2023-07-03 21:31:03 UTC
+++ src/Launcher/SALOME_ExternalServerLauncher.cxx
@@ -40,6 +40,8 @@
#include <memory>
#include <functional>
+#include <sys/param.h>
+
const char SALOME_ExternalServerLauncher::NAME_IN_NS[]="/ExternalServers";
unsigned SALOME_ExternalServerLauncher::CNT = 0;
@@ -62,7 +64,7 @@ class ChdirRAII
{
public:
#ifndef WIN32
- ChdirRAII(const std::string& wd):_wd(wd) { if(_wd.empty()) return ; char *pwd(get_current_dir_name()); _od = pwd; free(pwd); chdir(_wd.c_str()); }
+ ChdirRAII(const std::string& wd):_wd(wd) { if(_wd.empty()) return ; char wd_[MAXPATHLEN]; getcwd(wd_, MAXPATHLEN); _od = wd_; chdir(_wd.c_str()); }
~ChdirRAII() { if(_od.empty()) return ; chdir(_od.c_str()); }
#else
ChdirRAII(const std::string& wd) : _wd(wd) {

View File

@ -0,0 +1,20 @@
--- src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx.orig 2023-07-03 21:36:43 UTC
+++ src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx
@@ -212,7 +212,7 @@ bool SALOMEDSImpl_Study::Open(const std::string& aUrl)
isASCII = true;
char* aResultPath = HDFascii::ConvertFromASCIIToHDF(aUrl.c_str());
if ( !aResultPath )
- return NULL;
+ return false;
aC_HDFUrl = new char[strlen(aResultPath) + 19];
sprintf(aC_HDFUrl, "%shdf_from_ascii.hdf", aResultPath);
delete [] (aResultPath);
@@ -234,7 +234,7 @@ bool SALOMEDSImpl_Study::Open(const std::string& aUrl)
sprintf(eStr,"Can't open file %s",aUrl.c_str());
delete [] eStr;
_errorCode = std::string(eStr);
- return NULL;
+ return false;
}
// Assign the value of the URL in the study object

View File

@ -0,0 +1,4 @@
Kernel of the Salome project.
SALOME is an open-source software that provides a generic Pre- and
Post-Processing platform for numerical simulation.

File diff suppressed because it is too large Load Diff