From: Nabil Ghodbane Date: Wed, 23 Jun 2021 16:39:09 +0000 (+0200) Subject: add libxslt and fftw [windows] X-Git-Tag: V9_8_0~143 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=78a3ab71b4ae6edc27dd7ffa2a3b677314fa6599;p=tools%2Fsat_salome.git add libxslt and fftw [windows] --- diff --git a/products/compil_scripts/fftw.bat b/products/compil_scripts/fftw.bat new file mode 100644 index 0000000..389ea6b --- /dev/null +++ b/products/compil_scripts/fftw.bat @@ -0,0 +1,67 @@ +@echo off + +echo ########################################################################## +echo fftw %VERSION% +echo ########################################################################## + +IF NOT DEFINED SAT_DEBUG ( + SET SAT_DEBUG=0 +) + +SET PRODUCT_BUILD_TYPE=Release + +REM TODO: NGH: not Tested yet +if %SAT_DEBUG% == 1 ( + set PRODUCT_BUILD_TYPE=Debug +) + +if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% +set INCLUDE= +REM clean BUILD directory +if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% +mkdir %BUILD_DIR% +SET CMAKE_OPTIONS= +SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_INSTALL_PREFIX:STRING=%PRODUCT_INSTALL:\=/% +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE:STRING=%PRODUCT_BUILD_TYPE% +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -A Win32 -Thost=x64 +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_SYSTEM_VERSION=10.0.19041.0 +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR=%CMAKE_GENERATOR% + +cd %BUILD_DIR% +set PATH=%BUILD_DIR%\bin;%PATH% + +echo. +echo -------------------------------------------------------------------------- +echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR% +echo -------------------------------------------------------------------------- + +%CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR% +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on root + exit 1 +) + +echo. +echo -------------------------------------------------------------------------- +echo *** msbuild %MAKE_OPTIONS% /p:Configuration=Release /p:Platform=x86 ALL_BUILD.vcxproj +echo -------------------------------------------------------------------------- + +msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x86 ALL_BUILD.vcxproj +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on msbuild ALL_BUILD.vcxproj + exit 2 +) + +echo. +echo -------------------------------------------------------------------------- +echo *** msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x86 INSTALL.vcxproj +echo -------------------------------------------------------------------------- + +msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x86 INSTALL.vcxproj +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on msbuild INSTALL.vcxproj + exit 3 +) + +echo. +echo ########## END diff --git a/products/compil_scripts/libxslt.bat b/products/compil_scripts/libxslt.bat new file mode 100644 index 0000000..bac06c8 --- /dev/null +++ b/products/compil_scripts/libxslt.bat @@ -0,0 +1,61 @@ +@echo off + +echo ########################################################################## +echo libxslt %VERSION% +echo ########################################################################## + +if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% +if NOT exist "%PRODUCT_INSTALL%"\include mkdir %PRODUCT_INSTALL%\include + +REM clean BUILD directory +if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% +mkdir %BUILD_DIR% + +cd %SOURCE_DIR% + +SET ROOT_DIR=%CD% + +cd %ROOT_DIR%\win32 + +echo. +echo -------------------------------------------------------------------------- +echo *** cscript configure.js compiler=msvc prefix=%PRODUCT_INSTALL% iconv=no +echo -------------------------------------------------------------------------- + +cscript configure.js compiler=msvc prefix=%PRODUCT_INSTALL% iconv=no +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on configure + exit 1 +) + +echo. +echo -------------------------------------------------------------------------- +echo *** nmake /f Makefile.msvc +echo -------------------------------------------------------------------------- + +nmake /f Makefile.msvc +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on nmake + exit 2 +) + +echo. +echo -------------------------------------------------------------------------- +echo *** nmake install /f Makefile.msvc +echo -------------------------------------------------------------------------- + +nmake install /f Makefile.msvc +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on nmake install + exit 3 +) + +echo. +echo -------------------------------------------------------------------------- +echo *** Post-installation +echo -------------------------------------------------------------------------- + +move %PRODUCT_INSTALL%\include\libxslt\libxslt %PRODUCT_INSTALL%\include\libxslt + +echo. +echo ########## END diff --git a/products/env_scripts/fftw.py b/products/env_scripts/fftw.py new file mode 100644 index 0000000..b1458a9 --- /dev/null +++ b/products/env_scripts/fftw.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os.path +import platform + +def set_env(env, prereq_dir, version): + env.set('FFTW_DIR', prereq_dir) + env.set('FFTW_ROOT_DIR', prereq_dir) + + env.prepend('INCLUDE', os.path.join(prereq_dir, 'include')) + env.prepend('PATH', os.path.join(prereq_dir, 'bin')) + + if not platform.system() == "Windows" : + pyver = 'python' + env.get('PYTHON_VERSION') + env.prepend('LD_LIBRARY_PATH', os.path.join(prereq_dir, 'lib')) + +def set_nativ_env(env): + pass diff --git a/products/env_scripts/libxslt.py b/products/env_scripts/libxslt.py new file mode 100644 index 0000000..524323b --- /dev/null +++ b/products/env_scripts/libxslt.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os.path +import platform + +def set_env(env, prereq_dir, version): + env.set('LIBXSLT_DIR', prereq_dir) + env.set('LIBXSLT_ROOT_DIR', prereq_dir) + + env.prepend('INCLUDE', os.path.join(prereq_dir, 'include')) + env.prepend('PATH', os.path.join(prereq_dir, 'bin')) + + if not platform.system() == "Windows" : + pyver = 'python' + env.get('PYTHON_VERSION') + env.prepend('LD_LIBRARY_PATH', os.path.join(prereq_dir, 'lib')) + +def set_nativ_env(env): + pass diff --git a/products/fftw.pyconf b/products/fftw.pyconf new file mode 100644 index 0000000..999b786 --- /dev/null +++ b/products/fftw.pyconf @@ -0,0 +1,38 @@ +default : +{ + name : "fftw" + build_source : "script" + compil_script : $name + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : ["fftw"] + rpm_dev : ["fftw-devel"] + apt : ["fftw"] + apt_dev : ["fftw-dev"] + } + archive_info: + { + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python' ] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : 'base' + properties : + { + incremental : "yes" + } +} + +default_win : +{ + properties: + { + incremental : "yes" + single_install_dir : "yes" + } +} diff --git a/products/libxslt.pyconf b/products/libxslt.pyconf new file mode 100644 index 0000000..6716e8d --- /dev/null +++ b/products/libxslt.pyconf @@ -0,0 +1,39 @@ +default : +{ + name : "libxslt" + build_source : "script" + compil_script : $name + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : ["libxslt"] + rpm_dev : ["libxslt-devel"] + apt : ["libxslt"] + apt_dev : ["libxslt-dev"] + } + archive_info: + { + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python' ] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : 'base' + properties : + { + incremental : "yes" + } +} + +default_win : +{ + depend : ['Python', 'libxml2' ] + properties: + { + incremental : "yes" + single_install_dir : "yes" + } +} diff --git a/products/patches/libxslt-1.1.34-config-windows.patch b/products/patches/libxslt-1.1.34-config-windows.patch new file mode 100644 index 0000000..426fa24 --- /dev/null +++ b/products/patches/libxslt-1.1.34-config-windows.patch @@ -0,0 +1,12 @@ +diff -Naur libxslt-v1.1.34-ref/libxslt/xsltconfig.h.in libxslt-v1.1.34/libxslt/xsltconfig.h.in +--- libxslt-v1.1.34-ref/libxslt/xsltconfig.h.in 2021-06-23 18:32:05.370099221 +0200 ++++ libxslt-v1.1.34/libxslt/xsltconfig.h.in 2021-06-23 18:32:51.750100917 +0200 +@@ -117,7 +117,7 @@ + * is insignifiant. + * On by default unless --without-profiler is passed to configure + */ +-#if @WITH_PROFILER@ ++#if 1 + #ifndef WITH_PROFILER + #define WITH_PROFILER + #endif