diff --git a/.gitignore b/.gitignore index e48ad47..a417269 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ /gmsh-3.0.4-source-fedora.tar.xz /gmsh-3.0.5-source-fedora.tar.xz /gmsh-3.0.6-source-fedora.tar.xz +/gmsh-4.0.0-source-fedora.tar.xz diff --git a/fedoratarball.sh b/fedoratarball.sh new file mode 100755 index 0000000..5f218b3 --- /dev/null +++ b/fedoratarball.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then + echo "Usage: $0 upstream_ver" + exit 1 +fi + +ver=$1 + +wget http://geuz.org/gmsh/src/gmsh-$ver-source.tgz +tar xf gmsh-$ver-source.tgz + +rm -rf contrib/blossom contrib/mpeg_encode + +tar cfJ gmsh-$ver-source-fedora.tar.xz gmsh-$ver-source diff --git a/gmsh.spec b/gmsh.spec index 745a2bb..cb11c52 100644 --- a/gmsh.spec +++ b/gmsh.spec @@ -1,7 +1,10 @@ +%bcond_without openmpi +%bcond_without mpich + Name: gmsh Summary: A three-dimensional finite element mesh generator -Version: 3.0.6 -Release: 11%{?dist} +Version: 4.0.0 +Release: 1%{?dist} License: GPLv2+ URL: http://geuz.org/gmsh/ @@ -14,17 +17,19 @@ Source1: %{name}.desktop Patch0: gmsh_unbundle.patch # Fix include paths for alglib headers Patch1: gmsh_alglib.patch -# Port to newer tetgen -Patch2: gmsh_tetgen.patch -# Installation paths fixup, allow setting them from command line for MPI compilation -Patch3: gmsh_install-dirs.patch -# Fix macro collision with symbol by re-ordering includes -# Fix header in extern C block which causes conflicting declarations -Patch4: gmsh_build.patch +# Install onelab.py and gmsh.py into the python site-packages directory +Patch2: gmsh_python.patch # Use c++14 (needed by netgen component) -Patch5: gmsh_c++14.patch +Patch3: gmsh_c++14.patch # Adapt med.h include path -Patch6: gmsh_med.patch +Patch4: gmsh_med.patch +# Fix macro collision with symbol by re-ordering includes +# Fix header in extern C block which causes conflicting declarations +Patch5: gmsh_build.patch +# Install Julia API to share/gmsh +Patch6: gmsh_julia.patch +# Remove odd install of gmsh shared library +Patch7: gmsh_install.patch BuildRequires: alglib-devel BuildRequires: ann-devel @@ -46,7 +51,7 @@ BuildRequires: make BuildRequires: mathex-devel BuildRequires: med-devel BuildRequires: mesa-libGLU-devel -# BuildRequires: metis-devel +BuildRequires: metis-devel BuildRequires: mmg3d-devel BuildRequires: netgen-mesher-devel-private BuildRequires: OCE-devel @@ -55,6 +60,7 @@ BuildRequires: swig BuildRequires: tetgen-devel BuildRequires: voro++-devel BuildRequires: zlib-devel +BuildRequires: texinfo Requires: %{name}-common = %{version}-%{release} @@ -87,11 +93,18 @@ the base %{name} package and are used for development only. %package -n python3-%{name} -Summary: Python3 wrapper for %{name} +Summary: Python3 API for %{name} %{?python_provide:%python_provide python3-%{name}} %description -n python3-%{name} -Python3 wrapper for %{name}. +Python3 API for %{name}. + +%package -n python3-%{name}-private +Summary: Python3 wrapper for %{name} private API +%{?python_provide:%python_provide python3-%{name}} + +%description -n python3-%{name}-private +Python3 wrapper for %{name} private API. %package devel @@ -102,6 +115,14 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} Header files for development with %{name}. +%package devel-private +Summary: Development with %{name} (private API) +Requires: %{name}-devel%{?_isa} = %{version}-%{release} + +%description devel-private +Header files for development with %{name} (private API). + + %package doc Summary: Documentation, demos and tutorials for %{name} Requires: %{name} = %{version}-%{release} @@ -112,6 +133,7 @@ Documentation, demo projects and tutorials for %{name}. ############################################################################### +%if %{with openmpi} %package openmpi Summary: %{name} compiled against openmpi BuildRequires: openmpi-devel @@ -123,12 +145,14 @@ Requires: %{name}-openmpi-libs%{?_isa} = %{version}-%{release} %description openmpi %{name} compiled against openmpi. + %package openmpi-libs Summary: %{name} libraries compiled against openmpi %description openmpi-libs %{name} libraries compiled against openmpi. + %package openmpi-devel Summary: Development files for %{name} compiled against openmpi # Require explicitly for dir ownership @@ -138,8 +162,18 @@ Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} %description openmpi-devel Development files for %{name} compiled against openmpi. + +%package openmpi-devel-private +Summary: Development with %{name} compiled against openmpi (private API) +Requires: %{name}-openmpi-devel%{?_isa} = %{version}-%{release} + +%description openmpi-devel-private +Header files for development with %{name} compiled against openmpi (private API). +%endif + ############################################################################### +%if %{with mpich} %package mpich Summary: %{name} compiled against mpich BuildRequires: mpich-devel @@ -151,12 +185,14 @@ Requires: %{name}-mpich-libs%{?_isa} = %{version}-%{release} %description mpich %{name} compiled against mpich. + %package mpich-libs Summary: %{name} libraries compiled against mpich %description mpich-libs %{name} libraries compiled against mpich. + %package mpich-devel Summary: Development files for %{name} compiled against mpich # Require explicitly for dir ownership @@ -166,6 +202,15 @@ Requires: %{name}-mpich%{?_isa} = %{version}-%{release} %description mpich-devel Development files for %{name} compiled against mpich. + +%package mpich-devel-private +Summary: Development with %{name} compiled against mpich (private API) +Requires: %{name}-mpich-devel%{?_isa} = %{version}-%{release} + +%description mpich-devel-private +Header files for development with %{name} compiled against mpich (private API). +%endif + ############################################################################### %prep @@ -178,18 +223,23 @@ cp contrib/Netgen/nglib_gmsh.h contrib/Netgen/nglib_gmsh.cpp Mesh # Chaco: http://www.cs.sandia.gov/~bahendr/chaco.html - no fedora package, modified source code, see contrib/Chaco/README.txt # DiscreteIntegration: gmsh internal module # HighOrderMeshOptimizer: gmsh internal module +# hxt: Unknown source # kbipack: Source not available on the net anymore # onelab: gmsh internal module # rtree: single header file from http://superliminal.com/sources/sources.htm +( +cd contrib; ls -1 contrib | \ grep -v ^bamg$ | \ grep -v ^Chaco$ | \ grep -v ^DiscreteIntegration$ | \ grep -v ^HighOrderMeshOptimizer$ | \ + grep -v ^hxt$ | \ grep -v ^kbipack$ | \ grep -v ^onelab$ | \ grep -v ^rtree$ | \ rm -rf +) # Convert to utf-8 for file in tutorial/t12.geo; do @@ -201,15 +251,20 @@ done %build # mpeg not in fedora due to patent issues -# gmsh only supports metis 4 # blossoms is nonfree, see contrib/blossoms/README.txt +# HXT sources include immintrin.h which is only available on x86 gmsh_cmake_args="\ + -DENABLE_SYSTEM_CONTRIB=YES \ + -DENABLE_PRIVATE_API=YES \ -DENABLE_BUILD_LIB=YES \ -DENABLE_BUILD_SHARED=YES \ -DENABLE_BUILD_DYNAMIC=YES \ +%ifarch ppc64le %arm s390x aarch64 + -DENABLE_HXT=NO \ +%endif -DENABLE_MPEG_ENCODE=NO \ - -DENABLE_METIS=NO \ + -DENABLE_METIS=YES \ -DENABLE_BLOSSOM=NO \ -DENABLE_CGNS=YES \ -DENABLE_MED=YES \ @@ -226,93 +281,74 @@ make %{?_smp_mflags} popd ### openmpi version ### +%if %{with openmpi} %{_openmpi_load} export CXX=mpicxx mkdir build-openmpi pushd build-openmpi LDFLAGS="%{__global_ldflags} -Wl,--as-needed" %cmake .. \ -DENABLE_MPI=YES \ - -DGMSH_BIN=$MPI_BIN \ - -DGMSH_LIB=$MPI_LIB \ - -DGMSH_INCLUDE=$MPI_INCLUDE \ + -DCMAKE_INSTALL_BINDIR=$MPI_BIN \ + -DCMAKE_INSTALL_LIBDIR=$MPI_LIB \ + -DCMAKE_INSTALL_INCLUDEDIR=$MPI_INCLUDE \ $gmsh_cmake_args make %{?_smp_mflags} popd %{_openmpi_unload} +%endif ### mpich version ### +%if %{with mpich} %{_mpich_load} export CXX=mpicxx mkdir build-mpich pushd build-mpich LDFLAGS="%{__global_ldflags} -Wl,--as-needed" %cmake .. \ -DENABLE_MPI=YES \ - -DGMSH_BIN=$MPI_BIN \ - -DGMSH_LIB=$MPI_LIB \ - -DGMSH_INCLUDE=$MPI_INCLUDE \ + -DCMAKE_INSTALL_BINDIR=$MPI_BIN \ + -DCMAKE_INSTALL_LIBDIR=$MPI_LIB \ + -DCMAKE_INSTALL_INCLUDEDIR=$MPI_INCLUDE \ $gmsh_cmake_args make %{?_smp_mflags} popd %{_mpich_unload} +%endif +# Built html documentation +make -C build-serial html # Fix to create correct debuginfo cp -a Parser/Gmsh.* build-serial +%if %{with openmpi} cp -a Parser/Gmsh.* build-openmpi +%endif +%if %{with mpich} cp -a Parser/Gmsh.* build-mpich +%endif %install +%if %{with openmpi} %make_install -C build-openmpi +%endif +%if %{with mpich} %make_install -C build-mpich +%endif %make_install -C build-serial # Remove static libraries -find %{buildroot} -type f -name libGmsh.a -exec rm -f {} \; +find %{buildroot} -type f -name libgmsh.a -exec rm -f {} \; # Install icon and .desktop file install -Dpm 0644 utils/icons/solid_128x128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} -# Add API demo to documentation -install -Dpm 0644 utils/api_demos/mainSimple.cpp %{buildroot}%{_defaultdocdir}/%{name}/api/mainSimple.cpp - # Install License.txt via %%license rm -f %{buildroot}%{_defaultdocdir}/%{name}/LICENSE.txt -%post common -/usr/bin/update-desktop-database &> /dev/null || : -/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : - -%postun common -/usr/bin/update-desktop-database &> /dev/null || : -if [ $1 -eq 0 ] ; then - /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null - /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -fi - -%posttrans common -/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - - -%post libs -p /sbin/ldconfig - -%postun libs -p /sbin/ldconfig - - -%post openmpi-libs -p /sbin/ldconfig - -%postun openmpi-libs -p /sbin/ldconfig - - -%post mpich-libs -p /sbin/ldconfig - -%postun mpich-libs -p /sbin/ldconfig - - %files common %doc %{_defaultdocdir}/%{name}/CREDITS.txt %doc %{_defaultdocdir}/%{name}/README.txt @@ -321,6 +357,7 @@ fi %{_mandir}/man1/gmsh.1.gz %{_datadir}/icons/hicolor/128x128/apps/%{name}.png %{_datadir}/applications/%{name}.desktop +%{_datadir}/%{name}/ %{python3_sitelib}/onelab.py %{python3_sitelib}/__pycache__/onelab.* @@ -328,47 +365,72 @@ fi %license LICENSE.txt %doc %{_defaultdocdir}/%{name}/tutorial %doc %{_defaultdocdir}/%{name}/demos -%doc %{_defaultdocdir}/%{name}/api +%doc %{_defaultdocdir}/%{name}/%{name}.html %files %{_bindir}/%{name} %files devel +%{_includedir}/gmsh.h +%{_includedir}/gmshc.h +%{_includedir}/gmsh.h_cwrap +%{_libdir}/libgmsh.so + +%files devel-private %{_includedir}/%{name}/ -%{_libdir}/libGmsh.so %files libs %license LICENSE.txt -%{_libdir}/libGmsh.so.3.0* +%{_libdir}/libgmsh.so.4.0* %files -n python3-%{name} +%{python3_sitelib}/gmsh.py +%{python3_sitelib}/__pycache__/gmsh.*.pyc + +%files -n python3-%{name}-private %{python3_sitearch}/gmshpy/ +%if %{with openmpi} %files openmpi %{_libdir}/openmpi/bin/%{name} %files openmpi-devel +%{_includedir}/openmpi*/gmsh.h +%{_includedir}/openmpi*/gmshc.h +%{_includedir}/openmpi*/gmsh.h_cwrap +%{_libdir}/openmpi/lib/libgmsh.so + +%files openmpi-devel-private %{_includedir}/openmpi*/%{name}/ -%{_libdir}/openmpi/lib/libGmsh.so %files openmpi-libs %license LICENSE.txt -%{_libdir}/openmpi/lib/libGmsh.so.3.0* +%{_libdir}/openmpi/lib/libgmsh.so.4.0* +%endif +%if %{with mpich} %files mpich %{_libdir}/mpich/bin/%{name} %files mpich-devel -%{_includedir}/mpich*/%{name}/ +%{_includedir}/mpich*/gmsh.h +%{_includedir}/mpich*/gmshc.h +%{_includedir}/mpich*/gmsh.h_cwrap +%{_libdir}/mpich/lib/libgmsh.so -%{_libdir}/mpich/lib/libGmsh.so +%files mpich-devel-private +%{_includedir}/mpich*/%{name}/ %files mpich-libs %license LICENSE.txt -%{_libdir}/mpich/lib/libGmsh.so.3.0* +%{_libdir}/mpich/lib/libgmsh.so.4.0* +%endif %changelog +* Thu Aug 23 2018 Sandro Mani - 4.0.0-1 +- Update to 4.0.0 + * Fri Jul 13 2018 Fedora Release Engineering - 3.0.6-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/gmsh_alglib.patch b/gmsh_alglib.patch index ebf600b..4dbbf34 100644 --- a/gmsh_alglib.patch +++ b/gmsh_alglib.patch @@ -1,6 +1,6 @@ -diff -rupN gmsh-3.0.6-source/contrib/HighOrderMeshOptimizer/OptHOM.cpp gmsh-3.0.6-source-new/contrib/HighOrderMeshOptimizer/OptHOM.cpp ---- gmsh-3.0.6-source/contrib/HighOrderMeshOptimizer/OptHOM.cpp 2017-10-03 22:01:51.000000000 +0200 -+++ gmsh-3.0.6-source-new/contrib/HighOrderMeshOptimizer/OptHOM.cpp 2018-03-10 10:28:44.669972085 +0100 +diff -rupN gmsh-4.0.0-source/contrib/HighOrderMeshOptimizer/OptHOM.cpp gmsh-4.0.0-source-new/contrib/HighOrderMeshOptimizer/OptHOM.cpp +--- gmsh-4.0.0-source/contrib/HighOrderMeshOptimizer/OptHOM.cpp 2017-10-03 22:01:51.000000000 +0200 ++++ gmsh-4.0.0-source-new/contrib/HighOrderMeshOptimizer/OptHOM.cpp 2018-08-29 10:24:05.653924683 +0200 @@ -44,11 +44,11 @@ static int NEVAL = 0; #if defined(HAVE_BFGS) @@ -18,9 +18,9 @@ diff -rupN gmsh-3.0.6-source/contrib/HighOrderMeshOptimizer/OptHOM.cpp gmsh-3.0. static inline double compute_f(double v, double barrier) { -diff -rupN gmsh-3.0.6-source/contrib/HighOrderMeshOptimizer/OptHOM.h gmsh-3.0.6-source-new/contrib/HighOrderMeshOptimizer/OptHOM.h ---- gmsh-3.0.6-source/contrib/HighOrderMeshOptimizer/OptHOM.h 2017-10-03 22:01:51.000000000 +0200 -+++ gmsh-3.0.6-source-new/contrib/HighOrderMeshOptimizer/OptHOM.h 2018-03-10 10:28:44.669972085 +0100 +diff -rupN gmsh-4.0.0-source/contrib/HighOrderMeshOptimizer/OptHOM.h gmsh-4.0.0-source-new/contrib/HighOrderMeshOptimizer/OptHOM.h +--- gmsh-4.0.0-source/contrib/HighOrderMeshOptimizer/OptHOM.h 2017-10-03 22:01:51.000000000 +0200 ++++ gmsh-4.0.0-source-new/contrib/HighOrderMeshOptimizer/OptHOM.h 2018-08-29 10:24:05.653924683 +0200 @@ -38,7 +38,7 @@ #if defined(HAVE_BFGS) @@ -30,9 +30,9 @@ diff -rupN gmsh-3.0.6-source/contrib/HighOrderMeshOptimizer/OptHOM.h gmsh-3.0.6- class OptHOM { -diff -rupN gmsh-3.0.6-source/contrib/MeshOptimizer/MeshOpt.cpp gmsh-3.0.6-source-new/contrib/MeshOptimizer/MeshOpt.cpp ---- gmsh-3.0.6-source/contrib/MeshOptimizer/MeshOpt.cpp 2017-10-03 22:01:51.000000000 +0200 -+++ gmsh-3.0.6-source-new/contrib/MeshOptimizer/MeshOpt.cpp 2018-03-10 10:28:44.669972085 +0100 +diff -rupN gmsh-4.0.0-source/contrib/MeshOptimizer/MeshOpt.cpp gmsh-4.0.0-source-new/contrib/MeshOptimizer/MeshOpt.cpp +--- gmsh-4.0.0-source/contrib/MeshOptimizer/MeshOpt.cpp 2018-02-12 09:16:45.000000000 +0100 ++++ gmsh-4.0.0-source-new/contrib/MeshOptimizer/MeshOpt.cpp 2018-08-29 10:24:05.653924683 +0200 @@ -38,11 +38,11 @@ #if defined(HAVE_BFGS) @@ -48,11 +48,11 @@ diff -rupN gmsh-3.0.6-source/contrib/MeshOptimizer/MeshOpt.cpp gmsh-3.0.6-source +#include +#include - namespace { -diff -rupN gmsh-3.0.6-source/contrib/MeshOptimizer/MeshOpt.h gmsh-3.0.6-source-new/contrib/MeshOptimizer/MeshOpt.h ---- gmsh-3.0.6-source/contrib/MeshOptimizer/MeshOpt.h 2017-10-03 22:01:51.000000000 +0200 -+++ gmsh-3.0.6-source-new/contrib/MeshOptimizer/MeshOpt.h 2018-03-10 10:28:44.670972085 +0100 + +diff -rupN gmsh-4.0.0-source/contrib/MeshOptimizer/MeshOpt.h gmsh-4.0.0-source-new/contrib/MeshOptimizer/MeshOpt.h +--- gmsh-4.0.0-source/contrib/MeshOptimizer/MeshOpt.h 2018-02-12 09:16:45.000000000 +0100 ++++ gmsh-4.0.0-source-new/contrib/MeshOptimizer/MeshOpt.h 2018-08-29 10:24:05.653924683 +0200 @@ -42,7 +42,7 @@ #if defined(HAVE_BFGS) @@ -60,11 +60,11 @@ diff -rupN gmsh-3.0.6-source/contrib/MeshOptimizer/MeshOpt.h gmsh-3.0.6-source-n -#include "ap.h" +#include - class MeshOptParameters; -diff -rupN gmsh-3.0.6-source/contrib/MeshOptimizer/MeshOptObjContrib.h gmsh-3.0.6-source-new/contrib/MeshOptimizer/MeshOptObjContrib.h ---- gmsh-3.0.6-source/contrib/MeshOptimizer/MeshOptObjContrib.h 2017-10-03 22:01:51.000000000 +0200 -+++ gmsh-3.0.6-source-new/contrib/MeshOptimizer/MeshOptObjContrib.h 2018-03-10 10:28:44.670972085 +0100 + +diff -rupN gmsh-4.0.0-source/contrib/MeshOptimizer/MeshOptObjContrib.h gmsh-4.0.0-source-new/contrib/MeshOptimizer/MeshOptObjContrib.h +--- gmsh-4.0.0-source/contrib/MeshOptimizer/MeshOptObjContrib.h 2017-10-03 22:01:51.000000000 +0200 ++++ gmsh-4.0.0-source-new/contrib/MeshOptimizer/MeshOptObjContrib.h 2018-08-29 10:24:05.653924683 +0200 @@ -4,7 +4,7 @@ #define _MESHOPTOBJCONTRIB_H_ @@ -74,9 +74,9 @@ diff -rupN gmsh-3.0.6-source/contrib/MeshOptimizer/MeshOptObjContrib.h gmsh-3.0. #include "MeshOptCommon.h" -diff -rupN gmsh-3.0.6-source/contrib/MeshOptimizer/MeshOptObjectiveFunction.h gmsh-3.0.6-source-new/contrib/MeshOptimizer/MeshOptObjectiveFunction.h ---- gmsh-3.0.6-source/contrib/MeshOptimizer/MeshOptObjectiveFunction.h 2017-10-03 22:01:51.000000000 +0200 -+++ gmsh-3.0.6-source-new/contrib/MeshOptimizer/MeshOptObjectiveFunction.h 2018-03-10 10:28:44.670972085 +0100 +diff -rupN gmsh-4.0.0-source/contrib/MeshOptimizer/MeshOptObjectiveFunction.h gmsh-4.0.0-source-new/contrib/MeshOptimizer/MeshOptObjectiveFunction.h +--- gmsh-4.0.0-source/contrib/MeshOptimizer/MeshOptObjectiveFunction.h 2017-10-03 22:01:51.000000000 +0200 ++++ gmsh-4.0.0-source-new/contrib/MeshOptimizer/MeshOptObjectiveFunction.h 2018-08-29 10:24:05.654924683 +0200 @@ -5,7 +5,7 @@ #include @@ -86,9 +86,9 @@ diff -rupN gmsh-3.0.6-source/contrib/MeshOptimizer/MeshOptObjectiveFunction.h gm class ObjContrib; class Patch; -diff -rupN gmsh-3.0.6-source/Geo/GFace.cpp gmsh-3.0.6-source-new/Geo/GFace.cpp ---- gmsh-3.0.6-source/Geo/GFace.cpp 2017-10-03 22:01:51.000000000 +0200 -+++ gmsh-3.0.6-source-new/Geo/GFace.cpp 2018-03-10 10:28:44.670972085 +0100 +diff -rupN gmsh-4.0.0-source/Geo/GFace.cpp gmsh-4.0.0-source-new/Geo/GFace.cpp +--- gmsh-4.0.0-source/Geo/GFace.cpp 2018-08-22 16:41:34.000000000 +0200 ++++ gmsh-4.0.0-source-new/Geo/GFace.cpp 2018-08-29 10:24:05.654924683 +0200 @@ -28,8 +28,8 @@ #endif @@ -99,11 +99,11 @@ diff -rupN gmsh-3.0.6-source/Geo/GFace.cpp gmsh-3.0.6-source-new/Geo/GFace.cpp +#include #endif - #define SQU(a) ((a)*(a)) -diff -rupN gmsh-3.0.6-source/Mesh/Levy3D.cpp gmsh-3.0.6-source-new/Mesh/Levy3D.cpp ---- gmsh-3.0.6-source/Mesh/Levy3D.cpp 2017-10-03 22:01:51.000000000 +0200 -+++ gmsh-3.0.6-source-new/Mesh/Levy3D.cpp 2018-03-10 10:28:44.670972085 +0100 -@@ -19,11 +19,11 @@ + // TODO C++11 remove macro +diff -rupN gmsh-4.0.0-source/Mesh/Levy3D.cpp gmsh-4.0.0-source-new/Mesh/Levy3D.cpp +--- gmsh-4.0.0-source/Mesh/Levy3D.cpp 2018-08-08 14:02:30.000000000 +0200 ++++ gmsh-4.0.0-source-new/Mesh/Levy3D.cpp 2018-08-29 10:24:05.654924683 +0200 +@@ -18,11 +18,11 @@ #include "directions3D.h" #if defined(HAVE_BFGS) @@ -120,10 +120,10 @@ diff -rupN gmsh-3.0.6-source/Mesh/Levy3D.cpp gmsh-3.0.6-source-new/Mesh/Levy3D.c #endif /*********definitions*********/ -diff -rupN gmsh-3.0.6-source/Mesh/meshGFaceLloyd.cpp gmsh-3.0.6-source-new/Mesh/meshGFaceLloyd.cpp ---- gmsh-3.0.6-source/Mesh/meshGFaceLloyd.cpp 2017-10-03 22:01:51.000000000 +0200 -+++ gmsh-3.0.6-source-new/Mesh/meshGFaceLloyd.cpp 2018-03-10 10:28:44.671972085 +0100 -@@ -22,11 +22,11 @@ +diff -rupN gmsh-4.0.0-source/Mesh/meshGFaceLloyd.cpp gmsh-4.0.0-source-new/Mesh/meshGFaceLloyd.cpp +--- gmsh-4.0.0-source/Mesh/meshGFaceLloyd.cpp 2018-08-08 14:02:30.000000000 +0200 ++++ gmsh-4.0.0-source-new/Mesh/meshGFaceLloyd.cpp 2018-08-29 10:24:05.655924683 +0200 +@@ -21,11 +21,11 @@ #if defined(HAVE_BFGS) @@ -137,6 +137,6 @@ diff -rupN gmsh-3.0.6-source/Mesh/meshGFaceLloyd.cpp gmsh-3.0.6-source-new/Mesh/ +#include +#include +#include - #include "polynomialBasis.h" #include "MElementOctree.h" #include "GModel.h" + #include "meshGFaceOptimize.h" diff --git a/gmsh_build.patch b/gmsh_build.patch index b72699c..c7142d3 100644 --- a/gmsh_build.patch +++ b/gmsh_build.patch @@ -1,9 +1,9 @@ -diff -rupN gmsh-3.0.6-source/Common/CommandLine.cpp gmsh-3.0.6-source-new/Common/CommandLine.cpp ---- gmsh-3.0.6-source/Common/CommandLine.cpp 2017-11-04 20:27:37.000000000 +0100 -+++ gmsh-3.0.6-source-new/Common/CommandLine.cpp 2018-03-10 10:28:44.969972068 +0100 -@@ -20,15 +20,6 @@ - #include "CreateFile.h" - #include "OS.h" +diff -rupN gmsh-4.0.0-source/Common/CommandLine.cpp gmsh-4.0.0-source-new/Common/CommandLine.cpp +--- gmsh-4.0.0-source/Common/CommandLine.cpp 2018-08-29 10:24:06.134924656 +0200 ++++ gmsh-4.0.0-source-new/Common/CommandLine.cpp 2018-08-29 10:24:06.136924656 +0200 +@@ -22,15 +22,6 @@ + #include "GmshGlobal.h" + #include "StringUtils.h" -#if defined(HAVE_FLTK) -#include @@ -17,7 +17,7 @@ diff -rupN gmsh-3.0.6-source/Common/CommandLine.cpp gmsh-3.0.6-source-new/Common #if defined(HAVE_PETSC) #include "petsc.h" #endif -@@ -49,6 +40,15 @@ +@@ -51,6 +42,15 @@ #include "Parser.h" #endif @@ -33,9 +33,9 @@ diff -rupN gmsh-3.0.6-source/Common/CommandLine.cpp gmsh-3.0.6-source-new/Common int GetGmshMajorVersion(){ return GMSH_MAJOR_VERSION; } int GetGmshMinorVersion(){ return GMSH_MINOR_VERSION; } int GetGmshPatchVersion(){ return GMSH_PATCH_VERSION; } -diff -rupN gmsh-3.0.6-source/Fltk/helpWindow.cpp gmsh-3.0.6-source-new/Fltk/helpWindow.cpp ---- gmsh-3.0.6-source/Fltk/helpWindow.cpp 2017-10-03 22:01:51.000000000 +0200 -+++ gmsh-3.0.6-source-new/Fltk/helpWindow.cpp 2018-03-10 10:28:44.969972068 +0100 +diff -rupN gmsh-4.0.0-source/Fltk/helpWindow.cpp gmsh-4.0.0-source-new/Fltk/helpWindow.cpp +--- gmsh-4.0.0-source/Fltk/helpWindow.cpp 2018-08-29 10:24:06.134924656 +0200 ++++ gmsh-4.0.0-source-new/Fltk/helpWindow.cpp 2018-08-29 10:24:06.137924656 +0200 @@ -3,13 +3,18 @@ // See the LICENSE.txt file for license information. Please report all // bugs and problems to the public mailing list . @@ -43,7 +43,7 @@ diff -rupN gmsh-3.0.6-source/Fltk/helpWindow.cpp gmsh-3.0.6-source-new/Fltk/help +#include "GmshConfig.h" + +#if defined(HAVE_MED) -+#include "med.h" ++#include +#endif + #include @@ -61,35 +61,35 @@ diff -rupN gmsh-3.0.6-source/Fltk/helpWindow.cpp gmsh-3.0.6-source-new/Fltk/help #endif -#if defined(HAVE_MED) --#include "med.h" +-#include -#endif - static const char *help_link(Fl_Widget *w, const char *uri) { fl_open_uri(uri); -diff -rupN gmsh-3.0.6-source/Geo/GModelIO_MED.cpp gmsh-3.0.6-source-new/Geo/GModelIO_MED.cpp ---- gmsh-3.0.6-source/Geo/GModelIO_MED.cpp 2017-10-03 22:01:51.000000000 +0200 -+++ gmsh-3.0.6-source-new/Geo/GModelIO_MED.cpp 2018-03-10 10:28:44.969972068 +0100 +diff -rupN gmsh-4.0.0-source/Geo/GModelIO_MED.cpp gmsh-4.0.0-source-new/Geo/GModelIO_MED.cpp +--- gmsh-4.0.0-source/Geo/GModelIO_MED.cpp 2018-08-29 10:24:06.134924656 +0200 ++++ gmsh-4.0.0-source-new/Geo/GModelIO_MED.cpp 2018-08-29 10:24:06.137924656 +0200 @@ -25,9 +25,7 @@ #include "MPyramid.h" #include "discreteVertex.h" -extern "C" { - #include + #include -} - #if (MED_MAJOR_NUM == 3) + #if(MED_MAJOR_NUM == 3) // To avoid too many ifdefs below we use defines for the bits of the -diff -rupN gmsh-3.0.6-source/Post/PViewDataGModelIO.cpp gmsh-3.0.6-source-new/Post/PViewDataGModelIO.cpp ---- gmsh-3.0.6-source/Post/PViewDataGModelIO.cpp 2017-10-03 22:01:51.000000000 +0200 -+++ gmsh-3.0.6-source-new/Post/PViewDataGModelIO.cpp 2018-03-10 10:28:44.970972068 +0100 -@@ -361,9 +361,7 @@ void PViewDataGModel::importLists(int N[ +diff -rupN gmsh-4.0.0-source/Post/PViewDataGModelIO.cpp gmsh-4.0.0-source-new/Post/PViewDataGModelIO.cpp +--- gmsh-4.0.0-source/Post/PViewDataGModelIO.cpp 2018-08-29 10:24:06.134924656 +0200 ++++ gmsh-4.0.0-source-new/Post/PViewDataGModelIO.cpp 2018-08-29 10:24:06.137924656 +0200 +@@ -468,9 +468,7 @@ void PViewDataGModel::importLists(int N[ #if defined(HAVE_MED) -extern "C" { - #include + #include -} - #if (MED_MAJOR_NUM == 3) + #if(MED_MAJOR_NUM == 3) // To avoid too many ifdefs below we use defines for the bits of the diff --git a/gmsh_c++14.patch b/gmsh_c++14.patch index 3244588..32d6291 100644 --- a/gmsh_c++14.patch +++ b/gmsh_c++14.patch @@ -1,28 +1,27 @@ -diff -rupN gmsh-3.0.6-source/CMakeLists.txt gmsh-3.0.6-source-new/CMakeLists.txt ---- gmsh-3.0.6-source/CMakeLists.txt 2018-03-10 10:28:44.967972069 +0100 -+++ gmsh-3.0.6-source-new/CMakeLists.txt 2018-03-10 10:28:45.071972063 +0100 -@@ -45,7 +45,7 @@ opt(CGNS "Enable CGNS mesh export (exper +diff -rupN gmsh-4.0.0-source/CMakeLists.txt gmsh-4.0.0-source-new/CMakeLists.txt +--- gmsh-4.0.0-source/CMakeLists.txt 2018-08-29 10:24:05.899924669 +0200 ++++ gmsh-4.0.0-source-new/CMakeLists.txt 2018-08-29 10:24:05.901924669 +0200 +@@ -43,7 +43,7 @@ opt(BUILD_ANDROID "Enable Android NDK li + opt(BUILD_IOS "Enable iOS library target (experimental)" OFF) + opt(CGNS "Enable CGNS mesh import" ${DEFAULT}) opt(CAIRO "Enable Cairo to render fonts (experimental)" ${DEFAULT}) - opt(CHACO "Enable Chaco mesh partitioner (alternative to Metis)" ${DEFAULT}) - opt(COMPRESSED_IO "Enable compressed (gzip) input/output using zlib" OFF) -opt(CXX11 "Enable C++11" ${DEFAULT}) +opt(CXX14 "Enable C++14" ${DEFAULT}) + opt(C99 "Enable C99" ${DEFAULT}) + opt(PROFILE "Enable profiling compiler flags" OFF) opt(DINTEGRATION "Enable discrete integration (needed for levelsets)" ${DEFAULT}) - opt(FLTK "Enable FLTK graphical user interface (requires mesh/post)" ${DEFAULT}) - opt(FOURIER_MODEL "Enable Fourier geometrical models (experimental)" OFF) -@@ -269,14 +269,14 @@ if(ENABLE_OPENMP) +@@ -291,13 +291,13 @@ if(ENABLE_OPENMP) endif(OPENMP_FOUND) endif(ENABLE_OPENMP) -if(ENABLE_CXX11) -+if(ENABLE_CXX14) - # in recent cmake versions we could do e.g. set(CMAKE_CXX_STANDARD 11) +- # in recent cmake versions we could do e.g. set(CMAKE_CXX_STANDARD 11) - check_cxx_compiler_flag("-std=c++11" STDCXX11) - if(STDCXX11) -- set_config_option(HAVE_CXX11 "C++11") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") - endif(STDCXX11) -endif(ENABLE_CXX11) ++if(ENABLE_CXX14) + check_cxx_compiler_flag("-std=c++14" STDCXX14) + if(STDCXX14) + set_config_option(HAVE_CXX14 "C++14") @@ -30,9 +29,9 @@ diff -rupN gmsh-3.0.6-source/CMakeLists.txt gmsh-3.0.6-source-new/CMakeLists.txt + endif(STDCXX14) +endif(ENABLE_CXX14) - macro(append_gmsh_src DIRNAME FILES) - foreach(FILE ${FILES}) -@@ -1435,10 +1435,10 @@ if(ENABLE_REVOROPT) + if(ENABLE_C99) + # in recent cmake versions we could do e.g. set(CMAKE_C_STANDARD 99) +@@ -1438,10 +1438,10 @@ if(ENABLE_REVOROPT) get_source_file_property(PROP Plugin/CVTRemesh.cpp COMPILE_FLAGS) if(PROP) set_source_files_properties(Plugin/CVTRemesh.cpp PROPERTIES @@ -45,7 +44,7 @@ diff -rupN gmsh-3.0.6-source/CMakeLists.txt gmsh-3.0.6-source-new/CMakeLists.txt endif(PROP) else(EIGEN3_INC AND HAVE_MESH AND HAVE_PLUGINS AND HAVE_ANN AND HAVE_BFGS) message(WARNING "Revoropt requires Eigen3, Mesh, Plugins, Ann and BFGS") -@@ -1552,7 +1552,7 @@ if(ENABLE_BUILD_ANDROID) +@@ -1619,7 +1619,7 @@ if(ENABLE_BUILD_ANDROID) message(FATAL_ERROR "Cannot compile Gmsh for android without android-cmake") endif(NOT CMAKE_TOOLCHAIN_FILE) add_definitions(-D_GLIBCXX_USE_C99_MATH=1) diff --git a/gmsh_install-dirs.patch b/gmsh_install-dirs.patch deleted file mode 100644 index 1d1a221..0000000 --- a/gmsh_install-dirs.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -rupN gmsh-3.0.6-source/CMakeLists.txt gmsh-3.0.6-source-new/CMakeLists.txt ---- gmsh-3.0.6-source/CMakeLists.txt 2018-03-10 10:28:44.667972085 +0100 -+++ gmsh-3.0.6-source-new/CMakeLists.txt 2018-03-10 10:28:44.870972074 +0100 -@@ -1723,8 +1723,9 @@ elseif(APPLE AND ENABLE_OS_SPECIFIC_INST - set(GMSH_DOC ../../..) - set(GMSH_MAN ../../..) - else(WIN32 OR CYGWIN) -- set(GMSH_BIN bin) -- set(GMSH_LIB lib) -+ set(GMSH_BIN bin CACHE INTERNAL "Bin path") -+ set(GMSH_LIB lib${LIB_SUFFIX} CACHE INTERNAL "Lib path") -+ set(GMSH_INCLUDE include CACHE INTERNAL "Include path") - set(GMSH_DOC share/doc/gmsh) - set(GMSH_MAN share/man/man1) - endif(WIN32 OR CYGWIN) -@@ -1774,10 +1775,11 @@ if(ENABLE_BUILD_SHARED OR ENABLE_BUILD_D - endif(ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC) - - if(ENABLE_ONELAB) -- install(FILES ${ONELAB_PY} DESTINATION ${GMSH_BIN}) -+ execute_process ( COMMAND python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())" OUTPUT_VARIABLE PYTHON3_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE) -+ install(FILES ${ONELAB_PY} DESTINATION ${PYTHON3_SITE_PACKAGES}) - endif(ENABLE_ONELAB) - if(ENABLE_BUILD_LIB OR ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC) -- install(FILES ${GMSH_API} DESTINATION include/gmsh) -+ install(FILES ${GMSH_API} DESTINATION ${GMSH_INCLUDE}/gmsh) - endif(ENABLE_BUILD_LIB OR ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC) - install(FILES ${WELCOME_FILE} DESTINATION ${GMSH_DOC} RENAME README.txt) - install(FILES ${LICENSE_FILE} DESTINATION ${GMSH_DOC}) -diff -rupN gmsh-3.0.6-source/Common/GmshMessage.cpp gmsh-3.0.6-source-new/Common/GmshMessage.cpp ---- gmsh-3.0.6-source/Common/GmshMessage.cpp 2017-11-05 13:05:54.000000000 +0100 -+++ gmsh-3.0.6-source-new/Common/GmshMessage.cpp 2018-03-10 10:28:44.870972074 +0100 -@@ -149,12 +149,6 @@ void Msg::Init(int argc, char **argv) - if(CTX::instance()->exeFileName.empty() && argc && argv) - CTX::instance()->exeFileName = argv[0]; - -- // add the directory where the binary is installed to the path where Python -- // looks for modules, and to the path for executables (this allows us to find -- // the onelab.py module or subclients automatically) -- addGmshPathToEnvironmentVar("PYTHONPATH"); -- addGmshPathToEnvironmentVar("PATH"); -- - InitializeOnelab("Gmsh"); - } - diff --git a/gmsh_install.patch b/gmsh_install.patch new file mode 100644 index 0000000..8c03e8a --- /dev/null +++ b/gmsh_install.patch @@ -0,0 +1,12 @@ +diff -rupN gmsh-4.0.0-source/CMakeLists.txt gmsh-4.0.0-source-new/CMakeLists.txt +--- gmsh-4.0.0-source/CMakeLists.txt 2018-08-29 10:24:06.362924644 +0200 ++++ gmsh-4.0.0-source-new/CMakeLists.txt 2018-08-29 10:24:06.364924644 +0200 +@@ -1767,7 +1767,7 @@ endif(ENABLE_BUILD_LIB) + if(ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC) + install(TARGETS shared DESTINATION ${GMSH_LIB} OPTIONAL) + # FIXME once we cleanup the installation of the python module +- install(TARGETS shared DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/api OPTIONAL) ++# install(TARGETS shared DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/api OPTIONAL) + endif(ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC) + + if(ENABLE_ONELAB) diff --git a/gmsh_julia.patch b/gmsh_julia.patch new file mode 100644 index 0000000..8340d5b --- /dev/null +++ b/gmsh_julia.patch @@ -0,0 +1,12 @@ +diff -rupN gmsh-4.0.0-source/CMakeLists.txt gmsh-4.0.0-source-new/CMakeLists.txt +--- gmsh-4.0.0-source/CMakeLists.txt 2018-08-29 10:24:06.133924656 +0200 ++++ gmsh-4.0.0-source-new/CMakeLists.txt 2018-08-29 10:24:06.248924650 +0200 +@@ -1776,7 +1776,7 @@ endif(ENABLE_ONELAB) + if(ENABLE_BUILD_LIB OR ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC) + install(FILES ${GMSH_API} DESTINATION ${GMSH_INC}) + install(FILES ${GMSH_PY} DESTINATION ${PYTHON3_SITE_PACKAGES}) +- install(FILES ${GMSH_JL} DESTINATION ${GMSH_LIB}) ++ install(FILES ${GMSH_JL} DESTINATION share/gmsh) + if(ENABLE_PRIVATE_API) + install(FILES ${GMSH_PRIVATE_API} DESTINATION ${GMSH_INC}/gmsh) + endif(ENABLE_PRIVATE_API) diff --git a/gmsh_med.patch b/gmsh_med.patch index b727559..49cfcb2 100644 --- a/gmsh_med.patch +++ b/gmsh_med.patch @@ -1,7 +1,7 @@ -diff -rupN gmsh-3.0.6-source/CMakeLists.txt gmsh-3.0.6-source-new/CMakeLists.txt ---- gmsh-3.0.6-source/CMakeLists.txt 2018-03-10 10:28:45.165972058 +0100 -+++ gmsh-3.0.6-source-new/CMakeLists.txt 2018-03-10 11:25:50.178782609 +0100 -@@ -893,7 +893,7 @@ if(ENABLE_MED OR ENABLE_CGNS) +diff -rupN gmsh-4.0.0-source/CMakeLists.txt gmsh-4.0.0-source-new/CMakeLists.txt +--- gmsh-4.0.0-source/CMakeLists.txt 2018-08-29 10:24:06.016924663 +0200 ++++ gmsh-4.0.0-source-new/CMakeLists.txt 2018-08-29 10:24:06.018924663 +0200 +@@ -918,7 +918,7 @@ if(ENABLE_MED OR ENABLE_CGNS) set(HDF5_LIB "${HDF5_C_LIBRARIES}") list(APPEND EXTERNAL_INCLUDES ${HDF5_INCLUDE_DIRS}) if(ENABLE_MED) @@ -10,10 +10,10 @@ diff -rupN gmsh-3.0.6-source/CMakeLists.txt gmsh-3.0.6-source-new/CMakeLists.txt if(MED_LIB) set_config_option(HAVE_MED "Med") list(APPEND EXTERNAL_LIBRARIES ${MED_LIB}) -diff -rupN gmsh-3.0.6-source/Common/CommandLine.cpp gmsh-3.0.6-source-new/Common/CommandLine.cpp ---- gmsh-3.0.6-source/Common/CommandLine.cpp 2018-03-10 10:28:45.068972063 +0100 -+++ gmsh-3.0.6-source-new/Common/CommandLine.cpp 2018-03-10 10:28:45.167972057 +0100 -@@ -29,7 +29,7 @@ +diff -rupN gmsh-4.0.0-source/Common/CommandLine.cpp gmsh-4.0.0-source-new/Common/CommandLine.cpp +--- gmsh-4.0.0-source/Common/CommandLine.cpp 2018-08-08 18:28:41.000000000 +0200 ++++ gmsh-4.0.0-source-new/Common/CommandLine.cpp 2018-08-29 10:24:06.019924663 +0200 +@@ -40,7 +40,7 @@ #endif #if defined(HAVE_MED) @@ -22,39 +22,39 @@ diff -rupN gmsh-3.0.6-source/Common/CommandLine.cpp gmsh-3.0.6-source-new/Common #endif #if defined(HAVE_POST) -diff -rupN gmsh-3.0.6-source/Fltk/helpWindow.cpp gmsh-3.0.6-source-new/Fltk/helpWindow.cpp ---- gmsh-3.0.6-source/Fltk/helpWindow.cpp 2018-03-10 10:28:45.069972063 +0100 -+++ gmsh-3.0.6-source-new/Fltk/helpWindow.cpp 2018-03-10 10:28:45.167972057 +0100 -@@ -6,7 +6,7 @@ - #include "GmshConfig.h" +diff -rupN gmsh-4.0.0-source/Fltk/helpWindow.cpp gmsh-4.0.0-source-new/Fltk/helpWindow.cpp +--- gmsh-4.0.0-source/Fltk/helpWindow.cpp 2018-08-08 10:35:55.000000000 +0200 ++++ gmsh-4.0.0-source-new/Fltk/helpWindow.cpp 2018-08-29 10:24:06.019924663 +0200 +@@ -34,7 +34,7 @@ + #endif #if defined(HAVE_MED) -#include "med.h" +#include #endif - #include -diff -rupN gmsh-3.0.6-source/Geo/GModelIO_MED.cpp gmsh-3.0.6-source-new/Geo/GModelIO_MED.cpp ---- gmsh-3.0.6-source/Geo/GModelIO_MED.cpp 2018-03-10 10:28:45.069972063 +0100 -+++ gmsh-3.0.6-source-new/Geo/GModelIO_MED.cpp 2018-03-10 10:29:30.961969524 +0100 -@@ -25,7 +25,7 @@ - #include "MPyramid.h" + static const char *help_link(Fl_Widget *w, const char *uri) +diff -rupN gmsh-4.0.0-source/Geo/GModelIO_MED.cpp gmsh-4.0.0-source-new/Geo/GModelIO_MED.cpp +--- gmsh-4.0.0-source/Geo/GModelIO_MED.cpp 2018-08-08 10:35:55.000000000 +0200 ++++ gmsh-4.0.0-source-new/Geo/GModelIO_MED.cpp 2018-08-29 10:24:06.019924663 +0200 +@@ -26,7 +26,7 @@ #include "discreteVertex.h" + extern "C" { -#include +#include + } - #if (MED_MAJOR_NUM == 3) - // To avoid too many ifdefs below we use defines for the bits of the -diff -rupN gmsh-3.0.6-source/Post/PViewDataGModelIO.cpp gmsh-3.0.6-source-new/Post/PViewDataGModelIO.cpp ---- gmsh-3.0.6-source/Post/PViewDataGModelIO.cpp 2018-03-10 10:28:45.069972063 +0100 -+++ gmsh-3.0.6-source-new/Post/PViewDataGModelIO.cpp 2018-03-10 10:29:46.418968669 +0100 -@@ -361,7 +361,7 @@ void PViewDataGModel::importLists(int N[ - + #if(MED_MAJOR_NUM == 3) +diff -rupN gmsh-4.0.0-source/Post/PViewDataGModelIO.cpp gmsh-4.0.0-source-new/Post/PViewDataGModelIO.cpp +--- gmsh-4.0.0-source/Post/PViewDataGModelIO.cpp 2018-08-09 11:09:17.000000000 +0200 ++++ gmsh-4.0.0-source-new/Post/PViewDataGModelIO.cpp 2018-08-29 10:24:06.019924663 +0200 +@@ -469,7 +469,7 @@ void PViewDataGModel::importLists(int N[ #if defined(HAVE_MED) + extern "C" { -#include +#include + } - #if (MED_MAJOR_NUM == 3) - // To avoid too many ifdefs below we use defines for the bits of the + #if(MED_MAJOR_NUM == 3) diff --git a/gmsh_onelab.patch b/gmsh_onelab.patch new file mode 100644 index 0000000..3ad031d --- /dev/null +++ b/gmsh_onelab.patch @@ -0,0 +1,29 @@ +diff -rupN gmsh-4.0.0-source/CMakeLists.txt gmsh-4.0.0-source-new/CMakeLists.txt +--- gmsh-4.0.0-source/CMakeLists.txt 2018-08-23 11:57:38.816721896 +0200 ++++ gmsh-4.0.0-source-new/CMakeLists.txt 2018-08-23 11:57:38.952721889 +0200 +@@ -1769,7 +1769,8 @@ if(ENABLE_BUILD_SHARED OR ENABLE_BUILD_D + endif(ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC) + + if(ENABLE_ONELAB) +- install(FILES ${ONELAB_PY} DESTINATION ${GMSH_BIN}) ++ execute_process ( COMMAND python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())" OUTPUT_VARIABLE PYTHON3_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE) ++ install(FILES ${ONELAB_PY} DESTINATION ${PYTHON3_SITE_PACKAGES}) + endif(ENABLE_ONELAB) + if(ENABLE_BUILD_LIB OR ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC) + install(FILES ${GMSH_API} DESTINATION ${GMSH_INC}) +diff -rupN gmsh-4.0.0-source/Common/GmshMessage.cpp gmsh-4.0.0-source-new/Common/GmshMessage.cpp +--- gmsh-4.0.0-source/Common/GmshMessage.cpp 2018-06-27 22:44:49.000000000 +0200 ++++ gmsh-4.0.0-source-new/Common/GmshMessage.cpp 2018-08-23 11:57:38.953721888 +0200 +@@ -154,12 +154,6 @@ void Msg::Init(int argc, char **argv) + if(CTX::instance()->exeFileName.empty() && argc && argv) + CTX::instance()->exeFileName = argv[0]; + +- // add the directory where the binary is installed to the path where Python +- // looks for modules, and to the path for executables (this allows us to find +- // the onelab.py module or subclients automatically) +- addGmshPathToEnvironmentVar("PYTHONPATH"); +- addGmshPathToEnvironmentVar("PATH"); +- + InitializeOnelab("Gmsh"); + } + diff --git a/gmsh_python.patch b/gmsh_python.patch new file mode 100644 index 0000000..4ff0765 --- /dev/null +++ b/gmsh_python.patch @@ -0,0 +1,42 @@ +diff -rupN gmsh-4.0.0-source/CMakeLists.txt gmsh-4.0.0-source-new/CMakeLists.txt +--- gmsh-4.0.0-source/CMakeLists.txt 2018-08-29 10:24:05.651924683 +0200 ++++ gmsh-4.0.0-source-new/CMakeLists.txt 2018-08-29 10:24:05.776924676 +0200 +@@ -1748,6 +1748,8 @@ else(WIN32 OR CYGWIN) + set(GMSH_INC ${CMAKE_INSTALL_INCLUDEDIR}) + endif(WIN32 OR CYGWIN) + ++execute_process ( COMMAND python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())" OUTPUT_VARIABLE PYTHON3_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE) ++ + # FIXME: change this once we understand rpaths + if(APPLE) + if(ENABLE_BUILD_DYNAMIC OR ENABLE_BUILD_SHARED) +@@ -1769,11 +1771,11 @@ if(ENABLE_BUILD_SHARED OR ENABLE_BUILD_D + endif(ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC) + + if(ENABLE_ONELAB) +- install(FILES ${ONELAB_PY} DESTINATION ${GMSH_BIN}) ++ install(FILES ${ONELAB_PY} DESTINATION ${PYTHON3_SITE_PACKAGES}) + endif(ENABLE_ONELAB) + if(ENABLE_BUILD_LIB OR ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC) + install(FILES ${GMSH_API} DESTINATION ${GMSH_INC}) +- install(FILES ${GMSH_PY} DESTINATION ${GMSH_LIB}) ++ install(FILES ${GMSH_PY} DESTINATION ${PYTHON3_SITE_PACKAGES}) + install(FILES ${GMSH_JL} DESTINATION ${GMSH_LIB}) + if(ENABLE_PRIVATE_API) + install(FILES ${GMSH_PRIVATE_API} DESTINATION ${GMSH_INC}/gmsh) +diff -rupN gmsh-4.0.0-source/Common/GmshMessage.cpp gmsh-4.0.0-source-new/Common/GmshMessage.cpp +--- gmsh-4.0.0-source/Common/GmshMessage.cpp 2018-06-27 22:44:49.000000000 +0200 ++++ gmsh-4.0.0-source-new/Common/GmshMessage.cpp 2018-08-29 10:24:05.777924676 +0200 +@@ -154,12 +154,6 @@ void Msg::Init(int argc, char **argv) + if(CTX::instance()->exeFileName.empty() && argc && argv) + CTX::instance()->exeFileName = argv[0]; + +- // add the directory where the binary is installed to the path where Python +- // looks for modules, and to the path for executables (this allows us to find +- // the onelab.py module or subclients automatically) +- addGmshPathToEnvironmentVar("PYTHONPATH"); +- addGmshPathToEnvironmentVar("PATH"); +- + InitializeOnelab("Gmsh"); + } + diff --git a/gmsh_tetgen.patch b/gmsh_tetgen.patch deleted file mode 100644 index 0a3e682..0000000 --- a/gmsh_tetgen.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff -rupN gmsh-3.0.6-source/Mesh/meshGRegion.cpp gmsh-3.0.6-source-new/Mesh/meshGRegion.cpp ---- gmsh-3.0.6-source/Mesh/meshGRegion.cpp 2017-11-05 13:05:54.000000000 +0100 -+++ gmsh-3.0.6-source-new/Mesh/meshGRegion.cpp 2018-03-10 10:28:44.773972079 +0100 -@@ -513,7 +513,9 @@ bool CreateAnEmptyVolumeMesh(GRegion *gr - (Msg::GetVerbosity() < 3) ? "Q" : (Msg::GetVerbosity() > 6) ? "V" : "", - CTX::instance()->mesh.toleranceInitialDelaunay); - try{ -- tetrahedralize(opts, &in, &out); -+ tetgenbehavior behaviour; -+ behaviour.parse_commandline(opts); -+ tetrahedralize(&behaviour, &in, &out); - } - catch (int error){ - Msg::Error("Self intersecting surface mesh"); -@@ -583,14 +585,18 @@ void MeshDelaunayVolumeTetgen(std::vecto - (Msg::GetVerbosity() < 3) ? "Q" : (Msg::GetVerbosity() > 6) ? "V" : "", - CTX::instance()->mesh.toleranceInitialDelaunay); - try{ -- tetrahedralize(opts, &in, &out); -+ tetgenbehavior behaviour; -+ behaviour.parse_commandline(opts); -+ tetrahedralize(&behaviour, &in, &out); - } - catch (int error){ - Msg::Error("Self intersecting surface mesh, computing intersections " - "(this could take a while)"); - sprintf(opts, "dV"); - try{ -- tetrahedralize(opts, &in, &out); -+ tetgenbehavior behaviour; -+ behaviour.parse_commandline(opts); -+ tetrahedralize(&behaviour, &in, &out); - Msg::Info("%d intersecting faces have been saved into 'intersect.pos'", - out.numberoftrifaces); - FILE *fp = Fopen("intersect.pos", "w"); diff --git a/gmsh_unbundle.patch b/gmsh_unbundle.patch index 2190894..6ec7935 100644 --- a/gmsh_unbundle.patch +++ b/gmsh_unbundle.patch @@ -1,26 +1,25 @@ -diff -rupN gmsh-3.0.6-source/CMakeLists.txt gmsh-3.0.6-source-new/CMakeLists.txt ---- gmsh-3.0.6-source/CMakeLists.txt 2017-10-17 21:13:18.000000000 +0200 -+++ gmsh-3.0.6-source-new/CMakeLists.txt 2018-06-11 10:14:32.362959270 +0200 -@@ -162,8 +162,7 @@ set(GMSH_API - contrib/MeshOptimizer/MeshOptObjectiveFunction.h contrib/MeshOptimizer/MeshOptVertexCoord.h - contrib/MeshQualityOptimizer/MeshQualityObjContribIdealJac.h - contrib/MeshQualityOptimizer/MeshQualityObjContribInvCond.h -- contrib/MeshQualityOptimizer/MeshQualityOptimizer.h -- contrib/MathEx/mathex.h) -+ contrib/MeshQualityOptimizer/MeshQualityOptimizer.h) - - get_property(IAMCHILD DIRECTORY PROPERTY PARENT_DIRECTORY) - if(IAMCHILD) -@@ -665,7 +664,7 @@ endif(HAVE_FLTK OR HAVE_QT OR ENABLE_GRA +diff -rupN gmsh-4.0.0-source/CMakeLists.txt gmsh-4.0.0-source-new/CMakeLists.txt +--- gmsh-4.0.0-source/CMakeLists.txt 2018-08-09 10:10:35.000000000 +0200 ++++ gmsh-4.0.0-source-new/CMakeLists.txt 2018-08-29 10:24:05.510924691 +0200 +@@ -129,7 +129,7 @@ if(ENABLE_PRIVATE_API) + file(GLOB_RECURSE HEADERS Common/*.h Numeric/*.h Geo/*.h Mesh/*.h Solver/*.h + Post/*.h Graphics/*.h contrib/kbipack/*.h contrib/DiscreteIntegration/*.h + contrib/HighOrderMeshOptimizer/*.h contrib/MeshOptimizer/*.h +- contrib/MeshQualityOptimizer/*.h contrib/MathEx/*.h) ++ contrib/MeshQualityOptimizer/*.h) + set(GMSH_PRIVATE_API ${CMAKE_CURRENT_BINARY_DIR}/Common/GmshConfig.h + ${CMAKE_CURRENT_BINARY_DIR}/Common/GmshVersion.h ${HEADERS}) + get_property(IAMCHILD DIRECTORY PROPERTY PARENT_DIRECTORY) +@@ -707,7 +707,7 @@ endif(HAVE_FLTK OR ENABLE_GRAPHICS) if(HAVE_MESH OR HAVE_PLUGINS) if(ENABLE_ANN) - find_library(ANN_LIB ann PATH_SUFFIXES lib) + find_library(ANN_LIB ANN PATH_SUFFIXES lib) find_path(ANN_INC "ANN.h" PATH_SUFFIXES src include ANN) - if(ANN_LIB AND ANN_INC) - list(APPEND EXTERNAL_LIBRARIES ${ANN_LIB}) -@@ -680,8 +679,16 @@ if(HAVE_MESH OR HAVE_PLUGINS) + if(ENABLE_SYSTEM_CONTRIB AND ANN_LIB AND ANN_INC) + message(STATUS "Using system version of ANN") +@@ -722,8 +722,16 @@ if(HAVE_MESH OR HAVE_PLUGINS) endif(HAVE_MESH OR HAVE_PLUGINS) if(ENABLE_BFGS) @@ -39,7 +38,7 @@ diff -rupN gmsh-3.0.6-source/CMakeLists.txt gmsh-3.0.6-source-new/CMakeLists.txt set_config_option(HAVE_BFGS "Bfgs") endif(ENABLE_BFGS) -@@ -730,8 +737,16 @@ if(ENABLE_KBIPACK) +@@ -772,8 +780,16 @@ if(ENABLE_KBIPACK) endif(ENABLE_KBIPACK) if(ENABLE_MATHEX) @@ -58,26 +57,7 @@ diff -rupN gmsh-3.0.6-source/CMakeLists.txt gmsh-3.0.6-source-new/CMakeLists.txt set_config_option(HAVE_MATHEX "MathEx") endif(ENABLE_MATHEX) -@@ -782,8 +797,16 @@ if(HAVE_MESH) - set_config_option(HAVE_TETGENBR "TetGen/BR") - - if(ENABLE_VORO3D) -- add_subdirectory(contrib/voro++) -- include_directories(contrib/voro++/src) -+ find_library(VORO3D_LIB voro++ PATH_SUFFIXES lib) -+ find_path(VORO3D_INC "voro++.hh" PATH_SUFFIXES include/voro++) -+ if(VORO3D_LIB AND VORO3D_INC) -+ list(APPEND EXTERNAL_LIBRARIES ${VORO3D_LIB}) -+ list(APPEND EXTERNAL_INCLUDES ${VORO3D_INC}) -+ else(VORO3D_LIB AND VORO3D_INC) -+ message(STATUS "System voro++ not found: using contrib/voro++ instead") -+ add_subdirectory(contrib/voro++) -+ include_directories(contrib/voro++) -+ endif(VORO3D_LIB AND VORO3D_INC) - set_config_option(HAVE_VORO3D "Voro3D") - endif(ENABLE_VORO3D) - -@@ -795,9 +818,22 @@ if(HAVE_MESH) +@@ -846,9 +862,22 @@ if(HAVE_MESH) endif(ENABLE_BLOSSOM) if(ENABLE_NETGEN) @@ -103,18 +83,18 @@ diff -rupN gmsh-3.0.6-source/CMakeLists.txt gmsh-3.0.6-source-new/CMakeLists.txt set_config_option(HAVE_NETGEN "Netgen") add_definitions(-DNO_PARALLEL_THREADS -DNOTCL) endif(ENABLE_NETGEN) -@@ -809,7 +845,7 @@ if(HAVE_MESH) +@@ -860,7 +889,7 @@ if(HAVE_MESH) endif(ENABLE_BAMG) if(ENABLE_MMG3D) - find_library(MMG3D_LIB mmg3dlib4.0 PATH_SUFFIXES lib) + find_library(MMG3D_LIB mmg3d PATH_SUFFIXES lib) find_path(MMG3D_INC "libmmg3d.h" PATH_SUFFIXES src include) - if(MMG3D_LIB AND MMG3D_INC) - list(APPEND EXTERNAL_LIBRARIES ${MMG3D_LIB}) -diff -rupN gmsh-3.0.6-source/Mesh/CMakeLists.txt gmsh-3.0.6-source-new/Mesh/CMakeLists.txt ---- gmsh-3.0.6-source/Mesh/CMakeLists.txt 2017-10-03 22:01:51.000000000 +0200 -+++ gmsh-3.0.6-source-new/Mesh/CMakeLists.txt 2018-06-11 10:14:32.363959270 +0200 + if(ENABLE_SYSTEM_CONTRIB AND MMG3D_LIB AND MMG3D_INC) + message(STATUS "Using system version of MMG3D") +diff -rupN gmsh-4.0.0-source/Mesh/CMakeLists.txt gmsh-4.0.0-source-new/Mesh/CMakeLists.txt +--- gmsh-4.0.0-source/Mesh/CMakeLists.txt 2018-08-08 18:28:41.000000000 +0200 ++++ gmsh-4.0.0-source-new/Mesh/CMakeLists.txt 2018-08-29 10:24:05.510924691 +0200 @@ -47,6 +47,7 @@ set(SRC yamakawa.cpp Field.cpp diff --git a/sources b/sources index 0195694..840d424 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gmsh-3.0.6-source-fedora.tar.xz) = 535bfa34f20b33e202197e4dfe1710fcae137d0836c906171012244188564f67243fabecbf0ad42a39e5a0242f475519c86e7060d08746ee2bb2709a4cad4e5e +SHA512 (gmsh-4.0.0-source-fedora.tar.xz) = 2dec83f992cb359527d27e6e878752e4f80701e54d101067b04e94234cdfaef12d8a670a9d8cbdea9c3b99abd7b2bb33dfb0a66a2aac3146a40551d163cb3768