commit: 585d5b592d35130304541dcd3d17f0f8714a8343 Author: Justin Lecher <jlec <AT> gentoo <DOT> org> AuthorDate: Sat Feb 20 15:29:17 2016 +0000 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> CommitDate: Sat Feb 20 15:39:18 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=585d5b59
sci-libs/mathgl: Add compatibility patch for gsl API change Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=575158 Package-Manager: portage-2.2.27 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> sci-libs/mathgl/files/mathgl-2.3.3-gsl-2.patch | 25 +++++++++++++++++++++ sci-libs/mathgl/mathgl-2.1.3.1.ebuild | 4 ++-- sci-libs/mathgl/mathgl-2.1.3.ebuild | 4 ++-- ...{mathgl-2.3.3.ebuild => mathgl-2.3.3-r1.ebuild} | 26 +++++++++++++++++----- sci-libs/mathgl/mathgl-2.3.3.ebuild | 2 +- 5 files changed, 50 insertions(+), 11 deletions(-) diff --git a/sci-libs/mathgl/files/mathgl-2.3.3-gsl-2.patch b/sci-libs/mathgl/files/mathgl-2.3.3-gsl-2.patch new file mode 100644 index 0000000..6254321 --- /dev/null +++ b/sci-libs/mathgl/files/mathgl-2.3.3-gsl-2.patch @@ -0,0 +1,25 @@ + src/fit.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/fit.cpp b/src/fit.cpp +index 6a42a4b..d167022 100644 +--- a/src/fit.cpp ++++ b/src/fit.cpp +@@ -179,6 +179,7 @@ mreal MGL_NO_EXPORT mgl_fit_base(mglFitData &fd, mreal *ini) + const gsl_multifit_fdfsolver_type *T = gsl_multifit_fdfsolver_lmsder; + gsl_multifit_fdfsolver *s = gsl_multifit_fdfsolver_alloc(T, n, m); + gsl_multifit_function_fdf f; ++ gsl_matrix *J; + f.f = mgl_fit__f; f.df = mgl_fit__df; + f.fdf = mgl_fit__fdf; f.n = n; f.p = m; + f.params = &fd; +@@ -193,7 +194,8 @@ mreal MGL_NO_EXPORT mgl_fit_base(mglFitData &fd, mreal *ini) + } + while ( status == GSL_CONTINUE && iter < 500 ); + gsl_matrix *covar = gsl_matrix_alloc(m, m); +- gsl_multifit_covar (s->J, 0.0, covar ); ++ gsl_multifit_fdfsolver_jac (s, J); ++ gsl_multifit_covar (J, 0.0, covar); + mglFitCovar.Set(covar); + mreal res = gsl_blas_dnrm2(s->f); + for(i=0;i<m;i++) ini[i] = gsl_vector_get(s->x, i); diff --git a/sci-libs/mathgl/mathgl-2.1.3.1.ebuild b/sci-libs/mathgl/mathgl-2.1.3.1.ebuild index 7f0ff4a..7b50859 100644 --- a/sci-libs/mathgl/mathgl-2.1.3.1.ebuild +++ b/sci-libs/mathgl/mathgl-2.1.3.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -30,7 +30,7 @@ RDEPEND=" fltk? ( x11-libs/fltk:1 ) gif? ( media-libs/giflib ) glut? ( media-libs/freeglut ) - gsl? ( sci-libs/gsl ) + gsl? ( <sci-libs/gsl-2 ) hdf? ( sci-libs/hdf ) hdf5? ( >=sci-libs/hdf5-1.8[mpi=] ) jpeg? ( virtual/jpeg:0 ) diff --git a/sci-libs/mathgl/mathgl-2.1.3.ebuild b/sci-libs/mathgl/mathgl-2.1.3.ebuild index 65ff4c8..ce36b9d 100644 --- a/sci-libs/mathgl/mathgl-2.1.3.ebuild +++ b/sci-libs/mathgl/mathgl-2.1.3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -30,7 +30,7 @@ RDEPEND=" fltk? ( x11-libs/fltk:1 ) gif? ( media-libs/giflib ) glut? ( media-libs/freeglut ) - gsl? ( sci-libs/gsl ) + gsl? ( <sci-libs/gsl-2 ) hdf? ( sci-libs/hdf ) hdf5? ( >=sci-libs/hdf5-1.8[mpi=] ) jpeg? ( virtual/jpeg:0 ) diff --git a/sci-libs/mathgl/mathgl-2.3.3.ebuild b/sci-libs/mathgl/mathgl-2.3.3-r1.ebuild similarity index 90% copy from sci-libs/mathgl/mathgl-2.3.3.ebuild copy to sci-libs/mathgl/mathgl-2.3.3-r1.ebuild index f75fe4b..7b3109f 100644 --- a/sci-libs/mathgl/mathgl-2.3.3.ebuild +++ b/sci-libs/mathgl/mathgl-2.3.3-r1.ebuild @@ -30,7 +30,7 @@ RDEPEND=" fltk? ( x11-libs/fltk:1 ) gif? ( media-libs/giflib ) glut? ( media-libs/freeglut ) - gsl? ( sci-libs/gsl ) + gsl? ( >=sci-libs/gsl-2 ) hdf? ( sci-libs/hdf ) hdf5? ( >=sci-libs/hdf5-1.8[mpi=] ) jpeg? ( virtual/jpeg:0 ) @@ -56,19 +56,27 @@ REQUIRED_USE=" pdf? ( png ) python? ( ${PYTHON_REQUIRED_USE} )" +PATCHES=( + "${FILESDIR}"/${P}-gsl-2.patch +) + 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 + default + if ! [[ -d "${S}"/fonts ]]; then + mkdir "${S}"/fonts || die + fi cd "${S}"/fonts || die unpack STIX_font.tgz } src_prepare() { + default + epatch "${PATCHES[@]}" # fix for location of hdf headers sed -i -e 's:hdf/::g' src/data_io.cpp || die # bored of reporting bad libdir upstream @@ -82,9 +90,13 @@ src_prepare() { 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 -i -e '/#include <QStringList>/i #include <QObject>' json/Backend.hpp || die + sed \ + -e '/#include <QStringList>/i #include <QObject>' \ + -i json/Backend.hpp || die - use python && append-cppflags -I"$(${EPYTHON} -c 'import numpy; print(numpy.get_include())')" + use python && \ + append-cppflags \ + -I"$(${EPYTHON} -c 'import numpy; print(numpy.get_include())')" use wxwidgets && need-wxwidgets unicode } @@ -128,7 +140,9 @@ src_configure() { src_install() { cmake-utils_src_install dodoc README* *.txt AUTHORS - use static-libs || rm "${ED}"/usr/$(get_libdir)/*.a + if ! use static-libs; then + rm "${ED}"/usr/$(get_libdir)/*.a || die + fi if use qt4 ; then local lang insinto /usr/share/udav diff --git a/sci-libs/mathgl/mathgl-2.3.3.ebuild b/sci-libs/mathgl/mathgl-2.3.3.ebuild index f75fe4b..69f6c1f 100644 --- a/sci-libs/mathgl/mathgl-2.3.3.ebuild +++ b/sci-libs/mathgl/mathgl-2.3.3.ebuild @@ -30,7 +30,7 @@ RDEPEND=" fltk? ( x11-libs/fltk:1 ) gif? ( media-libs/giflib ) glut? ( media-libs/freeglut ) - gsl? ( sci-libs/gsl ) + gsl? ( <sci-libs/gsl-2 ) hdf? ( sci-libs/hdf ) hdf5? ( >=sci-libs/hdf5-1.8[mpi=] ) jpeg? ( virtual/jpeg:0 )