1 |
commit: 585d5b592d35130304541dcd3d17f0f8714a8343 |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 20 15:29:17 2016 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 20 15:39:18 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=585d5b59 |
7 |
|
8 |
sci-libs/mathgl: Add compatibility patch for gsl API change |
9 |
|
10 |
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=575158 |
11 |
|
12 |
Package-Manager: portage-2.2.27 |
13 |
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> |
14 |
|
15 |
sci-libs/mathgl/files/mathgl-2.3.3-gsl-2.patch | 25 +++++++++++++++++++++ |
16 |
sci-libs/mathgl/mathgl-2.1.3.1.ebuild | 4 ++-- |
17 |
sci-libs/mathgl/mathgl-2.1.3.ebuild | 4 ++-- |
18 |
...{mathgl-2.3.3.ebuild => mathgl-2.3.3-r1.ebuild} | 26 +++++++++++++++++----- |
19 |
sci-libs/mathgl/mathgl-2.3.3.ebuild | 2 +- |
20 |
5 files changed, 50 insertions(+), 11 deletions(-) |
21 |
|
22 |
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 |
23 |
new file mode 100644 |
24 |
index 0000000..6254321 |
25 |
--- /dev/null |
26 |
+++ b/sci-libs/mathgl/files/mathgl-2.3.3-gsl-2.patch |
27 |
@@ -0,0 +1,25 @@ |
28 |
+ src/fit.cpp | 4 +++- |
29 |
+ 1 file changed, 3 insertions(+), 1 deletion(-) |
30 |
+ |
31 |
+diff --git a/src/fit.cpp b/src/fit.cpp |
32 |
+index 6a42a4b..d167022 100644 |
33 |
+--- a/src/fit.cpp |
34 |
++++ b/src/fit.cpp |
35 |
+@@ -179,6 +179,7 @@ mreal MGL_NO_EXPORT mgl_fit_base(mglFitData &fd, mreal *ini) |
36 |
+ const gsl_multifit_fdfsolver_type *T = gsl_multifit_fdfsolver_lmsder; |
37 |
+ gsl_multifit_fdfsolver *s = gsl_multifit_fdfsolver_alloc(T, n, m); |
38 |
+ gsl_multifit_function_fdf f; |
39 |
++ gsl_matrix *J; |
40 |
+ f.f = mgl_fit__f; f.df = mgl_fit__df; |
41 |
+ f.fdf = mgl_fit__fdf; f.n = n; f.p = m; |
42 |
+ f.params = &fd; |
43 |
+@@ -193,7 +194,8 @@ mreal MGL_NO_EXPORT mgl_fit_base(mglFitData &fd, mreal *ini) |
44 |
+ } |
45 |
+ while ( status == GSL_CONTINUE && iter < 500 ); |
46 |
+ gsl_matrix *covar = gsl_matrix_alloc(m, m); |
47 |
+- gsl_multifit_covar (s->J, 0.0, covar ); |
48 |
++ gsl_multifit_fdfsolver_jac (s, J); |
49 |
++ gsl_multifit_covar (J, 0.0, covar); |
50 |
+ mglFitCovar.Set(covar); |
51 |
+ mreal res = gsl_blas_dnrm2(s->f); |
52 |
+ for(i=0;i<m;i++) ini[i] = gsl_vector_get(s->x, i); |
53 |
|
54 |
diff --git a/sci-libs/mathgl/mathgl-2.1.3.1.ebuild b/sci-libs/mathgl/mathgl-2.1.3.1.ebuild |
55 |
index 7f0ff4a..7b50859 100644 |
56 |
--- a/sci-libs/mathgl/mathgl-2.1.3.1.ebuild |
57 |
+++ b/sci-libs/mathgl/mathgl-2.1.3.1.ebuild |
58 |
@@ -1,4 +1,4 @@ |
59 |
-# Copyright 1999-2015 Gentoo Foundation |
60 |
+# Copyright 1999-2016 Gentoo Foundation |
61 |
# Distributed under the terms of the GNU General Public License v2 |
62 |
# $Id$ |
63 |
|
64 |
@@ -30,7 +30,7 @@ RDEPEND=" |
65 |
fltk? ( x11-libs/fltk:1 ) |
66 |
gif? ( media-libs/giflib ) |
67 |
glut? ( media-libs/freeglut ) |
68 |
- gsl? ( sci-libs/gsl ) |
69 |
+ gsl? ( <sci-libs/gsl-2 ) |
70 |
hdf? ( sci-libs/hdf ) |
71 |
hdf5? ( >=sci-libs/hdf5-1.8[mpi=] ) |
72 |
jpeg? ( virtual/jpeg:0 ) |
73 |
|
74 |
diff --git a/sci-libs/mathgl/mathgl-2.1.3.ebuild b/sci-libs/mathgl/mathgl-2.1.3.ebuild |
75 |
index 65ff4c8..ce36b9d 100644 |
76 |
--- a/sci-libs/mathgl/mathgl-2.1.3.ebuild |
77 |
+++ b/sci-libs/mathgl/mathgl-2.1.3.ebuild |
78 |
@@ -1,4 +1,4 @@ |
79 |
-# Copyright 1999-2015 Gentoo Foundation |
80 |
+# Copyright 1999-2016 Gentoo Foundation |
81 |
# Distributed under the terms of the GNU General Public License v2 |
82 |
# $Id$ |
83 |
|
84 |
@@ -30,7 +30,7 @@ RDEPEND=" |
85 |
fltk? ( x11-libs/fltk:1 ) |
86 |
gif? ( media-libs/giflib ) |
87 |
glut? ( media-libs/freeglut ) |
88 |
- gsl? ( sci-libs/gsl ) |
89 |
+ gsl? ( <sci-libs/gsl-2 ) |
90 |
hdf? ( sci-libs/hdf ) |
91 |
hdf5? ( >=sci-libs/hdf5-1.8[mpi=] ) |
92 |
jpeg? ( virtual/jpeg:0 ) |
93 |
|
94 |
diff --git a/sci-libs/mathgl/mathgl-2.3.3.ebuild b/sci-libs/mathgl/mathgl-2.3.3-r1.ebuild |
95 |
similarity index 90% |
96 |
copy from sci-libs/mathgl/mathgl-2.3.3.ebuild |
97 |
copy to sci-libs/mathgl/mathgl-2.3.3-r1.ebuild |
98 |
index f75fe4b..7b3109f 100644 |
99 |
--- a/sci-libs/mathgl/mathgl-2.3.3.ebuild |
100 |
+++ b/sci-libs/mathgl/mathgl-2.3.3-r1.ebuild |
101 |
@@ -30,7 +30,7 @@ RDEPEND=" |
102 |
fltk? ( x11-libs/fltk:1 ) |
103 |
gif? ( media-libs/giflib ) |
104 |
glut? ( media-libs/freeglut ) |
105 |
- gsl? ( sci-libs/gsl ) |
106 |
+ gsl? ( >=sci-libs/gsl-2 ) |
107 |
hdf? ( sci-libs/hdf ) |
108 |
hdf5? ( >=sci-libs/hdf5-1.8[mpi=] ) |
109 |
jpeg? ( virtual/jpeg:0 ) |
110 |
@@ -56,19 +56,27 @@ REQUIRED_USE=" |
111 |
pdf? ( png ) |
112 |
python? ( ${PYTHON_REQUIRED_USE} )" |
113 |
|
114 |
+PATCHES=( |
115 |
+ "${FILESDIR}"/${P}-gsl-2.patch |
116 |
+) |
117 |
+ |
118 |
pkg_setup() { |
119 |
use mpi && export CC=mpicc CXX=mpicxx |
120 |
use python && python-single-r1_pkg_setup |
121 |
} |
122 |
|
123 |
src_unpack() { |
124 |
- unpack ${A} |
125 |
- [[ -d "${S}"/fonts ]] || mkdir "${S}"/fonts |
126 |
+ default |
127 |
+ if ! [[ -d "${S}"/fonts ]]; then |
128 |
+ mkdir "${S}"/fonts || die |
129 |
+ fi |
130 |
cd "${S}"/fonts || die |
131 |
unpack STIX_font.tgz |
132 |
} |
133 |
|
134 |
src_prepare() { |
135 |
+ default |
136 |
+ epatch "${PATCHES[@]}" |
137 |
# fix for location of hdf headers |
138 |
sed -i -e 's:hdf/::g' src/data_io.cpp || die |
139 |
# bored of reporting bad libdir upstream |
140 |
@@ -82,9 +90,13 @@ src_prepare() { |
141 |
sed -i -e 's/update-mime-database/true/' udav/CMakeLists.txt || die |
142 |
sed -i -e 's/update-desktop-database/true/' udav/CMakeLists.txt || die |
143 |
# fix missing include, bug 564204 |
144 |
- sed -i -e '/#include <QStringList>/i #include <QObject>' json/Backend.hpp || die |
145 |
+ sed \ |
146 |
+ -e '/#include <QStringList>/i #include <QObject>' \ |
147 |
+ -i json/Backend.hpp || die |
148 |
|
149 |
- use python && append-cppflags -I"$(${EPYTHON} -c 'import numpy; print(numpy.get_include())')" |
150 |
+ use python && \ |
151 |
+ append-cppflags \ |
152 |
+ -I"$(${EPYTHON} -c 'import numpy; print(numpy.get_include())')" |
153 |
use wxwidgets && need-wxwidgets unicode |
154 |
} |
155 |
|
156 |
@@ -128,7 +140,9 @@ src_configure() { |
157 |
src_install() { |
158 |
cmake-utils_src_install |
159 |
dodoc README* *.txt AUTHORS |
160 |
- use static-libs || rm "${ED}"/usr/$(get_libdir)/*.a |
161 |
+ if ! use static-libs; then |
162 |
+ rm "${ED}"/usr/$(get_libdir)/*.a || die |
163 |
+ fi |
164 |
if use qt4 ; then |
165 |
local lang |
166 |
insinto /usr/share/udav |
167 |
|
168 |
diff --git a/sci-libs/mathgl/mathgl-2.3.3.ebuild b/sci-libs/mathgl/mathgl-2.3.3.ebuild |
169 |
index f75fe4b..69f6c1f 100644 |
170 |
--- a/sci-libs/mathgl/mathgl-2.3.3.ebuild |
171 |
+++ b/sci-libs/mathgl/mathgl-2.3.3.ebuild |
172 |
@@ -30,7 +30,7 @@ RDEPEND=" |
173 |
fltk? ( x11-libs/fltk:1 ) |
174 |
gif? ( media-libs/giflib ) |
175 |
glut? ( media-libs/freeglut ) |
176 |
- gsl? ( sci-libs/gsl ) |
177 |
+ gsl? ( <sci-libs/gsl-2 ) |
178 |
hdf? ( sci-libs/hdf ) |
179 |
hdf5? ( >=sci-libs/hdf5-1.8[mpi=] ) |
180 |
jpeg? ( virtual/jpeg:0 ) |