summaryrefslogtreecommitdiff
path: root/sci-libs/cgnslib
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/cgnslib')
-rw-r--r--sci-libs/cgnslib/Manifest4
-rw-r--r--sci-libs/cgnslib/cgnslib-4.4.0-r1.ebuild2
-rw-r--r--sci-libs/cgnslib/cgnslib-4.4.0-r2.ebuild106
-rw-r--r--sci-libs/cgnslib/files/cgnslib-4.4.0-c99.patch55
4 files changed, 165 insertions, 2 deletions
diff --git a/sci-libs/cgnslib/Manifest b/sci-libs/cgnslib/Manifest
index 4991ae8ce801..434c97db48cf 100644
--- a/sci-libs/cgnslib/Manifest
+++ b/sci-libs/cgnslib/Manifest
@@ -1,5 +1,7 @@
+AUX cgnslib-4.4.0-c99.patch 1858 BLAKE2B 357a63c31eaa1af5da44a427cd39a2e9ab994871d814ed53e729dfbec9aca148d148c53281b48b7073e7b5dd1f62fea827fbdeaef59b9a6bf27e4e8f12f2d2fc SHA512 f20b2ad63e7278c0290c29044fb7a0242a7f3cfb88ab71b18ee09925715a8b86076d85bb45b0eb54743560859c0c13418ff213c0fd15148f2de2c000cea52d0c
DIST cgnslib-4.3.0.tar.gz 1472044 BLAKE2B 8fa59eb2c13b163553c03991af1886d2162295367094937c3b7bbbc687f098e736a927fb6835fabb43ecfbe59edcf0e58e8977e89eeb1ef12b26568fbdc78e2c SHA512 5db97b8df8cb5b108a65513e20774881c1dfa790dd96bec46119883d934db18e3f88450d287690cb785e0875af87a3ec32b6c4665c54edb623161122ee85aa93
DIST cgnslib-4.4.0.tar.gz 1979828 BLAKE2B 1bf7a5eb8a69a488707da6e945228e053486cdfc64508ae6362ca84777bb5c22a7238676f24ca453cc8b5e2825482d473a2b84c1648849bb6f853fc0aa0a9100 SHA512 86c16d40b524519362645c553c91bade9bb7e4bffde7bf4de96a7f471ae3779a15781efa91efa059b2af0b127f08a560d2e903df6b45e1c79eaec6061db226e9
EBUILD cgnslib-4.3.0-r2.ebuild 2066 BLAKE2B 10a9064f30e3c2af9d17f06144d003f3d92390cb49ec45c80eaee799bbe6385c1d88f8b6097736d91cb6227435d02015d77e542465be17eafa8801cb77928df2 SHA512 e428d30c5403f230753ee655d8494df261c005dd0ee8a5820ba451e00dd7bbb229b5670a843bb5fdadebf0c7a144cfa23472fd3a5f558b69de80f2d95efd227d
-EBUILD cgnslib-4.4.0-r1.ebuild 2080 BLAKE2B 0ec63200766a71e8da91b5510e90757ca58eb5ab7ad79cfb822429a5512dd16d03a493152cf950b1948aedbb18b3d9f119e93a2bfad920bf28981c3e587c9fb4 SHA512 9bd670108e4da827a4c85729be586daafcb5d5cea3a58bf2924fc5969e1ada058d22079ad56e5ba7f64b6d0c2be0a1a30faf60c5bbec0b8928248c79a0575a9d
+EBUILD cgnslib-4.4.0-r1.ebuild 2079 BLAKE2B c81ebe2dc0773d97c1c9a6f8f44d1c049504cea1a57bfa54edd49049d08a3757708e63fb14832acd0f3e6dd903b0fad89de3f4c5d7c7132f7e81ad98edd6f298 SHA512 ee7c5ff5b7ccafe8773cb1a40dcbfca6181fa069d7749879e5b449caf7f49299f25952f830fde3037a89a326d407dc171b9f5e3c9a083b0e864ca3c7528d0226
+EBUILD cgnslib-4.4.0-r2.ebuild 2390 BLAKE2B 6e551fdc2cec94051b63b16777935ba1989a7a026c278139430f952e44eec3ba6cca946909b14629a37feb136b25af16179528b6cc346eb0d24be677c082bcf4 SHA512 56b164a2fd133badaf4cd1771352e6de407316d604b2f011f08307236acbd2b8939a9c253b01352196c601faa8d4248f0ca06f29961395d832d6bc68dd282e22
MISC metadata.xml 1273 BLAKE2B 05b98760182f6ab2586a969e7cd49a56b077f3c0f208460967b5b240cde12c3b62655223947646d48c743cb706b81e59693c693fbcdf703c75642958491d5902 SHA512 af36842f7cefc358474fd6b3646dda0974c0ee443d56babc48955340be64719b1c4548e952c93898265d6950f32bfb7db87472ca196b290ca13a8c20ed2244c2
diff --git a/sci-libs/cgnslib/cgnslib-4.4.0-r1.ebuild b/sci-libs/cgnslib/cgnslib-4.4.0-r1.ebuild
index e3836dc84986..005290743d5d 100644
--- a/sci-libs/cgnslib/cgnslib-4.4.0-r1.ebuild
+++ b/sci-libs/cgnslib/cgnslib-4.4.0-r1.ebuild
@@ -18,7 +18,7 @@ S="${WORKDIR}/CGNS-${PV}"
LICENSE="ZLIB"
SLOT="0/$(ver_cut 1-2)"
-KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
IUSE="base-scope debug examples fortran hdf5 legacy mpi scoping szip test tools"
RDEPEND="
diff --git a/sci-libs/cgnslib/cgnslib-4.4.0-r2.ebuild b/sci-libs/cgnslib/cgnslib-4.4.0-r2.ebuild
new file mode 100644
index 000000000000..53eb0c7c01ac
--- /dev/null
+++ b/sci-libs/cgnslib/cgnslib-4.4.0-r2.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FORTRAN_NEEDED="fortran"
+FORTRAN_STANDARD="90 2003"
+
+inherit cmake flag-o-matic fortran-2
+
+DESCRIPTION="CFD General Notation System standard library"
+HOMEPAGE="
+ https://cgns.github.io/
+ https://github.com/CGNS/CGNS
+"
+SRC_URI="https://github.com/CGNS/CGNS/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/CGNS-${PV}"
+
+LICENSE="ZLIB"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="base-scope debug examples fortran hdf5 legacy mpi scoping szip test tools"
+
+RDEPEND="
+ hdf5? ( sci-libs/hdf5:=[mpi=,szip=] )
+ tools? (
+ dev-lang/tcl:=
+ dev-lang/tk:=
+ x11-libs/libXmu:=
+ virtual/glu
+ virtual/opengl
+ )
+"
+DEPEND="${RDEPEND}"
+
+RESTRICT="
+ fortran? ( test )
+ !test? ( test )
+"
+REQUIRED_USE="
+ mpi? ( hdf5 )
+ szip? ( hdf5 )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.4.0-c99.patch
+)
+
+pkg_setup() {
+ use fortran && fortran-2_pkg_setup
+}
+
+src_prepare() {
+ # gentoo libdir
+ sed \
+ -e 's|/lib|/'$(get_libdir)'|' \
+ -e '/DESTINATION/s|lib|'$(get_libdir)'|g' \
+ -i src/CMakeLists.txt || die
+ cmake_src_prepare
+}
+
+src_configure() {
+ # -Werror=lto-type-mismatch
+ # https://bugs.gentoo.org/862684
+ # https://github.com/CGNS/CGNS/issues/758
+ filter-lto
+
+ # Needed for 4.4.0-c99.patch as it uses an internal header (bug #934122)
+ local tk_ver=$(best_version dev-lang/tk)
+ tk_ver=${tk_ver#dev-lang/tk-}
+ tk_ver=$(ver_cut 1-2 ${tk_ver})
+ append-cppflags -I"${ESYSROOT}/usr/$(get_libdir)/tk${tk_ver}/include/generic"
+
+ local mycmakeargs=(
+ -DCGNS_BUILD_SHARED=ON
+ -DCGNS_USE_SHARED=ON
+
+ -DCGNS_BUILD_CGNSTOOLS="$(usex tools)"
+ -DCGNS_ENABLE_BASE_SCOPE="$(usex base-scope)"
+ -DCGNS_ENABLE_FORTRAN="$(usex fortran)"
+ -DCGNS_ENABLE_HDF5="$(usex hdf5)"
+ -DCGNS_ENABLE_LEGACY="$(usex legacy)"
+ -DCGNS_ENABLE_SCOPING="$(usex scoping)"
+ -DCGNS_ENABLE_MEM_DEBUG="$(usex debug)"
+ -DCGNS_ENABLE_TESTS="$(usex test)"
+ )
+
+ if use mpi; then
+ mycmakeargs+=(
+ -DHDF5_NEED_MPI="$(usex mpi)"
+ -DHDF5_NEED_SZIP="$(usex szip)"
+ -DHDF5_NEED_ZLIB="$(usex szip)"
+ )
+ fi
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ dodoc README.md release_docs/{HISTORY,RELEASE,changes_from_2.5}.txt
+ rm "${ED}/usr/$(get_libdir)/libcgns.a" || die
+ dodoc release_docs/*.pdf
+ docompress -x /usr/share/doc/${PF}/examples
+ use examples && dodoc -r src/examples
+}
diff --git a/sci-libs/cgnslib/files/cgnslib-4.4.0-c99.patch b/sci-libs/cgnslib/files/cgnslib-4.4.0-c99.patch
new file mode 100644
index 000000000000..f0caba2045a6
--- /dev/null
+++ b/sci-libs/cgnslib/files/cgnslib-4.4.0-c99.patch
@@ -0,0 +1,55 @@
+https://github.com/CGNS/CGNS/pull/757
+https://github.com/CGNS/CGNS/pull/757
+
+From 4d791bccf1f2341de9091eb22d2ce225ec9139f7 Mon Sep 17 00:00:00 2001
+From: Mickael Philit <mickey.phy@gmail.com>
+Date: Sun, 3 Mar 2024 20:54:39 +0100
+Subject: [PATCH] backport gcc14 fedora patch
+
+---
+ src/cgnstools/tkogl/gencyl.c | 4 ++--
+ src/cgnstools/tkogl/tkogl.c | 8 +++++++-
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/src/cgnstools/tkogl/gencyl.c b/src/cgnstools/tkogl/gencyl.c
+index cc36c4ba6..b64d777f4 100644
+--- a/src/cgnstools/tkogl/gencyl.c
++++ b/src/cgnstools/tkogl/gencyl.c
+@@ -682,8 +682,8 @@ RenderModel (Model* model)
+ Vector normal;
+ GLdouble v [3];
+ obj = gluNewTess();
+- gluTessCallback(obj, GLU_BEGIN, glBegin);
+- gluTessCallback(obj, GLU_VERTEX, glVertex3fv);
++ gluTessCallback(obj, GLU_BEGIN, (_GLUfuncptr)glBegin);
++ gluTessCallback(obj, GLU_VERTEX, (_GLUfuncptr)glVertex3fv);
+ gluTessCallback(obj, GLU_END, glEnd);
+ if (flags&CLOSE_FIRST) {
+ CrossSection *a = model->cross [0];
+diff --git a/src/cgnstools/tkogl/tkogl.c b/src/cgnstools/tkogl/tkogl.c
+index e697e735e..506599d54 100644
+--- a/src/cgnstools/tkogl/tkogl.c
++++ b/src/cgnstools/tkogl/tkogl.c
+@@ -22,6 +22,12 @@
+ #include "printstr.h"
+ #include "feedback.h"
+
++#if ! defined(__WIN32__) && ! defined(_WIN32)
++/* For TkWmAddToColormapWindows. */
++#define _TKPORT /* Typical installations cannot find tkPort.h. */
++#include <tkInt.h>
++#endif
++
+ #ifndef CONST
+ # define CONST
+ #endif
+@@ -599,7 +605,7 @@ OGLwinCmd(clientData, interp, argc, argv)
+
+ if ((Tk_Parent(tkwin) != NULL) &&
+ (Tk_Colormap(tkwin) != Tk_Colormap (Tk_Parent(tkwin)))) {
+- TkWmAddToColormapWindows(tkwin);
++ TkWmAddToColormapWindows((TkWindow *)tkwin);
+ }
+
+ /* See if this window will share display lists with another */
+