From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CACD7139083 for ; Wed, 20 Dec 2017 03:27:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E15D5E0E72; Wed, 20 Dec 2017 03:27:52 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id ABBAAE0E72 for ; Wed, 20 Dec 2017 03:27:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 873DA3406D1 for ; Wed, 20 Dec 2017 03:27:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EEF16AE70 for ; Wed, 20 Dec 2017 03:27:46 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1513740441.041341aa8a089d7f8b7e7cd35a6722085df64629.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/mathgl/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/mathgl/mathgl-2.3.4-r1.ebuild X-VCS-Directories: sci-libs/mathgl/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 041341aa8a089d7f8b7e7cd35a6722085df64629 X-VCS-Branch: master Date: Wed, 20 Dec 2017 03:27:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: faa964a8-4d95-4440-8630-53585fac4bfd X-Archives-Hash: 5e42bec4bce52bdd967132bb4f6235b9 commit: 041341aa8a089d7f8b7e7cd35a6722085df64629 Author: Andreas Sturmlechner gentoo org> AuthorDate: Wed Dec 20 03:26:26 2017 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Wed Dec 20 03:27:21 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=041341aa sci-libs/mathgl: Fix USE=qt5 DEPENDs, drop USE=qt4 Bug: https://bugs.gentoo.org/540218 Bug: https://bugs.gentoo.org/596150 Closes: https://bugs.gentoo.org/578752 Package-Manager: Portage-2.3.19, Repoman-2.3.6 sci-libs/mathgl/mathgl-2.3.4-r1.ebuild | 177 +++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) diff --git a/sci-libs/mathgl/mathgl-2.3.4-r1.ebuild b/sci-libs/mathgl/mathgl-2.3.4-r1.ebuild new file mode 100644 index 00000000000..f42b9c87871 --- /dev/null +++ b/sci-libs/mathgl/mathgl-2.3.4-r1.ebuild @@ -0,0 +1,177 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +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.4.1" +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+=" linguas_${l}" +done +unset l + +RDEPEND=" + !sci-visualization/udav + 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} )" + +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() { + cmake-utils_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 + # fix missing include, bug 564204 + sed \ + -e '/#include /i #include ' \ + -i json/Backend.hpp || die + + use python && \ + append-cppflags \ + -I"$(${EPYTHON} -c 'import numpy; print(numpy.get_include())')" + use wxwidgets && need-wxwidgets unicode +} + +src_configure() { + local mycmakeargs=( + # No clue about this option: + # option(enable-mgl2 "Use names 'libmgl2-*' instead of 'libmgl-*'") + -DHDF4_INCLUDE_DIR="${EPREFIX}/usr/include" + -DMGL_LIB_INSTALL_DIR="$(get_libdir)" + $(cmake-utils_use doc enable-all-docs) + $(cmake-utils_use fltk enable-fltk) + $(cmake-utils_use gif enable-gif) + $(cmake-utils_use glut enable-glut) + $(cmake-utils_use gsl enable-gsl) + $(cmake-utils_use hdf enable-hdf4) + $(cmake-utils_use hdf5 enable-hdf5_18) + $(cmake-utils_use jpeg enable-jpeg) + $(cmake-utils_use lua enable-lua) + $(cmake-utils_use mpi enable-mpi) + $(cmake-utils_use octave enable-octave) + $(cmake-utils_use opengl enable-opengl) + $(cmake-utils_use openmp enable-openmp) + $(cmake-utils_use pdf enable-pdf) + $(cmake-utils_use png enable-png) + -Denable-qt4=OFF + $(cmake-utils_use qt5 enable-qt5) + $(cmake-utils_use qt5 enable-qt5asqt) + $(cmake-utils_use threads enable-pthread) + $(cmake-utils_use threads enable-pthr-widget) + $(cmake-utils_use python enable-python) + $(cmake-utils_use wxwidgets enable-wx) + $(cmake-utils_use zlib enable-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 linguas_${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 +}