diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2012-08-04 02:05:04 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2012-08-04 02:05:04 +0000 |
commit | 1e8a637e8f9228a6fa1e861fc3d22c7579af1277 (patch) | |
tree | 7291aeda2ab5dc123862e7f9f265e3db3fd553f6 /sci-libs/mathgl/mathgl-2.0.3.ebuild | |
parent | whitespace (diff) | |
download | gentoo-2-1e8a637e8f9228a6fa1e861fc3d22c7579af1277.tar.gz gentoo-2-1e8a637e8f9228a6fa1e861fc3d22c7579af1277.tar.bz2 gentoo-2-1e8a637e8f9228a6fa1e861fc3d22c7579af1277.zip |
Version bump. Switched to cmake, so had to rewrite from scratch
(Portage version: 2.2.01.20796-prefix/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/mathgl/mathgl-2.0.3.ebuild')
-rw-r--r-- | sci-libs/mathgl/mathgl-2.0.3.ebuild | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/sci-libs/mathgl/mathgl-2.0.3.ebuild b/sci-libs/mathgl/mathgl-2.0.3.ebuild new file mode 100644 index 000000000000..b60641c3ff6a --- /dev/null +++ b/sci-libs/mathgl/mathgl-2.0.3.ebuild @@ -0,0 +1,121 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/mathgl/mathgl-2.0.3.ebuild,v 1.1 2012/08/04 02:05:04 bicatali Exp $ + +EAPI=4 + +WX_GTK_VER=2.8 + +inherit cmake-utils eutils python wxwidgets multilib + +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" + +RDEPEND=" + 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 ) + octave? ( >=sci-mathematics/octave-3.4.0 ) + pdf? ( media-libs/libharu ) + png? ( media-libs/libpng ) + python? ( dev-python/numpy ) + qt4? ( x11-libs/qt-gui:4 ) + wxwidgets? ( x11-libs/wxGTK:2.8 ) + 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 )" + +pkg_setup() { + if use mpi; then + export CC=mpicc + export CXX=mpicxx + fi + use python && python_pkg_setup + use wxwidgets && wxwidgets_pkg_setup +} + +src_unpack() { + unpack ${A} + [[ -d "${S}"/fonts ]] || mkdir "${S}"/fonts + cd "${S}"/fonts + 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' \ + */CMakeLists.txt || diex +} + +src_configure() { + local mycmakeargs=( + -DHDF4_INCLUDE_DIR="${EPREFIX}/usr/include" + $(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 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 + sed -i -e "s:--prefix=\(.*\) :--prefix=\$ENV{DESTDIR}\1 :" \ + ${CMAKE_BUILD_DIR}/lang/cmake_install.cmake || die +} + +src_install() { + cmake-utils_src_install + dodoc README* *.txt AUTHORS + use static-libs || rm "${ED}"/usr/$(get_libdir)/*.a +} + +pkg_postinst() { + if use octave; then + octave <<-EOF + pkg install ${EROOT}/usr/share/${PN}/octave/${PN}.tar.gz + EOF + fi + use python && python_mod_optimize ${PN}.py +} + +pkg_prerm() { + if use octave; then + octave <<-EOF + pkg uninstall ${PN} + EOF + fi +} + +pkg_postrm() { + use python && python_mod_cleanup ${PN}.py +} |