Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-perl/PDL/files/, dev-perl/PDL/
Date: Sat, 29 Oct 2016 17:28:43
Message-Id: 1477762088.7dfece1daebd74e0aea287287927ff2cf53a023a.dilfridge@gentoo
1 commit: 7dfece1daebd74e0aea287287927ff2cf53a023a
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 29 17:27:34 2016 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 29 17:28:08 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7dfece1d
7
8 dev-perl/PDL: Version bump
9
10 Package-Manager: portage-2.3.2
11
12 dev-perl/PDL/Manifest | 1 +
13 dev-perl/PDL/PDL-2.17.0.ebuild | 115 +++++++++++++++++++++++
14 dev-perl/PDL/files/PDL-2.17.0-fortran.patch | 22 +++++
15 dev-perl/PDL/files/PDL-2.17.0-makemakerfix.patch | 20 ++++
16 dev-perl/PDL/files/PDL-2.17.0-shared-hdf.patch | 44 +++++++++
17 5 files changed, 202 insertions(+)
18
19 diff --git a/dev-perl/PDL/Manifest b/dev-perl/PDL/Manifest
20 index 71b5fe7..d174e18 100644
21 --- a/dev-perl/PDL/Manifest
22 +++ b/dev-perl/PDL/Manifest
23 @@ -1 +1,2 @@
24 +DIST PDL-2.017.tar.gz 2889414 SHA256 93b3f22454485d92efb2f85d2e622fd584b2df6a252eae672eba3c39d3c3bd10 SHA512 b1c60b45427153928834619a59ef2213a0845564ae997e22fe202dfee281647edceb68bf3bfa6602ee69a7fd0cc69b7b61ccb74407f490d9fa40230f74599411 WHIRLPOOL 98771811a82f3e3fc504d9af002f844f200f9751d8a492cb205859d094633ea88d88c70f105c9de08b10239037441ea2a6baac192930357b7cd3db24550ced91
25 DIST PDL-2.4.11.tar.gz 2859537 SHA256 c777ed2519d73ebde0d870e94931a2d2c57865abcee27dfec53f4412a2cac662 SHA512 014358b7d844a082552782f23d610d62b6f5bf5fccef30dc32ecad665501e278351cf3b33ceafe3387054d2063fc642b7bf56459944ee8c0c3d0d7cef3d78a2b WHIRLPOOL eb6623dce01e0f568ddcd2d399a8ddb394ab839b088347a51c5c73c8cacf91b726cd18f6692e50197ae9040eec9dcb4bc3fa7bb722c66ea316132764d40fa8d4
26
27 diff --git a/dev-perl/PDL/PDL-2.17.0.ebuild b/dev-perl/PDL/PDL-2.17.0.ebuild
28 new file mode 100644
29 index 00000000..34a58c1
30 --- /dev/null
31 +++ b/dev-perl/PDL/PDL-2.17.0.ebuild
32 @@ -0,0 +1,115 @@
33 +# Copyright 1999-2016 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +# $Id$
36 +
37 +EAPI=6
38 +
39 +DIST_AUTHOR=CHM
40 +DIST_VERSION=2.017
41 +
42 +FORTRAN_NEEDED=fortran
43 +
44 +inherit perl-module eutils fortran-2
45 +
46 +DESCRIPTION="Perl Data Language for scientific computing"
47 +
48 +LICENSE="|| ( Artistic GPL-1+ ) public-domain PerlDL"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~x86"
51 +
52 +IUSE="+badval doc fortran gd gsl hdf netpbm pdl2 pgplot threads"
53 +
54 +RDEPEND="sys-libs/ncurses:0=
55 + app-arch/sharutils
56 + dev-perl/Astro-FITS-Header
57 + dev-perl/File-Map
58 + >=dev-perl/Inline-0.680.0
59 + >=dev-perl/Inline-C-0.620.0
60 + dev-perl/Module-Compile
61 + dev-perl/OpenGL
62 + dev-perl/TermReadKey
63 + || ( dev-perl/Term-ReadLine-Perl dev-perl/Term-ReadLine-Gnu )
64 + >=virtual/perl-Data-Dumper-2.121.0
65 + virtual/perl-Pod-Parser
66 + virtual/perl-File-Spec
67 + virtual/perl-File-Temp
68 + virtual/perl-Filter-Simple
69 + dev-perl/Filter
70 + virtual/perl-Storable
71 + >=virtual/perl-Text-Balanced-1.890.0
72 +
73 + gd? ( media-libs/gd )
74 + gsl? ( sci-libs/gsl )
75 + hdf? ( sci-libs/hdf )
76 + netpbm? ( media-libs/netpbm virtual/ffmpeg )
77 + pdl2? (
78 + >=dev-perl/Devel-REPL-1.3.11
79 + || ( dev-perl/Term-ReadLine-Perl dev-perl/Term-ReadLine-Gnu )
80 + )
81 + pgplot? ( dev-perl/PGPLOT )
82 +"
83 +
84 +DEPEND="${RDEPEND}
85 + >=virtual/perl-ExtUtils-MakeMaker-6.560.0
86 + dev-perl/Devel-CheckLib
87 + fortran? ( >=dev-perl/ExtUtils-F77-1.13 )
88 +"
89 +
90 +mydoc="BUGS DEPENDENCIES DEVELOPMENT Known_problems MANIFEST* Release_Notes"
91 +
92 +PATCHES=(
93 + "${FILESDIR}"/${PN}-2.17.0-makemakerfix.patch
94 + "${FILESDIR}"/${PN}-2.17.0-fortran.patch # respect user choice for fortran compiler+flags, add pic
95 + "${FILESDIR}"/${PN}-2.17.0-shared-hdf.patch # search for shared hdf instead of static
96 +)
97 +
98 +pkg_setup() {
99 + perl_set_version
100 + use fortran && fortran-2_pkg_setup
101 +}
102 +
103 +src_prepare() {
104 + perl-module_src_prepare
105 + find . -name Makefile.PL -exec \
106 + sed -i -e "s|/usr|${EPREFIX}/usr|g" {} \; || die
107 +}
108 +
109 +src_configure() {
110 + sed -i \
111 + -e '/USE_POGL/s/=>.*/=> 1,/' \
112 + -e "/WITH_3D/s/=>.*/=> 1,/" \
113 + -e "/HTML_DOCS/s/=>.*/=> $(use doc && echo 1 || echo 0),/" \
114 + -e "/WITH_BADVAL/s/=>.*/=> $(use badval && echo 1|| echo 0),/" \
115 + -e "/WITH_DEVEL_REPL/s/=>.*/=> $(use pdl2 && echo 1 || echo 0),/" \
116 + -e "/WITH_GSL/s/=>.*/=> $(use gsl && echo 1 || echo 0),/" \
117 + -e "/WITH_GD/s/=>.*/=> $(use gd && echo 1 || echo 0),/" \
118 + -e "/WITH_HDF/s/=>.*/=> $(use hdf && echo 1 || echo 0),/" \
119 + -e "/WITH_MINUIT/s/=>.*/=> $(use fortran && echo 1|| echo 0),/" \
120 + -e "/WITH_PGPLOT/s/=>.*/=> $(use pgplot && echo 1 || echo 0),/" \
121 + -e "/WITH_POSIX_THREADS/s/=>.*/=> $(use threads && echo 1 || echo 0),/" \
122 + -e "/WITH_PROJ/s/=>.*/=> $(echo 0),/" \
123 + -e "/WITH_SLATEC/s/=>.*/=> $(use fortran && echo 1|| echo 0),/" \
124 + perldl.conf || die
125 + perl-module_src_configure
126 +}
127 +
128 +src_test() {
129 + MAKEOPTS+=" -j1" perl-module_src_test
130 +}
131 +
132 +src_install() {
133 + perl-module_src_install
134 + cp Doc/{scantree,mkhtmldoc}.pl "${D}"/${VENDOR_ARCH}/PDL/Doc || die
135 +}
136 +
137 +pkg_postinst() {
138 + perl "${VENDOR_ARCH}/PDL/Doc/scantree.pl" || die
139 + elog "Building perldl.db done. You can recreate this at any time"
140 + elog "by running:"
141 + elog "perl ${VENDOR_ARCH}/PDL/Doc/scantree.pl"
142 +}
143 +
144 +pkg_prerm() {
145 + rm -rf "${EROOT}"/var/lib/pdl/html
146 + rm -f "${EROOT}"/var/lib/pdl/{pdldoc.db,Index.pod}
147 +}
148
149 diff --git a/dev-perl/PDL/files/PDL-2.17.0-fortran.patch b/dev-perl/PDL/files/PDL-2.17.0-fortran.patch
150 new file mode 100644
151 index 00000000..8d02a26
152 --- /dev/null
153 +++ b/dev-perl/PDL/files/PDL-2.17.0-fortran.patch
154 @@ -0,0 +1,22 @@
155 +--- a/Lib/Minuit/Makefile.PL
156 ++++ b/Lib/Minuit/Makefile.PL
157 +@@ -149,7 +149,7 @@
158 + ("
159 +
160 + minuitlib/$_\$(OBJ_EXT): minuitlib/$_.f
161 +- $mycompiler -c $hack_64bit -o minuitlib/$_\$(OBJ_EXT) $mycflags minuitlib/$_.f
162 ++ \$(FC) \$(FFLAGS) -fPIC -c -o minuitlib/$_\$(OBJ_EXT) $mycflags minuitlib/$_.f
163 + " )} @minuitfiles;
164 +
165 + if (!defined($PDL::Config{MINUIT_LIB})){
166 +--- a/Lib/Slatec/Makefile.PL
167 ++++ b/Lib/Slatec/Makefile.PL
168 +@@ -136,7 +136,7 @@
169 + ("
170 +
171 + slatec/$_\$(OBJ_EXT): slatec/$_.f
172 +- $mycompiler -c $hack_64bit -o slatec/$_\$(OBJ_EXT) $mycflags slatec/$_.f
173 ++ \$(FC) \$(FFLAGS) -c -fPIC -o slatec/$_\$(OBJ_EXT) $mycflags slatec/$_.f
174 + " )} @slatecfiles;
175 +
176 + }
177
178 diff --git a/dev-perl/PDL/files/PDL-2.17.0-makemakerfix.patch b/dev-perl/PDL/files/PDL-2.17.0-makemakerfix.patch
179 new file mode 100644
180 index 00000000..b564a95
181 --- /dev/null
182 +++ b/dev-perl/PDL/files/PDL-2.17.0-makemakerfix.patch
183 @@ -0,0 +1,20 @@
184 +--- a/Demos/BAD2_demo.pm.PL 2006/04/20 07:42:24 1.1
185 ++++ b/Demos/BAD2_demo.pm.PL 2006/04/20 07:42:32
186 +@@ -3,6 +3,7 @@
187 + # - requires both bad-value support and PGPLOT
188 + #
189 +
190 ++use blib;
191 + use strict;
192 +
193 + use Config;
194 +--- a/Demos/BAD_demo.pm.PL 2006/04/20 07:42:17 1.1
195 ++++ b/Demos/BAD_demo.pm.PL 2006/04/20 07:42:38
196 +@@ -3,6 +3,7 @@
197 + # - needed since we allow bad pixel handling to be switched off
198 + #
199 +
200 ++use blib;
201 + use strict;
202 +
203 + use Config;
204
205 diff --git a/dev-perl/PDL/files/PDL-2.17.0-shared-hdf.patch b/dev-perl/PDL/files/PDL-2.17.0-shared-hdf.patch
206 new file mode 100644
207 index 00000000..0937b98
208 --- /dev/null
209 +++ b/dev-perl/PDL/files/PDL-2.17.0-shared-hdf.patch
210 @@ -0,0 +1,44 @@
211 +diff -ruN PDL-2.017.orig/IO/HDF/Makefile.PL PDL-2.017/IO/HDF/Makefile.PL
212 +--- PDL-2.017.orig/IO/HDF/Makefile.PL 2016-09-23 12:43:47.000000000 +0200
213 ++++ PDL-2.017/IO/HDF/Makefile.PL 2016-10-27 22:09:04.048315756 +0200
214 +@@ -56,25 +56,25 @@
215 +
216 + # Look for the libs:
217 + foreach my $libdir ( @HDF_lib_locations ) {
218 +- if (-e "$libdir/libdfalt.a" && !$found_df) {
219 ++ if (-e "$libdir/libdfalt.$Config{so}" && !$found_df) {
220 + $found_df = 1;
221 + $hdf_lib_path = $libdir;
222 + $hdf_libs = '-lmfhdfalt -ldfalt';
223 +- print "Found libdfalt.a at $libdir/libdfalt.a\n";
224 ++ print "Found libdfalt.$Config{so} at $libdir/libdfalt.$Config{so}\n";
225 + }
226 +
227 +- if (-e "$libdir/libdf.a" && !$found_df) {
228 ++ if (-e "$libdir/libdf.$Config{so}" && !$found_df) {
229 + $found_df = 1;
230 + $hdf_lib_path = $libdir;
231 + $hdf_libs = '-lmfhdf -ldf';
232 +- print "Found libdf.a at $libdir/libdf.a\n";
233 ++ print "Found libdf.$Config{so} at $libdir/libdf.$Config{so}\n";
234 + }
235 +
236 +- if (-e "$libdir/libhdf.a" && !$found_df) {
237 ++ if (-e "$libdir/libhdf.$Config{so}" && !$found_df) {
238 + $found_df = 1;
239 + $hdf_lib_path = $libdir;
240 + $hdf_libs = '-lmfhdf -lhdf -lxdr';
241 +- print "Found libhdf.a at $libdir/libhdf.a\n";
242 ++ print "Found libhdf.$Config{so} at $libdir/libhdf.$Config{so}\n";
243 + }
244 +
245 + # Look for the szip library, which HDF >= 4.2r0 needs, but older versions don't!
246 +@@ -91,7 +91,7 @@
247 + } # foreach $libdir...
248 +
249 + unless( defined( $hdf_lib_path ) ) {
250 +- $msg .= "Cannot find hdf library, libdf.a.\n"
251 ++ $msg .= "Cannot find hdf library, libdf.$Config{so}.\n"
252 + . "Please add the correct library path to Makefile.PL or install HDF\n";
253 + }
254 +