From: Serge Rehbinder Date: Fri, 8 Jul 2016 06:43:04 +0000 (+0200) Subject: base X-Git-Tag: 5.0.0a0~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cfa9edfb956345c69090469b519a94dcc55ba382;p=tools%2Fsat.git base --- diff --git a/commands/compile.py b/commands/compile.py index f0f8afd..89bff4e 100644 --- a/commands/compile.py +++ b/commands/compile.py @@ -509,4 +509,7 @@ def run(args, runner, logger): 'valid_result': nb_products - res, 'nb_products': nb_products }, 1) - return res \ No newline at end of file + code = res + if code != 0: + code = 1 + return code \ No newline at end of file diff --git a/commands/config.py b/commands/config.py index b9eb639..7ee957d 100644 --- a/commands/config.py +++ b/commands/config.py @@ -471,14 +471,15 @@ class ConfigManager: 'evince', "This is the pdf_viewer used " "to read pdf documentation\n") - user_cfg.USER.addMapping("bases", - src.pyconf.Mapping(user_cfg.USER), - "The products installation base(s)\n") - - user_cfg.USER.bases.base = src.pyconf.Reference( + user_cfg.USER.addMapping("base", + src.pyconf.Reference( user_cfg, src.pyconf.DOLLAR, - 'workdir + $VARS.sep + "BASE"') + 'workdir + $VARS.sep + "BASE"'), + "The products installation base (could be " + "ignored if this key exists in the site.pyconf" + " file of salomTools).\n") + # src.ensure_path_exists(config.VARS.personalDir) src.ensure_path_exists(os.path.join(config.VARS.personalDir, @@ -538,7 +539,7 @@ def show_product_info(config, name, logger): # Type of the product ptype = src.get_cfg_param(pinfo, "type", "") src.printcolors.print_value(logger, "type", ptype, 2) - if "opt_depend" in pinfo: + if "depend" in pinfo: src.printcolors.print_value(logger, "depends on", ', '.join(pinfo.depend), 2) diff --git a/commands/job.py b/commands/job.py index 8d1a63b..d140531 100644 --- a/commands/job.py +++ b/commands/job.py @@ -43,13 +43,8 @@ def run(args, runner, logger): # Parse the options (options, args) = parser.parse_args(args) - - jobs_cfg_files_dir = runner.cfg.SITE.jobs.config_path - - l_cfg_dir = [jobs_cfg_files_dir, os.path.join(runner.cfg.VARS.datadir, "jobs")] - - # Make sure the path to the jobs config files directory exists - src.ensure_path_exists(jobs_cfg_files_dir) + + l_cfg_dir = runner.cfg.PATHS.JOBPATH # Make sure the jobs_config option has been called if not options.jobs_cfg: diff --git a/commands/jobs.py b/commands/jobs.py index 39b55a7..05272c2 100644 --- a/commands/jobs.py +++ b/commands/jobs.py @@ -37,7 +37,7 @@ d_INT_DAY = {0 : "monday", parser = src.options.Options() -parser.add_option('j', 'jobs_config', 'string', 'jobs_cfg', +parser.add_option('n', 'name', 'string', 'jobs_cfg', _('The name of the config file that contains' ' the jobs configuration')) parser.add_option('o', 'only_jobs', 'list2', 'only_jobs', @@ -139,11 +139,9 @@ class Machine(object): self.put_dir(sat_local_path, self.sat_path, filters = ['.git']) # put the job configuration file in order to make it reachable # on the remote machine - job_file_name = os.path.basename(job_file) - self.sftp.put(job_file, os.path.join(self.sat_path, - "data", - "jobs", - job_file_name)) + self.sftp.put(job_file, os.path.join(".salomeTools", + "Jobs", + ".jobs_command_file.pyconf")) except Exception as e: res = str(e) self._connection_successful = False @@ -242,7 +240,7 @@ class Job(object): '''Class to manage one job ''' def __init__(self, name, machine, application, board, - commands, timeout, config, logger, job_file, after=None): + commands, timeout, config, logger, after=None): self.name = name self.machine = machine @@ -278,8 +276,7 @@ class Job(object): " -l " + os.path.join(self.machine.sat_path, "list_log_files.txt") + - " job --jobs_config " + - job_file + + " job --jobs_config .jobs_command_file" + " --name " + self.name) @@ -591,13 +588,11 @@ class Jobs(object): def __init__(self, runner, logger, - job_file, job_file_path, config_jobs, lenght_columns = 20): # The jobs configuration self.cfg_jobs = config_jobs - self.job_file = job_file self.job_file_path = job_file_path # The machine that will be used today self.lmachines = [] @@ -652,7 +647,6 @@ class Jobs(object): timeout, self.runner.cfg, self.logger, - self.job_file, after = after) def determine_jobs_and_machines(self): @@ -1392,14 +1386,8 @@ def description(): def run(args, runner, logger): (options, args) = parser.parse_args(args) - - jobs_cfg_files_dir = runner.cfg.SITE.jobs.config_path - - l_cfg_dir = [os.path.join(runner.cfg.VARS.datadir, "jobs"), - jobs_cfg_files_dir] - - # Make sure the path to the jobs config files directory exists - src.ensure_path_exists(jobs_cfg_files_dir) + + l_cfg_dir = runner.cfg.PATHS.JOBPATH # list option : display all the available config files if options.list: @@ -1445,7 +1433,7 @@ def run(args, runner, logger): (_("File containing the jobs configuration"), file_jobs_cfg) ] src.print_info(logger, info) - + # Read the config that is in the file config_jobs = src.read_config_from_a_file(file_jobs_cfg) if options.only_jobs: @@ -1459,7 +1447,6 @@ def run(args, runner, logger): # Initialization today_jobs = Jobs(runner, logger, - options.jobs_cfg, file_jobs_cfg, config_jobs) # SSH connection to all machines @@ -1485,6 +1472,15 @@ def run(args, runner, logger): today_jobs.ljobs, today_jobs.ljobs_not_today, l_file_boards = options.input_boards) + + # Display the list of the xml files + logger.write(src.printcolors.printcInfo(("Here is the list of published" + " files :\n")), 4) + logger.write("%s\n" % gui.xml_global_file.logFile, 4) + for board in gui.d_xml_board_files.keys(): + logger.write("%s\n" % gui.d_xml_board_files[board].logFile, 4) + + logger.write("\n", 4) today_jobs.gui = gui diff --git a/data/patches/SALOME_PROFILE_NO_ENV.patch b/data/patches/SALOME_PROFILE_NO_ENV.patch deleted file mode 100644 index 8069f56..0000000 --- a/data/patches/SALOME_PROFILE_NO_ENV.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -rupN SALOME_PROFILE/CMakeLists.txt SALOME_PROFILE_new/CMakeLists.txt ---- SALOME_PROFILE/CMakeLists.txt 2016-06-15 15:25:21.000000000 +0200 -+++ SALOME_PROFILE_new/CMakeLists.txt 2016-06-15 15:26:46.000000000 +0200 -@@ -117,5 +117,5 @@ SALOME_INSTALL_SCRIPTS("${_salome_contex - SET(_salome_context_BASHRC - ${KERNEL_ROOT_DIR}/bin/salome/appliskel/.bashrc - ) --FILE(TO_CMAKE_PATH $ENV{SALOME_PROFILE_ROOT_DIR} _SALOME_PROFILE_ROOT_DIR) -+FILE(TO_CMAKE_PATH ${CMAKE_INSTALL_PREFIX} _SALOME_PROFILE_ROOT_DIR) - SALOME_INSTALL_SCRIPTS("${_salome_context_BASHRC}" ${_SALOME_PROFILE_ROOT_DIR}) -Les fichiers binaires SALOME_PROFILE/.git/index et SALOME_PROFILE_new/.git/index sont différents diff --git a/data/patches/doxygen-1.8.3.1.patch b/data/patches/doxygen-1.8.3.1.patch deleted file mode 100755 index 64930bd..0000000 --- a/data/patches/doxygen-1.8.3.1.patch +++ /dev/null @@ -1,65 +0,0 @@ -diff -Naur doxygen-1.8.3.1_SRC_INIT/src/resize.js doxygen-1.8.3.1_SRC_MODIF/src/resize.js ---- doxygen-1.8.3.1_SRC_INIT/src/resize.js 2013-01-05 19:17:43.000000000 +0400 -+++ doxygen-1.8.3.1_SRC_MODIF/src/resize.js 2013-03-15 18:23:33.000000000 +0400 -@@ -1,5 +1,6 @@ - var cookie_namespace = 'doxygen'; - var sidenav,navtree,content,header; -+var navrows = new Array(); - - function readCookie(cookie) - { -@@ -39,24 +40,42 @@ - var windowWidth = $(window).width() + "px"; - var sidenavWidth = $(sidenav).outerWidth(); - content.css({marginLeft:parseInt(sidenavWidth)+6+"px"}); //account for 6px-wide handle-bar -+ for(var i = 1; i <= 4;i++) { -+ if(navrows[i] != null) -+ navrows[i].css({marginLeft:parseInt(sidenavWidth)+6+"px"}); //account for 6px-wide handle-bar -+ navrows[i].css({width:windowWidth-parseInt(sidenavWidth) - 6 + "px"}); -+ } - writeCookie('width',sidenavWidth, null); - } - - function restoreWidth(navWidth) - { -- var windowWidth = $(window).width() + "px"; -+ var windowWidth = $(window).width() + "px"; - content.css({marginLeft:parseInt(navWidth)+6+"px"}); - sidenav.css({width:navWidth + "px"}); -+ for(var i = 1; i <= 4;i++) { -+ if(navrows[i] != null) -+ navrows[i].css({marginLeft:parseInt(navWidth)+6+"px"}); -+ navrows[i].css({width:windowWidth-parseInt(navWidth) - 6 + "px"}); -+ } - } - - function resizeHeight() - { - var headerHeight = header.outerHeight(); - var footerHeight = footer.outerHeight(); -+ var navrowsH = 0; -+ for(var i = 1; i <= 4;i++) { -+ if(navrows[i] != null) -+ navrowsH = navrowsH + navrows[i].height(); -+ } - var windowHeight = $(window).height() - headerHeight - footerHeight; -+ var treeH = windowHeight + navrowsH; - content.css({height:windowHeight + "px"}); - navtree.css({height:windowHeight + "px"}); - sidenav.css({height:windowHeight + "px",top: headerHeight+"px"}); -+ navtree.css({height:treeH +"px"}); -+ sidenav.css({height:treeH +"px", top: headerHeight+"px"}); - } - - function initResizable() -@@ -66,6 +85,10 @@ - content = $("#doc-content"); - navtree = $("#nav-tree"); - footer = $("#nav-path"); -+ for(var i = 1; i <= 4;i++) { -+ navrows[i] = $("#navrow"+i); -+ } -+ - $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); - $(window).resize(function() { resizeHeight(); }); - var width = readCookie('width'); diff --git a/data/patches/freetype-2.4.11_ft_export_FD20.patch b/data/patches/freetype-2.4.11_ft_export_FD20.patch deleted file mode 100644 index 7f582a1..0000000 --- a/data/patches/freetype-2.4.11_ft_export_FD20.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rupN freetype-2.4.11/include/freetype/config/ftoption.h freetype-2.4.11_new/include/freetype/config/ftoption.h ---- freetype-2.4.11/include/freetype/config/ftoption.h 2014-07-28 10:56:26.000000000 +0200 -+++ freetype-2.4.11_new/include/freetype/config/ftoption.h 2014-12-19 11:20:43.838835547 +0100 -@@ -253,7 +253,7 @@ FT_BEGIN_HEADER - /* them for certain configurations only. */ - /* */ - /* #define FT_EXPORT(x) extern x */ --#define FT_EXPORT(x) __declspec(dllexport) x -+/* #define FT_EXPORT(x) __declspec(dllexport) x */ - /* #define FT_EXPORT_DEF(x) x */ - - diff --git a/data/patches/gl2ps-1.3.8_link_libm_FD20.patch b/data/patches/gl2ps-1.3.8_link_libm_FD20.patch deleted file mode 100755 index 4c1fa9b..0000000 --- a/data/patches/gl2ps-1.3.8_link_libm_FD20.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -rupN gl2ps-1.3.8/CMakeLists.txt gl2ps-1.3.8_new/CMakeLists.txt ---- gl2ps-1.3.8/CMakeLists.txt 2012-11-27 20:41:06.000000000 +0100 -+++ gl2ps-1.3.8_new/CMakeLists.txt 2014-12-18 16:33:26.479069652 +0100 -@@ -140,9 +140,9 @@ install(FILES ${CMAKE_SOURCE_DIR}/gl2psT - - if(GLUT_FOUND) - add_executable(gl2psTest WIN32 gl2psTest.c) -- target_link_libraries(gl2psTest lib ${EXTERNAL_LIBRARIES}) -+ target_link_libraries(gl2psTest lib ${EXTERNAL_LIBRARIES} -lm) - add_executable(gl2psTestSimple WIN32 gl2psTestSimple.c) -- target_link_libraries(gl2psTestSimple lib ${EXTERNAL_LIBRARIES}) -+ target_link_libraries(gl2psTestSimple lib ${EXTERNAL_LIBRARIES} -lm) - endif(GLUT_FOUND) - - find_package(LATEX) diff --git a/data/patches/matplotlib-1.4.3_no_auto_download.patch b/data/patches/matplotlib-1.4.3_no_auto_download.patch deleted file mode 100644 index 4f27014..0000000 --- a/data/patches/matplotlib-1.4.3_no_auto_download.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -pruN matplotlib-1.4.3_OLD/setup.py matplotlib-1.4.3/setup.py ---- matplotlib-1.4.3_OLD/setup.py 2015-11-19 10:20:21.819496459 +0100 -+++ matplotlib-1.4.3/setup.py 2015-11-19 10:21:19.792938308 +0100 -@@ -7,7 +7,7 @@ from __future__ import print_function, a - - # This needs to be the very first thing to use distribute - from distribute_setup import use_setuptools --use_setuptools() -+#use_setuptools() - - import sys - diff --git a/data/patches/matplotlib_1_4_3_patch_freetype_detection_for_SAT.patch b/data/patches/matplotlib_1_4_3_patch_freetype_detection_for_SAT.patch deleted file mode 100644 index ab5dc2e..0000000 --- a/data/patches/matplotlib_1_4_3_patch_freetype_detection_for_SAT.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -rupN matplotlib-1.4.3p1_old/setupext.py matplotlib-1.4.3p1_new/setupext.py ---- matplotlib-1.4.3p1_old/setupext.py 2015-02-16 04:46:36.000000000 +0100 -+++ matplotlib-1.4.3p1_new/setupext.py 2015-04-02 11:09:28.623280000 +0200 -@@ -446,8 +446,14 @@ class SetupPackage(object): - raise CheckFailed( - "Requires %s %s or later. Found %s." % - (package, min_version, version)) -- -- ext = self.get_extension() -+ # BEGIN SALOME patch -+ if package=='freetype2': -+ include_dirs_hack = [os.path.join(os.environ['FREETYPE_ROOT_DIR'], 'include'), os.path.join(os.environ['FREETYPE_ROOT_DIR'], 'include', 'freetype2') ] -+ check_include_file(include_dirs_hack, include_file, package) -+ return 'version %s' % version -+ # END SALOME patch -+ -+ ext = self.get_extension() - if ext is None: - ext = make_extension('test', []) - pkg_config.setup_extension(ext, package) -@@ -983,16 +989,22 @@ class FreeType(SetupPackage): - return '.'.join([major, minor, patch]) - - def add_flags(self, ext): -+ ## BEGIN SALOME HACK -+ freetype_include_path = os.path.join(os.environ['FREETYPE_ROOT_DIR'], 'include') -+ freetype_include_freetype2_path = os.path.join(freetype_include_path, 'freetype2') -+ freetype_include_freetype2_freetype_path = os.path.join(freetype_include_path, 'freetype2', 'freetype') -+ freetype_lib_path = os.path.join(os.environ['FREETYPE_ROOT_DIR'], 'lib') -+ - pkg_config.setup_extension( - ext, 'freetype2', -- default_include_dirs=[ -- 'include/freetype2', 'freetype2', -- 'lib/freetype2/include', -- 'lib/freetype2/include/freetype2'], -- default_library_dirs=[ -+ default_include_dirs=[freetype_include_path, freetype_include_freetype2_path, freetype_include_freetype2_freetype_path, -+ 'freetype2', 'lib/freetype2/include', -+ 'lib/freetype2/include/freetype2'], -+ default_library_dirs=[ freetype_lib_path, - 'freetype2/lib'], - default_libraries=['freetype', 'z']) - -+ ## END SALOME HACK - - - class FT2Font(SetupPackage): diff --git a/data/patches/matplotlibrc-qt4.patch b/data/patches/matplotlibrc-qt4.patch deleted file mode 100644 index 625103f..0000000 --- a/data/patches/matplotlibrc-qt4.patch +++ /dev/null @@ -1,514 +0,0 @@ -diff -pruN matplotlib-1.4.3/matplotlibrc matplotlib-1.4.3_NEW/matplotlibrc ---- matplotlib-1.4.3/matplotlibrc 1970-01-01 01:00:00.000000000 +0100 -+++ matplotlib-1.4.3_NEW/matplotlibrc 2016-05-20 14:08:25.109809135 +0200 -@@ -0,0 +1,510 @@ -+### MATPLOTLIBRC FORMAT -+ -+# This is a sample matplotlib configuration file - you can find a copy -+# of it on your system in -+# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it -+# there, please note that it will be overwritten in your next install. -+# If you want to keep a permanent local copy that will not be -+# overwritten, place it in the following location: -+# unix/linux: -+# $HOME/.config/matplotlib/matplotlibrc or -+# $XDG_CONFIG_HOME/matplotlib/matplotlibrc (if $XDG_CONFIG_HOME is set) -+# other platforms: -+# $HOME/.matplotlib/matplotlibrc -+# -+# See http://matplotlib.org/users/customizing.html#the-matplotlibrc-file for -+# more details on the paths which are checked for the configuration file. -+# -+# This file is best viewed in a editor which supports python mode -+# syntax highlighting. Blank lines, or lines starting with a comment -+# symbol, are ignored, as are trailing comments. Other lines must -+# have the format -+# key : val # optional comment -+# -+# Colors: for the color values below, you can either use - a -+# matplotlib color string, such as r, k, or b - an rgb tuple, such as -+# (1.0, 0.5, 0.0) - a hex string, such as ff00ff or #ff00ff - a scalar -+# grayscale intensity such as 0.75 - a legal html color name, e.g., red, -+# blue, darkslategray -+ -+#### CONFIGURATION BEGINS HERE -+ -+# The default backend; one of GTK GTKAgg GTKCairo GTK3Agg GTK3Cairo -+# CocoaAgg MacOSX Qt4Agg Qt5Agg TkAgg WX WXAgg Agg Cairo GDK PS PDF SVG -+# Template. -+# You can also deploy your own backend outside of matplotlib by -+# referring to the module name (which must be in the PYTHONPATH) as -+# 'module://my_backend'. -+backend : qt4agg -+ -+# If you are using the Qt4Agg backend, you can choose here -+# to use the PyQt4 bindings or the newer PySide bindings to -+# the underlying Qt4 toolkit. -+#backend.qt4 : PyQt4 # PyQt4 | PySide -+ -+# Note that this can be overridden by the environment variable -+# QT_API used by Enthought Tool Suite (ETS); valid values are -+# "pyqt" and "pyside". The "pyqt" setting has the side effect of -+# forcing the use of Version 2 API for QString and QVariant. -+ -+# The port to use for the web server in the WebAgg backend. -+# webagg.port : 8888 -+ -+# If webagg.port is unavailable, a number of other random ports will -+# be tried until one that is available is found. -+# webagg.port_retries : 50 -+ -+# When True, open the webbrowser to the plot that is shown -+# webagg.open_in_browser : True -+ -+# When True, the figures rendered in the nbagg backend are created with -+# a transparent background. -+# nbagg.transparent : True -+ -+# if you are running pyplot inside a GUI and your backend choice -+# conflicts, we will automatically try to find a compatible one for -+# you if backend_fallback is True -+#backend_fallback: True -+ -+#interactive : False -+#toolbar : toolbar2 # None | toolbar2 ("classic" is deprecated) -+#timezone : UTC # a pytz timezone string, e.g., US/Central or Europe/Paris -+ -+# Where your matplotlib data lives if you installed to a non-default -+# location. This is where the matplotlib fonts, bitmaps, etc reside -+#datapath : /home/jdhunter/mpldata -+ -+ -+### LINES -+# See http://matplotlib.org/api/artist_api.html#module-matplotlib.lines for more -+# information on line properties. -+#lines.linewidth : 1.0 # line width in points -+#lines.linestyle : - # solid line -+#lines.color : blue # has no affect on plot(); see axes.prop_cycle -+#lines.marker : None # the default marker -+#lines.markeredgewidth : 0.5 # the line width around the marker symbol -+#lines.markersize : 6 # markersize, in points -+#lines.dash_joinstyle : miter # miter|round|bevel -+#lines.dash_capstyle : butt # butt|round|projecting -+#lines.solid_joinstyle : miter # miter|round|bevel -+#lines.solid_capstyle : projecting # butt|round|projecting -+#lines.antialiased : True # render lines in antialiased (no jaggies) -+ -+#markers.fillstyle: full # full|left|right|bottom|top|none -+ -+### PATCHES -+# Patches are graphical objects that fill 2D space, like polygons or -+# circles. See -+# http://matplotlib.org/api/artist_api.html#module-matplotlib.patches -+# information on patch properties -+#patch.linewidth : 1.0 # edge width in points -+#patch.facecolor : blue -+#patch.edgecolor : black -+#patch.antialiased : True # render patches in antialiased (no jaggies) -+ -+### FONT -+# -+# font properties used by text.Text. See -+# http://matplotlib.org/api/font_manager_api.html for more -+# information on font properties. The 6 font properties used for font -+# matching are given below with their default values. -+# -+# The font.family property has five values: 'serif' (e.g., Times), -+# 'sans-serif' (e.g., Helvetica), 'cursive' (e.g., Zapf-Chancery), -+# 'fantasy' (e.g., Western), and 'monospace' (e.g., Courier). Each of -+# these font families has a default list of font names in decreasing -+# order of priority associated with them. When text.usetex is False, -+# font.family may also be one or more concrete font names. -+# -+# The font.style property has three values: normal (or roman), italic -+# or oblique. The oblique style will be used for italic, if it is not -+# present. -+# -+# The font.variant property has two values: normal or small-caps. For -+# TrueType fonts, which are scalable fonts, small-caps is equivalent -+# to using a font size of 'smaller', or about 83% of the current font -+# size. -+# -+# The font.weight property has effectively 13 values: normal, bold, -+# bolder, lighter, 100, 200, 300, ..., 900. Normal is the same as -+# 400, and bold is 700. bolder and lighter are relative values with -+# respect to the current weight. -+# -+# The font.stretch property has 11 values: ultra-condensed, -+# extra-condensed, condensed, semi-condensed, normal, semi-expanded, -+# expanded, extra-expanded, ultra-expanded, wider, and narrower. This -+# property is not currently implemented. -+# -+# The font.size property is the default font size for text, given in pts. -+# 12pt is the standard value. -+# -+#font.family : sans-serif -+#font.style : normal -+#font.variant : normal -+#font.weight : medium -+#font.stretch : normal -+# note that font.size controls default text sizes. To configure -+# special text sizes tick labels, axes, labels, title, etc, see the rc -+# settings for axes and ticks. Special text sizes can be defined -+# relative to font.size, using the following values: xx-small, x-small, -+# small, medium, large, x-large, xx-large, larger, or smaller -+#font.size : 12.0 -+#font.serif : Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif -+#font.sans-serif : Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif -+#font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, Script MT, Felipa, cursive -+#font.fantasy : Comic Sans MS, Chicago, Charcoal, Impact, Western, Humor Sans, fantasy -+#font.monospace : Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace -+ -+### TEXT -+# text properties used by text.Text. See -+# http://matplotlib.org/api/artist_api.html#module-matplotlib.text for more -+# information on text properties -+ -+#text.color : black -+ -+### LaTeX customizations. See http://wiki.scipy.org/Cookbook/Matplotlib/UsingTex -+#text.usetex : False # use latex for all text handling. The following fonts -+ # are supported through the usual rc parameter settings: -+ # new century schoolbook, bookman, times, palatino, -+ # zapf chancery, charter, serif, sans-serif, helvetica, -+ # avant garde, courier, monospace, computer modern roman, -+ # computer modern sans serif, computer modern typewriter -+ # If another font is desired which can loaded using the -+ # LaTeX \usepackage command, please inquire at the -+ # matplotlib mailing list -+#text.latex.unicode : False # use "ucs" and "inputenc" LaTeX packages for handling -+ # unicode strings. -+#text.latex.preamble : # IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX FAILURES -+ # AND IS THEREFORE UNSUPPORTED. PLEASE DO NOT ASK FOR HELP -+ # IF THIS FEATURE DOES NOT DO WHAT YOU EXPECT IT TO. -+ # preamble is a comma separated list of LaTeX statements -+ # that are included in the LaTeX document preamble. -+ # An example: -+ # text.latex.preamble : \usepackage{bm},\usepackage{euler} -+ # The following packages are always loaded with usetex, so -+ # beware of package collisions: color, geometry, graphicx, -+ # type1cm, textcomp. Adobe Postscript (PSSNFS) font packages -+ # may also be loaded, depending on your font settings -+ -+#text.dvipnghack : None # some versions of dvipng don't handle alpha -+ # channel properly. Use True to correct -+ # and flush ~/.matplotlib/tex.cache -+ # before testing and False to force -+ # correction off. None will try and -+ # guess based on your dvipng version -+ -+#text.hinting : auto # May be one of the following: -+ # 'none': Perform no hinting -+ # 'auto': Use freetype's autohinter -+ # 'native': Use the hinting information in the -+ # font file, if available, and if your -+ # freetype library supports it -+ # 'either': Use the native hinting information, -+ # or the autohinter if none is available. -+ # For backward compatibility, this value may also be -+ # True === 'auto' or False === 'none'. -+#text.hinting_factor : 8 # Specifies the amount of softness for hinting in the -+ # horizontal direction. A value of 1 will hint to full -+ # pixels. A value of 2 will hint to half pixels etc. -+ -+#text.antialiased : True # If True (default), the text will be antialiased. -+ # This only affects the Agg backend. -+ -+# The following settings allow you to select the fonts in math mode. -+# They map from a TeX font name to a fontconfig font pattern. -+# These settings are only used if mathtext.fontset is 'custom'. -+# Note that this "custom" mode is unsupported and may go away in the -+# future. -+#mathtext.cal : cursive -+#mathtext.rm : serif -+#mathtext.tt : monospace -+#mathtext.it : serif:italic -+#mathtext.bf : serif:bold -+#mathtext.sf : sans -+#mathtext.fontset : cm # Should be 'cm' (Computer Modern), 'stix', -+ # 'stixsans' or 'custom' -+#mathtext.fallback_to_cm : True # When True, use symbols from the Computer Modern -+ # fonts when a symbol can not be found in one of -+ # the custom math fonts. -+ -+#mathtext.default : it # The default font to use for math. -+ # Can be any of the LaTeX font names, including -+ # the special name "regular" for the same font -+ # used in regular text. -+ -+### AXES -+# default face and edge color, default tick sizes, -+# default fontsizes for ticklabels, and so on. See -+# http://matplotlib.org/api/axes_api.html#module-matplotlib.axes -+#axes.hold : True # whether to clear the axes by default on -+#axes.facecolor : white # axes background color -+#axes.edgecolor : black # axes edge color -+#axes.linewidth : 1.0 # edge linewidth -+#axes.grid : False # display grid or not -+#axes.titlesize : large # fontsize of the axes title -+#axes.labelsize : medium # fontsize of the x any y labels -+#axes.labelpad : 5.0 # space between label and axis -+#axes.labelweight : normal # weight of the x and y labels -+#axes.labelcolor : black -+#axes.axisbelow : False # whether axis gridlines and ticks are below -+ # the axes elements (lines, text, etc) -+ -+#axes.formatter.limits : -7, 7 # use scientific notation if log10 -+ # of the axis range is smaller than the -+ # first or larger than the second -+#axes.formatter.use_locale : False # When True, format tick labels -+ # according to the user's locale. -+ # For example, use ',' as a decimal -+ # separator in the fr_FR locale. -+#axes.formatter.use_mathtext : False # When True, use mathtext for scientific -+ # notation. -+#axes.formatter.useoffset : True # If True, the tick label formatter -+ # will default to labeling ticks relative -+ # to an offset when the data range is very -+ # small compared to the minimum absolute -+ # value of the data. -+ -+#axes.unicode_minus : True # use unicode for the minus symbol -+ # rather than hyphen. See -+ # http://en.wikipedia.org/wiki/Plus_and_minus_signs#Character_codes -+#axes.prop_cycle : cycler('color', 'bgrcmyk') -+ # color cycle for plot lines -+ # as list of string colorspecs: -+ # single letter, long name, or -+ # web-style hex -+#axes.xmargin : 0 # x margin. See `axes.Axes.margins` -+#axes.ymargin : 0 # y margin See `axes.Axes.margins` -+ -+#polaraxes.grid : True # display grid on polar axes -+#axes3d.grid : True # display grid on 3d axes -+ -+### TICKS -+# see http://matplotlib.org/api/axis_api.html#matplotlib.axis.Tick -+#xtick.major.size : 4 # major tick size in points -+#xtick.minor.size : 2 # minor tick size in points -+#xtick.major.width : 0.5 # major tick width in points -+#xtick.minor.width : 0.5 # minor tick width in points -+#xtick.major.pad : 4 # distance to major tick label in points -+#xtick.minor.pad : 4 # distance to the minor tick label in points -+#xtick.color : k # color of the tick labels -+#xtick.labelsize : medium # fontsize of the tick labels -+#xtick.direction : in # direction: in, out, or inout -+ -+#ytick.major.size : 4 # major tick size in points -+#ytick.minor.size : 2 # minor tick size in points -+#ytick.major.width : 0.5 # major tick width in points -+#ytick.minor.width : 0.5 # minor tick width in points -+#ytick.major.pad : 4 # distance to major tick label in points -+#ytick.minor.pad : 4 # distance to the minor tick label in points -+#ytick.color : k # color of the tick labels -+#ytick.labelsize : medium # fontsize of the tick labels -+#ytick.direction : in # direction: in, out, or inout -+ -+ -+### GRIDS -+#grid.color : black # grid color -+#grid.linestyle : : # dotted -+#grid.linewidth : 0.5 # in points -+#grid.alpha : 1.0 # transparency, between 0.0 and 1.0 -+ -+### Legend -+#legend.fancybox : False # if True, use a rounded box for the -+ # legend, else a rectangle -+#legend.isaxes : True -+#legend.numpoints : 2 # the number of points in the legend line -+#legend.fontsize : large -+#legend.borderpad : 0.5 # border whitespace in fontsize units -+#legend.markerscale : 1.0 # the relative size of legend markers vs. original -+# the following dimensions are in axes coords -+#legend.labelspacing : 0.5 # the vertical space between the legend entries in fraction of fontsize -+#legend.handlelength : 2. # the length of the legend lines in fraction of fontsize -+#legend.handleheight : 0.7 # the height of the legend handle in fraction of fontsize -+#legend.handletextpad : 0.8 # the space between the legend line and legend text in fraction of fontsize -+#legend.borderaxespad : 0.5 # the border between the axes and legend edge in fraction of fontsize -+#legend.columnspacing : 2. # the border between the axes and legend edge in fraction of fontsize -+#legend.shadow : False -+#legend.frameon : True # whether or not to draw a frame around legend -+#legend.framealpha : None # opacity of of legend frame -+#legend.scatterpoints : 3 # number of scatter points -+ -+### FIGURE -+# See http://matplotlib.org/api/figure_api.html#matplotlib.figure.Figure -+#figure.titlesize : medium # size of the figure title -+#figure.titleweight : normal # weight of the figure title -+#figure.figsize : 8, 6 # figure size in inches -+#figure.dpi : 80 # figure dots per inch -+#figure.facecolor : 0.75 # figure facecolor; 0.75 is scalar gray -+#figure.edgecolor : white # figure edgecolor -+#figure.autolayout : False # When True, automatically adjust subplot -+ # parameters to make the plot fit the figure -+#figure.max_open_warning : 20 # The maximum number of figures to open through -+ # the pyplot interface before emitting a warning. -+ # If less than one this feature is disabled. -+ -+# The figure subplot parameters. All dimensions are a fraction of the -+# figure width or height -+#figure.subplot.left : 0.125 # the left side of the subplots of the figure -+#figure.subplot.right : 0.9 # the right side of the subplots of the figure -+#figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure -+#figure.subplot.top : 0.9 # the top of the subplots of the figure -+#figure.subplot.wspace : 0.2 # the amount of width reserved for blank space between subplots -+#figure.subplot.hspace : 0.2 # the amount of height reserved for white space between subplots -+ -+### IMAGES -+#image.aspect : equal # equal | auto | a number -+#image.interpolation : bilinear # see help(imshow) for options -+#image.cmap : jet # gray | jet etc... -+#image.lut : 256 # the size of the colormap lookup table -+#image.origin : upper # lower | upper -+#image.resample : False -+#image.composite_image : True # When True, all the images on a set of axes are -+ # combined into a single composite image before -+ # saving a figure as a vector graphics file, -+ # such as a PDF. -+ -+### CONTOUR PLOTS -+#contour.negative_linestyle : dashed # dashed | solid -+#contour.corner_mask : True # True | False | legacy -+ -+### ERRORBAR PLOTS -+#errorbar.capsize : 3 # length of end cap on error bars in pixels -+ -+### Agg rendering -+### Warning: experimental, 2008/10/10 -+#agg.path.chunksize : 0 # 0 to disable; values in the range -+ # 10000 to 100000 can improve speed slightly -+ # and prevent an Agg rendering failure -+ # when plotting very large data sets, -+ # especially if they are very gappy. -+ # It may cause minor artifacts, though. -+ # A value of 20000 is probably a good -+ # starting point. -+### SAVING FIGURES -+#path.simplify : True # When True, simplify paths by removing "invisible" -+ # points to reduce file size and increase rendering -+ # speed -+#path.simplify_threshold : 0.1 # The threshold of similarity below which -+ # vertices will be removed in the simplification -+ # process -+#path.snap : True # When True, rectilinear axis-aligned paths will be snapped to -+ # the nearest pixel when certain criteria are met. When False, -+ # paths will never be snapped. -+#path.sketch : None # May be none, or a 3-tuple of the form (scale, length, -+ # randomness). -+ # *scale* is the amplitude of the wiggle -+ # perpendicular to the line (in pixels). *length* -+ # is the length of the wiggle along the line (in -+ # pixels). *randomness* is the factor by which -+ # the length is randomly scaled. -+ -+# the default savefig params can be different from the display params -+# e.g., you may want a higher resolution, or to make the figure -+# background white -+#savefig.dpi : 100 # figure dots per inch -+#savefig.facecolor : white # figure facecolor when saving -+#savefig.edgecolor : white # figure edgecolor when saving -+#savefig.format : png # png, ps, pdf, svg -+#savefig.bbox : standard # 'tight' or 'standard'. -+ # 'tight' is incompatible with pipe-based animation -+ # backends but will workd with temporary file based ones: -+ # e.g. setting animation.writer to ffmpeg will not work, -+ # use ffmpeg_file instead -+#savefig.pad_inches : 0.1 # Padding to be used when bbox is set to 'tight' -+#savefig.jpeg_quality: 95 # when a jpeg is saved, the default quality parameter. -+#savefig.directory : ~ # default directory in savefig dialog box, -+ # leave empty to always use current working directory -+#savefig.transparent : False # setting that controls whether figures are saved with a -+ # transparent background by default -+ -+# tk backend params -+#tk.window_focus : False # Maintain shell focus for TkAgg -+ -+# ps backend params -+#ps.papersize : letter # auto, letter, legal, ledger, A0-A10, B0-B10 -+#ps.useafm : False # use of afm fonts, results in small files -+#ps.usedistiller : False # can be: None, ghostscript or xpdf -+ # Experimental: may produce smaller files. -+ # xpdf intended for production of publication quality files, -+ # but requires ghostscript, xpdf and ps2eps -+#ps.distiller.res : 6000 # dpi -+#ps.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType) -+ -+# pdf backend params -+#pdf.compression : 6 # integer from 0 to 9 -+ # 0 disables compression (good for debugging) -+#pdf.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType) -+ -+# svg backend params -+#svg.image_inline : True # write raster image data directly into the svg file -+#svg.image_noscale : False # suppress scaling of raster data embedded in SVG -+#svg.fonttype : 'path' # How to handle SVG fonts: -+# 'none': Assume fonts are installed on the machine where the SVG will be viewed. -+# 'path': Embed characters as paths -- supported by most SVG renderers -+# 'svgfont': Embed characters as SVG fonts -- supported only by Chrome, -+# Opera and Safari -+ -+# docstring params -+#docstring.hardcopy = False # set this when you want to generate hardcopy docstring -+ -+# Set the verbose flags. This controls how much information -+# matplotlib gives you at runtime and where it goes. The verbosity -+# levels are: silent, helpful, debug, debug-annoying. Any level is -+# inclusive of all the levels below it. If your setting is "debug", -+# you'll get all the debug and helpful messages. When submitting -+# problems to the mailing-list, please set verbose to "helpful" or "debug" -+# and paste the output into your report. -+# -+# The "fileo" gives the destination for any calls to verbose.report. -+# These objects can a filename, or a filehandle like sys.stdout. -+# -+# You can override the rc default verbosity from the command line by -+# giving the flags --verbose-LEVEL where LEVEL is one of the legal -+# levels, e.g., --verbose-helpful. -+# -+# You can access the verbose instance in your code -+# from matplotlib import verbose. -+#verbose.level : silent # one of silent, helpful, debug, debug-annoying -+#verbose.fileo : sys.stdout # a log filename, sys.stdout or sys.stderr -+ -+# Event keys to interact with figures/plots via keyboard. -+# Customize these settings according to your needs. -+# Leave the field(s) empty if you don't need a key-map. (i.e., fullscreen : '') -+ -+#keymap.fullscreen : f # toggling -+#keymap.home : h, r, home # home or reset mnemonic -+#keymap.back : left, c, backspace # forward / backward keys to enable -+#keymap.forward : right, v # left handed quick navigation -+#keymap.pan : p # pan mnemonic -+#keymap.zoom : o # zoom mnemonic -+#keymap.save : s # saving current figure -+#keymap.quit : ctrl+w, cmd+w # close the current figure -+#keymap.grid : g # switching on/off a grid in current axes -+#keymap.yscale : l # toggle scaling of y-axes ('log'/'linear') -+#keymap.xscale : L, k # toggle scaling of x-axes ('log'/'linear') -+#keymap.all_axes : a # enable all axes -+ -+# Control location of examples data files -+#examples.directory : '' # directory to look in for custom installation -+ -+###ANIMATION settings -+#animation.html : 'none' # How to display the animation as HTML in -+ # the IPython notebook. 'html5' uses -+ # HTML5 video tag. -+#animation.writer : ffmpeg # MovieWriter 'backend' to use -+#animation.codec : mpeg4 # Codec to use for writing movie -+#animation.bitrate: -1 # Controls size/quality tradeoff for movie. -+ # -1 implies let utility auto-determine -+#animation.frame_format: 'png' # Controls frame format used by temp files -+#animation.ffmpeg_path: 'ffmpeg' # Path to ffmpeg binary. Without full path -+ # $PATH is searched -+#animation.ffmpeg_args: '' # Additional arguments to pass to ffmpeg -+#animation.avconv_path: 'avconv' # Path to avconv binary. Without full path -+ # $PATH is searched -+#animation.avconv_args: '' # Additional arguments to pass to avconv -+#animation.mencoder_path: 'mencoder' -+ # Path to mencoder binary. Without full path -+ # $PATH is searched -+#animation.mencoder_args: '' # Additional arguments to pass to mencoder -+#animation.convert_path: 'convert' # Path to ImageMagick's convert binary. -+ # On Windows use the full path since convert -+ # is also the name of a system tool. diff --git a/data/patches/netgen-4.9.13_without_togl.patch b/data/patches/netgen-4.9.13_without_togl.patch deleted file mode 100644 index 91e4e4d..0000000 --- a/data/patches/netgen-4.9.13_without_togl.patch +++ /dev/null @@ -1,97 +0,0 @@ -diff -pruN netgen-4.9.13-sources/configure netgen-4.9.13-2/configure ---- netgen-4.9.13-sources/configure 2015-08-24 12:15:29.560190846 +0200 -+++ netgen-4.9.13-2/configure 2015-08-25 11:39:07.485726666 +0200 -@@ -17837,7 +17837,7 @@ esac - - - --ac_config_files="$ac_config_files Makefile libsrc/Makefile libsrc/csg/Makefile libsrc/general/Makefile libsrc/geom2d/Makefile libsrc/gprim/Makefile libsrc/include/Makefile libsrc/interface/Makefile libsrc/linalg/Makefile libsrc/meshing/Makefile libsrc/occ/Makefile libsrc/stlgeom/Makefile libsrc/visualization/Makefile ng/Makefile nglib/Makefile tutorials/Makefile doc/Makefile windows/Makefile" -+ac_config_files="$ac_config_files Makefile libsrc/Makefile libsrc/csg/Makefile libsrc/general/Makefile libsrc/geom2d/Makefile libsrc/gprim/Makefile libsrc/include/Makefile libsrc/interface/Makefile libsrc/linalg/Makefile libsrc/meshing/Makefile libsrc/occ/Makefile libsrc/stlgeom/Makefile libsrc/visualization/Makefile nglib/Makefile " - - - cat >confcache <<\_ACEOF -@@ -18905,7 +18905,8 @@ $debug || - if test -n "$CONFIG_FILES"; then - - --ac_cr=' ' -+ac_cr=' -+' - ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` - if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -diff -pruN netgen-4.9.13-sources/configure.ac netgen-4.9.13-2/configure.ac ---- netgen-4.9.13-sources/configure.ac 2015-08-24 12:15:29.560190846 +0200 -+++ netgen-4.9.13-2/configure.ac 2015-08-25 10:48:08.236469725 +0200 -@@ -72,11 +72,11 @@ fi - - - --AC_ARG_WITH([togl], -- [AC_HELP_STRING([--with-togl=dir],[directory containing libTogl1.7])], -- [togldir=$withval] -- [togllibfl="-L$withval$"] -- ) -+#AC_ARG_WITH([togl], -+# [AC_HELP_STRING([--with-togl=dir],[directory containing libTogl1.7])], -+# [togldir=$withval] -+# [togllibfl="-L$withval$"] -+# ) - # [togllibfl="-L$(TK_BIN_DIR)/Togl1.7"] - # [togllibfl="-L/usr/local/lib/Togl1.7"] - -@@ -124,7 +124,7 @@ AM_CONDITIONAL([NGLIB], [test x$nglibon - AC_SUBST([TOGLLIBDIR], ["$togllibfl"]) - - AC_CHECK_HEADER(pthread.h) --AC_CHECK_HEADER([togl.h]) -+#AC_CHECK_HEADER([togl.h]) - AC_CHECK_HEADER([GL/gl.h]) - - AC_CHECK_FUNCS([pow]) -@@ -171,13 +171,7 @@ AC_SUBST(LIBGLU) - - - --AC_CONFIG_FILES(Makefile libsrc/Makefile libsrc/csg/Makefile --libsrc/general/Makefile libsrc/geom2d/Makefile libsrc/gprim/Makefile --libsrc/include/Makefile libsrc/interface/Makefile --libsrc/linalg/Makefile libsrc/meshing/Makefile libsrc/occ/Makefile -- libsrc/stlgeom/Makefile -- libsrc/visualization/Makefile ng/Makefile nglib/Makefile -- tutorials/Makefile doc/Makefile windows/Makefile ) -+AC_CONFIG_FILES(Makefile nglib/Makefile) - - AC_OUTPUT - -@@ -208,4 +202,4 @@ AC_MSG_RESULT([ - - Example programs will be built but not installed. - ------------------------------------------------------------------------ --]) -\ Pas de fin de ligne à la fin du fichier -+]) -diff -pruN netgen-4.9.13-sources/Makefile.am netgen-4.9.13-2/Makefile.am ---- netgen-4.9.13-sources/Makefile.am 2015-08-24 12:15:29.564190971 +0200 -+++ netgen-4.9.13-2/Makefile.am 2015-08-25 11:36:11.111872678 +0200 -@@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I m4 - - METASOURCES = AUTO - --SUBDIRS = libsrc ng nglib tutorials doc windows -+SUBDIRS = libsrc nglib - - # TESTS = ng/netgen -batchmode - -diff -pruN netgen-4.9.13-sources/Makefile.in netgen-4.9.13-2/Makefile.in ---- netgen-4.9.13-sources/Makefile.in 2015-08-24 12:15:29.564190971 +0200 -+++ netgen-4.9.13-2/Makefile.in 2015-08-25 11:46:41.932811373 +0200 -@@ -238,7 +238,7 @@ top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ - ACLOCAL_AMFLAGS = -I m4 - METASOURCES = AUTO --SUBDIRS = libsrc ng nglib tutorials doc windows -+SUBDIRS = libsrc nglib - all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - diff --git a/data/patches/netgen49ForSalome.patch b/data/patches/netgen49ForSalome.patch deleted file mode 100644 index 0e78c4a..0000000 --- a/data/patches/netgen49ForSalome.patch +++ /dev/null @@ -1,1109 +0,0 @@ -diff -Naur netgen-4.9.13_orig/libsrc/meshing/meshtype.cpp netgen-4.9.13_new/libsrc/meshing/meshtype.cpp ---- netgen-4.9.13_orig/libsrc/meshing/meshtype.cpp 2009-09-13 14:28:38.000000000 +0400 -+++ netgen-4.9.13_new/libsrc/meshing/meshtype.cpp 2014-07-22 13:01:28.000000000 +0400 -@@ -1,4 +1,5 @@ - #include -+#include // to get DBL_MIN defined - - #include "meshing.hpp" - -@@ -650,7 +651,8 @@ - - double det = trans.Det(); - -- if (det <= 0) -+ // if (det <= 0) -+ if (det <= DBL_MIN) // avoid FPE - err += 1e12; - else - err += frob * frob / det; -@@ -706,7 +708,8 @@ - - double det = trans(0,0)*trans(1,1)-trans(1,0)*trans(0,1); - -- if (det <= 0) -+ // if (det <= 0) -+ if (det <= DBL_MIN) // avoid FPE - { - dd = 0; - return 1e12; -@@ -790,7 +793,8 @@ - = dtrans(0,0) * trans(1,1) - trans(0,1) * dtrans(1,0) - + trans(0,0) * dtrans(1,1) - dtrans(0,1) * trans(1,0); - -- if (det <= 0) -+ // if (det <= 0) -+ if (det <= DBL_MIN) // avoid FPE - err += 1e12; - else - { -@@ -840,7 +844,8 @@ - frob /= 2; - - double det = trans.Det(); -- if (det <= 0) -+ //if (det <= 0) -+ if (det <= DBL_MIN) // avoid FPE - err += 1e12; - else - err += frob * frob / det; -@@ -1857,7 +1862,8 @@ - case PYRAMID: - { - double noz = 1-p(2); -- if (noz == 0.0) noz = 1e-10; -+ //if (noz == 0.0) noz = 1e-10; -+ if (noz <= DBL_MIN) noz = 1e-10; // avoid FPE - - double xi = p(0) / noz; - double eta = p(1) / noz; -@@ -2035,7 +2041,8 @@ - - double det = -trans.Det(); - -- if (det <= 0) -+ //if (det <= 0) -+ if (det <= DBL_MIN) // avoid FPE - err += 1e12; - else - err += frob * frob * frob / det; -@@ -2107,7 +2114,8 @@ - ddet *= -1; - - -- if (det <= 0) -+ //if (det <= 0) -+ if (det <= DBL_MIN) // avoid FPE - err += 1e12; - else - { -@@ -2189,7 +2197,7 @@ - - det *= -1; - -- if (det <= 0) -+ if (det <= DBL_MIN) - err += 1e12; - else - { -@@ -2522,10 +2530,10 @@ - - MeshingParameters :: MeshingParameters () - { -- optimize3d = "cmdmustm"; -+ optimize3d = (char*)"cmdmustm"; // optimize3d = "cmdmustm"; - //optimize3d = "cmdmstm"; - optsteps3d = 3; -- optimize2d = "smsmsmSmSmSm"; -+ optimize2d = (char*)"smsmsmSmSmSm"; // optimize2d = "smsmsmSmSmSm"; - optsteps2d = 3; - opterrpow = 2; - blockfill = 1; -diff -Naur netgen-4.9.13_orig/libsrc/meshing/meshtype.hpp netgen-4.9.13_new/libsrc/meshing/meshtype.hpp ---- netgen-4.9.13_orig/libsrc/meshing/meshtype.hpp 2009-11-09 13:50:43.000000000 +0300 -+++ netgen-4.9.13_new/libsrc/meshing/meshtype.hpp 2014-07-22 13:01:28.000000000 +0400 -@@ -12,6 +12,7 @@ - Classes for NETGEN - */ - -+class Mesh; // added due to compilation errors on some platforms - - enum ELEMENT_TYPE { - SEGMENT = 1, SEGMENT3 = 2, -diff -Naur netgen-4.9.13_orig/libsrc/meshing/smoothing2.cpp netgen-4.9.13_new/libsrc/meshing/smoothing2.cpp ---- netgen-4.9.13_orig/libsrc/meshing/smoothing2.cpp 2009-11-09 13:47:09.000000000 +0300 -+++ netgen-4.9.13_new/libsrc/meshing/smoothing2.cpp 2014-07-22 13:01:28.000000000 +0400 -@@ -302,7 +302,8 @@ - vgrad = 0; - badness = 0; - -- meshthis -> GetNormalVector (surfi, sp1, gi1, n); -+ //normal already computed: meshthis -> GetNormalVector (surfi, sp1, gi1, n); -+ n = normal; - pp1 = sp1 + x(0) * t1 + x(1) * t2; - - // meshthis -> ProjectPoint (surfi, pp1); -@@ -360,7 +361,8 @@ - vgrad = 0; - badness = 0; - -- meshthis -> GetNormalVector (surfi, sp1, gi1, n); -+ //normal already computed: meshthis -> GetNormalVector (surfi, sp1, gi1, n); -+ n = normal; - - pp1 = sp1 + x(0) * t1 + x(1) * t2; - -@@ -514,7 +516,8 @@ - vgrad = 0; - badness = 0; - -- meshthis -> GetNormalVector (surfi, sp1, gi1, n); -+ //normal already computed: meshthis -> GetNormalVector (surfi, sp1, gi1, n); -+ n = normal; - - pp1 = sp1 + x(0) * t1 + x(1) * t2; - -@@ -586,7 +589,8 @@ - vgrad = 0; - badness = 0; - -- meshthis -> GetNormalVector (surfi, sp1, gi1, n); -+ //normal already computed: meshthis -> GetNormalVector (surfi, sp1, gi1, n); -+ n = normal; - - // pp1 = sp1; - // pp1.Add2 (x.Get(1), t1, x.Get(2), t2); -@@ -973,7 +977,7 @@ - { - mesh[pi] = Point<3> (origp); - } -- -+ break; // exit as is not used anymore - } - } - -diff -Naur netgen-4.9.13_orig/libsrc/occ/occconstruction.cpp netgen-4.9.13_new/libsrc/occ/occconstruction.cpp ---- netgen-4.9.13_orig/libsrc/occ/occconstruction.cpp 2009-08-24 06:32:47.000000000 +0400 -+++ netgen-4.9.13_new/libsrc/occ/occconstruction.cpp 2014-07-22 13:01:28.000000000 +0400 -@@ -28,7 +28,7 @@ - #include - #include - #include --#include -+//#include - //#include - #include - #include -diff -Naur netgen-4.9.13_orig/libsrc/occ/occgenmesh.cpp netgen-4.9.13_new/libsrc/occ/occgenmesh.cpp ---- netgen-4.9.13_orig/libsrc/occ/occgenmesh.cpp 2010-03-16 09:30:07.000000000 +0300 -+++ netgen-4.9.13_new/libsrc/occ/occgenmesh.cpp 2014-07-22 13:01:28.000000000 +0400 -@@ -15,6 +15,8 @@ - - #define DIVIDEEDGESECTIONS 1000 - #define IGNORECURVELENGTH 1e-4 -+// a small value used to avoid FPE -+#define VSMALL 1e-10 - - - bool merge_solids = 1; -@@ -26,7 +28,8 @@ - double nq = n*q; - - Point<3> p = p0 + 0.5*n; -- double lambda = (p-l.p0)*n / nq; -+ // double lambda = (p-l.p0)*n / nq; -- avoid FPE -+ double lambda = (fabs(nq) > 1e-10) ? (p-l.p0)*n / nq : -1; - - if (lambda >= 0 && lambda <= 1) - { -@@ -54,6 +57,8 @@ - - - -+ -+ static // useless out of this file - double ComputeH (double kappa) - { - double hret; -@@ -62,7 +67,8 @@ - if (mparam.maxh * kappa < 1) - hret = mparam.maxh; - else -- hret = 1 / kappa; -+ // hret = 1 / kappa; -- avoid FPE -+ hret = 1 / (kappa + VSMALL); - - if (mparam.maxh < hret) - hret = mparam.maxh; -@@ -71,8 +77,7 @@ - } - - -- -- -+ static // useless out of this file - void RestrictHTriangle (gp_Pnt2d & par0, gp_Pnt2d & par1, gp_Pnt2d & par2, - BRepLProp_SLProps * prop, Mesh & mesh, int depth, double h = 0) - { -@@ -168,8 +173,8 @@ - if(h < 1e-4*maxside) - return; - -- -- if (h > 30) return; -+ // commented to restrict H on a large sphere for example -+ //if (h > 30) return; - } - - if (h < maxside && depth < 10) -@@ -228,6 +233,7 @@ - - - -+ static // useless out of this file - void DivideEdge (TopoDS_Edge & edge, Array & ps, - Array & params, Mesh & mesh) - { -@@ -247,8 +253,8 @@ - hvalue[0] = 0; - pnt = c->Value(s0); - -- double olddist = 0; -- double dist = 0; -+ //double olddist = 0; -- useless variables -+ //double dist = 0; - - int tmpVal = (int)(DIVIDEEDGESECTIONS); - -@@ -256,15 +262,19 @@ - { - oldpnt = pnt; - pnt = c->Value(s0+(i/double(DIVIDEEDGESECTIONS))*(s1-s0)); -+ // -- no more than 1 segment per /DIVIDEEDGESECTIONS - hvalue[i] = hvalue[i-1] + -- 1.0/mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))* -- pnt.Distance(oldpnt); -+ // 1.0/mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))* -+ // pnt.Distance(oldpnt); -+ min( 1.0, -+ 1.0/mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))* -+ pnt.Distance(oldpnt)); - - //(*testout) << "mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z())) " << mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z())) - // << " pnt.Distance(oldpnt) " << pnt.Distance(oldpnt) << endl; - -- olddist = dist; -- dist = pnt.Distance(oldpnt); -+ //olddist = dist; -- useless variables -+ //dist = pnt.Distance(oldpnt); - } - - // nsubedges = int(ceil(hvalue[DIVIDEEDGESECTIONS])); -@@ -279,7 +289,10 @@ - { - if (hvalue[i1]/hvalue[DIVIDEEDGESECTIONS]*nsubedges >= i) - { -- params[i] = s0+(i1/double(DIVIDEEDGESECTIONS))*(s1-s0); -+ // -- for nsubedges comparable to DIVIDEEDGESECTIONS -+ //params[i] = s0+(i1/double(DIVIDEEDGESECTIONS))*(s1-s0); -+ double d1 = i1 - (hvalue[i1] - i*hvalue[DIVIDEEDGESECTIONS]/nsubedges)/(hvalue[i1]-hvalue[i1-1]); -+ params[i] = s0+(d1/double(DIVIDEEDGESECTIONS))*(s1-s0); - pnt = c->Value(params[i]); - ps[i-1] = MeshPoint (Point3d(pnt.X(), pnt.Y(), pnt.Z())); - i++; -@@ -323,6 +336,9 @@ - (*testout) << "nedges = " << nedges << endl; - - double eps = 1e-6 * geom.GetBoundingBox().Diam(); -+ const double eps2 = eps * eps; // -- small optimization -+ -+ int first_vp = mesh.GetNP()+1; // -- to support SALOME sub-meshes - - for (int i = 1; i <= nvertices; i++) - { -@@ -332,7 +348,8 @@ - bool exists = 0; - if (merge_solids) - for (PointIndex pi = 1; pi <= mesh.GetNP(); pi++) -- if ( Dist2 (mesh[pi], Point<3>(mp)) < eps*eps) -+ //if ( Dist2 (mesh[pi], Point<3>(mp)) < eps*eps) -+ if ( Dist2 (mesh[pi], Point<3>(mp)) < eps2 ) // -- small optimization - { - exists = 1; - break; -@@ -362,6 +379,7 @@ - { - TopoDS_Face face = TopoDS::Face(exp1.Current()); - int facenr = geom.fmap.FindIndex(face); -+ if ( facenr < 1 ) continue; // -- to support SALOME sub-meshes - - if (face2solid[0][facenr-1] == 0) - face2solid[0][facenr-1] = solidnr; -@@ -381,6 +399,7 @@ - int facenr = 0; - int edgenr = 0; - -+ edgenr = mesh.GetNSeg(); // to support SALOME sub-meshes - - (*testout) << "faces = " << geom.fmap.Extent() << endl; - int curr = 0; -@@ -442,6 +461,7 @@ - //(*testout) << "ignoring degenerated edge" << endl; - continue; - } -+ if ( geom.emap.FindIndex(edge) < 1 ) continue; // to support SALOME sub-meshes - - if (geom.vmap.FindIndex(TopExp::FirstVertex (edge)) == - geom.vmap.FindIndex(TopExp::LastVertex (edge))) -@@ -474,20 +494,104 @@ - - if (!merge_solids) - { -- pnums[0] = geom.vmap.FindIndex (TopExp::FirstVertex (edge)); -- pnums[pnums.Size()-1] = geom.vmap.FindIndex (TopExp::LastVertex (edge)); -+ //pnums[0] = geom.vmap.FindIndex (TopExp::FirstVertex (edge)); -+ //pnums[pnums.Size()-1] = geom.vmap.FindIndex (TopExp::LastVertex (edge)); -+ MeshPoint dfltP ( Point<3> ( 0, 0, 0 ) ); -+ int *ipp[] = { &pnums[0], &pnums[pnums.Size()-1] }; -+ TopoDS_Iterator vIt( edge, false ); -+ TopoDS_Vertex v[2]; -+ v[0] = TopoDS::Vertex( vIt.Value() ); vIt.Next(); -+ v[1] = TopoDS::Vertex( vIt.Value() ); -+ if ( v[0].Orientation() == TopAbs_REVERSED ) -+ std::swap( v[0], v[1] ); -+ for ( int i = 0; i < 2; ++i) -+ { -+ int &ip = *ipp[i]; -+ ip = geom.vmap.FindIndex ( v[i] ); -+ if ( ip == 0 || ip > nvertices ) -+ { -+ int iv = ip; -+ if ( ip == 0 ) -+ ip = iv = geom.vmap.Add( v[i] ); -+ gp_Pnt pnt = BRep_Tool::Pnt( v[i] ); -+ MeshPoint mp( Point<3>(pnt.X(), pnt.Y(), pnt.Z()) ); -+ for (PointIndex pi = 1; pi < first_vp; pi++) -+ if ( Dist2 (mesh.Point(pi), Point<3>(mp)) < 1e-100 ) -+ { -+ ip = pi; -+ if ( mesh.Point(ip).GetLayer() != dfltP.GetLayer() && mesh.Point(ip).GetLayer() != iv ) -+ continue; -+ if ( mesh.Point(ip).GetLayer() == dfltP.GetLayer()) -+ mesh.Point(ip) = MeshPoint( mesh.Point(ip), iv ); -+ break; -+ } -+ } -+ else -+ { -+ ip += first_vp - 1; -+ } -+ } - } - else - { -- Point<3> fp = occ2ng (BRep_Tool::Pnt (TopExp::FirstVertex (edge))); -- Point<3> lp = occ2ng (BRep_Tool::Pnt (TopExp::LastVertex (edge))); -+ TopoDS_Iterator vIt( edge, false ); -+ TopoDS_Vertex v1 = TopoDS::Vertex( vIt.Value() ); vIt.Next(); -+ TopoDS_Vertex v2 = TopoDS::Vertex( vIt.Value() ); -+ if ( v1.Orientation() == TopAbs_REVERSED ) -+ std::swap( v1, v2 ); -+ const bool isClosedEdge = v1.IsSame( v2 ); -+ -+ Point<3> fp = occ2ng (BRep_Tool::Pnt (v1)); -+ Point<3> lp = occ2ng (BRep_Tool::Pnt (v2)); -+ double tol2 = std::min( eps*eps, 1e-6 * Dist2( fp, lp )); -+ if ( isClosedEdge ) -+ tol2 = BRep_Tool::Tolerance( v1 ) * BRep_Tool::Tolerance( v1 ); - - pnums[0] = -1; - pnums.Last() = -1; - for (PointIndex pi = 1; pi < first_ep; pi++) - { -- if (Dist2 (mesh[pi], fp) < eps*eps) pnums[0] = pi; -- if (Dist2 (mesh[pi], lp) < eps*eps) pnums.Last() = pi; -+ if (Dist2 (mesh[pi], fp) < tol2) pnums[0] = pi; -+ if (Dist2 (mesh[pi], lp) < tol2) pnums.Last() = pi; -+ } -+ if (( isClosedEdge && pnums[0] != pnums.Last() ) || -+ ( !isClosedEdge && pnums[0] == pnums.Last() )) -+ pnums[0] = pnums.Last() = -1; -+ if ( pnums[0] == -1 || pnums.Last() == -1 ) -+ { -+ // take into account a possible large gap between a vertex and an edge curve -+ // end and a large vertex tolerance covering the whole edge -+ if ( pnums[0] == -1 ) -+ { -+ double tol = BRep_Tool::Tolerance( v1 ); -+ for (PointIndex pi = 1; pi < first_ep; pi++) -+ if (pi != pnums.Last() && Dist2 (mesh[pi], fp) < 2*tol*tol) -+ pnums[0] = pi; -+ -+ if ( pnums[0] == -1 ) -+ pnums[0] = first_ep-1- nvertices + geom.vmap.FindIndex ( v1 ); -+ } -+ if ( isClosedEdge ) -+ { -+ pnums.Last() = pnums[0]; -+ } -+ else -+ { -+ if ( pnums.Last() == -1 ) -+ { -+ double tol = BRep_Tool::Tolerance( v2 ); -+ for (PointIndex pi = 1; pi < first_ep; pi++) -+ if (pi != pnums[0] && Dist2 (mesh[pi], lp) < 2*tol*tol) -+ pnums.Last() = pi; -+ -+ if ( pnums.Last() == -1 ) -+ pnums.Last() = first_ep-1-nvertices + geom.vmap.FindIndex ( v2 ); -+ } -+ -+ if ( Dist2( fp, mesh[PointIndex(pnums[0])]) > -+ Dist2( lp, mesh[PointIndex(pnums.Last())])) -+ std::swap( pnums[0], pnums.Last() ); -+ } - } - } - -@@ -497,17 +601,20 @@ - bool exists = 0; - int j; - for (j = first_ep; j <= mesh.GetNP(); j++) -+ { -+ if (!merge_solids && mesh.Point(j).GetLayer() != geomedgenr ) continue; // to support SALOME fuse edges - if ((mesh.Point(j)-Point<3>(mp[i-1])).Length() < eps) - { - exists = 1; - break; - } -+ } - - if (exists) - pnums[i] = j; - else - { -- mesh.AddPoint (mp[i-1]); -+ mesh.AddPoint (mp[i-1], geomedgenr); // to support SALOME fuse edges - (*testout) << "add meshpoint " << mp[i-1] << endl; - pnums[i] = mesh.GetNP(); - } -@@ -591,6 +698,8 @@ - // (*testout) << "edge " << mesh.LineSegment(i).edgenr << " face " << mesh.LineSegment(i).si - // << " p1 " << mesh.LineSegment(i)[0] << " p2 " << mesh.LineSegment(i)[1] << endl; - // exit(10); -+ for (int j = 1; j <= mesh.GetNP(); j++) // to support SALOME fuse edges: set level to zero -+ mesh.Point(j) = MeshPoint( (Point<3>&) mesh.Point(j) ); - - mesh.CalcSurfacesOfNode(); - multithread.task = savetask; -@@ -633,7 +742,8 @@ - } - - (*testout) << "mesh face " << k << endl; -- multithread.percent = 100 * k / (mesh.GetNFD()+1e-10); -+ // multithread.percent = 100 * k / (mesh.GetNFD()+1e-10); -- avoid FPE -+ multithread.percent = 100 * k / (mesh.GetNFD() + VSMALL); - geom.facemeshstatus[k-1] = -1; - - -@@ -901,7 +1011,8 @@ - // if (k != 36) continue; - - // (*testout) << "optimize face " << k << endl; -- multithread.percent = 100 * k / (mesh.GetNFD()+1e-10); -+ //multithread.percent = 100 * k / (mesh.GetNFD()+1e-10); -- avoid FPE -+ multithread.percent = 100 * k / (mesh.GetNFD() + VSMALL); - - FaceDescriptor & fd = mesh.GetFaceDescriptor(k); - -@@ -1456,3 +1567,4 @@ - } - - #endif -+ -diff -Naur netgen-4.9.13_orig/libsrc/occ/occgeom.cpp netgen-4.9.13_new/libsrc/occ/occgeom.cpp ---- netgen-4.9.13_orig/libsrc/occ/occgeom.cpp 2010-03-05 16:16:21.000000000 +0300 -+++ netgen-4.9.13_new/libsrc/occ/occgeom.cpp 2014-07-22 13:01:28.000000000 +0400 -@@ -8,6 +8,8 @@ - #include "ShapeAnalysis_CheckSmallFace.hxx" - #include "ShapeAnalysis_DataMapOfShapeListOfReal.hxx" - #include "ShapeAnalysis_Surface.hxx" -+#include // -- to optimize Project() and FastProject() -+#include - #include "BRepAlgoAPI_Fuse.hxx" - #include "BRepCheck_Analyzer.hxx" - #include "BRepLib.hxx" -@@ -16,10 +18,17 @@ - #include "ShapeFix_FixSmallFace.hxx" - #include "Partition_Spliter.hxx" - -- - namespace netgen - { -- void OCCGeometry :: PrintNrShapes () -+ // free data used to optimize Project() and FastProject() -+ OCCGeometry::~OCCGeometry() -+ { -+ NCollection_DataMap::Iterator it(fclsmap); -+ for (; it.More(); it.Next()) -+ delete it.Value(); -+ } -+ -+ void OCCGeometry :: PrintNrShapes () - { - TopExp_Explorer e; - int count = 0; -@@ -951,25 +960,58 @@ - } - - -+ // returns a projector and a classifier for the given surface -+ void OCCGeometry::GetFaceTools(int surfi, Handle(ShapeAnalysis_Surface)& proj, -+ BRepTopAdaptor_FClass2d*& cls) const -+ { -+ //MSV: organize caching projector in the map -+ if (fprjmap.IsBound(surfi)) -+ { -+ proj = fprjmap.Find(surfi); -+ cls = fclsmap.Find(surfi); -+ } -+ else -+ { -+ const TopoDS_Face& aFace = TopoDS::Face(fmap(surfi)); -+ Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace); -+ proj = new ShapeAnalysis_Surface(aSurf); -+ fprjmap.Bind(surfi, proj); -+ cls = new BRepTopAdaptor_FClass2d(aFace,Precision::Confusion()); -+ fclsmap.Bind(surfi, cls); -+ } -+ } - -- -- void OCCGeometry :: Project (int surfi, Point<3> & p) const -+ // void OCCGeometry :: Project (int surfi, Point<3> & p) const -+ bool OCCGeometry :: Project (int surfi, Point<3> & p, double& u, double& v) const - { - static int cnt = 0; - if (++cnt % 1000 == 0) cout << "Project cnt = " << cnt << endl; - - gp_Pnt pnt(p(0), p(1), p(2)); - -- double u,v; -- Handle( Geom_Surface ) thesurf = BRep_Tool::Surface(TopoDS::Face(fmap(surfi))); -- Handle( ShapeAnalysis_Surface ) su = new ShapeAnalysis_Surface( thesurf ); -- gp_Pnt2d suval = su->ValueOfUV ( pnt, BRep_Tool::Tolerance( TopoDS::Face(fmap(surfi)) ) ); -- suval.Coord( u, v); -- pnt = thesurf->Value( u, v ); -- -- -+ // -- Optimization: use cached projector and classifier -+ // double u,v; -+ // Handle( Geom_Surface ) thesurf = BRep_Tool::Surface(TopoDS::Face(fmap(surfi))); -+ // Handle( ShapeAnalysis_Surface ) su = new ShapeAnalysis_Surface( thesurf ); -+ // gp_Pnt2d suval = su->ValueOfUV ( pnt, BRep_Tool::Tolerance( TopoDS::Face(fmap(surfi)) ) ); -+ // suval.Coord( u, v); -+ // pnt = thesurf->Value( u, v ); -+ -+ Handle(ShapeAnalysis_Surface) proj; -+ BRepTopAdaptor_FClass2d *cls; -+ GetFaceTools(surfi, proj, cls); -+ -+ gp_Pnt2d p2d = proj->ValueOfUV(pnt, Precision::Confusion()); -+ if (cls->Perform(p2d) == TopAbs_OUT) -+ { -+ return false; -+ } -+ pnt = proj->Value(p2d); -+ p2d.Coord(u, v); -+ - p = Point<3> (pnt.X(), pnt.Y(), pnt.Z()); - -+ return true; - } - - -@@ -979,54 +1021,69 @@ - { - gp_Pnt p(ap(0), ap(1), ap(2)); - -- Handle(Geom_Surface) surface = BRep_Tool::Surface(TopoDS::Face(fmap(surfi))); -- -- gp_Pnt x = surface->Value (u,v); -- -- if (p.SquareDistance(x) <= sqr(PROJECTION_TOLERANCE)) return true; -- -- gp_Vec du, dv; -- -- surface->D1(u,v,x,du,dv); -- -- int count = 0; -- -- gp_Pnt xold; -- gp_Vec n; -- double det, lambda, mu; -- -- do { -- count++; -- -- n = du^dv; -- -- det = Det3 (n.X(), du.X(), dv.X(), -- n.Y(), du.Y(), dv.Y(), -- n.Z(), du.Z(), dv.Z()); -- -- if (det < 1e-15) return false; -- -- lambda = Det3 (n.X(), p.X()-x.X(), dv.X(), -- n.Y(), p.Y()-x.Y(), dv.Y(), -- n.Z(), p.Z()-x.Z(), dv.Z())/det; -- -- mu = Det3 (n.X(), du.X(), p.X()-x.X(), -- n.Y(), du.Y(), p.Y()-x.Y(), -- n.Z(), du.Z(), p.Z()-x.Z())/det; -- -- u += lambda; -- v += mu; -- -- xold = x; -- surface->D1(u,v,x,du,dv); -- -- } while (xold.SquareDistance(x) > sqr(PROJECTION_TOLERANCE) && count < 50); -- -- // (*testout) << "FastProject count: " << count << endl; -- -- if (count == 50) return false; -- -- ap = Point<3> (x.X(), x.Y(), x.Z()); -+ // -- Optimization: use cached projector and classifier -+ // Handle(Geom_Surface) surface = BRep_Tool::Surface(TopoDS::Face(fmap(surfi))); -+ // -+ // gp_Pnt x = surface->Value (u,v); -+ // -+ // if (p.SquareDistance(x) <= sqr(PROJECTION_TOLERANCE)) return true; -+ // -+ // gp_Vec du, dv; -+ // -+ // surface->D1(u,v,x,du,dv); -+ // -+ // int count = 0; -+ // -+ // gp_Pnt xold; -+ // gp_Vec n; -+ // double det, lambda, mu; -+ // -+ // do { -+ // count++; -+ // -+ // n = du^dv; -+ // -+ // det = Det3 (n.X(), du.X(), dv.X(), -+ // n.Y(), du.Y(), dv.Y(), -+ // n.Z(), du.Z(), dv.Z()); -+ // -+ // if (det < 1e-15) return false; -+ // -+ // lambda = Det3 (n.X(), p.X()-x.X(), dv.X(), -+ // n.Y(), p.Y()-x.Y(), dv.Y(), -+ // n.Z(), p.Z()-x.Z(), dv.Z())/det; -+ // -+ // mu = Det3 (n.X(), du.X(), p.X()-x.X(), -+ // n.Y(), du.Y(), p.Y()-x.Y(), -+ // n.Z(), du.Z(), p.Z()-x.Z())/det; -+ // -+ // u += lambda; -+ // v += mu; -+ // -+ // xold = x; -+ // surface->D1(u,v,x,du,dv); -+ // -+ // } while (xold.SquareDistance(x) > sqr(PROJECTION_TOLERANCE) && count < 50); -+ // -+ // // (*testout) << "FastProject count: " << count << endl; -+ // -+ // if (count == 50) return false; -+ // -+ // ap = Point<3> (x.X(), x.Y(), x.Z()); -+ Handle(ShapeAnalysis_Surface) proj; -+ BRepTopAdaptor_FClass2d *cls; -+ GetFaceTools(surfi, proj, cls); -+ -+ gp_Pnt2d p2d = proj->NextValueOfUV(gp_Pnt2d(u,v), p, Precision::Confusion()); -+ if (cls->Perform(p2d) == TopAbs_OUT) -+ { -+ //cout << "Projection fails" << endl; -+ return false; -+ } -+ -+ p = proj->Value(p2d); -+ p2d.Coord(u, v); -+ ap = Point<3> (p.X(), p.Y(), p.Z()); - - return true; - } -@@ -1038,9 +1095,9 @@ - { - cout << "writing stl..."; cout.flush(); - StlAPI_Writer writer; -- writer.RelativeMode() = Standard_False; -+ // writer.RelativeMode() = Standard_False; - -- writer.SetDeflection(0.02); -+ // writer.SetDeflection(0.02); - writer.Write(shape,filename); - - cout << "done" << endl; -diff -Naur netgen-4.9.13_orig/libsrc/occ/occgeom.hpp netgen-4.9.13_new/libsrc/occ/occgeom.hpp ---- netgen-4.9.13_orig/libsrc/occ/occgeom.hpp 2010-01-14 19:56:19.000000000 +0300 -+++ netgen-4.9.13_new/libsrc/occ/occgeom.hpp 2014-07-22 13:09:03.000000000 +0400 -@@ -15,8 +15,8 @@ - #include "Geom_Curve.hxx" - #include "Geom2d_Curve.hxx" - #include "Geom_Surface.hxx" --#include "GeomAPI_ProjectPointOnSurf.hxx" --#include "GeomAPI_ProjectPointOnCurve.hxx" -+// #include "GeomAPI_ProjectPointOnSurf.hxx" -+// #include "GeomAPI_ProjectPointOnCurve.hxx" - #include "BRepTools.hxx" - #include "TopExp.hxx" - #include "BRepBuilderAPI_MakeVertex.hxx" -@@ -42,8 +42,8 @@ - #include "Geom_Curve.hxx" - #include "Geom2d_Curve.hxx" - #include "Geom_Surface.hxx" --#include "GeomAPI_ProjectPointOnSurf.hxx" --#include "GeomAPI_ProjectPointOnCurve.hxx" -+// #include "GeomAPI_ProjectPointOnSurf.hxx" -+// #include "GeomAPI_ProjectPointOnCurve.hxx" - #include "TopoDS_Wire.hxx" - #include "BRepTools_WireExplorer.hxx" - #include "BRepTools.hxx" -@@ -68,18 +68,26 @@ - #include "IGESToBRep_Reader.hxx" - #include "Interface_Static.hxx" - #include "GeomAPI_ExtremaCurveCurve.hxx" --#include "Standard_ErrorHandler.hxx" -+//#include "Standard_ErrorHandler.hxx" - #include "Standard_Failure.hxx" - #include "ShapeUpgrade_ShellSewing.hxx" - #include "ShapeFix_Shape.hxx" - #include "ShapeFix_Wireframe.hxx" -+#include -+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) <= 0x060702 -+// porting to OCCT6.7.3 - #include "BRepMesh.hxx" -+#endif - #include "BRepMesh_IncrementalMesh.hxx" - #include "BRepBndLib.hxx" - #include "Bnd_Box.hxx" - #include "ShapeAnalysis.hxx" - #include "ShapeBuild_ReShape.hxx" - -+// -- Optimization: to use cached projector and classifier -+#include -+class Handle_ShapeAnalysis_Surface; -+class BRepTopAdaptor_FClass2d; - - // Philippose - 29/01/2009 - // OpenCascade XDE Support -@@ -190,6 +198,9 @@ - class OCCGeometry : public NetgenGeometry - { - Point<3> center; -+ // -- Optimization: to use cached projector and classifier -+ mutable NCollection_DataMap fprjmap; -+ mutable NCollection_DataMap fclsmap; - - public: - TopoDS_Shape shape; -@@ -241,6 +252,8 @@ - vmap.Clear(); - } - -+ ~OCCGeometry(); // -- to free cached projector and classifier -+ - void BuildFMap(); - - Box<3> GetBoundingBox() -@@ -260,9 +273,14 @@ - Point<3> Center() - { return center;} - -- void Project (int surfi, Point<3> & p) const; -+ // void Project (int surfi, Point<3> & p) const; -- optimization -+ bool Project (int surfi, Point<3> & p, double& u, double& v) const; - bool FastProject (int surfi, Point<3> & ap, double& u, double& v) const; - -+ // -- Optimization: to use cached projector and classifier -+ void GetFaceTools(int surfi, Handle(ShapeAnalysis_Surface)& proj, -+ BRepTopAdaptor_FClass2d*& cls) const; -+ - OCCSurface GetSurface (int surfi) - { - cout << "OCCGeometry::GetSurface using PLANESPACE" << endl; -diff -Naur netgen-4.9.13_orig/libsrc/occ/occmeshsurf.cpp netgen-4.9.13_new/libsrc/occ/occmeshsurf.cpp ---- netgen-4.9.13_orig/libsrc/occ/occmeshsurf.cpp 2009-08-24 06:32:47.000000000 +0400 -+++ netgen-4.9.13_new/libsrc/occ/occmeshsurf.cpp 2014-07-22 13:01:28.000000000 +0400 -@@ -6,6 +6,7 @@ - #include - #include - #include -+#include // -- moved here from occgeom.hpp - - - namespace netgen -@@ -434,23 +435,33 @@ - - void MeshOptimize2dOCCSurfaces :: ProjectPoint (INDEX surfind, Point<3> & p) const - { -- geometry.Project (surfind, p); -+ // geometry.Project (surfind, p); -- signature of Project() changed for optimization -+ double u, v; -+ geometry.Project (surfind, p, u, v); - } - - - int MeshOptimize2dOCCSurfaces :: ProjectPointGI (INDEX surfind, Point<3> & p, PointGeomInfo & gi) const - { -- double u = gi.u; -- double v = gi.v; -+ //double u = gi.u; -+ //double v = gi.v; - - Point<3> hp = p; -- if (geometry.FastProject (surfind, hp, u, v)) -- { -- p = hp; -- return 1; -- } -- ProjectPoint (surfind, p); -- return CalcPointGeomInfo (surfind, gi, p); -+ // -- u and v are computed by FastProject() and Project(), no need to call CalcPointGeomInfo() -+ // if (geometry.FastProject (surfind, hp, u, v)) -+ // { -+ // p = hp; -+ // return 1; -+ // } -+ // ProjectPoint (surfind, p); -+ // return CalcPointGeomInfo (surfind, gi, p); -+ bool ok; -+ if (gi.trignum > 0) -+ ok = geometry.FastProject (surfind, hp, gi.u, gi.v); -+ else -+ ok = geometry.Project (surfind, hp, gi.u, gi.v); -+ p = hp; -+ return ok; - } - - -@@ -680,7 +691,8 @@ - if (!geometry.FastProject (surfi, hnewp, u, v)) - { - // cout << "Fast projection to surface fails! Using OCC projection" << endl; -- geometry.Project (surfi, hnewp); -+ // geometry.Project (surfi, hnewp); -- Project() changed for optimization -+ geometry.Project (surfi, hnewp, u, v); - } - - newgi.trignum = 1; -@@ -689,7 +701,7 @@ - } - - newp = hnewp; -- } -+ }//; -- to compile with -Wall -pedantic - - - void OCCRefinementSurfaces :: -@@ -708,14 +720,18 @@ - hnewp = Point<3> (pnt.X(), pnt.Y(), pnt.Z()); - newp = hnewp; - newgi = ap1; -- }; -+ } - - - void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi) - { - if (surfi > 0) -- geometry.Project (surfi, p); -- }; -+ // geometry.Project (surfi, p); -- Project() changed for optimization -+ { -+ double u, v; -+ geometry.Project (surfi, p, u, v); -+ } -+ }//; -- to compile with -Wall -pedantic - - void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & gi) - { -@@ -723,9 +739,10 @@ - if (!geometry.FastProject (surfi, p, gi.u, gi.v)) - { - cout << "Fast projection to surface fails! Using OCC projection" << endl; -- geometry.Project (surfi, p); -+ double u, v; -+ geometry.Project (surfi, p, u, v); - } -- }; -+ } - - - -diff -Naur netgen-4.9.13_orig/libsrc/occ/Partition_Inter3d.cxx netgen-4.9.13_new/libsrc/occ/Partition_Inter3d.cxx ---- netgen-4.9.13_orig/libsrc/occ/Partition_Inter3d.cxx 2009-08-24 06:12:24.000000000 +0400 -+++ netgen-4.9.13_new/libsrc/occ/Partition_Inter3d.cxx 2014-07-22 13:01:28.000000000 +0400 -@@ -86,6 +86,9 @@ - #include - #include - #include -+ -+#include -+ - #include - - //======================================================================= -@@ -243,7 +246,12 @@ - Standard_Integer i, nbExt = anExtPS.NbExt(); - Extrema_POnSurf aPOnSurf; - for (i = 1; i <= nbExt; ++i ) -+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060400 -+// porting to OCCT6.5.1 -+ if (anExtPS.SquareDistance( i ) <= TolE * TolE) { -+#else - if (anExtPS.Value( i ) <= TolE) { -+#endif - aPOnSurf = anExtPS.Point( i ); - break; - } -diff -Naur netgen-4.9.13_orig/libsrc/occ/Partition_Loop2d.cxx netgen-4.9.13_new/libsrc/occ/Partition_Loop2d.cxx ---- netgen-4.9.13_orig/libsrc/occ/Partition_Loop2d.cxx 2009-08-24 06:12:24.000000000 +0400 -+++ netgen-4.9.13_new/libsrc/occ/Partition_Loop2d.cxx 2014-07-22 13:01:28.000000000 +0400 -@@ -22,7 +22,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -51,6 +50,15 @@ - #include - #include - -+#include -+ -+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060400 -+// porting to OCCT6.5.1 -+#include -+#else -+#include -+#endif -+ - //======================================================================= - //function : Partition_Loop2d - //purpose : -@@ -209,7 +217,7 @@ - Cc->D1(uc, PC, CTg1); - if (!isForward) CTg1.Reverse(); - -- Standard_Real anglemin = 3 * PI, tolAng = 1.e-8; -+ Standard_Real anglemin = 3 * M_PI, tolAng = 1.e-8; - - // select an edge whose first derivative is most left of CTg1 - // ie an angle between Tg1 and CTg1 is least -@@ -233,7 +241,7 @@ - // -PI < angle < PI - Standard_Real angle = Tg1.Angle(CTg1); - -- if (PI - Abs(angle) <= tolAng) -+ if (M_PI - Abs(angle) <= tolAng) - { - // an angle is too close to PI; assure that an angle sign really - // reflects an edge position: +PI - an edge is worst, -@@ -519,7 +527,12 @@ - DC.Initialize( DegEdge, F ); - - // avoid intersecting twice the same edge -+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060400 -+// porting to OCCT6.5.1 -+ TopTools_DataMapOfShapeReal EUMap ( EdgesList.Extent() ); -+#else - BRepOffset_DataMapOfShapeReal EUMap ( EdgesList.Extent() ); -+#endif - - Standard_Real U, f, l; - BRep_Tool::Range (DegEdge, f, l); -diff -Naur netgen-4.9.13_orig/libsrc/occ/Partition_Loop.cxx netgen-4.9.13_new/libsrc/occ/Partition_Loop.cxx ---- netgen-4.9.13_orig/libsrc/occ/Partition_Loop.cxx 2009-08-24 06:12:24.000000000 +0400 -+++ netgen-4.9.13_new/libsrc/occ/Partition_Loop.cxx 2014-07-22 13:01:28.000000000 +0400 -@@ -178,7 +178,7 @@ - } - } - -- Standard_Real anglemax = - PI; -+ Standard_Real anglemax = - M_PI; - TopoDS_Edge SelectedEdge; - for ( itl.Initialize(LE); itl.More(); itl.Next()) { - const TopoDS_Edge& E = TopoDS::Edge(itl.Value()); -diff -Naur netgen-4.9.13_orig/libsrc/occ/Partition_Spliter.cxx netgen-4.9.13_new/libsrc/occ/Partition_Spliter.cxx ---- netgen-4.9.13_orig/libsrc/occ/Partition_Spliter.cxx 2009-08-24 06:12:24.000000000 +0400 -+++ netgen-4.9.13_new/libsrc/occ/Partition_Spliter.cxx 2014-07-22 13:01:28.000000000 +0400 -@@ -79,6 +79,8 @@ - #include - #include - -+#include -+ - #ifdef DEB - //# define PART_PERF - #endif -@@ -1169,7 +1171,12 @@ - for (; j<=nbj && ok; ++j) { - if (Extrema.IsMin(j)) { - hasMin = Standard_True; -+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060400 -+// porting to OCCT6.5.1 -+ ok = Extrema.SquareDistance(j) <= tol * tol; -+#else - ok = Extrema.Value(j) <= tol; -+#endif - } - } - } -diff -Naur netgen-4.9.13_orig/libsrc/occ/utilities.h netgen-4.9.13_new/libsrc/occ/utilities.h ---- netgen-4.9.13_orig/libsrc/occ/utilities.h 2009-08-24 06:12:24.000000000 +0400 -+++ netgen-4.9.13_new/libsrc/occ/utilities.h 2014-07-22 13:01:28.000000000 +0400 -@@ -33,6 +33,7 @@ - - #include - #include -+#include - #include - // #include "SALOME_Log.hxx" - -diff -Naur netgen-4.9.13_orig/libsrc/stlgeom/stlgeommesh.cpp netgen-4.9.13_new/libsrc/stlgeom/stlgeommesh.cpp ---- netgen-4.9.13_orig/libsrc/stlgeom/stlgeommesh.cpp 2009-08-10 15:40:51.000000000 +0400 -+++ netgen-4.9.13_new/libsrc/stlgeom/stlgeommesh.cpp 2014-07-22 13:01:28.000000000 +0400 -@@ -1435,7 +1435,8 @@ - - if (!optstring || strlen(optstring) == 0) - { -- mparam.optimize2d = "smcm"; -+ //mparam.optimize2d = (char*)"smcm"; -+ mparam.optimize2d = (char*)"smcm"; - } - else - { -@@ -1451,7 +1452,8 @@ - mparam.grading); - mesh -> LoadLocalMeshSize (mparam.meshsizefilename); - mesh -> CalcLocalHFromSurfaceCurvature (stlparam.resthsurfmeshcurvfac); -- mparam.optimize2d = "cmsmSm"; -+ //mparam.optimize2d = (char*)"cmsmSm"; -+ mparam.optimize2d = (char*)"cmsmSm"; - STLSurfaceOptimization (*stlgeometry, *mesh, mparam); - #ifdef STAT_STREAM - (*statout) << GetTime() << " & "; -@@ -1557,7 +1559,8 @@ - - if (!optstring || strlen(optstring) == 0) - { -- mparam.optimize3d = "cmdmstm"; -+ //mparam.optimize3d = "cmdmstm"; -+ mparam.optimize3d = (char*)"cmdmstm"; - } - else - { -diff -Naur netgen-4.9.13_orig/nglib/nglib.h netgen-4.9.13_new/nglib/nglib.h ---- netgen-4.9.13_orig/nglib/nglib.h 2010-05-18 15:20:25.000000000 +0400 -+++ netgen-4.9.13_new/nglib/nglib.h 2014-07-22 13:01:28.000000000 +0400 -@@ -24,7 +24,7 @@ - // Philippose - 14.02.2009 - // Modifications for creating a DLL in Windows - #ifdef WIN32 -- #ifdef NGLIB_EXPORTS || nglib_EXPORTS -+ #if defined NGLIB_EXPORTS || defined nglib_EXPORTS - #define DLL_HEADER __declspec(dllexport) - #else - #define DLL_HEADER __declspec(dllimport) diff --git a/data/patches/patchPyQt496noPhonon.patch b/data/patches/patchPyQt496noPhonon.patch deleted file mode 100755 index 425e4ea..0000000 --- a/data/patches/patchPyQt496noPhonon.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -pruN PyQt-4.9.6/configure.py PyQt-4.9.6_new/configure.py ---- PyQt-4.9.6/configure.py 2012-12-08 10:51:13.000000000 +0100 -+++ PyQt-4.9.6_new/configure.py 2013-03-12 10:04:55.000000000 +0100 -@@ -390,8 +390,8 @@ class ConfigurePyQt4: - if qt_version < 0x050000: - check_module("QtXmlPatterns", "qxmlname.h", "new QXmlName()") - -- if qt_version < 0x050000: check_module("phonon", "phonon/videowidget.h", -- "new Phonon::VideoWidget()") -+ #if qt_version < 0x050000: check_module("phonon", "phonon/videowidget.h", -+ # "new Phonon::VideoWidget()") - check_module("QtAssistant", "qassistantclient.h", - "new QAssistantClient(\"foo\")", extra_lib_dirs=ass_lib_dirs, - extra_libs=ass_libs) diff --git a/data/patches/qt-4.8.4-enable-webkit-compilation-whith-gcc5.patch b/data/patches/qt-4.8.4-enable-webkit-compilation-whith-gcc5.patch deleted file mode 100644 index 9b2e14b..0000000 --- a/data/patches/qt-4.8.4-enable-webkit-compilation-whith-gcc5.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rupN qt-4.8.4_old/configure qt-4.8.4_new/configure ---- qt-4.8.4_old/configure 2012-11-23 11:11:23.000000000 +0100 -+++ qt-4.8.4_new/configure 2015-07-02 10:04:54.286480668 +0200 -@@ -7666,7 +7666,7 @@ case "$XPLATFORM" in - *-g++*) - # Check gcc's version - case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in -- 4*|3.4*) -+ 4*|3.4*|5*) - ;; - 3.3*) - canBuildWebKit="no" diff --git a/data/patches/scipy-0.14.1.patch b/data/patches/scipy-0.14.1.patch deleted file mode 100644 index 046c10b..0000000 --- a/data/patches/scipy-0.14.1.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -rupN scipy-0.14.1_old/scipy/_build_utils/_fortran.py scipy-0.14.1_new/scipy/_build_utils/_fortran.py ---- scipy-0.14.1_old/scipy/_build_utils/_fortran.py 2014-11-23 21:41:04.000000000 +0100 -+++ scipy-0.14.1_new/scipy/_build_utils/_fortran.py 2015-04-02 10:04:31.334629000 +0200 -@@ -13,11 +13,11 @@ __all__ = ['needs_g77_abi_wrapper', 'spl - def uses_veclib(info): - if sys.platform != "darwin": - return False -- r_accelerate = re.compile("vecLib") -- extra_link_args = info.get('extra_link_args', '') -- for arg in extra_link_args: -- if r_accelerate.search(arg): -- return True -+ #r_accelerate = re.compile("vecLib") -+ #extra_link_args = info.get('extra_link_args', '') -+ #for arg in extra_link_args: -+ # if r_accelerate.search(arg): -+ # return True - return False - - -@@ -33,11 +33,11 @@ def uses_accelerate(info): - - - def uses_mkl(info): -- r_mkl = re.compile("mkl_core") -- libraries = info.get('libraries', '') -- for library in libraries: -- if r_mkl.search(library): -- return True -+ #r_mkl = re.compile("mkl_core") -+ #libraries = info.get('libraries', '') -+ #for library in libraries: -+ # if r_mkl.search(library): -+ # return True - - return False - diff --git a/data/site.pyconf b/data/site.pyconf index 9cd2137..b63bb0a 100644 --- a/data/site.pyconf +++ b/data/site.pyconf @@ -7,10 +7,7 @@ SITE : { log_dir : $USER.workdir + "/LOGS" } - jobs : - { - config_path : $VARS.personalDir + '/Jobs' - } + #base : $USER.workdir + $VARS.sep + "BASE-FROM-SITE" } PROJECTS : diff --git a/src/__init__.py b/src/__init__.py index e492bb9..de1969c 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -114,12 +114,11 @@ def get_base_path(config): :return: The path of the product base. :rtype: str ''' - if "base" in config.APPLICATION: - base_name = config.APPLICATION.base - base_path = config.USER.bases[base_name] + if "base" in config.SITE: + base_path = config.SITE.base else: # default base - base_path = config.USER.bases.base + base_path = config.USER.base return base_path def only_numbers(str_num): diff --git a/src/environment.py b/src/environment.py index 6e2888b..721fbee 100644 --- a/src/environment.py +++ b/src/environment.py @@ -474,7 +474,7 @@ class SalomeEnviron: :param product str: The product name :param logger Logger: The logger instance to display messages """ - + # Get the informations corresponding to the product pi = src.product.get_product_config(self.cfg, product) @@ -487,6 +487,12 @@ class SalomeEnviron: self.add_line(1) self.add_comment('setting environ for ' + product) + + # Set an additional environment for SALOME products + if src.product.product_is_salome(pi): + # set environment using definition of the product + self.set_salome_minimal_product_env(pi, logger) + self.set_salome_generic_product_env(product) # Put the environment define in the configuration of the product if "environ" in pi: @@ -499,11 +505,7 @@ class SalomeEnviron: if 'env_script' in pi.environ: self.run_env_script(pi, logger) - # Set an additional environment for SALOME products - if src.product.product_is_salome(pi): - # set environment using definition of the product - self.set_salome_minimal_product_env(pi, logger) - self.set_salome_generic_product_env(product) + def run_env_script(self, product_info, logger=None): diff --git a/src/logger.py b/src/logger.py index 3e1e5a1..0b31fba 100644 --- a/src/logger.py +++ b/src/logger.py @@ -278,7 +278,12 @@ def show_command_log(logFilePath, cmd, application, notShownCommands): return False, None # Get the application of the log file - logFileXml = src.xmlManager.ReadXmlFile(logFilePath) + try: + logFileXml = src.xmlManager.ReadXmlFile(logFilePath) + except Exception as e: + msg = _("WARNING: the log file %s cannot be read:" % logFilePath) + sys.stdout.write(printcolors.printcWarning("%s\n%s\n" % (msg, e))) + return False, None if 'application' in logFileXml.xmlroot.keys(): appliLog = logFileXml.xmlroot.get('application') diff --git a/src/product.py b/src/product.py index e5fb779..007e2ce 100644 --- a/src/product.py +++ b/src/product.py @@ -45,6 +45,7 @@ def get_product_config(config, product_name): # current product debug = 'no' dev = 'no' + base = 'maybe' if isinstance(version, src.pyconf.Mapping): dic_version = version # Get the version/tag @@ -60,6 +61,10 @@ def get_product_config(config, product_name): # Get the dev if any if 'dev' in dic_version: dev = dic_version.dev + + # Get the dev if any + if 'base' in dic_version: + base = dic_version.base vv = version # substitute some character with _ in order to get the correct definition @@ -162,17 +167,25 @@ def get_product_config(config, product_name): prod_info.archive_info.archive_name = arch_path # Set the install_dir key - if "install_dir" not in prod_info: + if "no_base" in config.APPLICATION and config.APPLICATION.no_base == "yes": # Set it to the default value (in application directory) prod_info.install_dir = os.path.join(config.APPLICATION.workdir, "INSTALL", prod_info.name) else: - if prod_info.install_dir == "base": - # Get the product base of the application - base_path = src.get_base_path(config) - prod_info.install_dir = os.path.join(base_path, - prod_info.name + "-" + version) + if base == "yes": + prod_info.install_dir = "base" + if "install_dir" not in prod_info: + # Set it to the default value (in application directory) + prod_info.install_dir = os.path.join(config.APPLICATION.workdir, + "INSTALL", + prod_info.name) + else: + if prod_info.install_dir == "base": + # Get the product base of the application + base_path = src.get_base_path(config) + prod_info.install_dir = os.path.join(base_path, + prod_info.name + "-" + version) # If the product compiles with a script, check the script existence # and if it is executable diff --git a/src/xsl/command.xsl b/src/xsl/command.xsl index 6ab0300..b444b82 100644 --- a/src/xsl/command.xsl +++ b/src/xsl/command.xsl @@ -65,7 +65,7 @@ - + Click for more information KO2 @@ -90,7 +90,8 @@ - + + diff --git a/src/xsl/jobs_board_report.xsl b/src/xsl/jobs_board_report.xsl index 29e3ee4..98639ca 100644 --- a/src/xsl/jobs_board_report.xsl +++ b/src/xsl/jobs_board_report.xsl @@ -120,17 +120,20 @@ Legend : - - - - - - - - - + + + + + + + + + + Missing job: + Extra job: +
jobresult
OK2daysuccess today OK2daysuccess today
OK2success not today OK2success not today
KO2dayfail today KO2dayfail today
KO2fail not today KO2fail not today
TO2daytimeout today KF2dayknown failure today
RUNNING2running KF2known failure not today
NA2dayTo be launched
NA2Not today
+
jobresult
OK2daysuccess today OK2daysuccess today
OK2success not today OK2success not today
KO2dayfail today KO2dayfail today
KO2fail not today KO2fail not today
TO2daytimeout today KF2dayknown failure today
RUNNING2running KF2known failure not today
NA2dayTo be launched
NA2Not today
FFCCCC
FFCCCC Job name
-
@@ -225,7 +228,7 @@ OK2day - + KO2day / diff --git a/src/xsl/jobs_global_report.xsl b/src/xsl/jobs_global_report.xsl index 8be24da..29e4786 100644 --- a/src/xsl/jobs_global_report.xsl +++ b/src/xsl/jobs_global_report.xsl @@ -208,7 +208,7 @@ OK2day - + KO2day / diff --git a/test/config/create_user_pyconf.py b/test/config/create_user_pyconf.py index 9af5706..6036d30 100644 --- a/test/config/create_user_pyconf.py +++ b/test/config/create_user_pyconf.py @@ -89,6 +89,7 @@ class TestConfig(unittest.TestCase): # pyunit method to compare 2 str self.assertEqual(OK, "OK") + """ def test_override_SITE(self): '''override SITE ''' @@ -103,6 +104,7 @@ class TestConfig(unittest.TestCase): # pyunit method to compare 2 str self.assertEqual(OK, "OK") + """ def test_override_APPLICATION(self): '''override APPLICATION diff --git a/test/config/option_value_2.py b/test/config/option_value_2.py index d70ea1f..ba5a9c6 100644 --- a/test/config/option_value_2.py +++ b/test/config/option_value_2.py @@ -85,6 +85,35 @@ class TestConfig(unittest.TestCase): # pyunit method to compare 2 str self.assertEqual(OK, 'OK') + + def test_option_info(self): + '''Test the display of the right value of "sat config -i" + ''' + + application = 'appli-test' + product = 'PRODUCT_DEV' + + OK = 'KO' + + # output redirection + my_out = outRedirection() + + # The command to test + sat = Sat('') + sat.config(application + ' --info ' + product) + + # stop output redirection + my_out.end_redirection() + + # get results + res = my_out.read_results() + + + if 'compilation method = cmake' in res: + OK = 'OK' + + # pyunit method to compare 2 str + self.assertEqual(OK, 'OK') # test launch if __name__ == '__main__': diff --git a/test/jobs/test_jobs.py b/test/jobs/test_jobs.py index f9cd80b..2bd73a2 100644 --- a/test/jobs/test_jobs.py +++ b/test/jobs/test_jobs.py @@ -43,7 +43,7 @@ class TestJobs(unittest.TestCase): sat = Sat("-l " + tmp_file) # Execute the jobs command - sat.jobs("--jobs_config .test --publish" ) + sat.jobs("--name .test --publish" ) ff = open(tmp_file, "r") log_files = ff.readlines() @@ -79,7 +79,7 @@ class TestJobs(unittest.TestCase): sat = Sat("-l " + tmp_file) # Execute the jobs command - sat.jobs("--jobs_config .test --publish --only_jobs Job 1" ) + sat.jobs("--name .test --publish --only_jobs Job 1" ) ff = open(tmp_file, "r") log_files = ff.readlines() @@ -106,8 +106,8 @@ class TestJobs(unittest.TestCase): # pyunit method to compare 2 str self.assertEqual(OK, 'OK') - def test_no_option_jobs_config(self): - '''Test the jobs command without --jobs_config option + def test_no_option_name(self): + '''Test the jobs command without --name option ''' OK = 'KO' tmp_file = "/tmp/test.txt" @@ -131,7 +131,7 @@ class TestJobs(unittest.TestCase): sat = Sat("-l " + tmp_file) # Execute the job command - res = sat.jobs("--jobs_config NOTEXIST" ) + res = sat.jobs("--name NOTEXIST" ) if res == 1: OK = 'OK'