summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Rossi <rossi.f@inwind.it>2022-05-24 13:57:04 +0200
committerMatthias Maier <tamiko@gentoo.org>2022-06-06 00:49:21 -0500
commit7124c42f8e7ff9926f8474f49cc0c9a3870391d7 (patch)
tree3cddad3979bfdc9742a3b8ba4d0b22be6aff6080 /sci-libs/gmsh
parentdev-python/stevedore: Bump to 3.5.0 (diff)
downloadgentoo-7124c42f8e7ff9926f8474f49cc0c9a3870391d7.tar.gz
gentoo-7124c42f8e7ff9926f8474f49cc0c9a3870391d7.tar.bz2
gentoo-7124c42f8e7ff9926f8474f49cc0c9a3870391d7.zip
sci-libs/gmsh: various improvements
* removed deprecated dep * fixed installation with USE=examples * fixed detection of opencascade * now the private API is also exported with USE=shared Signed-off-by: Fabio Rossi <rossi.f@inwind.it> Bug: https://bugs.gentoo.org/835702 Bug: https://bugs.gentoo.org/835194 Signed-off-by: Matthias Maier <tamiko@gentoo.org>
Diffstat (limited to 'sci-libs/gmsh')
-rw-r--r--sci-libs/gmsh/files/gmsh-4.9.5-opencascade.patch20
-rw-r--r--sci-libs/gmsh/gmsh-4.9.5-r2.ebuild80
2 files changed, 100 insertions, 0 deletions
diff --git a/sci-libs/gmsh/files/gmsh-4.9.5-opencascade.patch b/sci-libs/gmsh/files/gmsh-4.9.5-opencascade.patch
new file mode 100644
index 000000000000..63281d42e1f2
--- /dev/null
+++ b/sci-libs/gmsh/files/gmsh-4.9.5-opencascade.patch
@@ -0,0 +1,20 @@
+--- ./CMakeLists.txt 2022-05-24 12:36:43.084752081 +0200
++++ ./CMakeLists.txt.new 2022-05-24 12:44:08.895710126 +0200
+@@ -1282,7 +1282,7 @@
+ else()
+ set(OCC_LIBS)
+ foreach(OCC ${OCC_LIBS_REQUIRED})
+- find_library(OCC_LIB ${OCC} HINTS ENV CASROOT PATH_SUFFIXES
++ find_library(OCC_LIB ${OCC} HINTS ENV CASROOT PATH_SUFFIXES opencascade
+ lib ${OCC_SYS_NAME}/vc8/lib ${OCC_SYS_NAME}/vc9/lib
+ ${OCC_SYS_NAME}/vc10/lib ${OCC_SYS_NAME}/vc11/lib
+ ${OCC_SYS_NAME}/vc12/lib ${OCC_SYS_NAME}/vc14/lib
+@@ -1308,7 +1308,7 @@
+ list(LENGTH OCC_CAF_LIBS_REQUIRED NUM_OCC_CAF_LIBS_REQUIRED)
+ set(OCC_CAF_LIBS)
+ foreach(OCC ${OCC_CAF_LIBS_REQUIRED})
+- find_library(OCC_CAF_LIB ${OCC} HINTS ENV CASROOT PATH_SUFFIXES
++ find_library(OCC_CAF_LIB ${OCC} HINTS ENV CASROOT PATH_SUFFIXES opencascade
+ lib ${OCC_SYS_NAME}/vc8/lib ${OCC_SYS_NAME}/vc9/lib
+ ${OCC_SYS_NAME}/vc10/lib ${OCC_SYS_NAME}/vc11/lib
+ ${OCC_SYS_NAME}/vc12/lib ${OCC_SYS_NAME}/vc14/lib
diff --git a/sci-libs/gmsh/gmsh-4.9.5-r2.ebuild b/sci-libs/gmsh/gmsh-4.9.5-r2.ebuild
new file mode 100644
index 000000000000..ece42634909b
--- /dev/null
+++ b/sci-libs/gmsh/gmsh-4.9.5-r2.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit cmake fortran-2 python-any-r1 toolchain-funcs
+
+DESCRIPTION="A three-dimensional finite element mesh generator"
+HOMEPAGE="http://www.geuz.org/gmsh/"
+SRC_URI="http://www.geuz.org/gmsh/src/${P}-source.tgz"
+
+LICENSE="GPL-3 free-noncomm"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+## cgns is not compiling ATM, maybe fix cgns lib first
+IUSE="blas cgns examples jpeg med metis mpi netgen opencascade petsc png python shared X zlib"
+
+REQUIRED_USE="med? ( mpi )"
+
+RDEPEND="
+ virtual/fortran
+ X? ( x11-libs/fltk:1[xft] )
+ blas? ( virtual/blas virtual/lapack sci-libs/fftw:3.0 )
+ cgns? ( sci-libs/cgnslib )
+ jpeg? ( media-libs/libjpeg-turbo )
+ med? ( sci-libs/med[mpi] )
+ opencascade? ( sci-libs/opencascade:* )
+ png? ( media-libs/libpng:0 )
+ petsc? ( sci-mathematics/petsc[mpi=] )
+ zlib? ( sys-libs/zlib )
+ mpi? ( virtual/mpi[cxx] )"
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+ python? ( dev-lang/swig:0 )
+ "
+
+S="${WORKDIR}"/${P}-source
+
+PATCHES=( "${FILESDIR}"/$P-opencascade.patch )
+
+pkg_setup() {
+ fortran-2_pkg_setup
+}
+
+src_configure() {
+ local mycmakeargs=( )
+
+ use blas && \
+ mycmakeargs+=(-DCMAKE_Fortran_COMPILER=$(tc-getF77))
+
+ mycmakeargs+=(
+ -DENABLE_BLAS_LAPACK="$(usex blas)"
+ -DENABLE_BUILD_DYNAMIC="$(usex shared)"
+ -DENABLE_CGNS="$(usex cgns)"
+ -DENABLE_FLTK="$(usex X)"
+ -DENABLE_GRAPHICS="$(usex X)"
+ -DENABLE_MED="$(usex med)"
+ -DENABLE_MPI="$(usex mpi)"
+ -DENABLE_METIS="$(usex metis)"
+ -DENABLE_NETGEN="$(usex netgen)"
+ -DENABLE_OCC="$(usex opencascade)"
+ -DENABLE_PETSC="$(usex petsc)"
+ -DENABLE_PRIVATE_API="$(usex shared)"
+ -DENABLE_WRAP_PYTHON="$(usex python)")
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ if use examples ; then
+ dodoc -r examples tutorials
+ docompress -x /usr/share/doc/${PF}/{examples,tutorials}
+ fi
+}