commit:     e77c75e99ed8208c5eafdf74af09eb9631c8c160
Author:     Jouni Kosonen <jouni.kosonen <AT> tukesoft <DOT> com>
AuthorDate: Mon Feb 19 16:05:27 2018 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Sun Apr  1 21:54:40 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e77c75e9

sci-libs/mathgl: version bump to 2.4.1.

Closes: https://bugs.gentoo.org/596150
Closes: https://github.com/gentoo/gentoo/pull/7229

 sci-libs/mathgl/Manifest                       |   1 +
 sci-libs/mathgl/files/mathgl-2.4.1-mutex.patch |  16 +++
 sci-libs/mathgl/mathgl-2.4.1.ebuild            | 180 +++++++++++++++++++++++++
 3 files changed, 197 insertions(+)

diff --git a/sci-libs/mathgl/Manifest b/sci-libs/mathgl/Manifest
index 4e77e01a129..f36f9767c84 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.3.4.tar.gz 21361705 BLAKE2B 
652cae42ace83077c5e5add2164a99d9a4f0b76a95d9ddd9b5570c04e87ce06c6cf127af85c451f74c7aa59e411c02c970e5fea7ed501a690f6d1a1456dcbd9c
 SHA512 
2ddc45750ae2373c26e199f43b7f9546e0d4540c7b11a1e6280c83632face42f50bcb8276c60b0c2208ca0b6a7506e3fc0d195a8c1aa9e774ba812643b81336d
+DIST mathgl-2.4.1.tar.gz 22665490 BLAKE2B 
a9c9e0ec7d145262994a754dfbcf1f789d2777f9334c8b4e73696265adba4d2fd7283621857318264c2162841e81427df21f7bc7b951d83876fbc066d3b9068f
 SHA512 
10fd016662ca60b9507942691f85b4d9151104319627732f4add0175475f7e8dff16e3645bb858c283b747f34e58f410d0532e94dc64cf8cf472938d3966402d

diff --git a/sci-libs/mathgl/files/mathgl-2.4.1-mutex.patch 
b/sci-libs/mathgl/files/mathgl-2.4.1-mutex.patch
new file mode 100644
index 00000000000..4ce7bb73311
--- /dev/null
+++ b/sci-libs/mathgl/files/mathgl-2.4.1-mutex.patch
@@ -0,0 +1,16 @@
+diff --git a/src/canvas.cpp b/src/canvas.cpp
+index ba4ffededb9b..7ea755d18265 100644
+--- a/src/canvas.cpp
++++ b/src/canvas.cpp
+@@ -1219,9 +1219,9 @@ void mglCanvas::Pop()
+ {
+       B = stack.back(); 
+ #if MGL_HAVE_PTHREAD
+-      pthread_mutex_lock(&m);
++      pthread_mutex_lock(&mutexStk);
+       stack.pop_back();
+-      pthread_mutex_unlock(&m);
++      pthread_mutex_unlock(&mutexStk);
+ #else
+ #pragma omp critical(stk)
+       stack.pop_back();

diff --git a/sci-libs/mathgl/mathgl-2.4.1.ebuild 
b/sci-libs/mathgl/mathgl-2.4.1.ebuild
new file mode 100644
index 00000000000..461956958f1
--- /dev/null
+++ b/sci-libs/mathgl/mathgl-2.4.1.ebuild
@@ -0,0 +1,180 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+WX_GTK_VER=3.0
+
+inherit cmake-utils eutils python-single-r1 wxwidgets multilib flag-o-matic
+
+DESCRIPTION="Math Graphics Library"
+HOMEPAGE="http://mathgl.sourceforge.net/";
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz 
mirror://sourceforge/${PN}/STIX_font.tgz"
+
+LICENSE="LGPL-3"
+SLOT="0/7.5.0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc fltk gif glut gsl hdf hdf5 jpeg lua mpi octave opengl openmp pdf
+       png python 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 )
+       lua? ( >=dev-lang/lua-5.1:0 )
+       octave? ( >=sci-mathematics/octave-3.4.0 )
+       openmp? ( sys-cluster/openmpi )
+       pdf? ( media-libs/libharu )
+       png? ( media-libs/libpng:0 )
+       python? ( dev-python/numpy[${PYTHON_USEDEP}] ${PYTHON_DEPS} )
+       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}
+       doc? ( app-text/texi2html virtual/texi2dvi )
+       octave? ( dev-lang/swig )
+       python? ( dev-lang/swig )"
+
+REQUIRED_USE="
+       mpi? ( hdf5 )
+       openmp? ( !threads )
+       png? ( zlib )
+       pdf? ( png )
+       python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-mutex.patch
+)
+
+pkg_setup() {
+       use mpi && export CC=mpicc CXX=mpicxx
+       use python && python-single-r1_pkg_setup
+}
+
+src_unpack() {
+       default
+       if ! [[ -d "${S}"/fonts ]]; then
+               mkdir "${S}"/fonts || die
+       fi
+       cd "${S}"/fonts || die
+       unpack STIX_font.tgz
+}
+
+src_prepare() {
+       # fix for location of hdf headers
+       sed -i -e 's:hdf/::g' src/data_io.cpp || die
+       # bored of reporting bad libdir upstream
+       sed -i \
+               -e '/DESTINATION/s:lib$:lib${LIB_SUFFIX}:g' \
+               {src,widgets}/CMakeLists.txt || die
+       echo "" > lang/install.m || die
+       # fix desktop file
+       sed -i -e 's/.png//' udav/udav.desktop || die
+       # 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
+
+       use python && \
+               append-cppflags \
+               -I"$(${EPYTHON} -c 'import numpy; print(numpy.get_include())')"
+       use wxwidgets && need-wxwidgets unicode
+       cmake-utils_src_prepare
+}
+
+src_configure() {
+       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-lua=$(usex lua)
+               -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=$(usex python)
+               -Denable-wx=$(usex wxwidgets)
+               -Denable-zlib=$(usex zlib)
+       )
+       cmake-utils_src_configure
+       # to whoever cares: TODO: do for multiple python ABI
+       if use python; then
+               sed -i \
+                       -e "s:--prefix=\(.*\) :--prefix=\$ENV{DESTDIR}\1 :" \
+                       "${CMAKE_BUILD_DIR}"/lang/cmake_install.cmake || die
+       fi
+}
+
+src_install() {
+       cmake-utils_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
+       use python && python_optimize
+}
+
+pkg_postinst() {
+       if use octave; then
+               octave <<-EOF
+               pkg install ${EROOT}/usr/share/${PN}/octave/${PN}.tar.gz
+               EOF
+       fi
+}
+
+pkg_prerm() {
+       if use octave; then
+               octave <<-EOF
+               pkg uninstall ${PN}
+               EOF
+       fi
+}

Reply via email to