diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2012-08-04 18:10:03 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2012-08-04 18:10:03 +0000 |
commit | bc6de669f9d382cd4f72e35f5ff68f95ad71c68f (patch) | |
tree | 5188fe6d9c6687e31116dc29877af3418e2bb780 /sci-libs/mathgl | |
parent | Block newer mathgl (diff) | |
download | gentoo-2-bc6de669f9d382cd4f72e35f5ff68f95ad71c68f.tar.gz gentoo-2-bc6de669f9d382cd4f72e35f5ff68f95ad71c68f.tar.bz2 gentoo-2-bc6de669f9d382cd4f72e35f5ff68f95ad71c68f.zip |
Added double-precision flag, linguas (only russian for now). Now blocks old udav. Fix numpy include directory (bug #429806), fix octave installation (bug #429804). Some of the features inspired from rion-overlay
(Portage version: 2.2.01.20796-prefix/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/mathgl')
-rw-r--r-- | sci-libs/mathgl/ChangeLog | 9 | ||||
-rw-r--r-- | sci-libs/mathgl/files/mathgl-2.0.3-fix-hardcoded-paths.patch | 48 | ||||
-rw-r--r-- | sci-libs/mathgl/mathgl-1.11.1.1.ebuild | 148 | ||||
-rw-r--r-- | sci-libs/mathgl/mathgl-2.0.3.ebuild | 40 | ||||
-rw-r--r-- | sci-libs/mathgl/metadata.xml | 1 |
5 files changed, 91 insertions, 155 deletions
diff --git a/sci-libs/mathgl/ChangeLog b/sci-libs/mathgl/ChangeLog index 2c95a9ab927c..c63fe54b84a0 100644 --- a/sci-libs/mathgl/ChangeLog +++ b/sci-libs/mathgl/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sci-libs/mathgl # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/mathgl/ChangeLog,v 1.28 2012/08/04 02:05:04 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/mathgl/ChangeLog,v 1.29 2012/08/04 18:10:02 bicatali Exp $ + + 04 Aug 2012; Sébastien Fabbro <bicatali@gentoo.org> + +files/mathgl-2.0.3-fix-hardcoded-paths.patch, -mathgl-1.11.1.1.ebuild, + mathgl-2.0.3.ebuild, metadata.xml: + Added double-precision flag, linguas (only russian for now). Now blocks old + udav. Fix numpy include directory (bug #429806), fix octave installation (bug + #429804). Some of the features inspired from rion-overlay *mathgl-2.0.3 (04 Aug 2012) diff --git a/sci-libs/mathgl/files/mathgl-2.0.3-fix-hardcoded-paths.patch b/sci-libs/mathgl/files/mathgl-2.0.3-fix-hardcoded-paths.patch new file mode 100644 index 000000000000..4a9a4b13a4a9 --- /dev/null +++ b/sci-libs/mathgl/files/mathgl-2.0.3-fix-hardcoded-paths.patch @@ -0,0 +1,48 @@ +diff -Nur mathgl-2.0_orig/include/mgl2/define.h mathgl-2.0/include/mgl2/define.h +--- mathgl-2.0_orig/include/mgl2/define.h 2012-04-12 18:12:24.000000000 +0700 ++++ mathgl-2.0/include/mgl2/define.h 2012-05-17 10:41:30.270686620 +0700 +@@ -84,7 +84,7 @@ + #ifdef WIN32
+ #define MGL_FONT_PATH "." // path to fonts
+ #else
+-#define MGL_FONT_PATH "/usr/local/share/mathgl/fonts" // path to fonts
++#define MGL_FONT_PATH "/usr/share/mathgl/fonts" // path to fonts
+ #endif
+ #endif
+ //-----------------------------------------------------------------------------
+diff -Nur mathgl-2.0_orig/udav/prop_dlg.cpp mathgl-2.0/udav/prop_dlg.cpp +--- mathgl-2.0_orig/udav/prop_dlg.cpp 2012-04-12 18:12:43.000000000 +0700 ++++ mathgl-2.0/udav/prop_dlg.cpp 2012-05-17 10:41:01.377677011 +0700 +@@ -111,7 +111,7 @@ + << QCoreApplication::applicationDirPath()+"/fonts";
+ filter << "*.vfm";
+ #ifndef WIN32
+- paths << "/usr/local/share/mathgl/fonts/" << "/usr/local/mathgl/fonts/";
++ paths << "/usr/share/mathgl/fonts/" << "/usr/mathgl/fonts/";
+ #endif
+ QFileInfoList info;
+ for(int i=0;i<paths.count();i++)
+diff -Nur mathgl-2.0_orig/udav/udav_wnd.cpp mathgl-2.0/udav/udav_wnd.cpp +--- mathgl-2.0_orig/udav/udav_wnd.cpp 2012-04-12 18:12:43.000000000 +0700 ++++ mathgl-2.0/udav/udav_wnd.cpp 2012-05-17 10:41:19.438683016 +0700 +@@ -70,7 +70,7 @@ + #ifdef WIN32 + #define UDAV_DIR "" + #else +-#define UDAV_DIR "/usr/local/share/udav/" ++#define UDAV_DIR "/usr/share/udav/" + #endif + #endif + //----------------------------------------------------------------------------- +diff -Nur mathgl-2.0_orig/udav/udav_wnd.h mathgl-2.0/udav/udav_wnd.h +--- mathgl-2.0_orig/udav/udav_wnd.h 2012-04-12 18:12:43.000000000 +0700 ++++ mathgl-2.0/udav/udav_wnd.h 2012-05-17 10:41:11.863680509 +0700 +@@ -30,7 +30,7 @@ + #ifdef WIN32 + #define MGL_DOC_DIR "" + #else +-#define MGL_DOC_DIR "/usr/local/share/doc/mathgl/" ++#define MGL_DOC_DIR "/usr/share/doc/mathgl/" + #endif + #endif + //----------------------------------------------------------------------------- diff --git a/sci-libs/mathgl/mathgl-1.11.1.1.ebuild b/sci-libs/mathgl/mathgl-1.11.1.1.ebuild deleted file mode 100644 index 2e30815f8734..000000000000 --- a/sci-libs/mathgl/mathgl-1.11.1.1.ebuild +++ /dev/null @@ -1,148 +0,0 @@ -# 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-1.11.1.1.ebuild,v 1.2 2012/02/28 00:56:32 patrick Exp $ - -EAPI=3 - -WX_GTK_VER=2.8 -PYTHON_DEPEND="2" -SUPPORT_PYTHON_ABIS="1" -RESTRICT_PYTHON_ABIS="3.* 2.7-pypy-* *-jython" - -inherit autotools wxwidgets python versionator toolchain-funcs - -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" -IUSE="doc fltk gif glut gsl hdf5 jpeg octave python qt4 wxwidgets" - -RDEPEND="media-libs/libpng - virtual/opengl - python? ( dev-python/numpy ) - glut? ( media-libs/freeglut ) - fltk? ( x11-libs/fltk:1 ) - gif? ( media-libs/giflib ) - jpeg? ( virtual/jpeg ) - hdf5? ( >=sci-libs/hdf5-1.8 ) - gsl? ( sci-libs/gsl ) - octave? ( >=sci-mathematics/octave-3.4.0 ) - qt4? ( x11-libs/qt-gui:4 ) - wxwidgets? ( x11-libs/wxGTK:2.8 )" -DEPEND="${RDEPEND} - >=sys-devel/libtool-2.2.4 - doc? ( app-text/texi2html virtual/texi2dvi ) - python? ( dev-lang/swig ) - octave? ( dev-lang/swig )" - -pkg_setup() { - if ! version_is_at_least "4.3.0" "$(gcc-version)"; then - eerror "You need >=gcc-4.3.0 to compile this package" - die "Wrong gcc version" - fi - if use hdf5 && has_version sci-libs/hdf5[mpi]; then - export CC=mpicc - export CXX=mpicxx - fi - use python && python_pkg_setup - use wxwidgets && wxwidgets_pkg_setup -} - -src_unpack() { - unpack ${A} - mkdir "${S}"/fonts - cd "${S}"/fonts - unpack STIX_font.tgz -} - -src_prepare() { - # bug #267061 - epatch "${FILESDIR}"/${PN}-1.10.2-gcc43.patch - - # bug #358245 - epatch "${FILESDIR}"/${PN}-octave-3.4.patch - - # correct location of numpy/arrayobject.h - if use python; then - sed \ - -e '/SUBDIRS/s:lang::g' \ - -i Makefile.am || die - fi - - echo "#!${EPREFIX}/bin/sh" > config/py-compile - - eautoreconf -} - -src_configure() { - econf --docdir="${ROOT}"usr/share/doc/${PF} \ - $(use_enable glut) \ - $(use_enable qt4 qt) \ - $(use_enable wxwidgets wx) \ - $(use_enable fltk) \ - $(use_enable gif) \ - $(use_enable jpeg) \ - $(use_enable hdf5 hdf5_18) \ - $(use_enable python) \ - $(use_enable octave) \ - $(use_enable gsl) \ - $(use_enable doc docs) -} - -src_compile() { - # see bug #249627 - local JOBS - use doc && JOBS=-j1 - emake ${JOBS} || die "emake failed" - - if use python; then - python_copy_sources lang - compilation() { - local numpy_h - numpy_h=$(python_get_sitedir)/numpy/core/include/numpy/arrayobject.h - einfo "fixing numpy.i for Python-${PYTHON_ABI}" - sed -e "s|<numpy/arrayobject.h>|\"${numpy_h}\"|" \ - -i numpy.i \ - || die "sed failed" - emake PYTHON_HEADERS="-I$(python_get_includedir)" pyexecdir="$(python_get_sitedir)" - } - python_execute_function -s --source-dir lang compilation - fi -} - -src_install() { - emake DESTDIR="${D}" install || die "emake install failed" - - if use python; then - installation() { - emake DESTDIR="${D}" PYTHON="$(PYTHON)" pyexecdir="$(python_get_sitedir)" pythondir="$(python_get_sitedir)" install - } - python_execute_function -s --source-dir lang installation - python_clean_installation_image - fi - dodoc README AUTHORS || die "dodoc failed" -} - -pkg_postinst() { - if use octave; then - octave <<-EOF - pkg install /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 -} diff --git a/sci-libs/mathgl/mathgl-2.0.3.ebuild b/sci-libs/mathgl/mathgl-2.0.3.ebuild index b60641c3ff6a..25f5b4b256d4 100644 --- a/sci-libs/mathgl/mathgl-2.0.3.ebuild +++ b/sci-libs/mathgl/mathgl-2.0.3.ebuild @@ -1,6 +1,6 @@ # 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 $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/mathgl/mathgl-2.0.3.ebuild,v 1.2 2012/08/04 18:10:02 bicatali Exp $ EAPI=4 @@ -15,10 +15,16 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz mirror://sourceforge/${PN}/STIX_ 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" +IUSE="doc double-precision 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 ) @@ -64,13 +70,16 @@ src_prepare() { # bored of reporting bad libdir upstream sed -i \ -e '/DESTINATION/s:lib$:lib${LIB_SUFFIX}:g' \ - */CMakeLists.txt || diex + */CMakeLists.txt || die + echo "" > lang/install.m || die + epatch "${FILESDIR}"/${P}-fix-hardcoded-paths.patch } src_configure() { local mycmakeargs=( -DHDF4_INCLUDE_DIR="${EPREFIX}/usr/include" $(cmake-utils_use doc enable-doc) + $(cmake-utils_use double-precision enable-double) $(cmake-utils_use fltk enable-fltk) $(cmake-utils_use gif enable-gif) $(cmake-utils_use glut enable-glut) @@ -89,14 +98,33 @@ src_configure() { $(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 + # 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 + # fix location of numpy + use python && append-cppflags \ + -I$(echo "import numpy; print numpy.get_include()" | "$(PYTHON)" - 2>/dev/null) + 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 } pkg_postinst() { diff --git a/sci-libs/mathgl/metadata.xml b/sci-libs/mathgl/metadata.xml index e62c4243ffb4..a10fb761c3dc 100644 --- a/sci-libs/mathgl/metadata.xml +++ b/sci-libs/mathgl/metadata.xml @@ -14,5 +14,6 @@ </longdescription> <use> <flag name="octave">Add bindings for <pkg>sci-mathematics/octave</pkg></flag> + <flag name="double-precision">Add double precision calculations</flag> </use> </pkgmetadata> |