--- salome-kernel-6.5.0.orig/debian/README.Debian.html +++ salome-kernel-6.5.0/debian/README.Debian.html @@ -0,0 +1,59 @@ +Debian Salomé package + +

Debian Salomé Package

By Adam Powell
+Last updated October 13, 2010 for version 5.1.3-11
+ +

Salomé is an amazing CAD program, mesher frontend, and general simulation + pre- and post-processor. Debian packaging is organized as follows:

+ + + +

Salomé components communicate using CORBA, and specifically, the omniORB + object request broker (ORB). This allows the different components to run in + different processes, and on different machines across a network when + necessary.

+ +

To run Salomé, use the menu, or type runSalome --gui at the prompt. + There are a lot + of command line options, such as specifying which modules to load, and + --killall kills processes left over from the previous run before + starting a new one. The command killSalome kills all Salomé and + related omniORB processes.

+ +

The package runs well, but could use a few updates at some + point:

+ + +Share and enjoy! + --- salome-kernel-6.5.0.orig/debian/changelog +++ salome-kernel-6.5.0/debian/changelog @@ -0,0 +1,402 @@ +salome-kernel (6.5.0-7ubuntu2) trusty; urgency=medium + + * No-change rebuild for libopenmpi1.3 -> libopenmpi1.6 transition. + + -- Logan Rosen Mon, 16 Dec 2013 17:06:34 -0500 + +salome-kernel (6.5.0-7ubuntu1) trusty; urgency=low + + * Resolve FTBFS (LP: #1255693): + - Patch CMake definitions to use multiarch lib locations during + configuration (passing --with-boost in d/rules is insufficient + since the CMake files are hardcoded to use specific paths); + - Add missing -lpthread to LIBADD for ld --as-needed. + + -- Daniel T Chen Mon, 02 Dec 2013 16:29:48 -0500 + +salome-kernel (6.5.0-7) unstable; urgency=low + + * Fix FTBFS with new boost (closes: #720646). Thanks to Christophe Trophime + for the patch! + + -- Julien Cristau Wed, 02 Oct 2013 11:16:26 +0200 + +salome-kernel (6.5.0-6) unstable; urgency=low + + * Allow finding libpython in a multiarch dir. + * Fix cppunit check for multiarch. + * Upload to unstable. + + -- Julien Cristau Fri, 19 Jul 2013 12:00:32 +0200 + +salome-kernel (6.5.0-5) experimental; urgency=low + + * Make check_cas.m4 behave the same on bsd and hurd as on linux (in + particular, look for oce headers). This should help building salome-gui + there. + + -- Julien Cristau Thu, 20 Dec 2012 11:21:08 +0100 + +salome-kernel (6.5.0-4) experimental; urgency=low + + * One more attempt at fixing the build on non-Linux. + + -- Julien Cristau Thu, 20 Sep 2012 16:30:32 +0200 + +salome-kernel (6.5.0-3) experimental; urgency=low + + * Fix runSalome with multiple arguments (thanks, Paul Rascle). + * Add a debug package. + + -- Julien Cristau Wed, 12 Sep 2012 18:10:34 +0200 + +salome-kernel (6.5.0-2) experimental; urgency=low + + * Fix a bunch of unsafe /tmp usage issues (closes: #682124). + * Set MACHINE on non-Linux. + * Fix a valgrind error + * Fix a bug in CHECK_CAS macro + + -- Julien Cristau Wed, 01 Aug 2012 14:00:59 +0200 + +salome-kernel (6.5.0-1) experimental; urgency=low + + * New upstream release (closes: #678100). + * Split salome source package into smaller modules. + + -- Julien Cristau Thu, 21 Jun 2012 11:03:26 +0200 + +salome (5.1.3-13) unstable; urgency=low + + * Replace sip4 with python-sip-dev in Build-Depends (closes: #611095). + * Replace texlive-latex-base with doxygen-latex in Build-Depends-Indep; note + build-arch still requires plain doxygen without latex (closes: #616278). + + -- "Adam C. Powell, IV" Sun, 10 Apr 2011 17:08:07 -0400 + +salome (5.1.3-12) unstable; urgency=low + + * Moved graphviz from Build-Depends-Indep to Build-Depends since YACS needs + it (closes: #601712). + * Separated salome-examples /usr/share/salome files into separate package + salome-examples-common without pycentral (closes: #602217). + * Removed salome-test from, and added salome-dev to, dh_pyshared list. + + -- "Adam C. Powell, IV" Sun, 21 Nov 2010 21:39:21 -0500 + +salome (5.1.3-11) unstable; urgency=low + + [ Denis Barbier ] + * Replaced csh-style >& redirects with 2>&1 for dash (closes: #593656). + * Added library version to StdPlugin plugin (closes: #593657). + * Added debian/patches/quiltrc and refreshed patches to follow its style. + * Added refresh-patches target to debian/rules. + * Removed CSF_GraphicShr definition from runSalome, should permit removal of + libopencascade-visualization-dev from salome Depends (closes: #595092). + + [ Adam C. Powell, IV ] + * Reorganization of binary packages (closes: #584590). + * Removed obsolete build-in-tree patches. + * Moved RECONFIGURE step to reconfigure-stamp target, simplifying + build-indep-stamp target (no longer requires build-arch-stamp). + * Stamps for each module (and docs) allow build targets to skip modules + already done. + * Build documentation in a separate tree and break out separate targets to + avoid remove-build race conditions (closes: #595260, #598916). + * Ignore -fix-clean patches because we don't use upstream's clean targets any + more, though the patches may still be useful to upstream. + * Added XDATA module, in the -dev package. + * Moved graphviz back from Build-Depends to Build-Depends-Indep. + * Created directories /usr/share/salome/MODULE_SRC with full adm_local and + salome_adm directories (closes: #595909). + * Have YACS configure fail without doxygen, it's required for -arch as well + as -indep builds. + * Fixed executable path in MED_Factory.cxx (closes: #598480). + * Added conditionals to prevent empty LD_LIBRARY_PATH segments and arbitrary + code execution (closes: #598421) - CVE-2010-3377 . + * Modified GEOM idl Makefile.am and added .NOTPARALLEL: to XDATA directories + to prevent code generation/compilation race (closes: #595281, #598772). + * Got rid of all extra copies of xversion.py so one and only one is installed + (closes: #598690). + * Use a patch to remove XDATA generated files so clean restores the original + tree. + * Fixed a bunch of lintian warnings. + * Significant documentation updates including a doc-base entry for salome-doc. + + [ Alain Leufroy ] + * Patched salomeloader to use the full Salomé PYTHONPATH (closes: #597739). + + -- "Adam C. Powell, IV" Wed, 13 Oct 2010 10:13:20 -0400 + +salome (5.1.3-10) unstable; urgency=low + + [ Denis Barbier ] + * Fix a missing include in KERNEL causing FTBFS when built with LAM. + * Change PPC to PPCurve to avoid PPC macro on PPC arch (closes: #585615). + * Reconstructed the clean target to remove auto-generated files. + * Build in a separate build directory to simplify cleaning. + * Add AM_MAINTAINER_MODE to all configure.ac files and configure with + --disable-maintainer-mode. + * Add --disable-dependency-tracking to configure flags. + * Properly install hxx2salome files into bindir. + * Put _lib*_Swig.so files into python library, not libdir. + + [ Adam C. Powell, IV ] + * Make salome-dev conflict with old libsalome-dev package (closes: #585837). + * Rebulid using new default python version (closes: #587387). + * Changed whrandom to random in kernel python files (closes: #588728). + * Changed doc image formats from jpg to svg (closes: #585050). + * Reinstated the -doc package with only usr_docs for now. + * Combined reconfigure, configure and build targets, with configure, + build-arch & install-arch in one loop. + * Added make install to build-indep target. + * Deactivated -build-in-tree patches because they're no longer needed. + * Added -debian-dirs patches to check for binaries in the right places. + * Remove build tree to save disk space during build. + * Fixed new compilation bugs in YACS module (stricter compiler behavior?). + * Changed all Python versions to 2.6. + * Bumped Standards-Version. + + [ Christophe Trophime ] + * Force Qt tools (moc, uic, rcc, lrelease) to the right major version. + + -- "Adam C. Powell, IV" Tue, 10 Aug 2010 15:00:41 -0400 + +salome (5.1.3-9) unstable; urgency=low + + [ Denis Barbier ] + * Removed contrib from package sections, as it dates to long-past times when + Open CASCADE was non-free (closes: #584171). + * Added patch-stamp target to make sure patches apply before configure + (closes: #584285). + * Abort in clean target if quilt pop fails. + * Abort when a module cannot be configured, built or installed. + * Added Vcs fields to control file. + * Added libqt4-opengl-dev to Build-Depends. + + [ Andre Espaze ] + * Adding TOOLSGUI to GUI_LDFLAGS for building VISU, added it back into the + modules list. + * Explicitly exporting GetIDMapper template to avoid linker problems with g++ + optimizations (closes: #584172). + + [ Adam C. Powell, IV ] + * Changed the "chmod -x" command the python directory to only include .py + files and shared libraries. + * Changed bindir to /usr/lib/salome/bin and libdir to /usr/lib/salome/lib to + avoid collisions with other packages (closes: #584124). + * Added Py back to python Salome_Container to remove conflict between + python2.5-salome and salome packages. + * Moved doxygen and graphviz from Build-Depends-Indep to Build-Depends. + * Fixed documentation install targets to not build documentation. + * Added usr_docs target for MED module. + * Updated README.Debian.html. + * Merged salome, libsalome5.1.3-0, python2.5-salome packages, and .so shared + library symlinks from libsalome-dev into salome package (closes: #584586). + * Changed name of the remainder of libsalome-dev to salome-dev, with about 13 + MiB of headers and other development files useless to end users. + * Added Build-Conflicts with libsalome-dev, and salome binary package + Conflicts with libsalome-dev and python2.5-salome, and removed salome + dependency on those two. + * Added lintian override for uploader Adam Powell's name. + + -- Adam C. Powell, IV Thu, 10 Jun 2010 03:59:38 -0400 + +salome (5.1.3-8) unstable; urgency=low + + * Removed the salome-doc binary package to cut disk space use dramatically. + * Moved SALOME_ContainerPy.py back to /usr/bin and dropped the Py.py ending. + * Moved SALOME_Container and other python scripts to python2.5-salome. + * Made python2.5-salome conflict with old salome because of this. + * Stripped .sh from shell script file names in /usr/bin . + + -- Adam C. Powell, IV Fri, 07 May 2010 07:18:21 -0400 + +salome (5.1.3-7) unstable; urgency=low + + * Added quilt Build-Dependency. + + -- Adam C. Powell, IV Tue, 27 Apr 2010 22:24:48 -0400 + +salome (5.1.3-6) unstable; urgency=low + + [ Andre Espaze ] + * Added libsalome-dev dependency to salome, as it's necessary for now. + * Added LD_LIBRARY_PATH setting to runSalome.in. + + [ Gerber van der Graaf ] + * Menu entry in salome.menu file. + + [ Adam C. Powell, IV ] + * Removed modules: VISU doesn't build, SIERPINSKY depends on it, NETGENPLUGIN + but requires significant updates to work with Debian's 4.9.x package. + * Revamped rules so build-arch/install-arch/binary-arch doesn't do all of the + documentation building. + * Un-did some of Andre's changes regarding python file permissions and .awk + and .tgz file locations. + * New salome.desktop file for Applications menu entry. + * Added quilt pop -a and removal of .pc to debian/rules clean target. + * Added libopencascade-visualization-dev dependency to salome. + * Patched runSalome.py to not require executable .py files. + * Changed to omniidl[-python] Build-Dep reflecting unstable name change. + * Changed control file encoding to UTF-8. + * First upload (closes: #457075). + + -- Adam C. Powell, IV Sun, 25 Apr 2010 22:42:28 -0400 + +salome (5.1.3-5) unstable; urgency=low + + * Python 2.5/2.6 installation flexibility to build on Ubuntu Karmic. + * New modules: NETGENPLUGIN, YACS, MULTIPR, LIGHT, PYLIGHT. + * Started module XDATA, need to finish fixing very broken clean target. + * Generalize MPI usage away from OpenMPI-only. + * Fixed the runSalome script UnitsAPI directory location, added DISABLE_FPE=1 + so the GEOM module works properly, and added new module root dirs. + * Fixed the killSalome script by making it config-able. + * Updated install target in rules. + * Changed salome-common dependency on salome to Recommends. + * Removed .la files from -dev package. + * Added ${misc:Depends} to all package dependencies. + * Corrected debhelper and python-central Build-Depends etc. + * Bumped Standards-Version. + + -- Adam C. Powell, IV Thu, 04 Mar 2010 12:04:18 -0500 + +salome (5.1.3-4) unstable; urgency=low + + * Team maintenance by debian-science. + * Complete source code copyright audit by Gerber van der Graaf, updated + copyright and included all of his analysis in the copyright-audit + directory. + * New modules: COMPONENT, CALCULATOR, PYCALCULATOR, SIERPINSKY. + * Started module NETGENPLUGIN, need libnetgen-dev B-D and possibly patches. + * Tell salome about new VTK 5.4. + * Fixed Makefile clean targets so the tree goes back to its original state. + * Updated OpenCascade detection to include data files. + + -- Adam C. Powell, IV Sun, 21 Feb 2010 10:06:09 -0500 + +salome (5.1.3-3) unstable; urgency=low + + * New modules: RANDOMIZER, HELLO, PYHELLO, VISU, SMESH. + * All patches are now upstream-ready except kernel-mpi-libs which is + Debian-specific. + + -- Adam C. Powell, IV Sun, 24 Jan 2010 12:31:11 -0500 + +salome (5.1.3-2) unstable; urgency=low + + * New modules: GUI, GEOM, MED. + * Lots of new patches and Build-Depends! + * Removed patch-stamp and unpatch targets since source format 3.0 takes care + of that. + + -- Adam C. Powell, IV Sun, 10 Jan 2010 14:17:29 -0500 + +salome (5.1.3-1) unstable; urgency=low + + * New upstream release. + * Starting simple -- just builds two modules for now. + * Switch to dpkg-source 3.0 (quilt) format. + * Bumped Standards-Version. + * Changed approach to HDF5/MPI linkage. + * Started backporting patches -- thankfully some are already in upstream. + + -- Adam C. Powell, IV Wed, 06 Jan 2010 21:09:02 -0500 + +salome (3.2.6-7) unstable; urgency=low + + * Fixed sip by a QT_VERS change. + * Fixed netgen plugin link directory problem. + * Added automake to xdata configure target. + * Using python-central properly for python2.4-salome and salome-xdata. + * Lots of cleanups inspired by lintian. + + -- Adam C. Powell, IV Sun, 13 Apr 2008 23:05:38 -0400 + +salome (3.2.6-6) unstable; urgency=low + + * OmniORB 4.1.x port has no known build bugs now (thanks: Thomas Girard). + * Added build-deps python-qt-dev, sip4, python-sip4-dev, and libvtk5-qt3-dev. + * Created Build-Conflicts against other MPI implementations. + + -- Adam C. Powell, IV Fri, 07 Mar 2008 07:50:49 -0500 + +salome (3.2.6-5) unstable; urgency=low + + * New patch porting to omniORB 4.1.x (thanks: Thomas Girard). + + -- Adam C. Powell, IV Fri, 29 Feb 2008 10:47:13 -0500 + +salome (3.2.6-4) unstable; urgency=low + + * Added NETGENPLUGIN module (required considerable hacking). + * Changed libdev package to arch all because it is. + * Concatenated .m4 files into salome.m4 for libdev package. + * Moved IDL files to /usr/share/idl/salome. + * Added new salome-xdata package. + * Added examples package with content from SAMPLES directory. + * Added more inter-package dependencies. + * Added the CASROOT valiable and three derivatives to the runSalome script. + * A new README.Debian.html file explains the package and gives a TODO list. + * Added bindir=/usr/bin to avoid having stuff in /usr/bin/salome. + * Removed the $bindir/appliskel and $bindir/styles directories. + * Removed executable bit on xdata .png and .qm resources files. + * New docs generated by "make usr_docs" and "make dev_docs". + + -- Adam C. Powell, IV Fri, 25 Jan 2008 08:51:52 -0500 + +salome (3.2.6-3) unstable; urgency=low + + * Ported the VISU and SMESH modules to VTK 5. + * Completed packaging for the VISU and SMESH modules. + * Removed the GetPropagationSource() method from the StdMeshers_Propagation + class because it causes a link relocation error (why??). + * Added gfortran and libboost-signals-dev to Build-Depends. + * Completed building of packages conforming to FHS standard. + * Added _ROOT_DIR and PYTHONPATH variables to runSalome script. + * Made a link /usr/bin/runSalome to /usr/bin/salome/runSalome. + * Added a salome-common package for the resources. + + -- Adam C. Powell, IV Fri, 18 Jan 2008 16:11:23 -0500 + +salome (3.2.6-2) unstable; urgency=low + + * Patched KERNEL OpenCASCADE, MPI and HDF5 .m4 files for Debian. + * Fixed many C++ headers to include hdf5 without extern "C", and before med. + * Hacked KERNEL_SRC_3.2.6/src/Communication/SALOME_Comm_i.hxx to + include missing #defines needed by ios_base.h (is this a compiler bug?). + * Set libdir=/usr/lib. + * Added general packaging for all of the modules. + * Omitting NETGENPLUGIN for now because interface seems to have changed. + * Omitting GHS3DPLUGIN because it is non-free. + * Patched all modules' missing DESTDIR support. + * Fixed all modules' deprecated file references. + * Removed all modules' extraneous aclocal.m4 target dependencies. + * Fixed several modules' incorrect KERNEL IDL directory settings. + * Fixed all modules' erroneous creation of salome_adm directories, which + prevents the proper link from forming. + * Removed modules' copying adm_local to builddir because we build in place. + * Hacked GUI, GEOM and SMESH modules' check functions so configuring all + modules before building them all works. + * Fixed MED, RANDOMIZER and VISU modules' check functions. + * Patched modules so they can include headers and link to libs in place. + * Fixed executables' linking to properly use libtool --mode=link. + * Fixed modules' makefiles to install to proper libdir. + * Ported GUI module to VTK 5 and sip 4.7. + * Added missing sources explicitly to Makefile.in to get around a make bug. + * Fixed MED for Debian libmed-dev compatibility and header completeness. + * Added KERNEL variables to the PY* modules' makefiles. + + -- Adam C. Powell, IV Fri, 18 Jan 2008 00:27:05 -0500 + +salome (3.2.6-1) unstable; urgency=low + + * First Debianization of Salomé. + * Needs to use MPI prefix for HDF5 prefix because HDF5 test comes first + (i.e. upstream assumes that HDF5 is independent of MPI). + * Patches configure to include -lmpi++ in MPI_LIBS and properly specify + the Debian location of OpenCASCADE headers. + + -- Adam C. Powell, IV Tue, 08 Jan 2008 15:52:23 -0500 + --- salome-kernel-6.5.0.orig/debian/compat +++ salome-kernel-6.5.0/debian/compat @@ -0,0 +1 @@ +7 --- salome-kernel-6.5.0.orig/debian/control +++ salome-kernel-6.5.0/debian/control @@ -0,0 +1,108 @@ +Source: salome-kernel +Section: science +Priority: extra +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Science Maintainers +Uploaders: "Adam C. Powell, IV" , Julien Cristau +Standards-Version: 3.9.1 +Build-Depends: + debhelper (>= 7), + quilt, + autoconf, + automake, + libtool, + gfortran, + flex, + bison, + python, + python-dev, + python-support, + python-numpy, + swig, + libboost-dev, + libboost-thread-dev, + libboost-signals-dev, + libboost-system-dev, + libboost-regex-dev, + libxml2-dev, + mpi-default-dev, + libhdf5-mpi-dev | libhdf5-dev, + omniidl, + libomniorb4-dev (>= 4.1.0), + libomnithread3-dev, + libcos4-dev, + python-omniorb, + omniidl-python, + libcppunit-dev, + graphviz, + doxygen, + dpkg-dev (>= 1.16.0~), +#Build-Depends-Indep: doxygen-latex, python-docutils, python-sphinx +Build-Conflicts: libsalome-dev +XS-Python-Version: >= 2.6 +Homepage: http://www.salome-platform.org/ +Vcs-Browser: http://git.debian.org/?p=debian-science/packages/salome-kernel.git;a=summary +Vcs-Git: git://git.debian.org/git/debian-science/packages/salome-kernel + +Package: salome-kernel +Architecture: any +Section: science +Depends: + omniorb-nameserver, + python-omniorb, + procps, + net-tools, + ${python:Depends}, + ${shlibs:Depends}, + ${misc:Depends}, +Suggests: salome-extras, salome-doc, salome-examples +Breaks: + salome (<< 6.5), +Replaces: + salome (<< 6.5) +Description: Numerical simulation pre- and post-processor + Salomé is a pre- and post-processor for numerical simulations. It can import + CAD files in IGES and STEP formats, facilitates component integration in + heterogeneous systems, and has a user-friendly GUI as well as a Python console + with all of the platform functionality. + . + This package contains the Salomé core runtime binaries, private libraries, and + python files comprising a basic Salomé installation. + +Package: salome-kernel-dev +Architecture: any +Section: devel +Depends: salome-kernel (= ${binary:Version}), ${shlibs:Depends}, ${python:Depends}, ${misc:Depends} +Conflicts: libsalome-dev, libsalome5.1.3-0, python2.5-salome, salome (<< 5.1.3-11) +Description: Numerical simulation pre- and post-processor development files + Salomé is a pre- and post-processor for numerical simulations. It can import + CAD files in IGES and STEP formats, facilitates component integration in + heterogeneous systems, and has a user-friendly GUI as well as a Python console + with all of the platform functionality. + . + This package contains the Salomé header files, IDL files, and .m4 files. + +Package: salome-kernel-doc +Architecture: all +Section: doc +Description: Numerical simulation pre- and post-processor documentation + Salomé is a pre- and post-processor for numerical simulations. It can import + CAD files in IGES and STEP formats, facilitates component integration in + heterogeneous systems, and has a user-friendly GUI as well as a Python console + with all of the platform functionality. + . + This package contains the documentation for the Salomé KERNEL module + documentation. + +Package: salome-kernel-dbg +Architecture: any +Priority: extra +Section: debug +Depends: salome-kernel (= ${binary:Version}), ${shlibs:Depends}, ${python:Depends}, ${misc:Depends} +Description: Numerical simulation pre- and post-processor debug symbols + Salomé is a pre- and post-processor for numerical simulations. It can import + CAD files in IGES and STEP formats, facilitates component integration in + heterogeneous systems, and has a user-friendly GUI as well as a Python console + with all of the platform functionality. + . + This package contains the Salomé KERNEL debugging symbols. --- salome-kernel-6.5.0.orig/debian/copyright +++ salome-kernel-6.5.0/debian/copyright @@ -0,0 +1,29 @@ +Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat +Debianized-By: Adam C. Powell, IV +Debianized-Date: Tue, 08 Jan 2008 15:52:23 -0500 +Upstream-Author: OpenCASCADE S.A.S. +Original-Source: http://www.salome-platform.org/ + +Files: * +Copyright: 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN + 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +License: LGPL-2.1 + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License. + . + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + . + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + . + See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + . + On Debian systems, the complete text of the GNU Lesser General Public License + Version 2.1 (LGPL-2.1) can be found in file + "/usr/share/common-licenses/LGPL-2.1". --- salome-kernel-6.5.0.orig/debian/envProducts.sh.in +++ salome-kernel-6.5.0/debian/envProducts.sh.in @@ -0,0 +1,140 @@ +#!/bin/sh +# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# ------------------------------------------------ +# ---- openpbs +# +export OPENPBS=/optroot/openpbs2316 +export PATH=${OPENPBS}/bin:${PATH} +export LD_LIBRARY_PATH=${OPENPBS}/lib:${LD_LIBRARY_PATH} + +#------------------------------------------------------------------------------ + +export INSTALL_ROOT=/home/prascle/PAL_SALOME141 +#------ gcc ------ +export GCC_ROOT=/usr +export CXX=${GCC_ROOT}/bin/g++ +export CC=${GCC_ROOT}/bin/gcc +## +#------ boost ------ +export BOOSTDIR=${INSTALL_ROOT}/boost-1.30.2 +## + +#------ tcltk ------ +export TCLHOME=/usr + +#------ Python ------ +export PYTHONHOME=/usr +export PYTHONPATH=${PYPACKAGES}:${PYTHONPATH} +## +#------ Qt ------ +#export QTDIR=/usr/lib/qt-3.0.5 +export QTDIR=/usr/lib/qt3-gcc3.2 +export PATH=${PATH}:${QTDIR}/bin +export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${QTDIR}/lib +## +#------ Sip ------ +export SIPDIR=/usr +export PYQTDIR=/usr +## +#------ PyQt ------ +export PYQT_SIPS=/usr/share/sip/qt +export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/python2.2/site-packages +## +#------ Swig ------ +export SWIG_ROOT=${INSTALL_ROOT}/SWIG-1.3.17 +export PATH=${SWIG_ROOT}/bin:${PATH} +export LD_LIBRARY_PATH=${SWIG_ROOT}/lib:${LD_LIBRARY_PATH} +## +#------ OpenCascade ------ +export CASROOT=@CASROOT@ +export LD_LIBRARY_PATH=@CAS_LIBDIR@:${LD_LIBRARY_PATH} +export PATH=${CASROOT}/Linux/bin:${PATH} +# Variable for Foundation Classes : +export CSF_UnitsLexicon=${CASROOT}/src/UnitsAPI/Lexi_Expr.dat +export CSF_UnitsDefinition=${CASROOT}/src/UnitsAPI/Units.dat +# Variable for DataExchange : +export CSF_SHMessage=@CAS_DATADIR@/src/SHMessage +export CSF_XSMessage=@CAS_DATADIR@/src/XSMessage +# Variable for Font : +export CSF_MDTVFontDirectory=@CAS_DATADIR@/src/FontMFT +export CSF_MDTVTexturesDirectory=@CAS_DATADIR@/src/Textures +## +export CSF_LANGUAGE=us +export MMGT_CLEAR=1 +export CSF_EXCEPTION_PROMPT=1 +export CSF_StandardDefaults=@CAS_DATADIR@/src/StdResource +export CSF_PluginDefaults=@CAS_DATADIR@/src/StdResource +export CSF_XCAFDefaults=@CAS_DATADIR@/src/StdResource +export CSF_GraphicShr=@CAS_LIBDIR@/libTKOpenGl.so +export CSF_IGESDefaults=@CAS_DATADIR@/src/XSTEPResource +export CSF_STEPDefaults=@CAS_DATADIR@/src/XSTEPResource +## +#export TCLLIBPATH=$TCLHOME/lib +## +#------ Qwt ------ +export QWTHOME=${INSTALL_ROOT}/qwt-0.4.1 +export LD_LIBRARY_PATH=${QWTHOME}/lib:${LD_LIBRARY_PATH} +## +#------ Hdf ------ +export HDF5HOME=${INSTALL_ROOT}/hdf5-1.4.4 +export PATH=${HDF5HOME}/bin:$PATH +export LD_LIBRARY_PATH=${HDF5HOME}/lib:${LD_LIBRARY_PATH} +## +#------ Med ------ +export MED2HOME=/opt/med2.2.2 +export PATH=${MED2HOME}/bin:${PATH} +export LD_LIBRARY_PATH=${MED2HOME}/lib:${LD_LIBRARY_PATH} +## +#------ Vtk ------ +export VTKHOME=${INSTALL_ROOT}/VTK-4.2.2 +export PATH=${VTKHOME}/bin:${PATH} +export LD_LIBRARY_PATH=${VTKHOME}/lib/vtk:${LD_LIBRARY_PATH} +export PYTHONPATH=${VTKHOME}/lib/vtk:${VTKHOME}/lib/python2.2/site-packages/vtk_python:${PYTHONPATH} +## +#------ netgen ------ +export NETGENROOT=${INSTALL_ROOT}/netgen4.3 +export NETGEN_HOME=${INSTALL_ROOT}/netgen4.3 +## +#------ OmniORB ------ +export OMNIORBDIR=${INSTALL_ROOT}/omniORB-3.0.5 +export OMNIORB_CONFIG=${OMNIORBDIR}/.omniORB.cfg +export PYTHONPATH=${OMNIORBDIR}/lib/python:${OMNIORBDIR}/lib/i586_linux_2.0_glibc2.1:${PYTHONPATH} +export PATH=$OMNIORBDIR/bin/i586_linux_2.0_glibc2.1:$PATH +export LD_LIBRARY_PATH=$OMNIORBDIR/lib/i586_linux_2.0_glibc2.1:$LD_LIBRARY_PATH +## +#------ Numeric ------ +export PYTHONPATH=${INSTALL_ROOT}/Numeric-22.0/lib/python2.2/site-packages/Numeric:${PYTHONPATH} +## +#------ HappyDoc ------ +export PATH=${INSTALL_ROOT}/HappyDoc-r2_1/bin:${PATH} +export PYTHONPATH=${INSTALL_ROOT}/HappyDoc-r2_1/lib/python2.2/site-packages:${PYTHONPATH} +## +#------ Doxygen ------ +export PATH=${INSTALL_ROOT}/doxygen-1.3-rc2/bin:${PATH} +## +#------ Graphviz ------ +export PATH=${INSTALL_ROOT}/graphviz-1.9/bin:${PATH} +export LD_LIBRARY_PATH=${INSTALL_ROOT}/graphviz-1.9/lib/graphviz:${LD_LIBRARY_PATH} +## + +#------------------------------------------------------------------------------ --- salome-kernel-6.5.0.orig/debian/killSalome.in +++ salome-kernel-6.5.0/debian/killSalome.in @@ -0,0 +1,7 @@ +#!/bin/sh + +export prefix=@prefix@ +export SALOME_PYTHON_DIR=/usr/lib/salome/bin +export PYTHONPATH=$PYTHONPATH:@pythondir@/omniORB:${SALOME_PYTHON_DIR} + +python ${SALOME_PYTHON_DIR}/killSalome.py --- salome-kernel-6.5.0.orig/debian/patches/kernel-Basics_DirUtils-use-mkstemp-on-unix.patch +++ salome-kernel-6.5.0/debian/patches/kernel-Basics_DirUtils-use-mkstemp-on-unix.patch @@ -0,0 +1,80 @@ +From ec037ab63ca405433f95e649fc0857e4b13f77c9 Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Tue, 24 Jul 2012 17:38:51 +0200 +Subject: [PATCH 09/16] Basics_DirUtils: use mkdtemp on unix + +--- + src/Basics/Basics_DirUtils.cxx | 32 ++++++++++++++++++++++---------- + 1 files changed, 22 insertions(+), 10 deletions(-) + +Index: KERNEL_SRC_6.5.0/src/Basics/Basics_DirUtils.cxx +=================================================================== +--- KERNEL_SRC_6.5.0.orig/src/Basics/Basics_DirUtils.cxx ++++ KERNEL_SRC_6.5.0/src/Basics/Basics_DirUtils.cxx +@@ -22,9 +22,10 @@ + // Module : SALOME + // + #include "Basics_DirUtils.hxx" +-#include ++#include + #include +-#include ++#include ++#include + + #ifndef WIN32 + # include +@@ -69,9 +70,26 @@ namespace Kernel_Utils + std::string GetTmpDirByPath( const std::string& tmp_path ) + { + std::string aTmpDir = tmp_path; +- if ( aTmpDir == "" ) ++#ifndef WIN32 ++ char *tmp; ++ std::string aDir; ++ if (aTmpDir == "") + { +-#ifdef WIN32 ++ aTmpDir = std::string("/tmp/"); ++ } ++ ++ if (aTmpDir[aTmpDir.size()-1] != '/') ++ aTmpDir += '/'; ++ ++ aTmpDir+= "XXXXXX"; ++ tmp = strdup(aTmpDir.c_str()); ++ if (!tmp) ++ abort(); ++ aDir = mkdtemp(tmp); ++ free(tmp); ++ return aDir + _separator_; ++#else ++ if (aTmpDir == "") { + char *Tmp_dir = getenv("TEMP"); + if( Tmp_dir == NULL ) + { +@@ -83,9 +101,6 @@ namespace Kernel_Utils + } + else + aTmpDir = std::string(Tmp_dir); +-#else +- aTmpDir = std::string("/tmp/"); +-#endif + } + + if(aTmpDir[aTmpDir.size()-1] != _separator_) +@@ -111,13 +126,10 @@ namespace Kernel_Utils + + if(aDir[aDir.size()-1] != _separator_) aDir += _separator_; + +-#ifdef WIN32 + CreateDirectory(aDir.c_str(), NULL); +-#else +- mkdir(aDir.c_str(), 0x1ff); +-#endif + + return aDir; ++#endif + } + + //============================================================================ --- salome-kernel-6.5.0.orig/debian/patches/kernel-Fix-CHECK_CAS-autoconf-macro-to-look-for-libs-in-the.patch +++ salome-kernel-6.5.0/debian/patches/kernel-Fix-CHECK_CAS-autoconf-macro-to-look-for-libs-in-the.patch @@ -0,0 +1,30 @@ +From be240864411b2a27a54f071cf0c36d5c564a2707 Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Tue, 31 Jul 2012 10:46:30 +0200 +Subject: [PATCH 1/2] Fix CHECK_CAS autoconf macro to look for libs in the right place + +--- + salome_adm/unix/config_files/check_cas.m4 | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/salome_adm/unix/config_files/check_cas.m4 b/salome_adm/unix/config_files/check_cas.m4 +index 7646fd3..6daed05 100755 +--- a/salome_adm/unix/config_files/check_cas.m4 ++++ b/salome_adm/unix/config_files/check_cas.m4 +@@ -240,11 +240,11 @@ else + CAS_OCAF="$CAS_LDPATH -lPTKernel -lTKernel -lTKCDF -lTKLCAF -lTKPCAF -lTKStdSchema" + CAS_OCAFVIS="$CAS_LDPATH -lTKCAF -lTKPLCAF -lTKPShape -lTKStdLSchema -lTKShapeSchema" + +- if test -f $CASROOT/$casdir/lib/libStdPlugin.so ; then ++ if test -f $CAS_LIBDIR/libStdPlugin.so ; then + # standard plugin library libStdPlugin has been added in CASCADE 5.2.3 + CAS_STDPLUGIN="StdPlugin" + CAS_OCAFVIS="$CAS_OCAFVIS -lStdPlugin -lStdLPlugin" +- elif test -f $CASROOT/$casdir/lib/libTKStdSchema.so ; then ++ elif test -f $CAS_LIBDIR/libTKStdSchema.so ; then + # standard plugin has been renamed in CASCADE 6.5 + CAS_STDPLUGIN=TKStdSchema + CAS_OCAFVIS="$CAS_OCAFVIS -lTKStdSchema -lTKStdLSchema" +-- +1.7.2.5 + --- salome-kernel-6.5.0.orig/debian/patches/kernel-HDFPersist-HDFascii-use-mkdtemp-in-copy-of-GetTmpDir.patch +++ salome-kernel-6.5.0/debian/patches/kernel-HDFPersist-HDFascii-use-mkdtemp-in-copy-of-GetTmpDir.patch @@ -0,0 +1,65 @@ +From 7aa2fd913a8cd5c6ce58c78c1f20fd1d6db77515 Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Wed, 25 Jul 2012 16:19:50 +0200 +Subject: [PATCH 14/16] HDFPersist/HDFascii: use mkdtemp in copy of GetTmpDir + +--- + src/HDFPersist/HDFascii.cc | 16 ++++++++++------ + 1 files changed, 10 insertions(+), 6 deletions(-) + +diff --git a/src/HDFPersist/HDFascii.cc b/src/HDFPersist/HDFascii.cc +index cc08ea9..48ec900 100755 +--- a/src/HDFPersist/HDFascii.cc ++++ b/src/HDFPersist/HDFascii.cc +@@ -56,7 +56,7 @@ void SaveAttributeInASCIIfile(HDFattribute *hdf_attribute, FILE* fp, int ident); + void SaveGroupInASCIIfile(HDFgroup *hdf_group, FILE* fp, int ident); + void SaveDatasetInASCIIfile(HDFdataset *hdf_dataset, FILE* fp, int ident); + +-std::string GetTmpDir(); ++static std::string GetTmpDir(); + char* makeName(char* name); + char* restoreName(char* name); + void write_float64(FILE* fp, hdf_float64* value); +@@ -685,7 +685,7 @@ bool CreateAttributeFromASCII(HDFinternalObject *father, FILE* fp) + // function : GetTempDir + // purpose : Return a temp directory to store created files like "/tmp/sub_dir/" + //============================================================================ +-std::string GetTmpDir() ++static std::string GetTmpDir() + { + //Find a temporary directory to store a file + std::string aTmpDir; +@@ -702,6 +702,13 @@ std::string GetTmpDir() + #endif + } + ++#ifndef WIN32 ++ aTmpDir += "XXXXXX"; ++ Tmp_dir = strdup(aTmpDir.c_str()); ++ aTmpDir = mkdtemp(Tmp_dir); ++ free(Tmp_dir); ++ return aTmpDir + dir_separator; ++#else + srand((unsigned int)time(NULL)); + int aRND = 999 + (int)(100000.0*rand()/(RAND_MAX+1.0)); //Get a random number to present a name of a sub directory + char buffer[127]; +@@ -720,15 +727,12 @@ std::string GetTmpDir() + aDir = aTmpDir+buffer; //Build a unique directory name + } + +-#ifdef WIN32 + //fuction CreateDirectory create only final directory, but not intermediate + CreateDirectory(aTmpDir.c_str(), NULL); + CreateDirectory(aDir.c_str(), NULL); +-#else +- mkdir(aDir.c_str(), 0x1ff); +-#endif + + return aDir + dir_separator; ++#endif + } + + char* makeName(char* name) +-- +1.7.2.5 + --- salome-kernel-6.5.0.orig/debian/patches/kernel-Kill-more-copies-of-GetTmpDir.patch +++ salome-kernel-6.5.0/debian/patches/kernel-Kill-more-copies-of-GetTmpDir.patch @@ -0,0 +1,273 @@ +From 8bea16e84b966e89cc084df675afca79c7e4cfbe Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Wed, 25 Jul 2012 17:20:16 +0200 +Subject: [PATCH 15/16] Kill more copies of GetTmpDir + +Note: ABI break +--- + src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx | 5 +- + src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx | 77 ++---------------------- + src/SALOMEDSImpl/SALOMEDSImpl_Tool.hxx | 6 -- + src/TOOLSDS/SALOMEDS_Tool.cxx | 63 ------------------- + src/TOOLSDS/SALOMEDS_Tool.hxx | 6 -- + 5 files changed, 8 insertions(+), 149 deletions(-) + +diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx +index d52b629..7842002 100755 +--- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx ++++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx +@@ -29,6 +29,7 @@ + #include "DF_ChildIterator.hxx" + #include "HDFexplorer.hxx" + #include "Basics_Utils.hxx" ++#include "Basics_DirUtils.hxx" + + //Warning undef of Ascii Winwows define + #ifdef WIN32 +@@ -532,7 +533,7 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const std::string& aStudyUrl, + std::string anOldName = aStudy->Name(); + + //Create a temporary url to which the study is saved +- std::string aUrl = SALOMEDSImpl_Tool::GetTmpDir() + SALOMEDSImpl_Tool::GetNameFromPath(aStudyUrl); ++ std::string aUrl = Kernel_Utils::GetTmpDir() + SALOMEDSImpl_Tool::GetNameFromPath(aStudyUrl); + + int aLocked = aStudy->GetProperties()->IsLocked(); + if (aLocked) aStudy->GetProperties()->SetLocked(false); +@@ -799,7 +800,7 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const std::string& aStudyUrl, + + // The easiest way to get a list of file in the temporary directory + +- std::string aCmd, aTmpFileDir = SALOMEDSImpl_Tool::GetTmpDir(); ++ std::string aCmd, aTmpFileDir = Kernel_Utils::GetTmpDir(); + std::string aTmpFile = aTmpFileDir +"files"; + std::string aStudyTmpDir = SALOMEDSImpl_Tool::GetDirFromPath(aUrl); + +diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx +index cb9d3e8..6b5f3b0 100755 +--- a/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx ++++ b/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx +@@ -50,84 +50,17 @@ + #endif + + ++#ifdef WIN32 + bool Exists(const std::string thePath) + { +-#ifdef WIN32 + if ( GetFileAttributes ( thePath.c_str() ) == 0xFFFFFFFF ) { + if ( GetLastError () == ERROR_FILE_NOT_FOUND ) { + return false; + } + } +-#else +- int status = access ( thePath.c_str() , F_OK ); +- if (status != 0) return false; +-#endif + return true; + } +- +- +- +- +-//============================================================================ +-// function : GetTempDir +-// purpose : Return a temp directory to store created files like "/tmp/sub_dir/" +-//============================================================================ +-std::string SALOMEDSImpl_Tool::GetTmpDir() +-{ +- //Find a temporary directory to store a file +- +- std::string aTmpDir; +- +- char *Tmp_dir = getenv("SALOME_TMP_DIR"); +- if(Tmp_dir != NULL) { +- aTmpDir = std::string(Tmp_dir); +-#ifdef WIN32 +- if(aTmpDir[aTmpDir.size()-1] != '\\') aTmpDir+='\\'; +-#else +- if(aTmpDir[aTmpDir.size()-1] != '/') aTmpDir+='/'; +-#endif +- } +- else { +-#ifdef WIN32 +- aTmpDir = std::string("C:\\"); +-#else +- aTmpDir = std::string("/tmp/"); + #endif +- } +- +- srand((unsigned int)time(NULL)); +- int aRND = 999 + (int)(100000.0*rand()/(RAND_MAX+1.0)); //Get a random number to present a name of a sub directory +- char buffer[127]; +- sprintf(buffer, "%d", aRND); +- std::string aSubDir(buffer); +- if(aSubDir.size() <= 1) aSubDir = std::string("123409876"); +- +- aTmpDir += aSubDir; //Get RND sub directory +- +- std::string aDir = aTmpDir; +- +- if(Exists(aDir)) { +- for(aRND = 0; Exists(aDir); aRND++) { +- sprintf(buffer, "%d", aRND); +- aDir = aTmpDir+buffer; //Build a unique directory name +- } +- } +- +-#ifdef WIN32 +- if(aDir[aTmpDir.size()-1] != '\\') aDir+='\\'; +-#else +- if(aDir[aTmpDir.size()-1] != '/') aDir+='/'; +-#endif +- +- +-#ifdef WIN32 +- CreateDirectory(aDir.c_str(), NULL); +-#else +- mkdir(aDir.c_str(), 0x1ff); +-#endif +- +- return aDir; +-} + + //============================================================================ + // function : RemoveTemporaryFiles +@@ -143,9 +76,9 @@ void SALOMEDSImpl_Tool::RemoveTemporaryFiles(const std::string& theDirectory, + for(i=1; i<=aLength; i++) { + std::string aFile(aDirName); + aFile += theFiles[i-1]; +- if(!Exists(aFile)) continue; + + #ifdef WIN32 ++ if(!Exists(aFile)) continue; + DeleteFile(aFile.c_str()); + #else + unlink(aFile.c_str()); +@@ -153,13 +86,13 @@ void SALOMEDSImpl_Tool::RemoveTemporaryFiles(const std::string& theDirectory, + } + + if(IsDirDeleted) { +- if(Exists(aDirName)) { + #ifdef WIN32 ++ if(Exists(aDirName)) { + RemoveDirectory(aDirName.c_str()); ++ } + #else +- rmdir(aDirName.c_str()); ++ rmdir(aDirName.c_str()); + #endif +- } + } + + } +diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Tool.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_Tool.hxx +index 1d6e7ad..8cf45c9 100755 +--- a/src/SALOMEDSImpl/SALOMEDSImpl_Tool.hxx ++++ b/src/SALOMEDSImpl/SALOMEDSImpl_Tool.hxx +@@ -39,12 +39,6 @@ class SALOMEDSIMPL_EXPORT SALOMEDSImpl_Tool + { + + public: +- +- // Returns the unique temporary directory, that is defined in SALOME_TMP_DIR if this variable is set +- // otherwise return /tmp/something/ for Unix or c:\something\ for WIN32 +- static std::string GetTmpDir(); +- +- + // Removes files which are in , the files for deletion are listed in + // if is true is also deleted if it is empty + static void RemoveTemporaryFiles(const std::string& theDirectory, +diff --git a/src/TOOLSDS/SALOMEDS_Tool.cxx b/src/TOOLSDS/SALOMEDS_Tool.cxx +index 895195b..8716622 100755 +--- a/src/TOOLSDS/SALOMEDS_Tool.cxx ++++ b/src/TOOLSDS/SALOMEDS_Tool.cxx +@@ -64,69 +64,6 @@ bool Exists(const std::string thePath) + return true; + } + +- +-//============================================================================ +-// function : GetTempDir +-// purpose : Return a temp directory to store created files like "/tmp/sub_dir/" +-//============================================================================ +-std::string SALOMEDS_Tool::GetTmpDir() +-{ +- return Kernel_Utils::GetTmpDirByEnv("SALOME_TMP_DIR"); +- //Find a temporary directory to store a file +- +- /*string aTmpDir = ""; +- +- char *Tmp_dir = getenv("SALOME_TMP_DIR"); +- if(Tmp_dir != NULL) { +- aTmpDir = string(Tmp_dir); +-#ifdef WIN32 +- if(aTmpDir[aTmpDir.size()-1] != '\\') aTmpDir+='\\'; +-#else +- if(aTmpDir[aTmpDir.size()-1] != '/') aTmpDir+='/'; +-#endif +- } +- else { +-#ifdef WIN32 +- aTmpDir = string("C:\\"); +-#else +- aTmpDir = string("/tmp/"); +-#endif +- } +- +- srand((unsigned int)time(NULL)); +- int aRND = 999 + (int)(100000.0*rand()/(RAND_MAX+1.0)); //Get a random number to present a name of a sub directory +- char buffer[127]; +- sprintf(buffer, "%d", aRND); +- string aSubDir(buffer); +- if(aSubDir.size() <= 1) aSubDir = string("123409876"); +- +- aTmpDir += aSubDir; //Get RND sub directory +- +- string aDir = aTmpDir; +- +- if(Exists(aDir)) { +- for(aRND = 0; Exists(aDir); aRND++) { +- sprintf(buffer, "%d", aRND); +- aDir = aTmpDir+buffer; //Build a unique directory name +- } +- } +- +-#ifdef WIN32 +- if(aDir[aDir.size()-1] != '\\') aDir+='\\'; +-#else +- if(aDir[aTmpDir.size()-1] != '/') aDir+='/'; +-#endif +- +- +-#ifdef WIN32 +- CreateDirectory(aDir.c_str(), NULL); +-#else +- mkdir(aDir.c_str(), 0x1ff); +-#endif +- +- return aDir;*/ +-} +- + //============================================================================ + // function : RemoveTemporaryFiles + // purpose : Removes files listed in theFileList +diff --git a/src/TOOLSDS/SALOMEDS_Tool.hxx b/src/TOOLSDS/SALOMEDS_Tool.hxx +index 0850fcd..ccb30a7 100755 +--- a/src/TOOLSDS/SALOMEDS_Tool.hxx ++++ b/src/TOOLSDS/SALOMEDS_Tool.hxx +@@ -50,12 +50,6 @@ + class TOOLSDS_EXPORT SALOMEDS_Tool + { + public: +- +- // Returns the unique temporary directory, that is defined in SALOME_TMP_DIR if this variable is set +- // otherwise return /tmp/something/ for Unix or c:\something\ for WIN32 +- static std::string GetTmpDir(); +- +- + // Removes files which are in , the files for deletion are listed in + // if is true is also deleted if it is empty + static void RemoveTemporaryFiles(const std::string& theDirectory, +-- +1.7.2.5 + --- salome-kernel-6.5.0.orig/debian/patches/kernel-SALOME_ContainerManager-don-t-use-predictable-tmp-fi.patch +++ salome-kernel-6.5.0/debian/patches/kernel-SALOME_ContainerManager-don-t-use-predictable-tmp-fi.patch @@ -0,0 +1,27 @@ +From b9979605d99706948fdbad6afb1d19def56f8c89 Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Wed, 25 Jul 2012 14:38:44 +0200 +Subject: [PATCH 12/16] SALOME_ContainerManager: don't use predictable tmp file name + +--- + src/Container/SALOME_ContainerManager.cxx | 4 +--- + 1 files changed, 1 insertions(+), 3 deletions(-) + +diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx +index a513af4..8761b94 100755 +--- a/src/Container/SALOME_ContainerManager.cxx ++++ b/src/Container/SALOME_ContainerManager.cxx +@@ -1799,9 +1799,7 @@ SALOME_ContainerManager::LogConfiguration(const std::string & log_type, + else + { + // default into a file... +- std::string logFilename = "/tmp/" + container_name + "_" + hostname + "_" + exe_type + "_"; +- logFilename += std::string(getenv("USER")) + ".log"; +- end = " > " + logFilename + " 2>&1 & "; ++ end = " > /dev/null 2>&1 & "; + } + } + +-- +1.7.2.5 + --- salome-kernel-6.5.0.orig/debian/patches/kernel-SALOME_ContainerPy.py-no-predictable-tempfile-replac.patch +++ salome-kernel-6.5.0/debian/patches/kernel-SALOME_ContainerPy.py-no-predictable-tempfile-replac.patch @@ -0,0 +1,711 @@ +From c3f79d3849f1eddfbe43b93d69d75d6bdfd62089 Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Wed, 25 Jul 2012 15:12:59 +0200 +Subject: [PATCH 13/16] SALOME_ContainerPy.py: no predictable tempfile, replace bindir at build time + +--- + src/Container/Makefile.am | 7 +- + src/Container/SALOME_ContainerPy.py | 339 -------------------------------- + src/Container/SALOME_ContainerPy.py.in | 324 ++++++++++++++++++++++++++++++ + 3 files changed, 330 insertions(+), 340 deletions(-) + delete mode 100755 src/Container/SALOME_ContainerPy.py + create mode 100755 src/Container/SALOME_ContainerPy.py.in + +Index: KERNEL_SRC_6.5.0/src/Container/Makefile.am +=================================================================== +--- KERNEL_SRC_6.5.0.orig/src/Container/Makefile.am ++++ KERNEL_SRC_6.5.0/src/Container/Makefile.am +@@ -51,7 +51,7 @@ dist_salomescript_PYTHON =\ + SALOME_Container.py + + # These files are executable scripts +-dist_salomescript_SCRIPTS=\ ++nodist_salomescript_SCRIPTS=\ + SALOME_ContainerPy.py + + # +@@ -170,6 +170,11 @@ TestSalome_file_LDADD =\ + $(CORBA_LIBS) \ + $(PYTHON_LIBS) + ++EXTRA_DIST = SALOME_ContainerPy.py.in ++ ++SALOME_ContainerPy.py: SALOME_ContainerPy.py.in ++ sed -e 's,#bindir#,$(bindir),g' < $< > $@ ++ + install-data-hook: + @for f in $(dist_salomescript_PYTHON) ; do \ + chmod -f a+x $(DESTDIR)$(salomescriptdir)/$$f ; \ +Index: KERNEL_SRC_6.5.0/src/Container/SALOME_ContainerPy.py +=================================================================== +--- KERNEL_SRC_6.5.0.orig/src/Container/SALOME_ContainerPy.py ++++ /dev/null +@@ -1,339 +0,0 @@ +-#! /usr/bin/env python +-# -*- coding: iso-8859-1 -*- +-# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +-# +-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-# +-# This library is free software; you can redistribute it and/or +-# modify it under the terms of the GNU Lesser General Public +-# License as published by the Free Software Foundation; either +-# version 2.1 of the License. +-# +-# This library is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-# Lesser General Public License for more details. +-# +-# You should have received a copy of the GNU Lesser General Public +-# License along with this library; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-# +-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-# +- +-# SALOME Container : implementation of container and engine for Kernel +-# File : SALOME_ContainerPy.py +-# Author : Paul RASCLE, EDF +-# Module : SALOME +-# $Header: /home/server/cvs/KERNEL/KERNEL_SRC/src/Container/SALOME_ContainerPy.py,v 1.12.2.2.14.3.2.1 2012-04-12 14:05:03 vsr Exp $ +-# +-import os +-import sys +-import string +- +-from omniORB import CORBA, PortableServer +-import SALOMEDS +-import Engines, Engines__POA +-from SALOME_NamingServicePy import * +-from SALOME_ComponentPy import * +- +-from SALOME_utilities import * +-from Utils_Identity import getShortHostName +-from launchConfigureParser import verbose +- +-#============================================================================= +- +-#define an implementation of the container interface for the container implemented in Python +- +-class SALOME_ContainerPy_i (Engines__POA.Container): +- _orb = None +- _poa = None +- _numInstance = 0 +- _listInstances_map = {} +- +- #------------------------------------------------------------------------- +- +- def __init__(self, orb, poa, containerName): +- MESSAGE( "SALOME_ContainerPy_i::__init__" ) +- self._orb = orb +- self._poa = poa +- myMachine=getShortHostName() +- Container_path = "/Containers/" + myMachine + "/" + containerName +- self._containerName = Container_path +- if verbose(): print "container name ",self._containerName +- +- naming_service = SALOME_NamingServicePy_i(self._orb) +- self._naming_service = naming_service +- MESSAGE( str(Container_path) ) +- naming_service.Register(self._this(), Container_path) +- +- #------------------------------------------------------------------------- +- +- def start_impl(self, ContainerName): +- MESSAGE( "SALOME_ContainerPy_i::start_impl " + str(ContainerName) ) +- myMachine=getShortHostName() +- theContainer = "/Containers/" + myMachine + "/" + ContainerName +- try: +- obj = self._naming_service.Resolve(theContainer) +- except : +- obj = None +- MESSAGE( "SALOME_ContainerPy_i::start_impl " + str(ContainerName) + ".object not found in Naming Service" ) +- if obj is None: +- container = None +- else: +- container = obj._narrow(Engines.Container) +- if container is None: +- MESSAGE( "SALOME_ContainerPy_i::start_impl " + str(containerName) + ".object exists but is not a Container" ) +- else : +- MESSAGE( "SALOME_ContainerPy_i::start_impl " + str(ContainerName) + ".object found without new launch" ) +- return container +- #shstr = os.getenv( "PWD" ) + "/" +- #shstr += "runSession ./SALOME_ContainerPy.py " +- shstr = os.getenv("KERNEL_ROOT_DIR") + "/bin/salome/SALOME_ContainerPy.py "; +- #shstr = "runSession SALOME_ContainerPy.py " +- shstr += ContainerName +- +- # mpv: fix for SAL4731 - allways create new file to write log of server +- num = 1 +- fileName = "" +- while 1: +- fileName = "/tmp/"+ContainerName+"_%i.log"%num +- if not os.path.exists(fileName): +- break +- num += 1 +- pass +- +- shstr += " > " +- shstr += fileName +- shstr += " 2>&1 &" +- +- #shstr += " > /tmp/" +- #shstr += ContainerName +- #shstr += ".log 2>&1 &" +- +- MESSAGE( "SALOME_ContainerPy_i::start_impl " + "os.system(" + str(shstr) + ")" ) +- os.system( shstr ) +- count = 21 +- while container is None : +- time.sleep(1) +- count = count - 1 +- MESSAGE( str(count) + ". Waiting for " + str(theContainer) ) +- try : +- obj = self._naming_service.Resolve(theContainer) +- except : +- obj = None +- if obj is None: +- container = None +- else: +- container = obj._narrow(Engines.Container) +- if container is None: +- MESSAGE( str(containerName) + ".object exists but is not a Container" ) +- return container +- if count == 0 : +- return container +- +- #------------------------------------------------------------------------- +- +- def instance(self, nameToRegister, componentName): +- MESSAGE( "SALOME_ContainerPy_i::instance " + str(nameToRegister) + ' ' + str(componentName) ) +- self._numInstance = self._numInstance +1 +- instanceName = nameToRegister + "_inst_" + `self._numInstance` +- +- component=__import__(componentName) +- factory=getattr(component,componentName) +- comp_i=factory(self._orb, self._poa, self._this(), self._containerName, +- instanceName, nameToRegister) +- +- MESSAGE( "SALOME_ContainerPy_i::instance : component created") +- comp_o = comp_i._this() +- return comp_o +- +- #------------------------------------------------------------------------- +- +- def load_impl(self, nameToRegister, componentName): +- MESSAGE( "SALOME_ContainerPy_i::load_impl " + str(nameToRegister) + ' ' + str(componentName) ) +- self._numInstance = self._numInstance +1 +- instanceName = nameToRegister + "_inst_" + `self._numInstance` +- interfaceName = nameToRegister +- the_command = "import " + nameToRegister + "\n" +- the_command = the_command + "comp_i = " + nameToRegister + "." + nameToRegister +- the_command = the_command + "(self._orb, self._poa, self._this(), self._containerName, instanceName, interfaceName)\n" +- MESSAGE( "SALOME_ContainerPy_i::load_impl :" + str (the_command) ) +- exec the_command +- comp_o = comp_i._this() +- return comp_o +- +- #------------------------------------------------------------------------- +- +- def import_component(self, componentName): +- MESSAGE( "SALOME_Container_i::import_component" ) +- reason = "" +- try: +- if verbose(): print "try import %s" % componentName +- # try import component +- module=__import__(componentName) +- if verbose(): print "import %s is done successfully" % componentName +- # if import successfully, check that component is loadable +- if not hasattr(module, componentName): +- reason = "module %s is not loadable" % componentName +- print reason +- pass +- pass +- except: +- import traceback +- print "cannot import %s" % componentName +- traceback.print_exc() +- reason = "cannot import %s" % componentName +- return reason +- +- #------------------------------------------------------------------------- +- +- def load_component_Library(self, componentName): +- MESSAGE( "SALOME_ContainerPy_i::load_component_Library " + str(componentName) ) +- ret = 0 +- instanceName = componentName + "_inst_" + `self._numInstance` +- interfaceName = componentName +- reason = self.import_component(componentName) +- return reason == "", reason +- +- #------------------------------------------------------------------------- +- +- def create_component_instance_env(self, componentName, studyId, env): +- return self.create_component_instance(componentName, studyId), "" +- +- def create_component_instance(self, componentName, studyId): +- MESSAGE( "SALOME_ContainerPy_i::create_component_instance ==> " + str(componentName) + ' ' + str(studyId) ) +- if studyId < 0: +- MESSAGE( "Study ID is lower than 0!" ) +- return None +- else: +- self._numInstance = self._numInstance +1 +- instanceName = componentName + "_inst_" + `self._numInstance` +- comp_iors="" +- try: +- component=__import__(componentName) +- factory=getattr(component,componentName) +- comp_i=factory(self._orb, +- self._poa, +- self._this(), +- self._containerName, +- instanceName, +- componentName) +- +- MESSAGE( "SALOME_Container_i::create_component_instance : OK") +- comp_o = comp_i._this() +- self._listInstances_map[instanceName] = comp_i +- except: +- import traceback +- traceback.print_exc() +- MESSAGE( "SALOME_Container_i::create_component_instance : NOT OK") +- return comp_o +- +- #------------------------------------------------------------------------- +- +- def find_component_instance(self, registeredName, studyId): +- anEngine = None +- keysList = self._listInstances_map.keys() +- i = 0 +- while i < len(keysList): +- instance = keysList[i] +- if find(instance,registeredName) == 0: +- anEngine = self._listInstances_map[instance] +- if studyId == anEngine.getStudyId(): +- return anEngine._this() +- i = i + 1 +- return anEngine._this() +- +- +- #------------------------------------------------------------------------- +- +- def remove_impl(self, component): +- MESSAGE( "SALOME_ContainerPy_i::remove_impl" ) +- instanceName = component._get_instanceName() +- MESSAGE( "unload component " + str(instanceName) ) +- self._listInstances_map.remove(instanceName) +- component.destroy() +- self._naming_service.Destroy_Name(str(instanceName)) +- +- #------------------------------------------------------------------------- +- +- def finalize_removal(self): +- MESSAGE( "SALOME_ContainerPy_i::finalize_removal" ) +- return None +- +- #------------------------------------------------------------------------- +- +- def ping(self): +- MESSAGE( "SALOME_ContainerPy_i::ping() pid " + str(os.getpid()) ) +- return None +- +- #------------------------------------------------------------------------- +- +- def getPID(self): +- return os.getpid() +- +- #------------------------------------------------------------------------- +- +- def _get_name(self): +- MESSAGE( "SALOME_ContainerPy_i::_get_name" ) +- return self._containerName +- +- #------------------------------------------------------------------------- +- +- def getHostName(self): +- MESSAGE( "SALOME_ContainerPy_i::_get_MachineName" ) +- self._machineName = "localhost" +- return self._machineName +- +- #------------------------------------------------------------------------- +- +- def _get_machineName(self): +- MESSAGE( "SALOME_ContainerPy_i::_get_MachineName" ) +- self._machineName = "localhost" +- return self._machineName +- +- #------------------------------------------------------------------------- +- +- def Shutdown(self): +- self._naming_service.Destroy_Name(self._containerName); +- self._naming_service.Destroy_FullDirectory(self._containerName); +- self._orb.shutdown(0) +- pass +- +- def _get_logfilename(self): +- return self._logfilename +- def _set_logfilename(self,logfilename): +- self._logfilename=logfilename +- def _get_workingdir(self): +- return os.getcwd() +- +-#============================================================================= +- +-if __name__ == "__main__": +- # change the stdout buffering to line buffering (same as C++ cout buffering) +- sys.stdout=os.fdopen(1,"w",1) +- #initialise the ORB and find the root POA +- if verbose():print "Starting ",sys.argv[1] +- orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID) +- poa = orb.resolve_initial_references("RootPOA") +- if verbose():print "ORB and POA initialized" +- +- #create an instance of SALOME_ContainerPy_i and a Container reference +- #containerName = "FactoryServerPy" +- MESSAGE( str(sys.argv) ) +- containerName = sys.argv[1] +- cpy_i = SALOME_ContainerPy_i(orb, poa, containerName) +- if verbose():print "SALOME_ContainerPy_i instance created ",cpy_i +- cpy_o = cpy_i._this() +- if verbose():print "SALOME_ContainerPy_i instance activated ",cpy_o +- sys.stdout.flush() +- sys.stderr.flush() +- +- #activate the POA +- poaManager = poa._get_the_POAManager() +- poaManager.activate() +- +- #Block for ever +- orb.run() +- if verbose():print "SALOME_ContainerPy_i shutdown" +Index: KERNEL_SRC_6.5.0/src/Container/SALOME_ContainerPy.py.in +=================================================================== +--- /dev/null ++++ KERNEL_SRC_6.5.0/src/Container/SALOME_ContainerPy.py.in +@@ -0,0 +1,324 @@ ++#! /usr/bin/env python ++# -*- coding: iso-8859-1 -*- ++# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE ++# ++# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, ++# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS ++# ++# This library is free software; you can redistribute it and/or ++# modify it under the terms of the GNU Lesser General Public ++# License as published by the Free Software Foundation; either ++# version 2.1 of the License. ++# ++# This library is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# Lesser General Public License for more details. ++# ++# You should have received a copy of the GNU Lesser General Public ++# License along with this library; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++# ++# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com ++# ++ ++# SALOME Container : implementation of container and engine for Kernel ++# File : SALOME_ContainerPy.py ++# Author : Paul RASCLE, EDF ++# Module : SALOME ++# $Header: /home/server/cvs/KERNEL/KERNEL_SRC/src/Container/SALOME_ContainerPy.py,v 1.12.2.2.14.3.2.1 2012-04-12 14:05:03 vsr Exp $ ++# ++import os ++import sys ++import string ++ ++from omniORB import CORBA, PortableServer ++import SALOMEDS ++import Engines, Engines__POA ++from SALOME_NamingServicePy import * ++from SALOME_ComponentPy import * ++ ++from SALOME_utilities import * ++from Utils_Identity import getShortHostName ++from launchConfigureParser import verbose ++ ++#============================================================================= ++ ++#define an implementation of the container interface for the container implemented in Python ++ ++class SALOME_ContainerPy_i (Engines__POA.Container): ++ _orb = None ++ _poa = None ++ _numInstance = 0 ++ _listInstances_map = {} ++ ++ #------------------------------------------------------------------------- ++ ++ def __init__(self, orb, poa, containerName): ++ MESSAGE( "SALOME_ContainerPy_i::__init__" ) ++ self._orb = orb ++ self._poa = poa ++ myMachine=getShortHostName() ++ Container_path = "/Containers/" + myMachine + "/" + containerName ++ self._containerName = Container_path ++ if verbose(): print "container name ",self._containerName ++ ++ naming_service = SALOME_NamingServicePy_i(self._orb) ++ self._naming_service = naming_service ++ MESSAGE( str(Container_path) ) ++ naming_service.Register(self._this(), Container_path) ++ ++ #------------------------------------------------------------------------- ++ ++ def start_impl(self, ContainerName): ++ MESSAGE( "SALOME_ContainerPy_i::start_impl " + str(ContainerName) ) ++ myMachine=getShortHostName() ++ theContainer = "/Containers/" + myMachine + "/" + ContainerName ++ try: ++ obj = self._naming_service.Resolve(theContainer) ++ except : ++ obj = None ++ MESSAGE( "SALOME_ContainerPy_i::start_impl " + str(ContainerName) + ".object not found in Naming Service" ) ++ if obj is None: ++ container = None ++ else: ++ container = obj._narrow(Engines.Container) ++ if container is None: ++ MESSAGE( "SALOME_ContainerPy_i::start_impl " + str(containerName) + ".object exists but is not a Container" ) ++ else : ++ MESSAGE( "SALOME_ContainerPy_i::start_impl " + str(ContainerName) + ".object found without new launch" ) ++ return container ++ shstr = "#bindir#" "/SALOME_ContainerPy.py "; ++ shstr += ContainerName ++ ++ fileName = os.devnull ++ ++ shstr += " > " ++ shstr += fileName ++ shstr += " 2>&1 &" ++ ++ MESSAGE( "SALOME_ContainerPy_i::start_impl " + "os.system(" + str(shstr) + ")" ) ++ os.system( shstr ) ++ count = 21 ++ while container is None : ++ time.sleep(1) ++ count = count - 1 ++ MESSAGE( str(count) + ". Waiting for " + str(theContainer) ) ++ try : ++ obj = self._naming_service.Resolve(theContainer) ++ except : ++ obj = None ++ if obj is None: ++ container = None ++ else: ++ container = obj._narrow(Engines.Container) ++ if container is None: ++ MESSAGE( str(containerName) + ".object exists but is not a Container" ) ++ return container ++ if count == 0 : ++ return container ++ ++ #------------------------------------------------------------------------- ++ ++ def instance(self, nameToRegister, componentName): ++ MESSAGE( "SALOME_ContainerPy_i::instance " + str(nameToRegister) + ' ' + str(componentName) ) ++ self._numInstance = self._numInstance +1 ++ instanceName = nameToRegister + "_inst_" + `self._numInstance` ++ ++ component=__import__(componentName) ++ factory=getattr(component,componentName) ++ comp_i=factory(self._orb, self._poa, self._this(), self._containerName, ++ instanceName, nameToRegister) ++ ++ MESSAGE( "SALOME_ContainerPy_i::instance : component created") ++ comp_o = comp_i._this() ++ return comp_o ++ ++ #------------------------------------------------------------------------- ++ ++ def load_impl(self, nameToRegister, componentName): ++ MESSAGE( "SALOME_ContainerPy_i::load_impl " + str(nameToRegister) + ' ' + str(componentName) ) ++ self._numInstance = self._numInstance +1 ++ instanceName = nameToRegister + "_inst_" + `self._numInstance` ++ interfaceName = nameToRegister ++ the_command = "import " + nameToRegister + "\n" ++ the_command = the_command + "comp_i = " + nameToRegister + "." + nameToRegister ++ the_command = the_command + "(self._orb, self._poa, self._this(), self._containerName, instanceName, interfaceName)\n" ++ MESSAGE( "SALOME_ContainerPy_i::load_impl :" + str (the_command) ) ++ exec the_command ++ comp_o = comp_i._this() ++ return comp_o ++ ++ #------------------------------------------------------------------------- ++ ++ def import_component(self, componentName): ++ MESSAGE( "SALOME_Container_i::import_component" ) ++ reason = "" ++ try: ++ if verbose(): print "try import %s" % componentName ++ # try import component ++ module=__import__(componentName) ++ if verbose(): print "import %s is done successfully" % componentName ++ # if import successfully, check that component is loadable ++ if not hasattr(module, componentName): ++ reason = "module %s is not loadable" % componentName ++ print reason ++ pass ++ pass ++ except: ++ import traceback ++ print "cannot import %s" % componentName ++ traceback.print_exc() ++ reason = "cannot import %s" % componentName ++ return reason ++ ++ #------------------------------------------------------------------------- ++ ++ def load_component_Library(self, componentName): ++ MESSAGE( "SALOME_ContainerPy_i::load_component_Library " + str(componentName) ) ++ ret = 0 ++ instanceName = componentName + "_inst_" + `self._numInstance` ++ interfaceName = componentName ++ reason = self.import_component(componentName) ++ return reason == "", reason ++ ++ #------------------------------------------------------------------------- ++ ++ def create_component_instance_env(self, componentName, studyId, env): ++ return self.create_component_instance(componentName, studyId), "" ++ ++ def create_component_instance(self, componentName, studyId): ++ MESSAGE( "SALOME_ContainerPy_i::create_component_instance ==> " + str(componentName) + ' ' + str(studyId) ) ++ if studyId < 0: ++ MESSAGE( "Study ID is lower than 0!" ) ++ return None ++ else: ++ self._numInstance = self._numInstance +1 ++ instanceName = componentName + "_inst_" + `self._numInstance` ++ comp_iors="" ++ try: ++ component=__import__(componentName) ++ factory=getattr(component,componentName) ++ comp_i=factory(self._orb, ++ self._poa, ++ self._this(), ++ self._containerName, ++ instanceName, ++ componentName) ++ ++ MESSAGE( "SALOME_Container_i::create_component_instance : OK") ++ comp_o = comp_i._this() ++ self._listInstances_map[instanceName] = comp_i ++ except: ++ import traceback ++ traceback.print_exc() ++ MESSAGE( "SALOME_Container_i::create_component_instance : NOT OK") ++ return comp_o ++ ++ #------------------------------------------------------------------------- ++ ++ def find_component_instance(self, registeredName, studyId): ++ anEngine = None ++ keysList = self._listInstances_map.keys() ++ i = 0 ++ while i < len(keysList): ++ instance = keysList[i] ++ if find(instance,registeredName) == 0: ++ anEngine = self._listInstances_map[instance] ++ if studyId == anEngine.getStudyId(): ++ return anEngine._this() ++ i = i + 1 ++ return anEngine._this() ++ ++ ++ #------------------------------------------------------------------------- ++ ++ def remove_impl(self, component): ++ MESSAGE( "SALOME_ContainerPy_i::remove_impl" ) ++ instanceName = component._get_instanceName() ++ MESSAGE( "unload component " + str(instanceName) ) ++ self._listInstances_map.remove(instanceName) ++ component.destroy() ++ self._naming_service.Destroy_Name(str(instanceName)) ++ ++ #------------------------------------------------------------------------- ++ ++ def finalize_removal(self): ++ MESSAGE( "SALOME_ContainerPy_i::finalize_removal" ) ++ return None ++ ++ #------------------------------------------------------------------------- ++ ++ def ping(self): ++ MESSAGE( "SALOME_ContainerPy_i::ping() pid " + str(os.getpid()) ) ++ return None ++ ++ #------------------------------------------------------------------------- ++ ++ def getPID(self): ++ return os.getpid() ++ ++ #------------------------------------------------------------------------- ++ ++ def _get_name(self): ++ MESSAGE( "SALOME_ContainerPy_i::_get_name" ) ++ return self._containerName ++ ++ #------------------------------------------------------------------------- ++ ++ def getHostName(self): ++ MESSAGE( "SALOME_ContainerPy_i::_get_MachineName" ) ++ self._machineName = "localhost" ++ return self._machineName ++ ++ #------------------------------------------------------------------------- ++ ++ def _get_machineName(self): ++ MESSAGE( "SALOME_ContainerPy_i::_get_MachineName" ) ++ self._machineName = "localhost" ++ return self._machineName ++ ++ #------------------------------------------------------------------------- ++ ++ def Shutdown(self): ++ self._naming_service.Destroy_Name(self._containerName); ++ self._naming_service.Destroy_FullDirectory(self._containerName); ++ self._orb.shutdown(0) ++ pass ++ ++ def _get_logfilename(self): ++ return self._logfilename ++ def _set_logfilename(self,logfilename): ++ self._logfilename=logfilename ++ def _get_workingdir(self): ++ return os.getcwd() ++ ++#============================================================================= ++ ++if __name__ == "__main__": ++ # change the stdout buffering to line buffering (same as C++ cout buffering) ++ sys.stdout=os.fdopen(1,"w",1) ++ #initialise the ORB and find the root POA ++ if verbose():print "Starting ",sys.argv[1] ++ orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID) ++ poa = orb.resolve_initial_references("RootPOA") ++ if verbose():print "ORB and POA initialized" ++ ++ #create an instance of SALOME_ContainerPy_i and a Container reference ++ #containerName = "FactoryServerPy" ++ MESSAGE( str(sys.argv) ) ++ containerName = sys.argv[1] ++ cpy_i = SALOME_ContainerPy_i(orb, poa, containerName) ++ if verbose():print "SALOME_ContainerPy_i instance created ",cpy_i ++ cpy_o = cpy_i._this() ++ if verbose():print "SALOME_ContainerPy_i instance activated ",cpy_o ++ sys.stdout.flush() ++ sys.stderr.flush() ++ ++ #activate the POA ++ poaManager = poa._get_the_POAManager() ++ poaManager.activate() ++ ++ #Block for ever ++ orb.run() ++ if verbose():print "SALOME_ContainerPy_i shutdown" --- salome-kernel-6.5.0.orig/debian/patches/kernel-Use-delete-to-free-arrays.patch +++ salome-kernel-6.5.0/debian/patches/kernel-Use-delete-to-free-arrays.patch @@ -0,0 +1,55 @@ +From 38a6d45ed8e142f66d451cd196b9fb8fe668bdc8 Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Tue, 31 Jul 2012 10:47:03 +0200 +Subject: [PATCH 2/2] Use delete[] to free arrays + +Fixes valgrind error: + +==407== Mismatched free() / delete / delete [] +==407== at 0x4C279DC: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==407== by 0xAF6B98E: restoreString(std::string const&) (in /usr/lib/salome/lib/libSalomeDSImpl.so.0.0.0) +==407== by 0xAF6EFA1: SALOMEDSImpl_AttributeParameter::Load(std::string const&) (in /usr/lib/salome/lib/libSalomeDSImpl.so.0.0.0) +==407== by 0xAF9D70F: ??? (in /usr/lib/salome/lib/libSalomeDSImpl.so.0.0.0) +==407== by 0xAF9DA93: ??? (in /usr/lib/salome/lib/libSalomeDSImpl.so.0.0.0) +==407== by 0xAF9DAE3: ??? (in /usr/lib/salome/lib/libSalomeDSImpl.so.0.0.0) +==407== by 0xAF969ED: SALOMEDSImpl_StudyManager::Open(std::string const&) (in /usr/lib/salome/lib/libSalomeDSImpl.so.0.0.0) +==407== by 0x1E9F3B2F: SALOMEDS_StudyManager_i::Open(char const*) (in /usr/lib/salome/lib/libSalomeDS.so.0.0.0) +==407== by 0x64B54CB: ??? (in /usr/lib/salome/lib/libSalomeIDLKernel.so.0.0.0) +==407== by 0xD68554D: omni::omniOrbPOA::dispatch(omniCallDescriptor&, omniLocalIdentity*) (in /usr/lib/libomniORB4.so.1.6) +==407== by 0xD66B0D6: omniLocalIdentity::dispatch(omniCallDescriptor&) (in /usr/lib/libomniORB4.so.1.6) +==407== by 0xD679866: omniObjRef::_invoke(omniCallDescriptor&, bool) (in /usr/lib/libomniORB4.so.1.6) +==407== Address 0x1b583b10 is 0 bytes inside a block of size 3 alloc'd +==407== at 0x4C28147: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==407== by 0xAF6B85E: restoreString(std::string const&) (in /usr/lib/salome/lib/libSalomeDSImpl.so.0.0.0) +==407== by 0xAF6EFA1: SALOMEDSImpl_AttributeParameter::Load(std::string const&) (in /usr/lib/salome/lib/libSalomeDSImpl.so.0.0.0) +==407== by 0xAF9D70F: ??? (in /usr/lib/salome/lib/libSalomeDSImpl.so.0.0.0) +==407== by 0xAF9DA93: ??? (in /usr/lib/salome/lib/libSalomeDSImpl.so.0.0.0) +==407== by 0xAF9DAE3: ??? (in /usr/lib/salome/lib/libSalomeDSImpl.so.0.0.0) +==407== by 0xAF969ED: SALOMEDSImpl_StudyManager::Open(std::string const&) (in /usr/lib/salome/lib/libSalomeDSImpl.so.0.0.0) +==407== by 0x1E9F3B2F: SALOMEDS_StudyManager_i::Open(char const*) (in /usr/lib/salome/lib/libSalomeDS.so.0.0.0) +==407== by 0x64B54CB: ??? (in /usr/lib/salome/lib/libSalomeIDLKernel.so.0.0.0) +==407== by 0xD68554D: omni::omniOrbPOA::dispatch(omniCallDescriptor&, omniLocalIdentity*) (in /usr/lib/libomniORB4.so.1.6) +==407== by 0xD66B0D6: omniLocalIdentity::dispatch(omniCallDescriptor&) (in /usr/lib/libomniORB4.so.1.6) +==407== by 0xD679866: omniObjRef::_invoke(omniCallDescriptor&, bool) (in /usr/lib/libomniORB4.so.1.6) +--- + .../SALOMEDSImpl_AttributeParameter.cxx | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx +index 97584c9..bdf4d1c 100755 +--- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx ++++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx +@@ -70,8 +70,8 @@ std::string restoreString(const std::string& S) + } + + std::string RS(buffer); +- delete c; +- delete buffer; ++ delete[] c; ++ delete[] buffer; + return RS; + } + +-- +1.7.2.5 + --- salome-kernel-6.5.0.orig/debian/patches/kernel-add-rpath-for-paraview-libs.patch +++ salome-kernel-6.5.0/debian/patches/kernel-add-rpath-for-paraview-libs.patch @@ -0,0 +1,25 @@ +From 3349abcdbe6a343ab531c009c636bced68ab1005 Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Wed, 30 May 2012 10:45:20 +0200 +Subject: [PATCH 3/9] add rpath for paraview libs + +--- + salome_adm/unix/config_files/check_vtk.m4 | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/salome_adm/unix/config_files/check_vtk.m4 b/salome_adm/unix/config_files/check_vtk.m4 +index 22ee960..af68600 100644 +--- a/salome_adm/unix/config_files/check_vtk.m4 ++++ b/salome_adm/unix/config_files/check_vtk.m4 +@@ -193,7 +193,7 @@ if test "x$PVHOME" != "x" ; then + AC_CHECKING(for VTK from ParaView) + + PV_LOCAL_INCLUDES="-I$PVHOME/include/paraview$PVVERSION $LOCAL_INCLUDES" +- PV_LOCAL_LIBS="-L$PVHOME/lib/paraview$PVVERSION -lvtksys -lvtkmetaio -lvtkverdict -lvtkDICOMParser -lvtkexoIIc $LOCAL_LIBS" ++ PV_LOCAL_LIBS="-L$PVHOME/lib/paraview$PVVERSION -Wl,--rpath,$PVHOME/lib/paraview$PVVERSION -lvtksys -lvtkmetaio -lvtkverdict -lvtkDICOMParser -lvtkexoIIc $LOCAL_LIBS" + PV_TRY_LINK_LIBS="-L$PVHOME/lib/paraview$PVVERSION -lvtksys $TRY_LINK_LIBS" + + dnl vtk headers +-- +1.7.2.5 + --- salome-kernel-6.5.0.orig/debian/patches/kernel-boost-1.54.patch +++ salome-kernel-6.5.0/debian/patches/kernel-boost-1.54.patch @@ -0,0 +1,36 @@ +Index: salome-kernel-6.5.0/src/DF/DF_definitions.hxx +=================================================================== +--- salome-kernel-6.5.0.orig/src/DF/DF_definitions.hxx 2013-12-02 16:53:59.559987414 -0500 ++++ salome-kernel-6.5.0/src/DF/DF_definitions.hxx 2013-12-02 17:02:24.314591860 -0500 +@@ -46,9 +46,10 @@ + } + + template +- df_shared_ptr(df_shared_ptr const & r): +- boost::shared_ptr(r,boost::detail::dynamic_cast_tag()) +- {} ++ df_shared_ptr(df_shared_ptr const & r) ++ { ++ boost::dynamic_pointer_cast(r); ++ } + + template + df_shared_ptr & operator=(df_shared_ptr const & r) +Index: salome-kernel-6.5.0/src/SALOMEDSClient/SALOMEDSClient_definitions.hxx +=================================================================== +--- salome-kernel-6.5.0.orig/src/SALOMEDSClient/SALOMEDSClient_definitions.hxx 2013-12-02 16:53:59.547987414 -0500 ++++ salome-kernel-6.5.0/src/SALOMEDSClient/SALOMEDSClient_definitions.hxx 2013-12-02 17:02:24.314591860 -0500 +@@ -47,9 +47,10 @@ + } + + template +- clt_shared_ptr(clt_shared_ptr const & r): +- boost::shared_ptr(r,boost::detail::dynamic_cast_tag()) +- {} ++ clt_shared_ptr(clt_shared_ptr const & r) ++ { ++ boost::dynamic_pointer_cast(r); ++ } + + template + clt_shared_ptr & operator=(clt_shared_ptr const & r) --- salome-kernel-6.5.0.orig/debian/patches/kernel-check-boost.patch +++ salome-kernel-6.5.0/debian/patches/kernel-check-boost.patch @@ -0,0 +1,52 @@ +Index: salome-kernel-6.5.0/salome_adm/unix/config_files/check_boost.m4 +=================================================================== +--- salome-kernel-6.5.0.orig/salome_adm/unix/config_files/check_boost.m4 2013-12-02 17:05:01.142729425 -0500 ++++ salome-kernel-6.5.0/salome_adm/unix/config_files/check_boost.m4 2013-12-02 17:28:23.512336553 -0500 +@@ -56,7 +56,7 @@ + + if test "x${BOOSTDIR}" != "x" ; then + BOOST_CPPFLAGS="-I${BOOSTDIR}/include" +- BOOST_LIBS="-L${BOOSTDIR}/lib${LIB_SUFFIX}" ++ BOOST_LIBS="-L${BOOSTDIR}/lib/${DEB_HOST_MULTIARCH}" + fi + + if test "x${BOOSTDIR}" = "x/usr" ; then +@@ -108,7 +108,7 @@ + if test "x${BOOSTDIR}" != "x" ; then + for BOOST_LIBSUFFIX in ${SUFFIXES} ; do + test "${BOOST_LIBSUFFIX}" == "empty" && BOOST_LIBSUFFIX="" +- AC_CHECK_FILE([${BOOSTDIR}/lib${LIB_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so], ++ AC_CHECK_FILE([${BOOSTDIR}/lib/${DEB_HOST_MULTIARCH}/libboost_thread${BOOST_LIBSUFFIX}.so], + [boost_lib_dir_ok=yes], + [AC_CHECK_FILE([${BOOSTDIR}/lib64/libboost_thread${BOOST_LIBSUFFIX}.so], + [boost_lib_dir_ok=yes; LIB_SUFFIX=64], +@@ -120,7 +120,7 @@ + done + fi + if test "x${boost_lib_dir_ok}" = "xyes" ; then +- LIBS="${LIBS_old} ${BOOST_LIBS} -lboost_thread${BOOST_LIBSUFFIX}" ++ LIBS="${LIBS_old} ${BOOST_LIBS} -lboost_thread${BOOST_LIBSUFFIX} -lboost_system${BOOST_LIBSUFFIX}" + AC_TRY_LINK([#include ], + [struct TBody{ void operator()(){} }; boost::thread(TBody())], + boost_binaries_ok=yes, +@@ -137,16 +137,16 @@ + else + AC_MSG_RESULT(\$BOOST_LIBSUFFIX = ${BOOST_LIBSUFFIX}) + AC_MSG_RESULT(\$BOOST_LIBS = ${BOOST_LIBS}) +- AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so, ++ AC_CHECK_FILE(${BOOSTDIR}/lib/${DEB_HOST_MULTIARCH}/libboost_thread${BOOST_LIBSUFFIX}.so, + BOOST_LIB_THREAD="${BOOST_LIBS} -lboost_thread${BOOST_LIBSUFFIX}", + BOOST_LIB_THREAD="") +- AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_SUFFIX}/libboost_signals${BOOST_LIBSUFFIX}.so, ++ AC_CHECK_FILE(${BOOSTDIR}/lib/${DEB_HOST_MULTIARCH}/libboost_signals${BOOST_LIBSUFFIX}.so, + BOOST_LIB_SIGNALS="${BOOST_LIBS} -lboost_signals${BOOST_LIBSUFFIX}", + BOOST_LIB_SIGNALS="") +- AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_SUFFIX}/libboost_system${BOOST_LIBSUFFIX}.so, ++ AC_CHECK_FILE(${BOOSTDIR}/lib/${DEB_HOST_MULTIARCH}/libboost_system${BOOST_LIBSUFFIX}.so, + BOOST_LIB_SYSTEM="${BOOST_LIBS} -lboost_system${BOOST_LIBSUFFIX}", + BOOST_LIB_SYSTEM="") +- AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_SUFFIX}/libboost_regex${BOOST_LIBSUFFIX}.so, ++ AC_CHECK_FILE(${BOOSTDIR}/lib/${DEB_HOST_MULTIARCH}/libboost_regex${BOOST_LIBSUFFIX}.so, + BOOST_LIB_REGEX="${BOOST_LIBS} -lboost_regex${BOOST_LIBSUFFIX}", + BOOST_LIB_REGEX="") + fi --- salome-kernel-6.5.0.orig/debian/patches/kernel-check_cas-hack.patch +++ salome-kernel-6.5.0/debian/patches/kernel-check_cas-hack.patch @@ -0,0 +1,22 @@ +From 112343afdfff0f229301c7fd2e2d41a06297fe32 Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Tue, 22 May 2012 14:12:53 +0200 +Subject: [PATCH] check_cas: don't fail if we don't find some files we don't use anyway + +--- + salome_adm/unix/config_files/check_cas.m4 | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +Index: salome-kernel/salome_adm/unix/config_files/check_cas.m4 +=================================================================== +--- salome-kernel.orig/salome_adm/unix/config_files/check_cas.m4 ++++ salome-kernel/salome_adm/unix/config_files/check_cas.m4 +@@ -151,7 +151,7 @@ else + CAS_DATADIR=${CASROOT}/share/opencascade/${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE} + AC_MSG_RESULT(found in $CAS_DATADIR/src) + else +- occ_ok=no ++ #XXX occ_ok=no + AC_MSG_RESULT(not found, check OpenCascade installation) + fi + fi --- salome-kernel-6.5.0.orig/debian/patches/kernel-check_vtk-useless-libs.patch +++ salome-kernel-6.5.0/debian/patches/kernel-check_vtk-useless-libs.patch @@ -0,0 +1,25 @@ +From 671d4f40790e23339c851293e742ee12da1561d6 Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Tue, 22 May 2012 14:13:26 +0200 +Subject: [PATCH 1/9] check_vtk: don't link to unneeded libs + +--- + salome_adm/unix/config_files/check_vtk.m4 | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/salome_adm/unix/config_files/check_vtk.m4 b/salome_adm/unix/config_files/check_vtk.m4 +index e41c864..22ee960 100644 +--- a/salome_adm/unix/config_files/check_vtk.m4 ++++ b/salome_adm/unix/config_files/check_vtk.m4 +@@ -193,7 +193,7 @@ if test "x$PVHOME" != "x" ; then + AC_CHECKING(for VTK from ParaView) + + PV_LOCAL_INCLUDES="-I$PVHOME/include/paraview$PVVERSION $LOCAL_INCLUDES" +- PV_LOCAL_LIBS="-L$PVHOME/lib/paraview$PVVERSION -lvtksys -lvtkzlib -lvtkpng -lvtkjpeg -lvtktiff -lvtkexpat -lvtksqlite -lvtkmetaio -lvtkverdict -lvtkNetCDF -lvtkDICOMParser -lvtkfreetype -lvtkftgl -lvtkexoIIc $LOCAL_LIBS" ++ PV_LOCAL_LIBS="-L$PVHOME/lib/paraview$PVVERSION -lvtksys -lvtkmetaio -lvtkverdict -lvtkDICOMParser -lvtkexoIIc $LOCAL_LIBS" + PV_TRY_LINK_LIBS="-L$PVHOME/lib/paraview$PVVERSION -lvtksys $TRY_LINK_LIBS" + + dnl vtk headers +-- +1.7.2.5 + --- salome-kernel-6.5.0.orig/debian/patches/kernel-config-extra.patch +++ salome-kernel-6.5.0/debian/patches/kernel-config-extra.patch @@ -0,0 +1,42 @@ +Index: salome-kernel/configure.ac +=================================================================== +--- salome-kernel.orig/configure.ac ++++ salome-kernel/configure.ac +@@ -313,6 +313,15 @@ fi + # --- end test ONLYLAUNCHER + # ---------------------------------------------------------------------------- + ++dnl This is needed for envProducts.sh ++echo ++echo --------------------------------------------- ++echo Testing OpenCascade ++echo --------------------------------------------- ++echo ++ ++CHECK_CAS ++ + echo + echo ============================================================ + echo testing parallel products +@@ -542,6 +551,9 @@ AC_OUTPUT([ \ + bin/Makefile \ + bin/appliskel/Makefile \ + bin/VERSION \ ++ bin/runSalome \ ++ bin/killSalome \ ++ bin/appliskel/env.d/envProducts.sh \ + doc/Makefile \ + doc/docutils/conf.py \ + doc/salome/Makefile \ +Index: salome-kernel/bin/Makefile.am +=================================================================== +--- salome-kernel.orig/bin/Makefile.am ++++ salome-kernel/bin/Makefile.am +@@ -48,6 +48,7 @@ dist_salomescript_SCRIPTS = \ + appli_clean.sh \ + appli_install.sh \ + createAppli.sh \ ++ killSalome \ + runIDLparser \ + runNS.sh \ + runSalome \ --- salome-kernel-6.5.0.orig/debian/patches/kernel-cppunit-multiarch.patch +++ salome-kernel-6.5.0/debian/patches/kernel-cppunit-multiarch.patch @@ -0,0 +1,103 @@ +From: Julien Cristau +Subject: Use a compile/link test for cppunit instead of AC_CHECK_FILE + +Checking in "known" locations fails in Debian sid where cppunit was +moved to multiarch directories. + +(Would be nice to use AC_CHECK_LIBS, but that doesn't seem to work too +well for c++ libraries due to mangling) + +diff --git a/salome_adm/unix/config_files/check_cppunit.m4 b/salome_adm/unix/config_files/check_cppunit.m4 +index 8b77ed4..35cc9cb 100755 +--- a/salome_adm/unix/config_files/check_cppunit.m4 ++++ b/salome_adm/unix/config_files/check_cppunit.m4 +@@ -42,46 +42,23 @@ AC_ARG_WITH(cppunit_inc, + + if test -z "$CPPUNITHOME"; then + AC_MSG_RESULT(CPPUNITHOME not defined) +- exits_ok=no +- if test "x$exits_ok" = "xno"; then +- for d in /usr/local /usr ; do +- AC_CHECK_FILE(${d}/lib64/libcppunit.so,exits_ok=yes,exits_ok=no) +- if test "x$exits_ok" = "xyes"; then +- CPPUNITHOME=$d +- AC_MSG_RESULT(libcppunit.so detected in $d/lib64) +- break +- fi +- AC_CHECK_FILE(${d}/lib/libcppunit.so,exits_ok=yes,exits_ok=no) +- if test "x$exits_ok" = "xyes"; then +- CPPUNITHOME=$d +- AC_MSG_RESULT(libcppunit.so detected in $d/lib) +- break +- fi +- done +- fi +- if test "x$exits_ok" = "xno"; then +- for d in `echo $LD_LIBRARY_PATH | sed -e "s/:/ /g"` ; do +- if test -f $d/libcppunit.so ; then +- AC_MSG_RESULT(libcppunit.so detected in $d) +- CPPUNITHOME=$d +- CPPUNITHOME=`echo ${CPPUNITHOME} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"` +- exits_ok=yes +- break +- fi +- done +- fi +- if test "x$exits_ok" = "xyes"; then +- if test -z "$CPPUNIT_INCLUDES"; then +- CPPUNIT_INCLUDES=$CPPUNITHOME"/include" +- fi +- fi ++ AC_LANG_PUSH([C++]) ++ SAVED_LIBS=$LIBS ++ LIBS="$LIBS -lcppunit" ++ AC_LINK_IFELSE( ++ [AC_LANG_PROGRAM([#include ], ++ [CppUnit::TestRunner dummy])], ++ [cppunit_ok=yes] [CPPUNIT_LIBS="-lcppunit"], ++ [cppunit_ok=no]) ++ LIBS="$SAVED_LIBS" ++ AC_LANG_POP() + else + if test -z "$CPPUNIT_INCLUDES"; then + CPPUNIT_INCLUDES="$CPPUNITHOME/include" +- fi ++ fi + fi + +-if test "x$cppunit_ok" = xno -o ! -d "$CPPUNITHOME" ; then ++if test "x$cppunit_ok" != xyes -a ! -d "$CPPUNITHOME" ; then + AC_MSG_RESULT(no) + AC_MSG_WARN(cppunit not found) + cppunit_ok=no +@@ -89,8 +66,9 @@ else + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + CPPFLAGS_old=$CPPFLAGS +- CPPFLAGS="$CPPFLAGS -I$CPPUNIT_INCLUDES" +- ++ if test -n "$CPPUNIT_INCLUDES"; then ++ CPPFLAGS="$CPPFLAGS -I$CPPUNIT_INCLUDES" ++ fi + AC_CHECK_HEADER(cppunit/extensions/HelperMacros.h,cppunit_ok=yes,cppunit_ok=no) + + CPPFLAGS=$CPPFLAGS_old +@@ -107,16 +85,12 @@ else + AC_MSG_RESULT(unable to found cppunit headers and library) + AC_MSG_RESULT(CPPUNITHOME environment variable may be wrong) + else +- if test "x$CPPUNIT_INCLUDES" = "x/usr/include" ++ if test -n "$CPPUNIT_INCLUDES" + then +- CPPUNIT_INCLUDES="" +- else + CPPUNIT_INCLUDES="-I$CPPUNIT_INCLUDES" + fi +- if test "x$CPPUNITHOME" = "x/usr" ++ if test -n "$CPPUNITHOME" + then +- CPPUNIT_LIBS=" -lcppunit" +- else + CPPUNIT_LIBS="-L$CPPUNITHOME/lib -lcppunit" + fi + --- salome-kernel-6.5.0.orig/debian/patches/kernel-debian-dirs.patch +++ salome-kernel-6.5.0/debian/patches/kernel-debian-dirs.patch @@ -0,0 +1,24 @@ +Use Debian-correct directory locations. + +Index: KERNEL_SRC/salome_adm/unix/config_files/check_Kernel.m4 +=================================================================== +--- KERNEL_SRC.orig/salome_adm/unix/config_files/check_Kernel.m4 ++++ KERNEL_SRC/salome_adm/unix/config_files/check_Kernel.m4 +@@ -57,7 +57,7 @@ if test "x${KERNEL_DIR}" = "x" ; then + fi + fi + +-if test -f ${KERNEL_DIR}/bin/salome/runSalome ; then ++if test -f ${KERNEL_DIR}/lib/salome/bin/runSalome ; then + AC_MSG_RESULT(Using Kernel module distribution in ${KERNEL_DIR}) + Kernel_ok=yes + +@@ -72,7 +72,7 @@ if test -f ${KERNEL_DIR}/bin/salome/runS + AC_SUBST(KERNEL_ROOT_DIR) + AC_SUBST(KERNEL_SITE_DIR) + +- KERNEL_LDFLAGS=-L${KERNEL_DIR}/lib${LIB_LOCATION_SUFFIX}/salome ++ KERNEL_LDFLAGS=-L${KERNEL_DIR}/lib${LIB_LOCATION_SUFFIX}/salome/lib + KERNEL_CXXFLAGS=-I${KERNEL_DIR}/include/salome + + AC_SUBST(KERNEL_LDFLAGS) --- salome-kernel-6.5.0.orig/debian/patches/kernel-debian-occ.patch +++ salome-kernel-6.5.0/debian/patches/kernel-debian-occ.patch @@ -0,0 +1,84 @@ +Option to use the Debian/Ubuntu OpenCASCADE installation location, but +preferring the OCC standard install. + +Index: salome/KERNEL_SRC_5.1.3/salome_adm/unix/config_files/check_cas.m4 +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/salome_adm/unix/config_files/check_cas.m4 ++++ salome/KERNEL_SRC_5.1.3/salome_adm/unix/config_files/check_cas.m4 +@@ -41,6 +41,9 @@ + AC_SUBST(CAS_LDFLAGS) + AC_SUBST(CAS_LDPATH) + AC_SUBST(CAS_STDPLUGIN) ++AC_SUBST(CAS_LIBDIR) ++AC_SUBST(CAS_DATADIR) ++AC_SUBST(CASROOT) + + CAS_CPPFLAGS="" + CAS_CXXFLAGS="" +@@ -87,18 +90,18 @@ + done + fi + +-if test -d ${CASROOT}/${casdir}/lib; then +- CAS_LDPATH="-L$CASROOT/$casdir/lib " ++CAS_LIBDIR="$CASROOT/$casdir/lib" ++if test -d ${CAS_LIBDIR}; then + AC_MSG_RESULT(yes) + else + if test -d ${CASROOT}/lib; then +- CAS_LDPATH="-L$CASROOT/lib " ++ CAS_LIBDIR="$CASROOT/lib" + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + fi +- ++ CAS_LDPATH="-L$CAS_LIBDIR " + + dnl were is OCC ? + if test -z "$CASROOT"; then +@@ -108,8 +111,12 @@ + OCC_VERSION_MAJOR=0 + OCC_VERSION_MINOR=0 + OCC_VERSION_MAINTENANCE=0 +- ff=$CASROOT/inc/Standard_Version.hxx +- if test -f $ff ; then ++ if test -f $CASROOT/inc/Standard_Version.hxx; then ++ ff=$CASROOT/inc/Standard_Version.hxx ++ else ++ ff=$CASROOT/include/opencascade/Standard_Version.hxx ++ fi ++ if test -f $ff; then + grep "define OCC_VERSION_MAJOR" $ff > /dev/null + if test $? = 0 ; then + OCC_VERSION_MAJOR=`grep "define OCC_VERSION_MAJOR" $ff | awk '{i=3 ; print $i}'` +@@ -122,6 +129,19 @@ + if test $? = 0 ; then + OCC_VERSION_MAINTENANCE=`grep "define OCC_VERSION_MAINTENANCE" $ff | awk '{i=3 ; print $i}'` + fi ++ AC_MSG_CHECKING(for OpenCascade data files) ++ if test -f ${CASROOT}/src/UnitsAPI/Lexi_Expr.dat; then ++ CAS_DATADIR=${CASROOT} ++ AC_MSG_RESULT(found in $CAS_DATADIR/src) ++ else ++ if test -f ${CASROOT}/share/opencascade/${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}/src/UnitsAPI/Lexi_Expr.dat; then ++ CAS_DATADIR=${CASROOT}/share/opencascade/${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE} ++ AC_MSG_RESULT(found in $CAS_DATADIR/src) ++ else ++ occ_ok=no ++ AC_MSG_RESULT(not found, check OpenCascade installation) ++ fi ++ fi + fi + fi + +@@ -151,7 +171,7 @@ + CAS_CPPFLAGS="$CAS_CPPFLAGS -DOCC_CONVERT_SIGNALS" + ;; + esac +- CAS_CPPFLAGS="$CAS_CPPFLAGS -I$CASROOT/inc" ++ CAS_CPPFLAGS="$CAS_CPPFLAGS -I$CASROOT/inc -I$CASROOT/include/opencascade" + ;; + osf*) + CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DOCC_VERSION_MINOR=$OCC_VERSION_MINOR -DOCC_VERSION_MAINTENANCE=$OCC_VERSION_MAINTENANCE -DLIN -DLINTEL -DCSFDB -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H -I$CASROOT/inc" --- salome-kernel-6.5.0.orig/debian/patches/kernel-doc-images-svg.patch +++ salome-kernel-6.5.0/debian/patches/kernel-doc-images-svg.patch @@ -0,0 +1,26 @@ +Index: KERNEL_SRC/doc/salome/gui/doxyfile.in +=================================================================== +--- KERNEL_SRC.orig/doc/salome/gui/doxyfile.in ++++ KERNEL_SRC/doc/salome/gui/doxyfile.in +@@ -235,7 +235,7 @@ INCLUDED_BY_GRAPH = NO + CALL_GRAPH = NO + GRAPHICAL_HIERARCHY = NO + DIRECTORY_GRAPH = NO +-DOT_IMAGE_FORMAT = jpg ++DOT_IMAGE_FORMAT = svg + DOT_FONTNAME = Arial + DOT_PATH = + DOTFILE_DIRS = +Index: KERNEL_SRC/doc/salome/tui/doxyfile.in +=================================================================== +--- KERNEL_SRC.orig/doc/salome/tui/doxyfile.in ++++ KERNEL_SRC/doc/salome/tui/doxyfile.in +@@ -224,7 +224,7 @@ INCLUDED_BY_GRAPH = NO + CALL_GRAPH = NO + GRAPHICAL_HIERARCHY = YES + DIRECTORY_GRAPH = YES +-DOT_IMAGE_FORMAT = jpg ++DOT_IMAGE_FORMAT = svg + DOT_FONTNAME = Arial + DOT_PATH = + DOTFILE_DIRS = --- salome-kernel-6.5.0.orig/debian/patches/kernel-drop-useless-pass-statements.patch +++ salome-kernel-6.5.0/debian/patches/kernel-drop-useless-pass-statements.patch @@ -0,0 +1,153 @@ +From 4ece4146bd92e1ad19d4a5cc81ba916cf00e4839 Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Tue, 24 Jul 2012 12:33:29 +0200 +Subject: [PATCH 01/16] drop useless 'pass' statements + +--- + bin/killSalomeWithPort.py | 31 ------------------------------- + 1 files changed, 0 insertions(+), 31 deletions(-) + +diff --git a/bin/killSalomeWithPort.py b/bin/killSalomeWithPort.py +index a8a0469..c61b6cc 100755 +--- a/bin/killSalomeWithPort.py ++++ b/bin/killSalomeWithPort.py +@@ -58,7 +58,6 @@ def getPiDict(port,appname='salome',full=True,hidden=True,hostname=None): + if not hostname: + hostname = os.getenv("NSHOST") + if hostname: hostname = hostname.split(".")[0] +- pass + if full: + # full path to the pidict file is requested + if hidden: +@@ -69,8 +68,6 @@ def getPiDict(port,appname='salome',full=True,hidden=True,hostname=None): + # old-style non-dot-prefixed pidict files + # are in the user's home directory + dir = os.getenv("HOME") +- pass +- pass + return generateFileName(dir, + suffix="pidict", + hidden=hidden, +@@ -111,11 +108,9 @@ def appliCleanOmniOrbConfig(port): + pointedPath=os.path.join(os.path.dirname(last_running_config), pointedPath) + if pointedPath == omniorb_config: + os.unlink(last_running_config) +- pass + pass + if os.access(omniorb_config,os.F_OK): + os.remove(omniorb_config) +- pass + + if os.path.lexists(last_running_config):return + +@@ -132,8 +127,6 @@ def appliCleanOmniOrbConfig(port): + if current_config: + os.symlink(os.path.normpath(current_config), last_running_config) + +- pass +- pass + + ########## kills all salome processes with the given port ########## + +@@ -154,7 +147,6 @@ def shutdownMyPort(port): + if appli is not None: + home = os.path.join(home, appli,"USERS") + kwargs["with_username"]=True +- pass + omniorb_config = generateFileName(home, prefix="omniORB", + extension="cfg", + hidden=True, +@@ -176,7 +168,6 @@ def shutdownMyPort(port): + salome_kernel.LifeCycleCORBA.killOmniNames() + except: + pass +- pass + + def killMyPort(port): + """ +@@ -221,7 +212,6 @@ def killMyPort(port): + if not sys.platform == 'win32': + cmd = 'pid=`ps -eo pid,command | egrep "[0-9] omniNames -start %s"` ; echo $pid > %s' % ( str(port), fpidomniNames ) + a = os.system(cmd) +- pass + try: + fpidomniNamesFile = open(fpidomniNames) + lines = fpidomniNamesFile.readlines() +@@ -237,12 +227,8 @@ def killMyPort(port): + else: + if verbose(): print 'stop process '+pidfield+' : omniNames' + os.kill(int(pidfield),signal.SIGKILL) +- pass +- pass + except: + pass +- pass +- pass + except: + pass + # +@@ -258,14 +244,8 @@ def killMyPort(port): + win32pm.killpid(int(pid),0) + else: + os.kill(int(pid),signal.SIGKILL) +- pass +- pass + except: + if verbose(): print " ------------------ process %s : %s not found"% (pid, cmd[0]) +- pass +- pass # for pid, cmd ... +- pass # for process_id ... +- pass # try... + except: + pass + # +@@ -277,14 +257,10 @@ def killMyPort(port): + a = commands.getoutput("kill -9 " + pid) + pid = commands.getoutput(cmd) + #print pid +- pass +- pass + except: + print "Cannot find or open SALOME PIDs file for port", port +- pass + # + appliCleanOmniOrbConfig(port) +- pass + + def killNotifdAndClean(port): + """ +@@ -324,10 +300,8 @@ def killMyPortSpy(pid, port): + if e.errno != 3: + return + break +- pass + from time import sleep + sleep(dt) +- pass + filedict = getPiDict(port, hidden=True) + if not os.path.exists(filedict): + return +@@ -346,11 +320,9 @@ def killMyPortSpy(pid, port): + except: + # -- session is in naming service but has crash + status = None +- pass + if status: + if not status.activeGUI: + return +- pass + killMyPort(port) + return + +@@ -360,8 +332,5 @@ if __name__ == "__main__": + port = sys.argv[3] + killMyPortSpy(pid, port) + sys.exit(0) +- pass + for port in sys.argv[1:]: + killMyPort(port) +- pass +- pass +-- +1.7.2.5 + --- salome-kernel-6.5.0.orig/debian/patches/kernel-fix-clean.patch +++ salome-kernel-6.5.0/debian/patches/kernel-fix-clean.patch @@ -0,0 +1,13 @@ +Index: salome/KERNEL_SRC_5.1.3/doc/salome/tui/Makefile.am +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/doc/salome/tui/Makefile.am ++++ salome/KERNEL_SRC_5.1.3/doc/salome/tui/Makefile.am +@@ -31,7 +31,7 @@ + $(DOXYGEN) doxyfile + + clean-local: +- -rm -fr KERNEL log.txt doxyfile.bak ++ -rm -fr log.txt doxyfile.bak KERNEL/*.jpg KERNEL/*.html KERNEL/*.map KERNEL/*.md5 KERNEL/*.gif KERNEL/*.css KERNEL/*.png + + install-data-local: + if test -d KERNEL; then \ --- salome-kernel-6.5.0.orig/debian/patches/kernel-gcc-4.7-fixes.patch +++ salome-kernel-6.5.0/debian/patches/kernel-gcc-4.7-fixes.patch @@ -0,0 +1,115 @@ +From a18f557ff667ab8d5c5779c092acad18f74a8d40 Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Mon, 21 May 2012 15:47:50 +0200 +Subject: [PATCH] gcc 4.7 fixes + +--- + src/Basics/Basics_DirUtils.cxx | 1 + + src/DSC/DSC_Basic/ConnectionManager_i.cxx | 2 ++ + src/DSC/DSC_User/Datastream/GenericPort.hxx | 8 ++++---- + src/MPIContainer/MPIObject_i.cxx | 4 ++++ + src/MPIContainer/testMPI2.cxx | 1 + + src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx | 2 ++ + 6 files changed, 14 insertions(+), 4 deletions(-) + +diff --git a/src/Basics/Basics_DirUtils.cxx b/src/Basics/Basics_DirUtils.cxx +index 4ff0268..03d28dc 100644 +--- a/src/Basics/Basics_DirUtils.cxx ++++ b/src/Basics/Basics_DirUtils.cxx +@@ -29,6 +29,7 @@ + #ifndef WIN32 + # include + # include ++# include + #else + # include + # include +diff --git a/src/DSC/DSC_Basic/ConnectionManager_i.cxx b/src/DSC/DSC_Basic/ConnectionManager_i.cxx +index 4f1849e..468e45b 100644 +--- a/src/DSC/DSC_Basic/ConnectionManager_i.cxx ++++ b/src/DSC/DSC_Basic/ConnectionManager_i.cxx +@@ -29,6 +29,8 @@ + + #ifdef WIN32 + # include ++#else ++# include + #endif + + ConnectionManager_i::ConnectionManager_i(CORBA::ORB_ptr orb) { +diff --git a/src/DSC/DSC_User/Datastream/GenericPort.hxx b/src/DSC/DSC_User/Datastream/GenericPort.hxx +index c493097..ffb4c04 100644 +--- a/src/DSC/DSC_User/Datastream/GenericPort.hxx ++++ b/src/DSC/DSC_User/Datastream/GenericPort.hxx +@@ -283,7 +283,7 @@ void GenericPort::put(CorbaInDataType dataPara + // rem : Utilisation de l'évaluation gauche droite du logical C or + if ( waitingForAnyDataId || + ( waitingForConvenientDataId && +- isDataIdConveniant(storedDatas, expectedDataId, dummy1, dummy2, dummy3) ) ++ this->isDataIdConveniant(storedDatas, expectedDataId, dummy1, dummy2, dummy3) ) + ) { + #ifdef MYDEBUG + std::cout << "-------- Put : MARK 10 ------------------" << std::endl; +@@ -394,7 +394,7 @@ GenericPort::get(TimeType time, + // que la politique gére ce cas de figure + // - l'itérateur wDataIt1 est tel que wDataIt1->first < wdataId < (wDataIt1+1)->first + // Méthode provenant de la COUPLING_POLICY +- isDataIdConveniant(storedDatas,expectedDataId,isEqual,isBounded,wDataIt1); ++ this->isDataIdConveniant(storedDatas,expectedDataId,isEqual,isBounded,wDataIt1); + #ifdef MYDEBUG + std::cout << "-------- Get : MARK 3 ------------------" << std::endl; + #endif +@@ -651,8 +651,8 @@ GenericPort::next(TimeType &t, + std::cout << "-------- Next : MARK 6 ------------------" << std::endl; + #endif + +- t = getTime( (*wDataIt1).first ); +- tag = getTag ( (*wDataIt1).first ); ++ t = this->getTime( (*wDataIt1).first ); ++ tag = this->getTag ( (*wDataIt1).first ); + dataToTransmit = (*wDataIt1).second; + + #ifdef MYDEBUG +diff --git a/src/MPIContainer/MPIObject_i.cxx b/src/MPIContainer/MPIObject_i.cxx +index ce9c989..1bc313c 100644 +--- a/src/MPIContainer/MPIObject_i.cxx ++++ b/src/MPIContainer/MPIObject_i.cxx +@@ -28,6 +28,10 @@ + #include "utilities.h" + #include "Utils_SALOME_Exception.hxx" + ++#ifdef HAVE_MPI2 ++# include ++#endif ++ + #define TIMEOUT 5 + + MPIObject_i::MPIObject_i() +diff --git a/src/MPIContainer/testMPI2.cxx b/src/MPIContainer/testMPI2.cxx +index a5ea545..2082ea1 100644 +--- a/src/MPIContainer/testMPI2.cxx ++++ b/src/MPIContainer/testMPI2.cxx +@@ -2,6 +2,7 @@ + #include + #include + #include ++#include + #define TIMEOUT 20 + #define EPSILON 0.00000001 + +diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx +index ce1453a..6a3ebe6 100644 +--- a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx ++++ b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx +@@ -35,6 +35,8 @@ + + #ifdef WIN32 + # include ++#else ++# include + #endif + + #ifdef _DEBUG_ +-- +1.7.2.5 + --- salome-kernel-6.5.0.orig/debian/patches/kernel-hdf5-needs-mpi.patch +++ salome-kernel-6.5.0/debian/patches/kernel-hdf5-needs-mpi.patch @@ -0,0 +1,72 @@ +The HDF5 library requires MPI in order to work, so the MPI check needs to go +first, and the MPI variables need to be in the HDF5 check. + +Index: salome/KERNEL_SRC_5.1.3/salome_adm/unix/config_files/check_hdf5.m4 +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/salome_adm/unix/config_files/check_hdf5.m4 ++++ salome/KERNEL_SRC_5.1.3/salome_adm/unix/config_files/check_hdf5.m4 +@@ -65,7 +65,7 @@ + dnl hdf5 headers + + CPPFLAGS_old="$CPPFLAGS" +-CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES" ++CPPFLAGS="$CPPFLAGS $MPI_INCLUDES $LOCAL_INCLUDES" + AC_CHECK_HEADER(hdf5.h,hdf5_ok=yes ,hdf5_ok=no) + CPPFLAGS="$CPPFLAGS_old" + +@@ -76,7 +76,7 @@ + dnl hdf5 library + + LIBS_old="$LIBS" +- LIBS="$LIBS $LOCAL_LIBS" ++ LIBS="$LIBS $MPI_LIBS $LOCAL_LIBS" + AC_CHECK_LIB(hdf5,H5open,hdf5_ok=yes,hdf5_ok=no) + LIBS="$LIBS_old" + +@@ -84,9 +84,9 @@ + + if test "x$hdf5_ok" = "xyes" + then +- HDF5_INCLUDES="$LOCAL_INCLUDES" +- HDF5_LIBS="$LOCAL_LIBS -lhdf5 $LOCAL_RLIBS" +- HDF5_MT_LIBS="$LOCAL_LIBS -lhdf5 $LOCAL_RLIBS" ++ HDF5_INCLUDES="$MPI_INCLUDES $LOCAL_INCLUDES" ++ HDF5_LIBS="$MPI_LIBS $LOCAL_LIBS -lhdf5 $LOCAL_RLIBS" ++ HDF5_MT_LIBS="$MPI_LIBS $LOCAL_LIBS -lhdf5 $LOCAL_RLIBS" + fi + + if test "x$hdf5_ok" = "xyes" +Index: salome/KERNEL_SRC_5.1.3/configure.ac +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/configure.ac ++++ salome/KERNEL_SRC_5.1.3/configure.ac +@@ -222,6 +222,14 @@ + + CHECK_LIBXML + ++echo ++echo --------------------------------------------- ++echo checking if MPI is requested by user ++echo --------------------------------------------- ++echo ++ ++CHECK_MPI ++ + if test x$with_onlylauncher = xno; then + echo + echo --------------------------------------------- +@@ -303,14 +311,6 @@ + + echo + echo --------------------------------------------- +-echo checking if MPI is requested by user +-echo --------------------------------------------- +-echo +- +-CHECK_MPI +- +-echo +-echo --------------------------------------------- + echo checking if PaCO++ is requested by user + echo --------------------------------------------- + echo --- salome-kernel-6.5.0.orig/debian/patches/kernel-install-without-docs.patch +++ salome-kernel-6.5.0/debian/patches/kernel-install-without-docs.patch @@ -0,0 +1,19 @@ +Index: salome/KERNEL_SRC_5.1.3/doc/salome/gui/Makefile.am +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/doc/salome/gui/Makefile.am ++++ salome/KERNEL_SRC_5.1.3/doc/salome/gui/Makefile.am +@@ -6,9 +6,11 @@ + + docs: usr_docs + +-install-data-local: usr_docs +- $(INSTALL) -d $(DESTDIR)$(docdir)/gui +- cp -rp KERNEL $(DESTDIR)$(docdir)/gui ++install-data-local: ++ if test -d KERNEL; then \ ++ $(INSTALL) -d $(DESTDIR)$(docdir)/gui ; \ ++ cp -rp KERNEL $(DESTDIR)$(docdir)/gui ; \ ++ fi + + uninstall-local: + rm -rf $(DESTDIR)$(docdir)/gui/KERNEL --- salome-kernel-6.5.0.orig/debian/patches/kernel-killSalomeWithPort-don-t-use-a-tempfile-where-a-pipe.patch +++ salome-kernel-6.5.0/debian/patches/kernel-killSalomeWithPort-don-t-use-a-tempfile-where-a-pipe.patch @@ -0,0 +1,57 @@ +From 0c7db1de423ad88ff4e0ff13d0dc15471bf610e4 Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Tue, 24 Jul 2012 16:40:39 +0200 +Subject: [PATCH 02/16] killSalomeWithPort: don't use a tempfile where a pipe does the job + +--- + bin/killSalomeWithPort.py | 26 +++++++------------------- + 1 files changed, 7 insertions(+), 19 deletions(-) + +diff --git a/bin/killSalomeWithPort.py b/bin/killSalomeWithPort.py +index c61b6cc..50d8f98 100755 +--- a/bin/killSalomeWithPort.py ++++ b/bin/killSalomeWithPort.py +@@ -198,26 +198,12 @@ def killMyPort(port): + try: + fpid = open(filedict, 'r') + # +- from salome_utils import generateFileName +- if sys.platform == "win32": +- username = os.getenv( "USERNAME" ) +- else: +- username = os.getenv('USER') +- path = os.path.join('/tmp/logs', username) +- fpidomniNames = generateFileName(path, +- prefix="", +- suffix="Pid_omniNames", +- extension="log", +- with_port=port) +- if not sys.platform == 'win32': +- cmd = 'pid=`ps -eo pid,command | egrep "[0-9] omniNames -start %s"` ; echo $pid > %s' % ( str(port), fpidomniNames ) +- a = os.system(cmd) ++ import subprocess + try: +- fpidomniNamesFile = open(fpidomniNames) +- lines = fpidomniNamesFile.readlines() +- fpidomniNamesFile.close() +- os.remove(fpidomniNames) +- for l in lines: ++ cmd = subprocess.Popen(['ps', '-eo', 'pid,command'], stdout=subprocess.PIPE) ++ for l in cmd.stdout: ++ if l.split()[1:4] != ['omniNames', '-start', str(port)]: ++ continue + try: + pidfield = l.split()[0] # pid should be at the first position + if sys.platform == "win32": +@@ -231,6 +217,8 @@ def killMyPort(port): + pass + except: + pass ++ finally: ++ cmd.wait() + # + try: + process_ids=pickle.load(fpid) +-- +1.7.2.5 + --- salome-kernel-6.5.0.orig/debian/patches/kernel-ld-as-needed.patch +++ salome-kernel-6.5.0/debian/patches/kernel-ld-as-needed.patch @@ -0,0 +1,10 @@ +Index: salome-kernel-6.5.0/src/SALOMELocalTrace/Makefile.am +=================================================================== +--- salome-kernel-6.5.0.orig/src/SALOMELocalTrace/Makefile.am 2012-06-19 06:04:16.000000000 -0400 ++++ salome-kernel-6.5.0/src/SALOMELocalTrace/Makefile.am 2013-12-02 23:43:44.508730209 -0500 +@@ -49,4 +49,4 @@ + + libSALOMELocalTrace_la_LDFLAGS = -no-undefined -version-info=0:0:0 + libSALOMELocalTrace_la_CPPFLAGS = -I$(srcdir)/../Basics +-libSALOMELocalTrace_la_LIBADD = ../Basics/libSALOMEBasics.la ++libSALOMELocalTrace_la_LIBADD = ../Basics/libSALOMEBasics.la -lpthread --- salome-kernel-6.5.0.orig/debian/patches/kernel-machine-nonlinux.patch +++ salome-kernel-6.5.0/debian/patches/kernel-machine-nonlinux.patch @@ -0,0 +1,13 @@ +diff --git a/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 b/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 +index 8b7efc1..998a52a 100755 +--- a/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 ++++ b/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 +@@ -109,7 +109,7 @@ case $host_os in + MACHINE=VPP5000 + ;; + *) +- MACHINE= ++ MACHINE=DONTCARE + host_os_novers=$host_os + ;; + esac --- salome-kernel-6.5.0.orig/debian/patches/kernel-maint-mode.patch +++ salome-kernel-6.5.0/debian/patches/kernel-maint-mode.patch @@ -0,0 +1,18 @@ +Add AM_MAINTAINER_MODE into configure.ac and call configure +with --disable-maintainer-mode. +See in /usr/share/doc/autotools-dev/README.Debian.gz the section +about the problem with time-stamp skews when autotools are run +when building packages. + +Index: salome-kernel/configure.ac +=================================================================== +--- salome-kernel.orig/configure.ac ++++ salome-kernel/configure.ac +@@ -33,6 +33,7 @@ AC_CONFIG_AUX_DIR(salome_adm/unix/config + AC_CANONICAL_HOST + AC_CANONICAL_TARGET + AM_INIT_AUTOMAKE([tar-pax -Wno-portability]) ++AM_MAINTAINER_MODE + #AC_CONFIG_HEADER([config.h]) + + XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'` --- salome-kernel-6.5.0.orig/debian/patches/kernel-missing-destdir.patch +++ salome-kernel-6.5.0/debian/patches/kernel-missing-destdir.patch @@ -0,0 +1,26 @@ +diff --git a/salome_adm/cmake_files/install_and_compile_python_file.cmake b/salome_adm/cmake_files/install_and_compile_python_file.cmake +index ffbb3f4..a56104f 100644 +--- a/salome_adm/cmake_files/install_and_compile_python_file.cmake ++++ b/salome_adm/cmake_files/install_and_compile_python_file.cmake +@@ -20,7 +20,7 @@ + # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + # + +-SET(FULLDIR ${CMAKE_INSTALL_PREFIX}/${DEST}) ++SET(FULLDIR $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${DEST}) + MESSAGE(STATUS "py compiling ${FULLDIR}/${PYTHON_FILE}") + SET(CMD "import py_compile ; py_compile.compile('${FULLDIR}/${PYTHON_FILE}')") + EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "${CMD}") +diff --git a/salome_adm/cmake_files/install_python_from_idl.cmake b/salome_adm/cmake_files/install_python_from_idl.cmake +index 24faa8e..ea85388 100644 +--- a/salome_adm/cmake_files/install_python_from_idl.cmake ++++ b/salome_adm/cmake_files/install_python_from_idl.cmake +@@ -20,7 +20,7 @@ + # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + # + +-SET(FULLDIR ${CMAKE_INSTALL_PREFIX}/${DIR}) ++SET(FULLDIR $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${DIR}) + FILE(MAKE_DIRECTORY ${FULLDIR}) + MESSAGE(STATUS "Compiling ${IDL_FILE} into ${FULLDIR}") + EXECUTE_PROCESS(COMMAND ${OMNIORB_IDL_PYTHON} ${IDLPYFLAGS} -C${FULLDIR} ${IDL_FILE}) --- salome-kernel-6.5.0.orig/debian/patches/kernel-mpi-fix-lam.patch +++ salome-kernel-6.5.0/debian/patches/kernel-mpi-fix-lam.patch @@ -0,0 +1,14 @@ +Add missing #include + +Index: salome/KERNEL_SRC_5.1.3/src/MPIContainer/MPIObject_i.hxx +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/MPIContainer/MPIObject_i.hxx ++++ salome/KERNEL_SRC_5.1.3/src/MPIContainer/MPIObject_i.hxx +@@ -28,6 +28,7 @@ + + #include + #include ++#include + #include + #include CORBA_SERVER_HEADER(SALOME_MPIObject) + --- salome-kernel-6.5.0.orig/debian/patches/kernel-mpi-includes.patch +++ salome-kernel-6.5.0/debian/patches/kernel-mpi-includes.patch @@ -0,0 +1,28 @@ +Allow a separate MPI include directory (used by Debian's /usr/include/mpi link) + +Index: salome/KERNEL_SRC_5.1.3/salome_adm/unix/config_files/check_mpi.m4 +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/salome_adm/unix/config_files/check_mpi.m4 ++++ salome/KERNEL_SRC_5.1.3/salome_adm/unix/config_files/check_mpi.m4 +@@ -27,6 +27,10 @@ + [AC_HELP_STRING([--with-mpi_lib=DIR],[directory path of MPICH lib installation])], + MPILIBREQUESTED="$withval") + ++AC_ARG_WITH(mpi_include, ++ [AC_HELP_STRING([--with-mpi_include=DIR],[directory path of MPICH header file installation])], ++ MPIINCLUDEREQUESTED="$withval") ++ + AC_ARG_WITH(mpi, + [AC_HELP_STRING([--with-mpi=DIR],[root directory path of MPICH installation])], + MPIREQUESTED="yes",MPIREQUESTED="no") +@@ -58,6 +62,10 @@ + MPI_LIBS="-L$MPILIBREQUESTED" + fi + ++ if test x"$MPIINCLUDEREQUESTED" != x; then ++ MPI_INCLUDES="-I$MPIINCLUDEREQUESTED" ++ fi ++ + CPPFLAGS_old="$CPPFLAGS" + CPPFLAGS="$MPI_INCLUDES $CPPFLAGS" + AC_CHECK_HEADER(mpi.h,WITHMPI="yes",WITHMPI="no") --- salome-kernel-6.5.0.orig/debian/patches/kernel-mpi-libs.patch +++ salome-kernel-6.5.0/debian/patches/kernel-mpi-libs.patch @@ -0,0 +1,15 @@ +Debian-specific patch to use our libmpi++.so alternatives symlink. + +Index: KERNEL_SRC/salome_adm/unix/config_files/check_mpi.m4 +=================================================================== +--- KERNEL_SRC.orig/salome_adm/unix/config_files/check_mpi.m4 ++++ KERNEL_SRC/salome_adm/unix/config_files/check_mpi.m4 +@@ -85,7 +85,7 @@ if test x"$MPIREQUESTED" = xyes; then + + if test "$WITHMPI" = "yes";then + mpi_ok=yes +- MPI_LIBS="$MPI_LIBS -lmpi -lmpio -lmpiCC" ++ MPI_LIBS="$MPI_LIBS -lmpi -lmpi++" + else + mpi_ok=no + fi --- salome-kernel-6.5.0.orig/debian/patches/kernel-nameserver-don-t-put-logs-in-tmp-logs-USER.patch +++ salome-kernel-6.5.0/debian/patches/kernel-nameserver-don-t-put-logs-in-tmp-logs-USER.patch @@ -0,0 +1,97 @@ +From ee912920d99a030dbfea90dbcf9c8429924964b9 Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Tue, 24 Jul 2012 16:49:10 +0200 +Subject: [PATCH 04/16] nameserver: don't put logs in /tmp/logs/$USER/ + +There's just no way this can be safe, so put them somewhere in $HOME instead. +Also don't create world-writable directories. +--- + bin/nameserver.py | 41 ++++++----------------------------------- + 1 files changed, 6 insertions(+), 35 deletions(-) + +diff --git a/bin/nameserver.py b/bin/nameserver.py +index 426256b..67f8d48 100755 +--- a/bin/nameserver.py ++++ b/bin/nameserver.py +@@ -36,26 +36,9 @@ class NamingServer(Server): + USER='anonymous' + + def initNSArgs(self): +- if sys.platform == "win32": +- # temporarily using home directory for Namning Service logs +- # to be replaced with TEMP later... +- os.environ["BaseDir"]=os.environ["HOME"] +- else: +- os.environ["BaseDir"]="/tmp" +- +- try: +- os.mkdir(os.environ["BaseDir"] + "/logs") +- os.chmod(os.environ["BaseDir"] + "/logs", 0777) +- except: +- #print "Can't create " + os.environ["BaseDir"] + "/logs" +- pass +- +- upath = os.environ["BaseDir"] + "/logs/"; +- if sys.platform == "win32": +- upath += os.environ["Username"]; +- else: +- upath += os.environ["USER"]; ++ os.environ["BaseDir"]=os.environ["HOME"] + ++ upath = os.path.join(os.environ["BaseDir"], "salome_logs") + try: + os.mkdir(upath) + except: +@@ -86,33 +69,25 @@ class NamingServer(Server): + # remove the log files if the corresponding omniNames has not been killed. + # \end{E.A.} + +- upath += "/omniNames_%s"%(aPort) ++ upath = os.path.join(upath, "omniNames_%s" % aPort) + try: + os.mkdir(upath) + except: + #print "Can't create " + upath + pass + +- #os.system("touch " + upath + "/dummy") + for fname in os.listdir(upath): + try: +- os.remove(upath + "/" + fname) ++ os.remove(os.path.join(upath, fname)) + except: + pass +- #os.system("rm -f " + upath + "/omninames* " + upath + "/dummy " + upath + "/*.log") + +- #aSedCommand="s/.*NameService=corbaname::" + hname + ":\([[:digit:]]*\)/\1/" +- #print "sed command = ", aSedCommand +- #aPort = commands.getoutput("sed -e\"" + aSedCommand + "\"" + os.environ["OMNIORB_CONFIG"]) +- #print "port=", aPort + if sys.platform == "win32": + #print "start omniNames -start " + aPort + " -logdir " + upath + self.CMD=['omniNames -start ' , aPort , ' -nohostname ', ' -logdir ' , '\"' + upath + '\"', ' -errlog', '\"' + upath+'/omniNameErrors.log' + '\"'] + #os.system("start omniNames -start " + aPort + " -logdir " + upath) + else: +- #self.CMD=['omniNames -start ' , aPort , ' -logdir ' , upath , ' &'] +- self.CMD=['omniNames','-start' , aPort, '-logdir' , upath, '-errlog', upath+'/omniNameErrors.log'] +- #os.system("omniNames -start " + aPort + " -logdir " + upath + " &") ++ self.CMD=['omniNames','-start' , aPort, '-logdir' , upath, '-errlog', os.path.join(upath, 'omniNameErrors.log')] + + if verbose(): print "... ok" + if verbose(): print "to list contexts and objects bound into the context with the specified name : showNS " +@@ -120,11 +95,7 @@ class NamingServer(Server): + + def initArgs(self): + Server.initArgs(self) +- if sys.platform == "win32": +- env_ld_library_path=['env', 'LD_LIBRARY_PATH=' + os.getenv("PATH")] +- else: +- env_ld_library_path=['env', 'LD_LIBRARY_PATH=' + os.getenv("LD_LIBRARY_PATH")] +- self.CMD=['xterm', '-e']+ env_ld_library_path + ['python'] ++ self.CMD=['xterm', '-e', 'python'] + self.initNSArgs() + + # In LifeCycleCORBA, FactoryServer is started with rsh on the requested +-- +1.7.2.5 + --- salome-kernel-6.5.0.orig/debian/patches/kernel-nameserver-drop-unused-XTERM-and-LOGDIR-variables.patch +++ salome-kernel-6.5.0/debian/patches/kernel-nameserver-drop-unused-XTERM-and-LOGDIR-variables.patch @@ -0,0 +1,29 @@ +From 9b70001d8f4e382fa2fbb1e158221c278122315e Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Tue, 24 Jul 2012 16:45:35 +0200 +Subject: [PATCH 03/16] nameserver: drop unused XTERM and LOGDIR variables + +--- + bin/nameserver.py | 3 --- + 1 files changed, 0 insertions(+), 3 deletions(-) + +diff --git a/bin/nameserver.py b/bin/nameserver.py +index 94b15f6..426256b 100755 +--- a/bin/nameserver.py ++++ b/bin/nameserver.py +@@ -31,12 +31,9 @@ from launchConfigureParser import verbose + # ----------------------------------------------------------------------------- + + class NamingServer(Server): +- XTERM="" + USER=os.getenv('USER') + if USER is None: + USER='anonymous' +- #os.system("mkdir -m 777 -p /tmp/logs") +- LOGDIR="/tmp/logs/" + USER + + def initNSArgs(self): + if sys.platform == "win32": +-- +1.7.2.5 + --- salome-kernel-6.5.0.orig/debian/patches/kernel-no-bindir-libdir-override.patch +++ salome-kernel-6.5.0/debian/patches/kernel-no-bindir-libdir-override.patch @@ -0,0 +1,20 @@ +Index: salome-kernel/salome_adm/unix/make_common_starter.am +=================================================================== +--- salome-kernel.orig/salome_adm/unix/make_common_starter.am ++++ salome-kernel/salome_adm/unix/make_common_starter.am +@@ -41,8 +41,6 @@ endif + # Standard directory for installation + # + salomeincludedir = $(includedir)/salome +-libdir = $(prefix)/lib@LIB_LOCATION_SUFFIX@/salome +-bindir = $(prefix)/bin/salome + salomescriptdir = $(bindir) + # _GBO_SALOME_PYTHON_PACKAGING_ + # Maybe we could try to suppress on stage in this folder path, for +@@ -73,6 +71,3 @@ salome4deprdir = $(salomeadmdir)/unix + + # Shared modules installation directory + sharedpkgpythondir =$(salomepythondir)/shared_modules +- +-# Documentation directory +-docdir = $(datadir)/doc/salome --- salome-kernel-6.5.0.orig/debian/patches/kernel-non-linux.patch +++ salome-kernel-6.5.0/debian/patches/kernel-non-linux.patch @@ -0,0 +1,26 @@ +Index: KERNEL_SRC_6.5.0/src/DSC/DSC_User/Datastream/Calcium/fortoc.h +=================================================================== +--- KERNEL_SRC_6.5.0.orig/src/DSC/DSC_User/Datastream/Calcium/fortoc.h ++++ KERNEL_SRC_6.5.0/src/DSC/DSC_User/Datastream/Calcium/fortoc.h +@@ -23,7 +23,7 @@ + /* Operateur de concatenation */ + #define _(A,B) A##B + +-#ifdef __linux ++#ifdef __GNUC__ + #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 */ +Index: KERNEL_SRC_6.5.0/salome_adm/unix/config_files/check_cas.m4 +=================================================================== +--- KERNEL_SRC_6.5.0.orig/salome_adm/unix/config_files/check_cas.m4 ++++ KERNEL_SRC_6.5.0/salome_adm/unix/config_files/check_cas.m4 +@@ -172,7 +172,7 @@ dnl cascade headers + + CPPFLAGS_old="$CPPFLAGS" + case $host_os in +- linux*) ++ linux*|*bsd*|*gnu*) + CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DOCC_VERSION_MINOR=$OCC_VERSION_MINOR -DOCC_VERSION_MAINTENANCE=$OCC_VERSION_MAINTENANCE -DLIN -DLINTEL -DCSFDB -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H" + + OCC_VERSION_STRING="$OCC_VERSION_MAJOR.$OCC_VERSION_MINOR.$OCC_VERSION_MAINTENANCE" --- salome-kernel-6.5.0.orig/debian/patches/kernel-oce.patch +++ salome-kernel-6.5.0/debian/patches/kernel-oce.patch @@ -0,0 +1,25 @@ +Index: salome-kernel/salome_adm/unix/config_files/check_cas.m4 +=================================================================== +--- salome-kernel.orig/salome_adm/unix/config_files/check_cas.m4 ++++ salome-kernel/salome_adm/unix/config_files/check_cas.m4 +@@ -116,8 +116,10 @@ else + OCC_VERSION_DEVELOPMENT=0 + if test -f $CASROOT/inc/Standard_Version.hxx; then + ff=$CASROOT/inc/Standard_Version.hxx +- else ++ elif test -f $CASROOT/include/opencascade/Standard_Version.hxx; then + ff=$CASROOT/include/opencascade/Standard_Version.hxx ++ else ++ ff=$CASROOT/include/oce/Standard_Version.hxx + fi + if test -f $ff; then + grep "define OCC_VERSION_MAJOR" $ff > /dev/null +@@ -182,7 +184,7 @@ case $host_os in + CAS_CPPFLAGS="$CAS_CPPFLAGS -DOCC_CONVERT_SIGNALS" + ;; + esac +- CAS_CPPFLAGS="$CAS_CPPFLAGS -I$CASROOT/inc -I$CASROOT/include/opencascade" ++ CAS_CPPFLAGS="$CAS_CPPFLAGS -I$CASROOT/inc -I$CASROOT/include/opencascade -I$CASROOT/include/oce" + ;; + osf*) + CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DOCC_VERSION_MINOR=$OCC_VERSION_MINOR -DOCC_VERSION_MAINTENANCE=$OCC_VERSION_MAINTENANCE -DLIN -DLINTEL -DCSFDB -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H -I$CASROOT/inc" --- salome-kernel-6.5.0.orig/debian/patches/kernel-python-multiarch.patch +++ salome-kernel-6.5.0/debian/patches/kernel-python-multiarch.patch @@ -0,0 +1,45 @@ +From: Julien Cristau +Subject: Use python-config to get the needed preprocessor and linker flags + +Checking in "known" locations fail in Debian sid after libpython was +moved to multiarch directories instead of /usr/lib. + +diff --git a/salome_adm/unix/config_files/python.m4 b/salome_adm/unix/config_files/python.m4 +index 5ebc1f5..af4d6b0 100755 +--- a/salome_adm/unix/config_files/python.m4 ++++ b/salome_adm/unix/config_files/python.m4 +@@ -63,32 +63,11 @@ AC_DEFUN([CHECK_PYTHON], + changequote([, ])dnl + AC_SUBST(PYTHON_VERSION) + +- PY_MAKEFILE=${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python$PYTHON_VERSION/config/Makefile +- if test ! -f "$PY_MAKEFILE"; then +- if test "${build_cpu::6}" = "x86_64" ; then +- PY_MAKEFILE=${PYTHON_PREFIX}/lib64/python$PYTHON_VERSION/config/Makefile +- fi +- fi +- if test ! -f "$PY_MAKEFILE"; then +- AC_MSG_WARN([*** Couldn't find ${PY_MAKEFILE}. Maybe you are +-*** missing the development portion of the python installation]) +- python_ok=no +- fi +- + AC_SUBST(PYTHON_INCLUDES) + AC_SUBST(PYTHON_LIBS) + +- PYTHON_INCLUDES=-I$PYTHON_PREFIX/include/python$PYTHON_VERSION +- PYTHON_LIBS="-L${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}" +- PYTHON_LIB=$PYTHON_LIBS +- PYTHON_LIBA=${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python$PYTHON_VERSION/config/libpython$PYTHON_VERSION.a +- if test "${build_cpu::6}" = "x86_64" ; then +- if test "$PY_MAKEFILE" = "${PYTHON_PREFIX}/lib64/python$PYTHON_VERSION/config/Makefile" ; then +- PYTHON_LIBS="-L${PYTHON_PREFIX}/lib64/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}" +- PYTHON_LIB=$PYTHON_LIBS +- PYTHON_LIBA=${PYTHON_PREFIX}/lib64/python$PYTHON_VERSION/config/libpython$PYTHON_VERSION.a +- fi +- fi ++ PYTHON_INCLUDES=`$PYTHON-config --includes` ++ PYTHON_LIBS=`$PYTHON-config --libs` + + dnl At times (like when building shared libraries) you may want + dnl to know which OS Python thinks this is. --- salome-kernel-6.5.0.orig/debian/patches/kernel-python-noexec.patch +++ salome-kernel-6.5.0/debian/patches/kernel-python-noexec.patch @@ -0,0 +1,15 @@ +Change needed to run with .py files non-executable. + +Index: KERNEL_SRC/bin/runSalome.py +=================================================================== +--- KERNEL_SRC.orig/bin/runSalome.py ++++ KERNEL_SRC/bin/runSalome.py +@@ -208,7 +208,7 @@ class ContainerPYServer(Server): + if sys.platform == "win32": + self.CMD=[os.environ["PYTHONBIN"], '\"'+os.environ["KERNEL_ROOT_DIR"] + '/bin/salome/SALOME_ContainerPy.py'+'\"','FactoryServerPy'] + else: +- self.CMD=['SALOME_ContainerPy.py','FactoryServerPy'] ++ self.CMD=['SALOME_ContainerPy','FactoryServerPy'] + + # --- + --- salome-kernel-6.5.0.orig/debian/patches/kernel-python-script.patch +++ salome-kernel-6.5.0/debian/patches/kernel-python-script.patch @@ -0,0 +1,88 @@ +From: Julien Cristau +Subject: Move a bunch of python files from bindir to salomepythondir + +They don't seem to make sense executed directly, and are imported by +other modules. + +Index: salome-kernel/bin/Makefile.am +=================================================================== +--- salome-kernel.orig/bin/Makefile.am ++++ salome-kernel/bin/Makefile.am +@@ -64,7 +64,6 @@ dist_salomescript_PYTHON = \ + envSalome.py \ + killSalome.py \ + killSalomeWithPort.py \ +- launchConfigureParser.py \ + launchSalome.py \ + nameserver.py \ + NSparam.py \ +@@ -73,7 +72,6 @@ dist_salomescript_PYTHON = \ + runSalome.py \ + salomeConsole.py \ + salome_session.py \ +- salome_utils.py \ + server.py \ + setenv.py \ + showNS.py \ +@@ -82,6 +80,10 @@ dist_salomescript_PYTHON = \ + waitContainers.py \ + waitNS.py + ++dist_salomepython_PYTHON = \ ++ launchConfigureParser.py \ ++ salome_utils.py ++ + install-data-hook: + @for f in $(dist_salomescript_PYTHON) ; do \ + chmod -f a+x $(DESTDIR)$(salomescriptdir)/$$f ; \ +Index: salome-kernel/src/LifeCycleCORBA_SWIG/Makefile.am +=================================================================== +--- salome-kernel.orig/src/LifeCycleCORBA_SWIG/Makefile.am ++++ salome-kernel/src/LifeCycleCORBA_SWIG/Makefile.am +@@ -88,7 +88,7 @@ EXTRA_DIST = $(SWIGSOURCES) + # + + # Scripts to be installed. +-dist_salomescript_PYTHON =\ ++dist_salomepython_PYTHON =\ + LifeCycleCORBA.py \ + TestLifeCycleCORBA.py + +Index: salome-kernel/src/Logger/Makefile.am +=================================================================== +--- salome-kernel.orig/src/Logger/Makefile.am ++++ salome-kernel/src/Logger/Makefile.am +@@ -70,4 +70,4 @@ libSalomeLoggerServer_la_LIBADD = \ + @CORBA_LIBS@ + + # Scripts target +-dist_salomescript_PYTHON = SALOME_Trace.py ++dist_salomepython_PYTHON = SALOME_Trace.py +Index: salome-kernel/src/NamingService/Makefile.am +=================================================================== +--- salome-kernel.orig/src/NamingService/Makefile.am ++++ salome-kernel/src/NamingService/Makefile.am +@@ -36,7 +36,7 @@ salomeinclude_HEADERS =\ + SALOME_NamingService_defs.hxx + + # Scripts to be exported +-dist_salomescript_PYTHON =\ ++dist_salomepython_PYTHON =\ + SALOME_NamingServicePy.py + + +Index: salome-kernel/src/Utils/Makefile.am +=================================================================== +--- salome-kernel.orig/src/Utils/Makefile.am ++++ salome-kernel/src/Utils/Makefile.am +@@ -45,7 +45,9 @@ salomeinclude_HEADERS =\ + + # Scripts to be exported + dist_salomescript_PYTHON =\ +- Utils_Identity.py \ ++ Utils_Identity.py ++ ++dist_salomepython_PYTHON =\ + SALOME_utilities.py + + # Libraries targets --- salome-kernel-6.5.0.orig/debian/patches/kernel-remove-mpi-undefs.patch +++ salome-kernel-6.5.0/debian/patches/kernel-remove-mpi-undefs.patch @@ -0,0 +1,16 @@ +I have no idea why these are undef'd, they break the build when using OpenMPI. + +Index: salome/KERNEL_SRC_5.1.3/src/Communication_SWIG/libSALOME_Comm.i +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/Communication_SWIG/libSALOME_Comm.i ++++ salome/KERNEL_SRC_5.1.3/src/Communication_SWIG/libSALOME_Comm.i +@@ -26,9 +26,6 @@ + %{ + #include "ReceiverFactory.hxx" + #include "MatrixClient.hxx" +- #undef SEEK_SET +- #undef SEEK_CUR +- #undef SEEK_END + #include "SALOME_Comm_i.hxx" + #include "SALOMEMultiComm.hxx" + #include "SenderFactory.hxx" --- salome-kernel-6.5.0.orig/debian/patches/kernel-replace-csh-stderr.patch +++ salome-kernel-6.5.0/debian/patches/kernel-replace-csh-stderr.patch @@ -0,0 +1,32 @@ +Replace >& csh construct by 2> + +The former is recognized by bash, but not all by POSIX +shells, for instance dash throws this error: + sh: Syntax error: Bad fd number + +Index: salome/KERNEL_SRC_5.1.3/bin/waitNS.sh +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/bin/waitNS.sh ++++ salome/KERNEL_SRC_5.1.3/bin/waitNS.sh +@@ -22,7 +22,7 @@ + # + status=1 + while [ $status -ne 0 ]; do +- ls $HOME/$APPLI/USERS/.omniORB_${USER}_last.cfg >& /dev/null ++ ls $HOME/$APPLI/USERS/.omniORB_${USER}_last.cfg 2> /dev/null + status=$? + sleep 1 + echo -n "#" +Index: salome/KERNEL_SRC_5.1.3/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx ++++ salome/KERNEL_SRC_5.1.3/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx +@@ -557,7 +557,7 @@ + { + string cmd = ("from killSalomeWithPort import killNotifdAndClean; "); + cmd += string("killNotifdAndClean(") + portNumber + "); "; +- cmd = string("python -c \"") + cmd +"\" >& /dev/null"; ++ cmd = string("python -c \"") + cmd +"\" 2> /dev/null"; + MESSAGE(cmd); + system( cmd.c_str() ); + } --- salome-kernel-6.5.0.orig/debian/patches/kernel-runSalome-don-t-use-tmp-for-logs.patch +++ salome-kernel-6.5.0/debian/patches/kernel-runSalome-don-t-use-tmp-for-logs.patch @@ -0,0 +1,26 @@ +From 730cb8b70611a6596337d3c09b50b8ff7cdc4eff Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Tue, 24 Jul 2012 16:54:07 +0200 +Subject: [PATCH 05/16] runSalome: don't use /tmp for logs + +--- + bin/runSalome.py | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +diff --git a/bin/runSalome.py b/bin/runSalome.py +index c4b62a0..7f28d17 100755 +--- a/bin/runSalome.py ++++ b/bin/runSalome.py +@@ -216,8 +216,7 @@ class LoggerServer(Server): + self.args=args + self.initArgs() + from salome_utils import generateFileName +- if sys.platform == "win32": dirpath = os.environ["HOME"] +- else: dirpath = "/tmp" ++ dirpath = os.path.join(os.environ["HOME"], 'salome_logs') + logfile = generateFileName( dirpath, + prefix="logger", + extension="log", +-- +1.7.2.5 + --- salome-kernel-6.5.0.orig/debian/patches/kernel-runSalome-drop-semicolons.patch +++ salome-kernel-6.5.0/debian/patches/kernel-runSalome-drop-semicolons.patch @@ -0,0 +1,45 @@ +From 58ea0d62017bf527c1f60144c3e317ec6be43478 Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Tue, 24 Jul 2012 17:29:06 +0200 +Subject: [PATCH 06/16] runSalome: drop semicolons + +Cosmetic. +--- + bin/runSalome.py | 14 +++++++------- + 1 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/bin/runSalome.py b/bin/runSalome.py +index 7f28d17..25dd3c9 100755 +--- a/bin/runSalome.py ++++ b/bin/runSalome.py +@@ -812,20 +812,20 @@ def searchFreePort(args, save_config=1): + print "Searching for a free port for naming service:", + # + if sys.platform == "win32": +- tmp_file = os.getenv('TEMP'); ++ tmp_file = os.getenv('TEMP') + else: + tmp_file = '/tmp' + tmp_file = os.path.join(tmp_file, '.netstat_%s'%os.getpid()) + # + ###status = os.system("netstat -ltn | grep -E :%s > /dev/null 2>&1"%(NSPORT)) +- os.system( "netstat -a -n > %s" % tmp_file ); +- f = open( tmp_file, 'r' ); +- ports = f.readlines(); +- f.close(); +- os.remove( tmp_file ); ++ os.system( "netstat -a -n > %s" % tmp_file ) ++ f = open( tmp_file, 'r' ) ++ ports = f.readlines() ++ f.close() ++ os.remove( tmp_file ) + # + def portIsUsed(port, data): +- regObj = re.compile( ".*tcp.*:([0-9]+).*:.*listen", re.IGNORECASE ); ++ regObj = re.compile( ".*tcp.*:([0-9]+).*:.*listen", re.IGNORECASE ) + for item in data: + try: + p = int(regObj.match(item).group(1)) +-- +1.7.2.5 + --- salome-kernel-6.5.0.orig/debian/patches/kernel-runSalome-drop-unused-registerEnv.patch +++ salome-kernel-6.5.0/debian/patches/kernel-runSalome-drop-unused-registerEnv.patch @@ -0,0 +1,42 @@ +From 1d8ddd540e814c3615415dffd93f8d8c55fcc72e Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Wed, 25 Jul 2012 12:04:19 +0200 +Subject: [PATCH 10/16] runSalome: drop unused(?) registerEnv + +--- + bin/runSalome.py | 19 ------------------- + 1 files changed, 0 insertions(+), 19 deletions(-) + +diff --git a/bin/runSalome.py b/bin/runSalome.py +index 25dd3c9..9f5a862 100755 +--- a/bin/runSalome.py ++++ b/bin/runSalome.py +@@ -789,25 +789,6 @@ def execScript(script_path): + + # ----------------------------------------------------------------------------- + +-def registerEnv(args, modules_list, modules_root_dir): +- """ +- Register args, modules_list, modules_root_dir in a file +- for further use, when SALOME is launched embedded in an other application. +- """ +- if sys.platform == "win32": +- fileEnv = os.getenv('TEMP') +- else: +- fileEnv = '/tmp/' +- +- fileEnv += os.getenv('USER') + "_" + str(args['port']) \ +- + '_' + args['appname'].upper() + '_env' +- fenv=open(fileEnv,'w') +- pickle.dump((args, modules_list, modules_root_dir),fenv) +- fenv.close() +- os.environ["SALOME_LAUNCH_CONFIG"] = fileEnv +- +-# ----------------------------------------------------------------------------- +- + def searchFreePort(args, save_config=1): + print "Searching for a free port for naming service:", + # +-- +1.7.2.5 + --- salome-kernel-6.5.0.orig/debian/patches/kernel-runSalome-use-a-pipe-in-searchFreePort.patch +++ salome-kernel-6.5.0/debian/patches/kernel-runSalome-use-a-pipe-in-searchFreePort.patch @@ -0,0 +1,36 @@ +From bb02fdc5981a3800ad7b16c7e3b4cecbaa349f9e Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Wed, 25 Jul 2012 12:07:16 +0200 +Subject: [PATCH 11/16] runSalome: use a pipe in searchFreePort + +Replaces insecure tempfile usage. + +--- +Index: KERNEL_SRC_6.5.0/bin/runSalome.py +=================================================================== +--- KERNEL_SRC_6.5.0.orig/bin/runSalome.py ++++ KERNEL_SRC_6.5.0/bin/runSalome.py +@@ -792,18 +792,11 @@ def execScript(script_path): + def searchFreePort(args, save_config=1): + print "Searching for a free port for naming service:", + # +- if sys.platform == "win32": +- tmp_file = os.getenv('TEMP') +- else: +- tmp_file = '/tmp' +- tmp_file = os.path.join(tmp_file, '.netstat_%s'%os.getpid()) +- # +- ###status = os.system("netstat -ltn | grep -E :%s > /dev/null 2>&1"%(NSPORT)) +- os.system( "netstat -a -n > %s" % tmp_file ) +- f = open( tmp_file, 'r' ) +- ports = f.readlines() +- f.close() +- os.remove( tmp_file ) ++ import subprocess ++ cmd = subprocess.Popen(["netstat", "-a", "-n"], stdin=open(os.devnull), ++ stdout=subprocess.PIPE, stderr=open(os.devnull, 'w')) ++ cmd.wait() ++ ports = cmd.stdout.readlines() + # + def portIsUsed(port, data): + regObj = re.compile( ".*tcp.*:([0-9]+).*:.*listen", re.IGNORECASE ) --- salome-kernel-6.5.0.orig/debian/patches/kernel-runsalome.patch +++ salome-kernel-6.5.0/debian/patches/kernel-runsalome.patch @@ -0,0 +1,15 @@ +Look for killSalomeWithPort.py in python's module path, not in $PATH + +diff --git a/bin/runSalome.py b/bin/runSalome.py +index 9f52819..599b099 100755 +--- a/bin/runSalome.py ++++ b/bin/runSalome.py +@@ -991,7 +991,7 @@ def foreGround(clt, args): + if sys.platform == "win32": + server.CMD = [os.getenv("PYTHONBIN"), "-m", "killSalomeWithPort", "--spy", "%s"%(os.getpid()), "%s"%(port)] + else: +- server.CMD = ["killSalomeWithPort.py", "--spy", "%s"%(os.getpid()), "%s"%(port)] ++ server.CMD = ["python", "-m", "killSalomeWithPort", "--spy", "%s"%(os.getpid()), "%s"%(port)] + server.run() + # os.system("killSalomeWithPort.py --spy %s %s &"%(os.getpid(), port)) + # -- --- salome-kernel-6.5.0.orig/debian/patches/kernel-safe-include.patch +++ salome-kernel-6.5.0/debian/patches/kernel-safe-include.patch @@ -0,0 +1,283 @@ +Remove unnecessary extern "C" instances and add one necessary one. +Background: One must not #include mpi.h from within an extern "C" block. +Both mpi.h and hdf5.h are C++-safe, and should be included directly without +extern "C". For details, see: +http://www.open-mpi.org/community/lists/users/2007/12/4763.php + +Index: salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFobject.hxx +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/HDFPersist/HDFobject.hxx ++++ salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFobject.hxx +@@ -26,10 +26,7 @@ + #ifndef HDFOBJECT_HXX + #define HDFOBJECT_HXX + +-extern "C" +-{ + #include "HDFtypes.h" +-} + #include "HDFexport.hxx" + + class HDFPERSIST_EXPORT HDFobject { +Index: salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFinternalObject.cc +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/HDFPersist/HDFinternalObject.cc ++++ salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFinternalObject.cc +@@ -23,10 +23,7 @@ + // File : HDFinternalObject.cc + // Module : SALOME + // +-extern "C" +-{ + #include "hdfi.h" +-} + #include "HDFinternalObject.hxx" + + HDFinternalObject::HDFinternalObject(const char *name) +Index: salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFattribute.cc +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/HDFPersist/HDFattribute.cc ++++ salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFattribute.cc +@@ -23,10 +23,7 @@ + // File : HDFattribute.cc + // Module : SALOME + // +-extern "C" +-{ + #include "hdfi.h" +-} + #include "HDFexception.hxx" + #include "HDFattribute.hxx" + #include "HDFinternalObject.hxx" +Index: salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFcontainerObject.cc +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/HDFPersist/HDFcontainerObject.cc ++++ salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFcontainerObject.cc +@@ -23,10 +23,7 @@ + // File : HDFcontainerObject.cc + // Module : SALOME + // +-extern "C" +-{ + #include "hdfi.h" +-} + #include "HDFcontainerObject.hxx" + #include "HDFexception.hxx" + using namespace std; +Index: salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFdataset.cc +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/HDFPersist/HDFdataset.cc ++++ salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFdataset.cc +@@ -23,11 +23,8 @@ + // File : HDFdataset.cc + // Module : SALOME + // +-extern "C" +-{ + #include "hdfi.h" + #include +-} + #include "HDFdataset.hxx" + #include "HDFcontainerObject.hxx" + #include "HDFexception.hxx" +Index: salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFfile.cc +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/HDFPersist/HDFfile.cc ++++ salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFfile.cc +@@ -23,8 +23,6 @@ + // File : HDFfile.cc + // Module : SALOME + // +-extern "C" +-{ + #include "hdfi.h" + #ifndef WIN32 + #include +@@ -33,7 +31,6 @@ + #define F_OK 0 + #endif + #include +-} + #include + #include "HDFfile.hxx" + #include "HDFexception.hxx" +Index: salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFgroup.cc +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/HDFPersist/HDFgroup.cc ++++ salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFgroup.cc +@@ -23,11 +23,8 @@ + // File : HDFgroup.cc + // Module : SALOME + // +-extern "C" +-{ + #include "hdfi.h" + #include +-} + #include "HDFgroup.hxx" + #include "HDFexception.hxx" + using namespace std; +Index: salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFcontainerObject.hxx +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/HDFPersist/HDFcontainerObject.hxx ++++ salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFcontainerObject.hxx +@@ -26,10 +26,7 @@ + #ifndef HDFCONTAINEROBJECT_HXX + #define HDFCONTAINEROBJECT_HXX + +-extern "C" +-{ + #include "HDFtypes.h" +-} + #include "HDFobject.hxx" + #include "HDFinternalObject.hxx" + #include "HDFexport.hxx" +Index: salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFconvert.hxx +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/HDFPersist/HDFconvert.hxx ++++ salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFconvert.hxx +@@ -26,8 +26,6 @@ + #ifndef HDFCONVERT_HXX + #define HDFCONVERT_HXX + +-extern "C" +-{ + #include "HDFtypes.h" + #ifndef WIN32 + #include +@@ -39,7 +37,6 @@ + #include + #include + #include +-} + #include "HDFexport.hxx" + #include "HDFcontainerObject.hxx" + #include "HDFdataset.hxx" +Index: salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFOI.hxx +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/HDFPersist/HDFOI.hxx ++++ salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFOI.hxx +@@ -23,10 +23,7 @@ + // File : HDFOI.hxx + // Module : SALOME + // +-extern "C" +-{ + #include "HDFtypes.h" +-} + + #include "HDFattribute.hxx" + #include "HDFfile.hxx" +Index: salome/KERNEL_SRC_5.1.3/src/HDFPersist/hdfi.h +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/HDFPersist/hdfi.h ++++ salome/KERNEL_SRC_5.1.3/src/HDFPersist/hdfi.h +@@ -32,6 +32,9 @@ + + /* HDF C INTERFACE */ + ++#ifdef __cplusplus ++extern "C" { ++#endif + /* File Interface */ + extern + hdf_idt HDFfileCreate(char *name); +@@ -125,5 +128,8 @@ + + extern + hdf_err HDFobjectType(hdf_idt id, char *name, hdf_object_type *type); ++#ifdef __cplusplus ++} ++#endif + + #endif /* HDFI_H */ +Index: salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFinternalObject.hxx +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/HDFPersist/HDFinternalObject.hxx ++++ salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFinternalObject.hxx +@@ -26,10 +26,7 @@ + #ifndef HDFINTERNALOBJECT_HXX + #define HDFINTERNALOBJECT_HXX + +-extern "C" +-{ + #include "HDFtypes.h" +-} + #include "HDFobject.hxx" + #include "HDFexport.hxx" + +Index: salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFattribute.hxx +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/HDFPersist/HDFattribute.hxx ++++ salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFattribute.hxx +@@ -26,10 +26,7 @@ + #ifndef HDFATTRIBUTE_HXX + #define HDFATTRIBUTE_HXX + +-extern "C" +-{ + #include "HDFtypes.h" +-} + #include "HDFinternalObject.hxx" + #include "HDFcontainerObject.hxx" + +Index: salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFdataset.hxx +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/HDFPersist/HDFdataset.hxx ++++ salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFdataset.hxx +@@ -26,10 +26,7 @@ + #ifndef HDFDATASET_HXX + #define HDFDATASET_HXX + +-extern "C" +-{ + #include "HDFtypes.h" +-} + #include "HDFinternalObject.hxx" + #include "HDFcontainerObject.hxx" + #include "HDFexport.hxx" +Index: salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFfile.hxx +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/HDFPersist/HDFfile.hxx ++++ salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFfile.hxx +@@ -26,10 +26,7 @@ + #ifndef HDFFILE_HXX + #define HDFFILE_HXX + +-extern "C" +-{ + #include "HDFtypes.h" +-} + #include "HDFcontainerObject.hxx" + #include "HDFexport.hxx" + +Index: salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFgroup.hxx +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/HDFPersist/HDFgroup.hxx ++++ salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFgroup.hxx +@@ -26,10 +26,7 @@ + #ifndef HDFGROUP_HXX + #define HDFGROUP_HXX + +-extern "C" +-{ + #include "HDFtypes.h" +-} + #include "HDFcontainerObject.hxx" + #include "HDFexport.hxx" + +Index: salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFobject.cc +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/HDFPersist/HDFobject.cc ++++ salome/KERNEL_SRC_5.1.3/src/HDFPersist/HDFobject.cc +@@ -24,10 +24,7 @@ + // Module : SALOME + // + #include "HDFobject.hxx" +-extern "C" +-{ + #include "hdfi.h" +-} + + #include + #include --- salome-kernel-6.5.0.orig/debian/patches/kernel-salome_utils-make-getTmpDir-return-a-dir-under-HOME.patch +++ salome-kernel-6.5.0/debian/patches/kernel-salome_utils-make-getTmpDir-return-a-dir-under-HOME.patch @@ -0,0 +1,25 @@ +From 1714f1a6176f2356cceafe7c304cacae9e955eb5 Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Tue, 24 Jul 2012 17:30:12 +0200 +Subject: [PATCH 07/16] salome_utils: make getTmpDir return a directory under $HOME + +Predictable names in world-writable directories == bad. +--- + bin/salome_utils.py | 6 ++---- + 1 files changed, 2 insertions(+), 4 deletions(-) + +Index: KERNEL_SRC_6.5.0/bin/salome_utils.py +=================================================================== +--- KERNEL_SRC_6.5.0.orig/bin/salome_utils.py ++++ KERNEL_SRC_6.5.0/bin/salome_utils.py +@@ -235,9 +235,7 @@ def getTmpDir(): + # to be replaced with TEMP environment variable later... + dir = os.getenv("HOME") + else: +- # for Linux: use /tmp/logs/{user} folder +- dir = os.path.join( '/tmp', 'logs', getUserName() ) +- pass ++ dir = os.path.join(os.getenv("HOME"), ".salome", getShortHostName()) + return dir + + # --- --- salome-kernel-6.5.0.orig/debian/patches/kernel-salome_utils-simplify-makeTmpDir.patch +++ salome-kernel-6.5.0/debian/patches/kernel-salome_utils-simplify-makeTmpDir.patch @@ -0,0 +1,54 @@ +From a8ff0c89b7548462a96a7c4487c61a34b77c25ff Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Tue, 24 Jul 2012 17:31:13 +0200 +Subject: [PATCH 08/16] salome_utils: simplify makeTmpDir + +Use standard python functions instead of calling out (insecurely) to the shell. +--- + bin/salome_utils.py | 21 +-------------------- + 1 files changed, 1 insertions(+), 20 deletions(-) + +Index: KERNEL_SRC_6.5.0/bin/salome_utils.py +=================================================================== +--- KERNEL_SRC_6.5.0.orig/bin/salome_utils.py ++++ KERNEL_SRC_6.5.0/bin/salome_utils.py +@@ -373,7 +373,7 @@ def generateFileName( dir, prefix = None + + # --- + +-def makeTmpDir( path, mode=0777 ): ++def makeTmpDir( path, mode=0700 ): + """ + Make temporary directory with the specified path. + If the directory exists then clear its contents. +@@ -382,26 +382,10 @@ def makeTmpDir( path, mode=0777 ): + - path : absolute path to the directory to be created. + - mode : access mode + """ +- import os +- if os.path.exists( path ): +- import sys +- if sys.platform == "win32": +- os.system( "rmdir /S /Q " + '"' + path + '"' ) +- os.system( "mkdir " + '"' + path + '"' ) +- else: +- os.system( "rm -rf " + path + "/*" ) +- else: +- dirs = path.split("/") +- shift1 = shift2 = 0 +- if not dirs[0]: shift1 = 1 +- if dirs[-1]: shift2 = 1 +- for i in range(1+shift1,len(dirs)+shift2): +- p = "/".join(dirs[:i]) +- try: +- os.mkdir(p, mode) +- os.chmod(p, mode) +- except: +- pass ++ import os, shutil ++ print 'makeTmpDir %r %o' % (path, mode) ++ shutil.rmtree(path, ignore_errors=True) ++ os.makedirs(path, mode) + + # --- + --- salome-kernel-6.5.0.orig/debian/patches/kernel-whrandom-to-random.patch +++ salome-kernel-6.5.0/debian/patches/kernel-whrandom-to-random.patch @@ -0,0 +1,32 @@ +Use random instead of deprecated whrandom (gone as of python 2.5). + +Index: salome/KERNEL_SRC_5.1.3/src/KERNEL_PY/batchmode_salome.py +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/KERNEL_PY/batchmode_salome.py ++++ salome/KERNEL_SRC_5.1.3/src/KERNEL_PY/batchmode_salome.py +@@ -52,8 +52,8 @@ + #-------------------------------------------------------------------------- + + def generateName(prefix = None): +- import whrandom; +- int = whrandom.randint(1,1000); ++ import random; ++ int = random.randint(1,1000); + if prefix is None: + return "Study" + str(int) + else : +Index: salome/KERNEL_SRC_5.1.3/src/KERNEL_PY/salome_study.py +=================================================================== +--- salome.orig/KERNEL_SRC_5.1.3/src/KERNEL_PY/salome_study.py ++++ salome/KERNEL_SRC_5.1.3/src/KERNEL_PY/salome_study.py +@@ -109,8 +109,8 @@ + #-------------------------------------------------------------------------- + + def generateName(prefix = None): +- import whrandom; +- int = whrandom.randint(1,1000); ++ import random; ++ int = random.randint(1,1000); + if prefix is None: + return "Study" + str(int) + else : --- salome-kernel-6.5.0.orig/debian/patches/quiltrc +++ salome-kernel-6.5.0/debian/patches/quiltrc @@ -0,0 +1,3 @@ +QUILT_PATCHES="debian/patches" +QUILT_NO_DIFF_TIMESTAMPS=1 + --- salome-kernel-6.5.0.orig/debian/patches/series +++ salome-kernel-6.5.0/debian/patches/series @@ -0,0 +1,49 @@ +kernel-maint-mode.patch +#kernel-safe-include.patch +#kernel-mpi-includes.patch +#kernel-mpi-fix-lam.patch +kernel-mpi-libs.patch +#kernel-hdf5-needs-mpi.patch +#kernel-remove-mpi-undefs.patch +#kernel-debian-occ.patch +kernel-config-extra.patch +kernel-debian-dirs.patch +#kernel-fix-clean.patch -p2 +#kernel-python-noexec.patch +#kernel-install-without-docs.patch +#kernel-whrandom-to-random.patch +#kernel-doc-images-svg.patch +#kernel-replace-csh-stderr.patch +kernel-oce.patch +kernel-runsalome.patch +kernel-gcc-4.7-fixes.patch +kernel-check_vtk-useless-libs.patch +kernel-check_cas-hack.patch +kernel-add-rpath-for-paraview-libs.patch +kernel-python-script.patch +kernel-missing-destdir.patch +kernel-no-bindir-libdir-override.patch +kernel-drop-useless-pass-statements.patch +kernel-killSalomeWithPort-don-t-use-a-tempfile-where-a-pipe.patch +kernel-nameserver-drop-unused-XTERM-and-LOGDIR-variables.patch +kernel-nameserver-don-t-put-logs-in-tmp-logs-USER.patch +kernel-runSalome-don-t-use-tmp-for-logs.patch +kernel-runSalome-drop-semicolons.patch +kernel-salome_utils-make-getTmpDir-return-a-dir-under-HOME.patch +kernel-salome_utils-simplify-makeTmpDir.patch +kernel-Basics_DirUtils-use-mkstemp-on-unix.patch +kernel-runSalome-drop-unused-registerEnv.patch +kernel-runSalome-use-a-pipe-in-searchFreePort.patch +kernel-SALOME_ContainerManager-don-t-use-predictable-tmp-fi.patch +kernel-SALOME_ContainerPy.py-no-predictable-tempfile-replac.patch +kernel-HDFPersist-HDFascii-use-mkdtemp-in-copy-of-GetTmpDir.patch +#kernel-Kill-more-copies-of-GetTmpDir.patch +kernel-machine-nonlinux.patch +kernel-Fix-CHECK_CAS-autoconf-macro-to-look-for-libs-in-the.patch +kernel-Use-delete-to-free-arrays.patch +kernel-non-linux.patch +kernel-cppunit-multiarch.patch +kernel-python-multiarch.patch +kernel-check-boost.patch +kernel-boost-1.54.patch +kernel-ld-as-needed.patch --- salome-kernel-6.5.0.orig/debian/rules +++ salome-kernel-6.5.0/debian/rules @@ -0,0 +1,136 @@ +#!/usr/bin/make -f +# Made with the aid of debmake, by Christoph Lameter, +# based on the sample debian/rules file for GNU hello by Ian Jackson. + +export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) +package = $(shell dpkg-parsechangelog | awk '/^Source:/ { print $$2 }') + +builddir = build-$(package) + +# Support multiple makes at once +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +NJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +else +NJOBS := 1 +endif + +include /usr/share/quilt/quilt.make + +clean: unpatch + dh_testdir + -rm -rf $(builddir) $(builddir)-doc + # Remove files copied from debian/ + -rm -f bin/runSalome.in \ + bin/killSalome.in \ + bin/appliskel/env.d/envProducts.sh.in + # Remove files generated by build_configure + -find * -name build_configure.log -delete + -find * -name configure.in -delete + # Remove files generated by libtool, except in DEPRECATED directories + -find * -name libtool.m4 -o -name ltmain.sh -o -name lt\*.m4 -o -name config.guess -o -name config.sub | grep -v /DEPRECATED/ | xargs --no-run-if-empty rm + # Remove files generated by automake, except in DEPRECATED directories + -find * -name depcomp -o -name install-sh -o -name missing | \ + grep -v /DEPRECATED/ | xargs --no-run-if-empty rm + -find * -name py-compile | grep config_files | xargs --no-run-if-empty rm + # some Makefile.in are not generated by automake + -find * -name Makefile.in | while read f; do \ + test ! -e $${f%.in}.am || rm -f $$f; \ + done + # Remove files generated by autoconf + -find * -name configure -delete + # Remove files generated by aclocal + -find * -name aclocal.m4 -delete + rm -f *-stamp + dh_clean + +reconfigure-stamp: $(QUILT_STAMPFN) + # Install new .in files + cp -fp debian/runSalome.in debian/killSalome.in bin/ + install -d -m 755 bin/appliskel/env.d/ + cp -fp debian/envProducts.sh.in bin/appliskel/env.d/ + ./build_configure + >$@ + +build: build-arch build-indep +build-arch: build-arch-stamp +build-arch-stamp: $(QUILT_STAMPFN) reconfigure-stamp + dh_testdir + mkdir -p $(builddir) + cd $(builddir) && \ + ../configure \ + --prefix=/usr \ + --disable-dependency-tracking \ + --disable-maintainer-mode \ + --with-mpi=/usr --with-mpi_include=/usr/include/mpi \ + --bindir=/usr/lib/salome/bin --libdir=/usr/lib/salome/lib \ + --docdir=/usr/share/doc/salome-kernel-doc \ + CASROOT=/usr \ + KERNEL_ROOT_DIR=$(CURDIR)/debian/salome-kernel/usr + $(MAKE) -C $(builddir) -j $(NJOBS) \ + LD_LIBRARY_PATH=$(CURDIR)/debian/salome-kernel/usr/lib/salome/lib \ + pythondir=/usr/lib/salome/python \ + pyexecdir=/usr/lib/salome/python + >$@ + +build-indep: build-indep-stamp +build-indep-stamp: build-arch-stamp + +install: build install-stamp + +install-arch: build-arch install-stamp + +# This installs everything, so it's not really install-arch-stamp +install-stamp: build-arch-stamp + dh_testdir + dh_prep + $(MAKE) -C $(builddir) install \ + LD_LIBRARY_PATH=$(CURDIR)/debian/tmp/usr/lib/salome/lib \ + DESTDIR=$(CURDIR)/debian/tmp \ + pythondir=/usr/lib/salome/python \ + pyexecdir=/usr/lib/salome/python + rm -f debian/tmp/usr/lib/salome/lib/*.la + find debian/tmp/usr/lib/salome/bin/ -name '*.pyc' -delete + find debian/tmp/usr/lib/salome/bin/ -name '*.pyo' -delete + rm -f debian/tmp/usr/lib/salome/bin/VERSION + rm -f debian/tmp/usr/lib/salome/bin/*.csh debian/tmp/usr/lib/salome/bin/*.ksh debian/tmp/usr/lib/salome/bin/*.bat + +binary-indep: install-stamp + dh_testdir -i + dh_testroot -i + dh_installdirs -i + dh_install -i --list-missing + dh_installdocs -i + dh_installchangelogs -i + dh_installmenu -i + dh_link -i + dh_compress -i + dh_fixperms -i + dh_strip -i + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +binary-arch: install-stamp + dh_testdir -a + dh_testroot -a + dh_installdirs -a + dh_install -a --list-missing + dh_installdocs -a + dh_installchangelogs -a + dh_pysupport -a /usr/lib/salome/python + dh_installmenu -a + dh_link -a + dh_compress -a + dh_fixperms -a + dh_strip -a --dbg-package=salome-kernel-dbg + dh_makeshlibs -a + dh_shlibdeps -a -l $(CURDIR)/debian/salome/usr/lib/salome/lib + dh_installdeb -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +binary: binary-arch binary-indep + +.PHONY: binary binary-arch binary-indep clean install install-arch install-indep build build-arch build-indep --- salome-kernel-6.5.0.orig/debian/runSalome.in +++ salome-kernel-6.5.0/debian/runSalome.in @@ -0,0 +1,68 @@ +#!/bin/bash + +export prefix=@prefix@ +export KERNEL_ROOT_DIR=@prefix@ +export GUI_ROOT_DIR=@prefix@ +export PARAVIS_ROOT_DIR=@prefix@ +export GEOM_ROOT_DIR=@prefix@ +export MED_ROOT_DIR=@prefix@ +export VISU_ROOT_DIR=@prefix@ +export SMESH_ROOT_DIR=@prefix@ +export NETGENPLUGIN_ROOT_DIR=@prefix@ +export YACS_ROOT_DIR=@prefix@ +export MULTIPR_ROOT_DIR=@prefix@ +export COMPONENT_ROOT_DIR=@prefix@ +export RANDOMIZER_ROOT_DIR=@prefix@ +export SIERPINSKY_ROOT_DIR=@prefix@ +export CALCULATOR_ROOT_DIR=@prefix@ +export PYCALCULATOR_ROOT_DIR=@prefix@ + +export DISABLE_FPE=1 + +# This is a major kludge! But it's necessary for Salome to open with .py files +# in the right place... +export bindir=${prefix}/lib/salome/bin +export libdir=${prefix}/lib/salome/lib +export PATH=$PATH:${bindir} +export LD_LIBRARY_PATH=${prefix}/lib:${libdir}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} +#export CASROOT=@prefix@ +#export CSF_UnitsLexicon=${CASROOT}/share/opencascade/6.3.0/src/UnitsAPI/Lexi_Expr.dat +#export CSF_UnitsDefinition=${CASROOT}/share/opencascade/6.3.0/src/UnitsAPI/Units.dat +export SALOME_PYTHON_DIR=${prefix}/lib/salome/python/salome +export PYTHONPATH=$PYTHONPATH:@pythondir@/omniORB:${SALOME_PYTHON_DIR}:${bindir} + +if [ $# -ne 0 ] ; then + python ${bindir}/envSalome.py python -i -m runSalome "$@" +else + python -m runSalome +fi + +# ----------------------------------------------------------------------------- +# examples: +# --------- +# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome +# +# - parameters for launching are taken from SalomeApp.xml; +# - if the config file does not exist, it is created with default values. +# +# +# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome --modules=GEOM,SMESH,VISU,SUPERV,MED --embedded=registry,study,moduleCatalog,cppContainer --standalone=pyContainer,supervContainer --xterm --killall +# +# parameters from command line supersede those from SalomeApp.xml +# +# Some CORBA servers can be launched in the SALOME_Session_Server's process +# (embedded = same process) or in a separate process (standalone): +# --> registry,study,moduleCatalog,cppContainer +# Other CORBA servers could only be launched in separate process (standalone): +# --> pyContainer,supervContainer +# +# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome -h +# help +# ----------------------------------------------------------------------------- +# +# l'option -i permet de garder l'interpreteur python ouvert : +# par defaut, les differents serveurs ouvrent des fenêtres xterm +# (cf. runSalome.py) +# le serveur Logger n'est pas obligatoire (commenté dans runSalome.py) +# +# ----------------------------------------------------------------------------- --- salome-kernel-6.5.0.orig/debian/salome-kernel-dev.install +++ salome-kernel-6.5.0/debian/salome-kernel-dev.install @@ -0,0 +1,3 @@ +usr/salome_adm usr/share/salome/KERNEL_SRC +usr/include/salome/ +usr/idl usr/share/salome/ --- salome-kernel-6.5.0.orig/debian/salome-kernel-doc.install +++ salome-kernel-6.5.0/debian/salome-kernel-doc.install @@ -0,0 +1 @@ +usr/share/doc/salome-kernel-doc --- salome-kernel-6.5.0.orig/debian/salome-kernel.install +++ salome-kernel-6.5.0/debian/salome-kernel.install @@ -0,0 +1,2 @@ +usr/lib/salome +usr/share/salome/resources --- salome-kernel-6.5.0.orig/debian/salome-kernel.links +++ salome-kernel-6.5.0/debian/salome-kernel.links @@ -0,0 +1,2 @@ +/usr/lib/salome/bin/runSalome usr/bin/runSalome +/usr/lib/salome/bin/killSalome usr/bin/killSalome