diff --git a/.gitignore b/.gitignore index 2d41628..6142107 100644 --- a/.gitignore +++ b/.gitignore @@ -45,36 +45,3 @@ /gmsh-4.5.2-source-fedora.tar.xz /gmsh-4.5.3-source-fedora.tar.xz /gmsh-4.5.4-source-fedora.tar.xz -/gmsh-4.5.5-source-fedora.tar.xz -/gmsh-4.5.6-source-fedora.tar.xz -/gmsh-4.6.0-source-fedora.tar.xz -/gmsh-4.7.0-source-fedora.tar.xz -/gmsh-4.7.1-source-fedora.tar.xz -/gmsh-4.8.0-source-fedora.tar.xz -/gmsh-4.8.1-source-fedora.tar.xz -/gmsh-4.8.2-source-fedora.tar.xz -/gmsh-4.8.3-source-fedora.tar.xz -/gmsh-4.8.4-source-fedora.tar.xz -/gmsh-4.9.0-source-fedora.tar.xz -/gmsh-4.9.1-source-fedora.tar.xz -/gmsh-4.9.2-source-fedora.tar.xz -/gmsh-4.9.3-source-fedora.tar.xz -/gmsh-4.9.4-source-fedora.tar.xz -/gmsh-4.9.5-source-fedora.tar.xz -/gmsh-4.10.0-source-fedora.tar.xz -/gmsh-4.10.1-source-fedora.tar.xz -/gmsh-4.10.2-source-fedora.tar.xz -/gmsh-4.10.3-source-fedora.tar.xz -/gmsh-4.10.4-source-fedora.tar.xz -/gmsh-4.10.5-source-fedora.tar.xz -/gmsh-4.11.0-source-fedora.tar.xz -/gmsh-4.11.1-source-fedora.tar.xz -/gmsh-4.12.0-source-fedora.tar.xz -/gmsh-4.12.1-source-fedora.tar.xz -/gmsh-4.12.2-source-fedora.tar.xz -/gmsh-4.13.0-source-fedora.tar.xz -/gmsh-4.13.1-source-fedora.tar.xz -/gmsh-4.13.2-source-fedora.tar.xz -/gmsh-4.14.0-source-fedora.tar.xz -/gmsh-4.14.1-source-fedora.tar.xz -/gmsh-4.15.0-source-fedora.tar.xz diff --git a/fedoratarball.sh b/fedoratarball.sh index b42d209..7dd7998 100755 --- a/fedoratarball.sh +++ b/fedoratarball.sh @@ -1,14 +1,16 @@ #!/bin/sh -ver=`grep Version: gmsh.spec | awk -F " " '{print $2}'` +if [ $# -lt 1 ]; then + echo "Usage: $0 upstream_ver" + exit 1 +fi -echo "This will download and rearchive gmsh version $ver" -read -p "Press any key to Continue..." +ver=$1 TMPDIR=`mktemp -d /tmp/gmsh.XXXXXX` pushd "$TMPDIR" -curl -LO http://geuz.org/gmsh/src/gmsh-$ver-source.tgz +wget http://geuz.org/gmsh/src/gmsh-$ver-source.tgz tar xf gmsh-$ver-source.tgz rm -rf contrib/blossom contrib/mpeg_encode diff --git a/gmsh.spec b/gmsh.spec index f1597f5..2980b1b 100644 --- a/gmsh.spec +++ b/gmsh.spec @@ -1,30 +1,14 @@ -%if 0%{?fedora} >= 40 -%ifarch %{ix86} -%bcond_with openmpi -%else %bcond_without openmpi -%endif -%else -%bcond_without openmpi -%endif %bcond_without mpich -%global sover 4.15 - -%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 -%bcond_without flexiblas -%endif - Name: gmsh Summary: A three-dimensional finite element mesh generator -Version: 4.15.0 +Version: 4.5.4 Release: 1%{?dist} -# MPI not available on i686 -ExcludeArch: %{ix86} -# gmsh is GPL-2.0-or-later WITH Gmsh-exception, see LICENSE.txt +# gmsh is GPLv2+ with exceptions, see LICENSE.txt # contrib/{DiscreteIntegration, HighOrderMeshOptimizer, MeshOptimizer, onelab} are MIT, see respective README.txt -License: GPL-2.0-or-later WITH Gmsh-exception AND MIT +License: GPLv2+ with exceptions and MIT URL: http://geuz.org/gmsh/ # Download source from http://geuz.org/gmsh/src/%%{name}-%%{version}-source.tgz # Delete contrib/blossom and contrib/mpeg_encode from source archive @@ -33,23 +17,20 @@ Source1: %{name}.desktop # Install onelab.py and gmsh.py into the python site-packages directory Patch0: gmsh_python.patch +# Use c++14 (needed by netgen component) +Patch1: gmsh_c++14.patch # Adapt med.h include path -Patch1: gmsh_med.patch +Patch2: gmsh_med.patch # Install Julia API to share/gmsh -Patch2: gmsh_julia.patch +Patch3: gmsh_julia.patch # Remove odd install of gmsh shared library -Patch3: gmsh_install.patch -# Unbundle gl2ps -Patch4: gmsh_unbundle_gl2ps.patch -# Make gmm use superlu -Patch5: gmsh_gmm.patch +Patch4: gmsh_install.patch +# Fix build error caused by include ordering +Patch5: gmsh_build.patch +BuildRequires: alglib-devel BuildRequires: ann-devel -%if %{with flexiblas} -BuildRequires: flexiblas-devel -%else -BuildRequires: blas-devel, lapack-devel -%endif +BuildRequires: blas-devel BuildRequires: cgnslib-devel BuildRequires: cmake BuildRequires: desktop-file-utils @@ -59,26 +40,22 @@ BuildRequires: gcc-gfortran BuildRequires: gmm-devel BuildRequires: gmp-devel BuildRequires: hdf5-devel +BuildRequires: lapack-devel BuildRequires: libjpeg-turbo-devel BuildRequires: liblbfgs-devel BuildRequires: libpng-devel +BuildRequires: make BuildRequires: mathex-devel BuildRequires: med-devel BuildRequires: mesa-libGLU-devel BuildRequires: metis-devel +BuildRequires: mmg3d-devel BuildRequires: netgen-mesher-devel-private BuildRequires: opencascade-devel BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: SuperLU-devel BuildRequires: voro++-devel BuildRequires: zlib-devel BuildRequires: texinfo -# For transforming icon -BuildRequires: ImageMagick - -Provides: bundled(netgen-mesher) = svn469 - Requires: %{name}-common = %{version}-%{release} @@ -115,10 +92,6 @@ Summary: Python3 API for %{name} %{?python_provide:%python_provide python3-%{name}} Obsoletes: python3-%{name}-private -BuildArch: noarch - -Requires: %{name}-libs = %{version}-%{release} - %description -n python3-%{name} Python3 API for %{name}. @@ -211,8 +184,8 @@ Development files for %{name} compiled against mpich. %prep %autosetup -p1 -n %{name}-%{version}-source -# Copy these outside the contrib folder -cp contrib/Netgen/nglib_gmsh.h contrib/Netgen/nglib_gmsh.cpp src/mesh +# Copy these outside the contrib folder (Patch takes care of including these in the build) +cp contrib/Netgen/nglib_gmsh.h contrib/Netgen/nglib_gmsh.cpp Mesh # Bamg: part of freefem++, modified source code # DiscreteIntegration: gmsh internal module @@ -220,58 +193,69 @@ cp contrib/Netgen/nglib_gmsh.h contrib/Netgen/nglib_gmsh.cpp src/mesh # hxt: see contrib/hxt/CREDITS.txt # kbipack: Source not available on the net anymore # onelab: gmsh internal module -# WinslowUntangler: gmsh internal module (?) ( cd contrib; ls -1 | \ grep -v ^bamg$ | \ - grep -v ^blossom$ | \ grep -v ^DiscreteIntegration$ | \ - grep -v ^MeshOptimizer$ | \ + grep -v ^MeshOptimizer | \ grep -v ^HighOrderMeshOptimizer$ | \ - grep -v ^QuadTri$ | \ + grep -v ^QuadTri | \ grep -v ^hxt$ | \ grep -v ^kbipack$ | \ grep -v ^onelab$ | \ - grep -v ^tinyobjloader$ | \ - grep -v ^WinslowUntangler$ | \ xargs rm -rf ) +# Convert to utf-8 +for file in tutorial/t12.geo; do + iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \ + touch -r $file $file.new && \ + mv $file.new $file +done + %build # mpeg not in fedora due to patent issues # blossoms is nonfree, see contrib/blossoms/README.txt gmsh_cmake_args="\ - %{?with_flexiblas:-DBLA_VENDOR=FlexiBLAS} \ -DENABLE_SYSTEM_CONTRIB=YES \ -DENABLE_BUILD_LIB=YES \ -DENABLE_BUILD_SHARED=YES \ -DENABLE_BUILD_DYNAMIC=YES \ - -DENABLE_MPEG_ENCODE=NO" + -DENABLE_MPEG_ENCODE=NO \ + -DENABLE_METIS=YES \ + -DENABLE_BLOSSOM=NO \ + -DENABLE_CGNS=YES \ + -DENABLE_MED=YES \ + -DENABLE_OCC=YES" ### serial version ### -%define _vpath_builddir %{_target_platform} -%cmake \ +mkdir build-serial +pushd build-serial +LDFLAGS="%{__global_ldflags} -Wl,--as-needed" %cmake .. \ -DENABLE_OPENMP=ON \ $gmsh_cmake_args -%cmake_build +make %{?_smp_mflags} +popd ### openmpi version ### %if %{with openmpi} %{_openmpi_load} export CXX=mpicxx -%define _vpath_builddir %{_target_platform}-openmpi -%cmake \ +mkdir build-openmpi +pushd build-openmpi +LDFLAGS="%{__global_ldflags} -Wl,--as-needed" %cmake .. \ -DENABLE_MPI=YES \ -DCMAKE_INSTALL_BINDIR=$MPI_BIN \ -DCMAKE_INSTALL_LIBDIR=$MPI_LIB \ -DCMAKE_INSTALL_INCLUDEDIR=$MPI_INCLUDE \ $gmsh_cmake_args -%cmake_build +make %{?_smp_mflags} +popd %{_openmpi_unload} %endif @@ -279,49 +263,47 @@ export CXX=mpicxx %if %{with mpich} %{_mpich_load} export CXX=mpicxx -%define _vpath_builddir %{_target_platform}-mpich -%cmake \ +mkdir build-mpich +pushd build-mpich +LDFLAGS="%{__global_ldflags} -Wl,--as-needed" %cmake .. \ -DENABLE_MPI=YES \ -DCMAKE_INSTALL_BINDIR=$MPI_BIN \ -DCMAKE_INSTALL_LIBDIR=$MPI_LIB \ -DCMAKE_INSTALL_INCLUDEDIR=$MPI_INCLUDE \ $gmsh_cmake_args -%cmake_build +make %{?_smp_mflags} +popd %{_mpich_unload} %endif # Built html documentation -%cmake_build --target html +make -C build-serial html # Fix to create correct debuginfo -cp -a src/parser/Gmsh.* %{_target_platform} +cp -a Parser/Gmsh.* build-serial %if %{with openmpi} -cp -a src/parser/Gmsh.* %{_target_platform}-openmpi +cp -a Parser/Gmsh.* build-openmpi %endif %if %{with mpich} -cp -a src/parser/Gmsh.* %{_target_platform}-mpich +cp -a Parser/Gmsh.* build-mpich %endif %install %if %{with openmpi} -%define _vpath_builddir %{_target_platform}-openmpi -%cmake_install +%make_install -C build-openmpi %endif %if %{with mpich} -%define _vpath_builddir %{_target_platform}-mpich -%cmake_install +%make_install -C build-mpich %endif -%define _vpath_builddir %{_target_platform} -%cmake_install +%make_install -C build-serial # Remove static libraries find %{buildroot} -type f -name libgmsh.a -exec rm -f {} \; # Install icon and .desktop file -magick utils/icons/gmsh.png -scale 128 icon_128x128.png -install -Dpm 0644 icon_128x128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png +install -Dpm 0644 utils/icons/solid_128x128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} # Install License.txt via %%license @@ -342,10 +324,9 @@ rm -f %{buildroot}%{_defaultdocdir}/%{name}/LICENSE.txt %files doc %license LICENSE.txt -%doc %{_defaultdocdir}/%{name}/tutorials -%doc %{_defaultdocdir}/%{name}/examples +%doc %{_defaultdocdir}/%{name}/tutorial +%doc %{_defaultdocdir}/%{name}/demos %doc %{_defaultdocdir}/%{name}/%{name}.html -%doc %{_defaultdocdir}/%{name}/images/ %files %{_bindir}/%{name} @@ -354,17 +335,15 @@ rm -f %{buildroot}%{_defaultdocdir}/%{name}/LICENSE.txt %{_includedir}/gmsh.h %{_includedir}/gmshc.h %{_includedir}/gmsh.h_cwrap -%{_includedir}/gmsh.f90 %{_libdir}/libgmsh.so %files libs %license LICENSE.txt -%{_libdir}/libgmsh.so.%{sover}* +%{_libdir}/libgmsh.so.4.5* %files -n python3-%{name} %{python3_sitelib}/gmsh.py %{python3_sitelib}/__pycache__/gmsh.*.pyc -%{python3_sitelib}/gmsh-%{version}*.dist-info/ %if %{with openmpi} %files openmpi @@ -374,12 +353,11 @@ rm -f %{buildroot}%{_defaultdocdir}/%{name}/LICENSE.txt %{_includedir}/openmpi*/gmsh.h %{_includedir}/openmpi*/gmshc.h %{_includedir}/openmpi*/gmsh.h_cwrap -%{_includedir}/openmpi*/gmsh.f90 %{_libdir}/openmpi/lib/libgmsh.so %files openmpi-libs %license LICENSE.txt -%{_libdir}/openmpi/lib/libgmsh.so.%{sover}* +%{_libdir}/openmpi/lib/libgmsh.so.4.5* %endif %if %{with mpich} @@ -390,248 +368,15 @@ rm -f %{buildroot}%{_defaultdocdir}/%{name}/LICENSE.txt %{_includedir}/mpich*/gmsh.h %{_includedir}/mpich*/gmshc.h %{_includedir}/mpich*/gmsh.h_cwrap -%{_includedir}/mpich*/gmsh.f90 %{_libdir}/mpich/lib/libgmsh.so %files mpich-libs %license LICENSE.txt -%{_libdir}/mpich/lib/libgmsh.so.%{sover}* +%{_libdir}/mpich/lib/libgmsh.so.4.5* %endif %changelog -* Sun Oct 26 2025 Sandro Mani - 4.15.0-1 -- Update to 4.15.0 - -* Fri Sep 19 2025 Python Maint - 4.14.1-2 -- Rebuilt for Python 3.14.0rc3 bytecode - -* Tue Sep 02 2025 Sandro Mani - 4.14.1-1 -- Update to 4.14.1 - -* Fri Aug 15 2025 Python Maint - 4.14.0-4 -- Rebuilt for Python 3.14.0rc2 bytecode - -* Wed Jul 23 2025 Fedora Release Engineering - 4.14.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Thu Jul 17 2025 Sandro Mani - 4.14.0-2 -- Use %%cmake_build instead of make - -* Fri Jul 04 2025 Sandro Mani - 4.14.0-1 -- Update to 4.14.0 - -* Wed Jun 04 2025 Python Maint - 4.13.2-12 -- Rebuilt for Python 3.14 - -* Thu May 29 2025 Richard Shaw - 4.13.2-11 -- Rebuild for opencascade 7.9.1. - -* Wed May 28 2025 Richard Shaw - 4.13.2-10 -- Rebuild for opencascade 7.9.1. - -* Sat May 24 2025 Sandro Mani - 4.13.2-9 -- Add fix for GCC15 build failure - -* Mon Feb 3 2025 Jaroslav Škarvada - 4.13.2-8 -- Rebuild for tcl/tk - -* Tue Jan 28 2025 Sandro Mani - 4.13.2-7 -- Rebuild (cgnslib) - -* Fri Jan 24 2025 Sandro Mani - 4.13.2-6 -- Rebuild (cgnslib) - -* Thu Jan 16 2025 Fedora Release Engineering - 4.13.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Fri Oct 25 2024 Orion Poplawski - 4.13.2-4 -- Rebuild for hdf5 1.14.5 - -* Thu Jul 18 2024 Fedora Release Engineering - 4.13.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Sun Jun 09 2024 Python Maint - 4.13.2-2 -- Rebuilt for Python 3.13 - -* Tue Jun 04 2024 Sandro Mani - 4.13.2-1 -- Update to 4.13.2 - -* Sun Jun 02 2024 Richard Shaw - 4.13.1-2 -- Rebuild for opencascade 7.8.1. - -* Wed May 08 2024 Sandro Mani - 4.13.1-1 -- Update to 4.13.1 - -* Tue Apr 09 2024 Benjamin A. Beasley - 4.13.0-3 -- Ensure python3-gmsh depends on gmsh-libs -- Make the python3-gmsh subpackage noarch, since the bindings are pure Python - -* Fri Mar 29 2024 Richard Shaw - 4.13.0-2 -- Rebuild for OpenCascade 7.8.0. - -* Tue Feb 27 2024 Sandro Mani - 4.13.0-1 -- Update to 4.13.0 - -* Tue Jan 23 2024 Sandro Mani - 4.12.2-1 -- Update to 4.12.2 - -* Fri Jan 19 2024 Fedora Release Engineering - 4.12.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Jan 14 2024 Sandro Mani - 4.12.1-1 -- Update to 4.12.1 - -* Mon Jan 01 2024 Sandro Mani - 4.12.0-1 -- Update to 4.12.0 - -* Sun Oct 29 2023 Orion Poplawski - 4.11.1-7 -- Rebuild for openmpi 5.0.0, drops i686 and C++ API - -* Wed Jul 19 2023 Fedora Release Engineering - 4.11.1-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Thu Jul 06 2023 Sandro Mani - 4.11.1-5 -- Rebuild (cgnslib) - -* Sat Jun 17 2023 Python Maint - 4.11.1-4 -- Rebuilt for Python 3.12 - -* Thu Jan 19 2023 Fedora Release Engineering - 4.11.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sat Jan 14 2023 Richard Shaw - 4.11.1-2 -- Rebuild for opencascade. - -* Wed Dec 21 2022 Sandro Mani - 4.11.1-1 -- Update to 4.11.1 - -* Tue Nov 08 2022 Sandro Mani - 4.11.0-1 -- Update to 4.11.0 - -* Thu Jul 21 2022 Fedora Release Engineering - 4.10.5-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Sun Jul 03 2022 Sandro Mani - 4.10.5-1 -- Update to 4.10.5 - -* Mon Jun 20 2022 Python Maint - 4.10.4-2 -- Rebuilt for Python 3.11 - -* Sun Jun 19 2022 Sandro Mani - 4.10.4-1 -- Update to 4.10.4 - -* Mon Jun 13 2022 Python Maint - 4.10.3-2 -- Rebuilt for Python 3.11 - -* Mon May 30 2022 Sandro Mani - 4.10.3-1 -- Update to 4.10.3 - -* Fri May 13 2022 Sandro Mani - 4.10.2-1 -- Update to 4.10.2 - -* Mon May 09 2022 Sandro Mani - 4.10.1-2 -- Fix removing bundled libraries - -* Tue May 03 2022 Sandro Mani - 4.10.1-1 -- Update to 4.10.1 - -* Tue Apr 26 2022 Sandro Mani - 4.10.0-1 -- Update to 4.10.0 - -* Tue Mar 22 2022 Sandro Mani - 4.9.5-2 -- Rebuild for cgnslib-4.3.0 - -* Mon Feb 21 2022 Richard Shaw - 4.9.5-1 -- Update to 4.9.5. - -* Fri Feb 04 2022 Sandro Mani - 4.9.4-1 -- Update to 4.9.4 - -* Thu Jan 20 2022 Fedora Release Engineering - 4.9.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Sat Jan 08 2022 Sandro Mani - 4.9.3-1 -- Update to 4.9.3 - -* Thu Dec 23 2021 Richard Shaw - 4.9.2-1 -- Update to 4.9.2. - -* Sat Dec 18 2021 Richard Shaw - 4.9.1-1 -- Update to 4.9.1. - -* Fri Dec 03 2021 Richard Shaw - 4.9.0-1 -- Update to 4.9.0. - -* Wed Oct 27 2021 Sandro Mani - 4.8.4-6 -- Rebuild (alglib) - -* Thu Jul 22 2021 Fedora Release Engineering - 4.8.4-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue Jul 13 2021 Björn Esser - 4.8.4-4 -- Properly set BLA_VENDOR to FlexiBLAS for cmake >= 3.19 - -* Fri Jun 04 2021 Python Maint - 4.8.4-3 -- Rebuilt for Python 3.10 - -* Thu Apr 29 2021 Sandro Mani - 4.8.4-2 -- Rebuild (cgnslib) - -* Thu Apr 29 2021 Sandro Mani - 4.8.4-1 -- Update to 4.8.4 - -* Tue Apr 06 2021 Sandro Mani - 4.8.3-1 -- Update to 4.8.3 - -* Mon Mar 29 2021 Sandro Mani - 4.8.2-1 -- Update to 4.8.2 - -* Wed Mar 24 2021 Sandro Mani - 4.8.1-1 -- Update to 4.8.1 - -* Tue Mar 02 2021 Sandro Mani - 4.8.0-1 -- Update to 4.8.0 - -* Tue Jan 26 2021 Fedora Release Engineering - 4.7.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Mon Nov 16 2020 Richard Shaw - 4.7.1-1 -- Update to 4.7.1. - -* Sun Nov 08 2020 Richard Shaw - 4.7.0-1 -- Update to 4.7.0. - -* Thu Aug 27 2020 Iñaki Úcar - 4.6.0-5 -- https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager - -* Sat Aug 01 21:40:30 GMT 2020 Sandro Mani - 4.6.0-4 -- Rebuild (med) - -* Mon Jul 27 2020 Fedora Release Engineering - 4.6.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Fri Jul 24 2020 Jeff Law - 4.6.0-2 -- Use __cmake_in_source_build - -* Mon Jul 13 2020 Sandro Mani - 4.6.0-1 -- Update to 4.6.0 - -* Tue May 26 2020 Miro Hrončok - 4.5.6-4 -- Rebuilt for Python 3.9 - -* Fri May 08 2020 Richard Shaw - 4.5.6-3 -- Rebuild for unannounced soname bump in libcgns. - -* Mon Apr 06 2020 Sandro Mani - 4.5.6-2 -- Unbundle gl2ps (#1821461) - -* Mon Mar 30 2020 Sandro Mani - 4.5.6-1 -- Update to 4.5.6 - -* Sat Mar 21 2020 Sandro Mani - 4.5.5-1 -- Update to 4.5.5 - * Mon Mar 02 2020 Sandro Mani - 4.5.4-1 - Update to 4.5.4 diff --git a/gmsh_build.patch b/gmsh_build.patch new file mode 100644 index 0000000..6b23572 --- /dev/null +++ b/gmsh_build.patch @@ -0,0 +1,24 @@ +diff -rupN --no-dereference gmsh-4.5.4-source/Fltk/helpWindow.cpp gmsh-4.5.4-source-new/Fltk/helpWindow.cpp +--- gmsh-4.5.4-source/Fltk/helpWindow.cpp 2020-03-02 11:12:53.937188558 +0100 ++++ gmsh-4.5.4-source-new/Fltk/helpWindow.cpp 2020-03-02 11:12:54.207189793 +0100 +@@ -3,6 +3,12 @@ + // See the LICENSE.txt file for license information. Please report all + // issues on https://gitlab.onelab.info/gmsh/gmsh/issues. + ++#include "GmshConfig.h" ++ ++#if defined(HAVE_MED) ++#include ++#endif ++ + #include + #include + #include +@@ -13,7 +19,6 @@ + #include + #include + #include +-#include "GmshConfig.h" + #include "FlGui.h" + #include "inputValue.h" + #include "helpWindow.h" diff --git a/gmsh_c++14.patch b/gmsh_c++14.patch new file mode 100644 index 0000000..9758779 --- /dev/null +++ b/gmsh_c++14.patch @@ -0,0 +1,55 @@ +diff -rupN --no-dereference gmsh-4.5.4-source/CMakeLists.txt gmsh-4.5.4-source-new/CMakeLists.txt +--- gmsh-4.5.4-source/CMakeLists.txt 2020-03-02 11:12:53.640187196 +0100 ++++ gmsh-4.5.4-source-new/CMakeLists.txt 2020-03-02 11:12:53.642187205 +0100 +@@ -44,7 +44,7 @@ opt(BUILD_IOS "Enable iOS library target + opt(CGNS "Enable CGNS import/export (experimental)" ${DEFAULT}) + opt(CGNS_CPEX0045 "Enable high-order CGNS import/export following CPEX0045 (experimental)" OFF) + opt(CAIRO "Enable Cairo to render fonts (experimental)" ${DEFAULT}) +-opt(CXX11 "Enable C++11" ON) ++opt(CXX14 "Enable C++14" ON) + opt(C99 "Enable C99" ON) + opt(PROFILE "Enable profiling compiler flags" OFF) + opt(DINTEGRATION "Enable discrete integration (needed for levelsets)" ${DEFAULT}) +@@ -325,13 +325,13 @@ if(ENABLE_OPENACC) + endif() + endif() + +-if(ENABLE_CXX11) +- # 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(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +- endif() +-endif() ++if(ENABLE_CXX14) ++ check_cxx_compiler_flag("-std=c++14" STDCXX14) ++ if(STDCXX14) ++ set_config_option(HAVE_CXX14 "C++14") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") ++ endif(STDCXX14) ++endif(ENABLE_CXX14) + + if(ENABLE_C99) + # in recent cmake versions we could do e.g. set(CMAKE_C_STANDARD 99) +@@ -1536,10 +1536,10 @@ if(ENABLE_REVOROPT) + get_source_file_property(PROP Plugin/CVTRemesh.cpp COMPILE_FLAGS) + if(PROP) + set_source_files_properties(Plugin/CVTRemesh.cpp PROPERTIES +- COMPILE_FLAGS "${PROP} -std=c++11") ++ COMPILE_FLAGS "${PROP} -std=c++14") + else() + set_source_files_properties(Plugin/CVTRemesh.cpp PROPERTIES +- COMPILE_FLAGS "-std=c++11") ++ COMPILE_FLAGS "-std=c++14") + endif() + else() + message(WARNING "Revoropt requires Eigen3, Mesh, Plugins, ANN and ALGLIB") +@@ -1719,7 +1719,7 @@ if(ENABLE_BUILD_ANDROID) + message(FATAL_ERROR "Cannot compile Gmsh for android without android-cmake") + endif() + add_definitions(-D_GLIBCXX_USE_C99_MATH=1) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") + set(CMAKE_BUILD_TYPE Release) + set(LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_CURRENT_BINARY_DIR}) + set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/libs/) diff --git a/gmsh_gmm.patch b/gmsh_gmm.patch deleted file mode 100644 index 271327e..0000000 --- a/gmsh_gmm.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -rupN gmsh-4.15.0-source/CMakeLists.txt gmsh-4.15.0-source-new/CMakeLists.txt ---- gmsh-4.15.0-source/CMakeLists.txt 2025-11-16 12:12:00.997452631 +0100 -+++ gmsh-4.15.0-source-new/CMakeLists.txt 2025-11-16 13:18:32.590269286 +0100 -@@ -1271,6 +1271,18 @@ if(HAVE_SOLVER) - if(ENABLE_GMM) # use GMM/MUMPS interface - add_definitions(-DGMM_USES_MUMPS) - endif() -+ else() -+ if(ENABLE_GMM) # use GMM/MUMPS interface -+ add_definitions(-DGMM_USES_SUPERLU -DGMM_NO_SUPERLU_INCLUDE_SUBDIR) -+ find_path(SUPERLU_INC "slu_util.h" PATH_SUFFIXES SuperLU) -+ include_directories(${SUPERLU_INC}) -+ endif() -+ endif() -+ else() -+ if(ENABLE_GMM) # use GMM/MUMPS interface -+ add_definitions(-DGMM_USES_SUPERLU -DGMM_NO_SUPERLU_INCLUDE_SUBDIR) -+ find_path(SUPERLU_INC "slu_util.h" PATH_SUFFIXES SuperLU) -+ include_directories(${SUPERLU_INC}) - endif() - endif() - diff --git a/gmsh_install.patch b/gmsh_install.patch index 5e02993..9f8873b 100644 --- a/gmsh_install.patch +++ b/gmsh_install.patch @@ -1,7 +1,7 @@ -diff -rupN --no-dereference gmsh-4.15.0-source/CMakeLists.txt gmsh-4.15.0-source-new/CMakeLists.txt ---- gmsh-4.15.0-source/CMakeLists.txt 2025-11-16 12:11:30.706154249 +0100 -+++ gmsh-4.15.0-source-new/CMakeLists.txt 2025-11-16 12:11:30.710717577 +0100 -@@ -278,7 +278,7 @@ if(ENABLE_RPATH) +diff -rupN --no-dereference gmsh-4.5.4-source/CMakeLists.txt gmsh-4.5.4-source-new/CMakeLists.txt +--- gmsh-4.5.4-source/CMakeLists.txt 2020-03-02 11:12:54.074189185 +0100 ++++ gmsh-4.5.4-source-new/CMakeLists.txt 2020-03-02 11:12:54.076189194 +0100 +@@ -253,7 +253,7 @@ else() # when building, don't use the install RPATH already (but later on when # installing) set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) @@ -10,3 +10,12 @@ diff -rupN --no-dereference gmsh-4.15.0-source/CMakeLists.txt gmsh-4.15.0-source # add the automatically determined parts of the RPATH which point to # directories outside the build tree to the install RPATH +@@ -1865,7 +1865,7 @@ endif() + 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() + + if(ENABLE_ONELAB) diff --git a/gmsh_julia.patch b/gmsh_julia.patch index 90c37cf..b49177d 100644 --- a/gmsh_julia.patch +++ b/gmsh_julia.patch @@ -1,12 +1,12 @@ -diff -rupN --no-dereference gmsh-4.15.0-source/CMakeLists.txt gmsh-4.15.0-source-new/CMakeLists.txt ---- gmsh-4.15.0-source/CMakeLists.txt 2025-11-16 12:11:30.209672907 +0100 -+++ gmsh-4.15.0-source-new/CMakeLists.txt 2025-11-16 12:11:30.455854462 +0100 -@@ -2041,7 +2041,7 @@ endif() +diff -rupN --no-dereference gmsh-4.5.4-source/CMakeLists.txt gmsh-4.5.4-source-new/CMakeLists.txt +--- gmsh-4.5.4-source/CMakeLists.txt 2020-03-02 11:12:53.787187870 +0100 ++++ gmsh-4.5.4-source-new/CMakeLists.txt 2020-03-02 11:12:53.940188572 +0100 +@@ -1874,7 +1874,7 @@ endif() 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) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/METADATA DESTINATION - ${PYTHON3_SITE_PACKAGES}/gmsh-${GMSH_PYTHON_VERSION}.dist-info) if(ENABLE_PRIVATE_API) + install(FILES ${GMSH_PRIVATE_API} DESTINATION ${GMSH_INC}/gmsh) + endif() diff --git a/gmsh_med.patch b/gmsh_med.patch index 696ca1b..7ddca3a 100644 --- a/gmsh_med.patch +++ b/gmsh_med.patch @@ -1,6 +1,6 @@ -diff -rupN --no-dereference gmsh-4.15.0-source/src/common/CommandLine.cpp gmsh-4.15.0-source-new/src/common/CommandLine.cpp ---- gmsh-4.15.0-source/src/common/CommandLine.cpp 2025-10-01 16:39:02.000000000 +0200 -+++ gmsh-4.15.0-source-new/src/common/CommandLine.cpp 2025-11-16 12:11:30.214030834 +0100 +diff -rupN --no-dereference gmsh-4.5.4-source/Common/CommandLine.cpp gmsh-4.5.4-source-new/Common/CommandLine.cpp +--- gmsh-4.5.4-source/Common/CommandLine.cpp 2020-02-29 17:40:31.000000000 +0100 ++++ gmsh-4.5.4-source-new/Common/CommandLine.cpp 2020-03-02 11:12:53.790187884 +0100 @@ -42,7 +42,7 @@ #endif @@ -10,10 +10,10 @@ diff -rupN --no-dereference gmsh-4.15.0-source/src/common/CommandLine.cpp gmsh-4 #endif #if defined(HAVE_POST) -diff -rupN --no-dereference gmsh-4.15.0-source/src/fltk/helpWindow.cpp gmsh-4.15.0-source-new/src/fltk/helpWindow.cpp ---- gmsh-4.15.0-source/src/fltk/helpWindow.cpp 2025-10-01 16:39:02.000000000 +0200 -+++ gmsh-4.15.0-source-new/src/fltk/helpWindow.cpp 2025-11-16 12:11:30.214367145 +0100 -@@ -37,7 +37,7 @@ +diff -rupN --no-dereference gmsh-4.5.4-source/Fltk/helpWindow.cpp gmsh-4.5.4-source-new/Fltk/helpWindow.cpp +--- gmsh-4.5.4-source/Fltk/helpWindow.cpp 2020-02-07 14:15:26.000000000 +0100 ++++ gmsh-4.5.4-source-new/Fltk/helpWindow.cpp 2020-03-02 11:12:53.790187884 +0100 +@@ -38,7 +38,7 @@ #endif #if defined(HAVE_MED) @@ -22,9 +22,9 @@ diff -rupN --no-dereference gmsh-4.15.0-source/src/fltk/helpWindow.cpp gmsh-4.15 #endif static const char *help_link(Fl_Widget *w, const char *uri) -diff -rupN --no-dereference gmsh-4.15.0-source/src/geo/GModelIO_MED.cpp gmsh-4.15.0-source-new/src/geo/GModelIO_MED.cpp ---- gmsh-4.15.0-source/src/geo/GModelIO_MED.cpp 2025-10-01 16:39:02.000000000 +0200 -+++ gmsh-4.15.0-source-new/src/geo/GModelIO_MED.cpp 2025-11-16 12:11:30.214658519 +0100 +diff -rupN --no-dereference gmsh-4.5.4-source/Geo/GModelIO_MED.cpp gmsh-4.5.4-source-new/Geo/GModelIO_MED.cpp +--- gmsh-4.5.4-source/Geo/GModelIO_MED.cpp 2020-02-07 14:15:26.000000000 +0100 ++++ gmsh-4.5.4-source-new/Geo/GModelIO_MED.cpp 2020-03-02 11:12:53.790187884 +0100 @@ -26,7 +26,7 @@ #include "discreteVertex.h" #include "Context.h" @@ -34,10 +34,10 @@ diff -rupN --no-dereference gmsh-4.15.0-source/src/geo/GModelIO_MED.cpp gmsh-4.1 #if(MED_MAJOR_NUM >= 3) // To avoid too many ifdefs below we use defines for the bits of the -diff -rupN --no-dereference gmsh-4.15.0-source/src/post/PViewDataGModelIO_MED.cpp gmsh-4.15.0-source-new/src/post/PViewDataGModelIO_MED.cpp ---- gmsh-4.15.0-source/src/post/PViewDataGModelIO_MED.cpp 2025-10-01 16:39:03.000000000 +0200 -+++ gmsh-4.15.0-source-new/src/post/PViewDataGModelIO_MED.cpp 2025-11-16 12:11:30.214886156 +0100 -@@ -11,7 +11,7 @@ +diff -rupN --no-dereference gmsh-4.5.4-source/Post/PViewDataGModelIO.cpp gmsh-4.5.4-source-new/Post/PViewDataGModelIO.cpp +--- gmsh-4.5.4-source/Post/PViewDataGModelIO.cpp 2020-02-07 14:15:27.000000000 +0100 ++++ gmsh-4.5.4-source-new/Post/PViewDataGModelIO.cpp 2020-03-02 11:12:53.790187884 +0100 +@@ -471,7 +471,7 @@ void PViewDataGModel::importLists(int N[ #if defined(HAVE_MED) diff --git a/gmsh_python.patch b/gmsh_python.patch index 75cfbb1..2f67a46 100644 --- a/gmsh_python.patch +++ b/gmsh_python.patch @@ -1,19 +1,19 @@ -diff -rupN --no-dereference gmsh-4.15.0-source/CMakeLists.txt gmsh-4.15.0-source-new/CMakeLists.txt ---- gmsh-4.15.0-source/CMakeLists.txt 2025-10-25 17:09:26.000000000 +0200 -+++ gmsh-4.15.0-source-new/CMakeLists.txt 2025-11-16 12:11:29.982761471 +0100 -@@ -2001,6 +2001,8 @@ else() +diff -rupN --no-dereference gmsh-4.5.4-source/CMakeLists.txt gmsh-4.5.4-source-new/CMakeLists.txt +--- gmsh-4.5.4-source/CMakeLists.txt 2020-02-24 16:47:33.000000000 +0100 ++++ gmsh-4.5.4-source-new/CMakeLists.txt 2020-03-02 11:12:53.508186591 +0100 +@@ -1846,6 +1846,8 @@ else() set(GMSH_INC ${CMAKE_INSTALL_INCLUDEDIR}) endif() +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) + - # mark targets as optional so we can install them separately if needed - # (e.g. "make lib" or "make shared" followed by "make install/fast") - install(TARGETS gmsh -@@ -2034,14 +2036,14 @@ if(ENABLE_BUILD_LIB OR ENABLE_BUILD_SHAR + # FIXME: change this once we understand rpaths + if(APPLE) + if(ENABLE_BUILD_DYNAMIC OR ENABLE_BUILD_SHARED) +@@ -1867,11 +1869,11 @@ if(ENABLE_BUILD_SHARED OR ENABLE_BUILD_D endif() - if(ENABLE_ONELAB AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/onelab) + if(ENABLE_ONELAB) - install(FILES ${ONELAB_PY} DESTINATION ${GMSH_BIN}) + install(FILES ${ONELAB_PY} DESTINATION ${PYTHON3_SITE_PACKAGES}) endif() @@ -22,27 +22,21 @@ diff -rupN --no-dereference gmsh-4.15.0-source/CMakeLists.txt gmsh-4.15.0-source - install(FILES ${GMSH_PY} DESTINATION ${GMSH_LIB}) + install(FILES ${GMSH_PY} DESTINATION ${PYTHON3_SITE_PACKAGES}) install(FILES ${GMSH_JL} DESTINATION ${GMSH_LIB}) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/METADATA DESTINATION -- ${GMSH_LIB}/gmsh-${GMSH_PYTHON_VERSION}.dist-info) -+ ${PYTHON3_SITE_PACKAGES}/gmsh-${GMSH_PYTHON_VERSION}.dist-info) if(ENABLE_PRIVATE_API) install(FILES ${GMSH_PRIVATE_API} DESTINATION ${GMSH_INC}/gmsh) - if(HAVE_CONTRIB_EIGEN) # the private API depends on Eigen -diff -rupN --no-dereference gmsh-4.15.0-source/src/common/GmshMessage.cpp gmsh-4.15.0-source-new/src/common/GmshMessage.cpp ---- gmsh-4.15.0-source/src/common/GmshMessage.cpp 2025-10-01 16:39:02.000000000 +0200 -+++ gmsh-4.15.0-source-new/src/common/GmshMessage.cpp 2025-11-16 12:11:29.983375719 +0100 -@@ -177,14 +177,6 @@ void Msg::Initialize(int argc, char **ar - if(CTX::instance()->exeFileName.empty() && _commandLineArgs.size()) - CTX::instance()->exeFileName = _commandLineArgs[0]; +diff -rupN --no-dereference gmsh-4.5.4-source/Common/GmshMessage.cpp gmsh-4.5.4-source-new/Common/GmshMessage.cpp +--- gmsh-4.5.4-source/Common/GmshMessage.cpp 2020-02-22 12:48:08.000000000 +0100 ++++ gmsh-4.5.4-source-new/Common/GmshMessage.cpp 2020-03-02 11:12:53.508186591 +0100 +@@ -154,12 +154,6 @@ void Msg::Init(int argc, char **argv) + if(CTX::instance()->exeFileName.empty() && argc && argv) + CTX::instance()->exeFileName = argv[0]; -- if(_env) { -- // 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"); -- } +- // 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"); - - if(_locale) { - // make sure to use the "C" locale; in particular this ensures that we will - // use a dot for for the decimal separator when writing ASCII mesh files + InitializeOnelab("Gmsh"); + } + diff --git a/gmsh_unbundle_gl2ps.patch b/gmsh_unbundle_gl2ps.patch deleted file mode 100644 index 0c0047d..0000000 --- a/gmsh_unbundle_gl2ps.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -rupN --no-dereference gmsh-4.15.0-source/CMakeLists.txt gmsh-4.15.0-source-new/CMakeLists.txt ---- gmsh-4.15.0-source/CMakeLists.txt 2025-11-16 12:11:30.943987998 +0100 -+++ gmsh-4.15.0-source-new/CMakeLists.txt 2025-11-16 12:11:30.948218140 +0100 -@@ -1728,6 +1728,8 @@ if(NOT ENABLE_BUILD_DYNAMIC AND NOT ENAB - endif() - endif() - -+list(APPEND LINK_LIBRARIES -lgl2ps -lGL) -+ - # Linux-specific linker options - if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - if(HAVE_OCC) -diff -rupN --no-dereference gmsh-4.15.0-source/src/graphics/CMakeLists.txt gmsh-4.15.0-source-new/src/graphics/CMakeLists.txt ---- gmsh-4.15.0-source/src/graphics/CMakeLists.txt 2025-10-01 16:39:02.000000000 +0200 -+++ gmsh-4.15.0-source-new/src/graphics/CMakeLists.txt 2025-11-16 12:11:30.948782419 +0100 -@@ -15,7 +15,6 @@ set(SRC - drawScales.cpp - drawGraph2d.cpp - drawGlyph.cpp -- gl2ps.cpp - gl2gif.cpp - gl2jpeg.cpp - gl2png.cpp diff --git a/sources b/sources index 753782a..1b02bef 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gmsh-4.15.0-source-fedora.tar.xz) = eac4f6e8cd342ec07e1a83cae966d81716e1d158398ed930c82322b61785f8ab38c84ec07efc91f7be523d872e3331e1a64ce81b20a8c899a82107fab9834add +SHA512 (gmsh-4.5.4-source-fedora.tar.xz) = ebe4b1561204779f059d40c118ab11bd0ba3ebfe09678fba5cd0dec54560b057bf8bbdb02267fae94b0f23293fdb7f0344acd9213e69dcc90b9f5b96359ebfad