summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-libs/mathgl/mathgl-2.1.3.1.ebuild
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-libs/mathgl/mathgl-2.1.3.1.ebuild')
-rw-r--r--sci-libs/mathgl/mathgl-2.1.3.1.ebuild149
1 files changed, 149 insertions, 0 deletions
diff --git a/sci-libs/mathgl/mathgl-2.1.3.1.ebuild b/sci-libs/mathgl/mathgl-2.1.3.1.ebuild
new file mode 100644
index 000000000000..7f0ff4af3215
--- /dev/null
+++ b/sci-libs/mathgl/mathgl-2.1.3.1.ebuild
@@ -0,0 +1,149 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+WX_GTK_VER=2.8
+
+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"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc fltk gif glut gsl hdf hdf5 jpeg mpi octave opengl pdf
+ png python qt4 static-libs threads wxwidgets zlib"
+
+LANGS="ru"
+for l in ${LANGS}; do
+ IUSE+=" linguas_${l}"
+done
+
+RDEPEND="
+ !sci-visualization/udav
+ virtual/opengl
+ fltk? ( x11-libs/fltk:1 )
+ gif? ( media-libs/giflib )
+ glut? ( media-libs/freeglut )
+ gsl? ( sci-libs/gsl )
+ hdf? ( sci-libs/hdf )
+ hdf5? ( >=sci-libs/hdf5-1.8[mpi=] )
+ jpeg? ( virtual/jpeg:0 )
+ octave? ( >=sci-mathematics/octave-3.4.0 )
+ pdf? ( media-libs/libharu )
+ png? ( media-libs/libpng:0 )
+ python? ( dev-python/numpy[${PYTHON_USEDEP}] ${PYTHON_DEPS} )
+ qt4? ( dev-qt/qtgui:4 )
+ wxwidgets? ( x11-libs/wxGTK:2.8[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 )
+ 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() {
+ unpack ${A}
+ [[ -d "${S}"/fonts ]] || mkdir "${S}"/fonts
+ 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
+ use python && append-cppflags -I"$(${EPYTHON} -c 'import numpy; print(numpy.get_include())')"
+
+ epatch "${FILESDIR}"/${P}-x11.patch
+}
+
+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-doc)
+ $(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 mpi enable-mpi)
+ $(cmake-utils_use octave enable-octave)
+ $(cmake-utils_use opengl enable-opengl)
+ $(cmake-utils_use pdf enable-pdf)
+ $(cmake-utils_use png enable-png)
+ $(cmake-utils_use qt4 enable-qt)
+ $(cmake-utils_use threads enable-pthread)
+ $(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
+ use static-libs || rm "${ED}"/usr/$(get_libdir)/*.a
+ if use qt4 ; 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
+}