diff options
author | Pacho Ramos <pacho@gentoo.org> | 2023-11-24 15:04:23 +0100 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2023-11-24 15:30:30 +0100 |
commit | b7e1372b7791f70b4f162a8ef5762c892633b4c7 (patch) | |
tree | 502f97c4088d70f7a32a7c92d33842b10cca212f /sci-libs/mathgl | |
parent | sci-electronics/gspiceui: Port to wxGTK 3.2 (diff) | |
download | gentoo-b7e1372b7791f70b4f162a8ef5762c892633b4c7.tar.gz gentoo-b7e1372b7791f70b4f162a8ef5762c892633b4c7.tar.bz2 gentoo-b7e1372b7791f70b4f162a8ef5762c892633b4c7.zip |
sci-libs/mathgl: add 8.0.1
Closes: https://bugs.gentoo.org/587150
Closes: https://bugs.gentoo.org/886468
Closes: https://bugs.gentoo.org/873457
Closes: https://bugs.gentoo.org/808713
Closes: https://bugs.gentoo.org/780318
Closes: https://bugs.gentoo.org/711154
Signed-off-by: Pacho Ramos <pacho@gentoo.org>
Diffstat (limited to 'sci-libs/mathgl')
-rw-r--r-- | sci-libs/mathgl/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/mathgl/files/mathgl-libharu2.4.patch | 25 | ||||
-rw-r--r-- | sci-libs/mathgl/mathgl-8.0.1.ebuild | 145 |
3 files changed, 171 insertions, 0 deletions
diff --git a/sci-libs/mathgl/Manifest b/sci-libs/mathgl/Manifest index ed743f578265..9a1cf0f5c874 100644 --- a/sci-libs/mathgl/Manifest +++ b/sci-libs/mathgl/Manifest @@ -1,2 +1,3 @@ DIST STIX_font.tgz 2450541 BLAKE2B f725eb0264d9c3cb7c32a935e8857c4a21cb905a1dc6c9cc8a16408afdc7dd9b6fcd312a8c2f77aff5484605a39a9ee36e86ad0234adb5d6bcc5c8839101194c SHA512 c9124ec552074c98f15d6d3572a063598ca6bc598e3e78dcb5a5d57ae3928b5327a1374635f428ea1cefc9e51ee1d1aa9bd6ba9a306429fc6965140251d368b5 DIST mathgl-2.4.4.tar.gz 23917716 BLAKE2B 11d36195c65b11f0eedbc1c946f600fd33bdc6ab8d3ff95c65634300527b2e06ffbb6615e4425896b87435fdb45bfad806f00e79edd26af4ab67bf223695d5cf SHA512 6955cb3630b4c17ab7eeb7542569a7fba653f592640f30700988abe340ecb17f09f1cbcd3903232797e9debc9f74ba2ea1f76f51935749bc8dec5e05951bb573 +DIST mathgl-8.0.1.tar.gz 23979834 BLAKE2B 275301c945ea15a38d1c75fd509c126425080b811403d5a8c8e864c8a975b914b5f0909bdc2c0de2feb84638ef0655694cd4d0c2aec8fb537c937147d81608c9 SHA512 1ff3023f1bbd7bfd84202777a0166a8d4255a020a07f3650b9858929345bc8a2ceea4db155d2c93ba32b762d2304474276290a9edac99fda70fb4b5bc12982c2 diff --git a/sci-libs/mathgl/files/mathgl-libharu2.4.patch b/sci-libs/mathgl/files/mathgl-libharu2.4.patch new file mode 100644 index 000000000000..fb0acb5da547 --- /dev/null +++ b/sci-libs/mathgl/files/mathgl-libharu2.4.patch @@ -0,0 +1,25 @@ +diff -up mathgl-8.0.1/src/prc.cpp.libharu2.4 mathgl-8.0.1/src/prc.cpp +--- mathgl-8.0.1/src/prc.cpp.libharu2.4 2022-01-11 13:48:53.000000000 -0700 ++++ mathgl-8.0.1/src/prc.cpp 2022-10-05 21:10:18.640050969 -0600 +@@ -36,6 +36,7 @@ + #include <hpdf.h>
+ #include <hpdf_u3d.h>
+ #include <hpdf_annotation.h>
++#include <hpdf_version.h>
+ #endif // MGL_HAVE_PDF
+
+
+@@ -959,7 +960,12 @@ void MGL_EXPORT mgl_write_prc(HMGL gr, c + HPDF_U3D_SetDefault3DView(u3d, "DefaultView");
+
+ // Create annotation
+- annot = HPDF_Page_Create3DAnnot (page, rect, u3d );
++ annot
++#if HPDF_VERSION_ID >= 20400
++ = HPDF_Page_Create3DAnnot (page, rect, HPDF_FALSE, HPDF_FALSE, u3d, NULL);
++#else
++ = HPDF_Page_Create3DAnnot (page, rect, u3d );
++#endif
+
+ // Enable toolbar
+ HPDF_Dict action = (HPDF_Dict)HPDF_Dict_GetItem (annot, "3DA", HPDF_OCLASS_DICT);
diff --git a/sci-libs/mathgl/mathgl-8.0.1.ebuild b/sci-libs/mathgl/mathgl-8.0.1.ebuild new file mode 100644 index 000000000000..bc9909e31c95 --- /dev/null +++ b/sci-libs/mathgl/mathgl-8.0.1.ebuild @@ -0,0 +1,145 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +WX_GTK_VER="3.2-gtk3" + +inherit cmake wxwidgets multilib flag-o-matic xdg + +DESCRIPTION="Math Graphics Library" +HOMEPAGE="https://mathgl.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="LGPL-3+" +SLOT="0/7.5.0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc fltk gif glut gsl hdf hdf5 jpeg mpi octave opengl openmp pdf + png qt5 static-libs threads wxwidgets zlib" + +LANGS="ru" +for l in ${LANGS}; do + IUSE+=" l10n_${l}" +done +unset l + +RDEPEND=" + virtual/opengl + fltk? ( x11-libs/fltk:1 ) + gif? ( media-libs/giflib ) + glut? ( media-libs/freeglut ) + gsl? ( >=sci-libs/gsl-2:= ) + hdf? ( sci-libs/hdf ) + hdf5? ( >=sci-libs/hdf5-1.8[mpi=] ) + jpeg? ( virtual/jpeg:0 ) + octave? ( >=sci-mathematics/octave-3.4.0 ) + openmp? ( sys-cluster/openmpi ) + pdf? ( media-libs/libharu ) + png? ( media-libs/libpng:0 ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtprintsupport:5 + dev-qt/qtwidgets:5 + ) + wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] ) + zlib? ( sys-libs/zlib )" +DEPEND="${RDEPEND}" +BDEPEND="doc? ( app-text/texi2html virtual/texi2dvi ) + octave? ( dev-lang/swig )" + +REQUIRED_USE=" + mpi? ( hdf5 ) + openmp? ( !threads ) + png? ( zlib ) + pdf? ( png )" + +pkg_setup() { + use mpi && export CC=mpicc CXX=mpicxx +} + +PATCHES=( + # From Fedora + "${FILESDIR}"/${PN}-libharu2.4.patch +) + +src_prepare() { + # Prevent sandbox violation + sed -i -e 's/update-mime-database/true/' udav/CMakeLists.txt || die + sed -i -e 's/update-desktop-database/true/' udav/CMakeLists.txt || die + cmake_src_prepare +} + +src_configure() { + use wxwidgets && setup-wxwidgets unicode + + local mycmakeargs=() + if use hdf; then + mycmakeargs+=( + -DHDF4_INCLUDE_DIR="${EPREFIX}/usr/include" + ) + fi + mycmakeargs+=( + # No clue about this option: + # option(enable-mgl2 "Use names 'libmgl2-*' instead of 'libmgl-*'") + -DMathGL_INSTALL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)" + -Denable-all-docs=$(usex doc) + -Denable-fltk=$(usex fltk) + -Denable-gif=$(usex gif) + -Denable-glut=$(usex glut) + -Denable-gsl=$(usex gsl) + -Denable-hdf4=$(usex hdf) + -Denable-hdf5=$(usex hdf5) + -Denable-jpeg=$(usex jpeg) + -Denable-mpi=$(usex mpi) + -Denable-octave=$(usex octave) + -Denable-opengl=$(usex opengl) + -Denable-openmp=$(usex openmp) + -Denable-pdf=$(usex pdf) + -Denable-png=$(usex png) + -Denable-qt4=OFF + -Denable-qt5=$(usex qt5) + -Denable-qt5asqt=$(usex qt5) + -Denable-pthread=$(usex threads) + -Denable-pthr-widget=$(usex threads) + -Denable-python=OFF + -Denable-wx=$(usex wxwidgets) + -Denable-zlib=$(usex zlib) + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + dodoc README* *.txt AUTHORS + if ! use static-libs; then + rm "${ED}"/usr/$(get_libdir)/*.a || die + fi + if use qt5 ; then + local lang + insinto /usr/share/udav + for lang in ${LANGS} ; do + use l10n_${lang} && doins udav/udav_${lang}.qm + done + fi + if use octave ; then + insinto /usr/share/${PN}/octave + doins "${CMAKE_BUILD_DIR}"/lang/${PN}.tar.gz + fi +} + +pkg_postinst() { + if use octave; then + octave <<-EOF + pkg install ${EROOT}/usr/share/${PN}/octave/${PN}.tar.gz + EOF + fi + xdg_pkg_postinst +} + +pkg_prerm() { + if use octave; then + octave <<-EOF + pkg uninstall ${PN} + EOF + fi +} |