--- 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:
+
+- The main salome binary package includes several modules loaded
+ by default at runtime called: KERNEL, GUI, GEOM, MED, VISU, SMESH and
+ YACS.
+ - salome-extras includes RANDOMIZER, COMPONENT and SIERPINSKY, and
+ will include NETGENPLUGIN when it links to Debian's Netgen library
+ package.
+ - salome-examples includes the LIGHT and PYLIGHT light-weight
+ graphical interfaces for Salomé, and HELLO, PYHELLO, CALCULATOR and
+ PYCALCULATOR modules as examples of module development.
+ - The HXX2SALOME and XDATA modules in the salome-dev package
+ provide tools for module development; that package also provides headers
+ and shared library symlinks.
+ - And the salome-test package includes numerous test programs and
+ data.
+
+
+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:
+
+ - Make man pages for the salome scripts in /usr/bin.
+ - Build a test suite script which runs all of the tests in the
+ salome-test package.
+ - Link to the Aster and Saturne mechanics/heat and fluid flow solvers
+ - Make a salome-dev-doc binary out of the (voluminous) generated
+ documentation.
+ - The .m4 files' check names like CHECK_KERNEL are a bit presumptuous.
+ They should change to CHECK_SALOME_KERNEL etc.
+ - Many of the libs need to link to additional libraries to get all of their
+ symbols, and many of them link to libraries they don't need (see
+ dh_shlibdeps warnings).
+
- Right now, the package only builds a python2.6 version. However,
+ rebuilding just the python parts of each module for each python version
+ will be very tricky, and rebuilding the entire thing for each python
+ version is probably unworkable -- the package takes long enough to build as
+ it is!
+
+
+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