summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-04-10 01:30:27 +0100
committerSam James <sam@gentoo.org>2024-04-10 01:56:20 +0100
commit95b7c07b2a05902b8002a4f7ab91034247fdb810 (patch)
tree8c21b7e9a9c46f1ac765a7c4f9da2e3d41f2293b
parentdev-perl/OpenGL-GLUT: new package, add 0.720.0 (diff)
downloadgentoo-95b7c07b2a05902b8002a4f7ab91034247fdb810.tar.gz
gentoo-95b7c07b2a05902b8002a4f7ab91034247fdb810.tar.bz2
gentoo-95b7c07b2a05902b8002a4f7ab91034247fdb810.zip
dev-perl/PDL: add 2.87.0
* Drop USE=threads. Tests fail to compile with USE=-threads with: ``` Basic/SourceFilter/../../blib/arch/auto/PDL/Core/Core.so: undefined symbol: pdl_pthread_free at /usr/lib64/perl5/5.38/x86_64-linux/DynaLoader.pm line 206. ``` and configure loudly warns too: ``` pthread disabled in perldl.conf PDL will be built without POSIX thread support. ==> *NOTE*: PDL threads are unrelated to perl threads (usethreads=y)! ==> Enabling perl threads will not help! ``` Just drop it. I don't see the value in it here. See net-misc/curl's bd4d42f83c774c36bf879a5b7ec89d373546743e for the general rationale in killing USE=threads. * Drop now-obsolete LTO filtering as it was fixed in the last release after Eli reported it upstream, yay! Bug: https://bugs.gentoo.org/856406 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--dev-perl/PDL/Manifest1
-rw-r--r--dev-perl/PDL/PDL-2.87.0.ebuild140
-rw-r--r--dev-perl/PDL/files/PDL-2.87.0-fortran.patch26
3 files changed, 167 insertions, 0 deletions
diff --git a/dev-perl/PDL/Manifest b/dev-perl/PDL/Manifest
index 720e78ada332..64e2a2275716 100644
--- a/dev-perl/PDL/Manifest
+++ b/dev-perl/PDL/Manifest
@@ -1 +1,2 @@
DIST PDL-2.063.tar.gz 2813482 BLAKE2B eff1737c2d27a51b911f8dd32095bb3016cddf52a93242ddad9fad3e179cd499d84b17ef1fbed4e11bdc759823032636cc32994eea2b8c91c6adda7cb1f15ef9 SHA512 dfb776103fa98da990cc30939e218b392c7c25c8c645230a71c7e881cf5325c97f855fe46e9bc093c7517883f78457f67eee14012fa5b39790b8dfcfa1ec08c9
+DIST PDL-2.087.tar.gz 2980457 BLAKE2B 8a29b78e49bff5f682e460abf452f725b811ec0929bf8419050d62c868b51007a2d234c171b6a4435fa0c0f9e10f41e15dfc7507f9eabac7fc00f0d44a28ea36 SHA512 3c046cff3cba25d14b062041b3abc195a2995473b3e3e97428db0a06d5b9630079f7d9d12288aa1f2f95f9c562ee3079a7f17703abe947fb8bab5f0a5282e609
diff --git a/dev-perl/PDL/PDL-2.87.0.ebuild b/dev-perl/PDL/PDL-2.87.0.ebuild
new file mode 100644
index 000000000000..879802e954cd
--- /dev/null
+++ b/dev-perl/PDL/PDL-2.87.0.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DIST_AUTHOR=ETJ
+DIST_VERSION=2.087
+DIST_EXAMPLES=( "Example/*" )
+
+FORTRAN_NEEDED=fortran
+
+inherit perl-module fortran-2
+
+DESCRIPTION="Perl Data Language for scientific computing"
+
+LICENSE="|| ( Artistic GPL-1+ ) public-domain PerlDL"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+badval doc fortran gd gsl hdf netpbm pdl2 pgplot test"
+
+RDEPEND="
+ sys-libs/ncurses:=
+ app-arch/sharutils
+ dev-perl/Astro-FITS-Header
+ dev-perl/Convert-UU
+ >=virtual/perl-Data-Dumper-2.121.0
+ >=dev-perl/File-Map-0.570.0
+ >=virtual/perl-Filter-Simple-0.880.0
+ dev-perl/Filter
+ dev-perl/File-Which
+ >=dev-perl/Inline-0.830.0
+ >=dev-perl/Inline-C-0.620.0
+ >=virtual/perl-Scalar-List-Utils-1.330.0
+ virtual/perl-Math-Complex
+ dev-perl/Module-Compile
+ >=dev-perl/OpenGL-0.700.0
+ dev-perl/OpenGL-GLUT
+ >=dev-perl/TermReadKey-2.340.0
+ || ( dev-perl/Term-ReadLine-Perl dev-perl/Term-ReadLine-Gnu )
+ >=virtual/perl-Data-Dumper-2.121.0
+ dev-perl/Pod-Parser
+ virtual/perl-File-Spec
+ virtual/perl-File-Temp
+ virtual/perl-Filter-Simple
+ virtual/perl-Storable
+ >=virtual/perl-Text-Balanced-2.50.0
+ fortran? ( >=dev-perl/ExtUtils-F77-1.260.0 )
+ gd? ( media-libs/gd )
+ gsl? ( sci-libs/gsl )
+ hdf? (
+ sci-libs/hdf
+ dev-perl/Alien-HDF4
+ )
+ netpbm? (
+ media-libs/netpbm
+ media-video/ffmpeg
+ )
+ pdl2? (
+ >=dev-perl/Devel-REPL-1.3.11
+ || ( dev-perl/Term-ReadLine-Perl dev-perl/Term-ReadLine-Gnu )
+ )
+ pgplot? ( dev-perl/PGPLOT )
+"
+DEPEND="
+ ${RDEPEND}
+"
+
+BDEPEND="
+ ${RDEPEND}
+ >=virtual/perl-Carp-1.200.0
+ >=dev-perl/Devel-CheckLib-1.10.0
+ >=dev-perl/ExtUtils-Depends-0.402.0
+ >=virtual/perl-ExtUtils-MakeMaker-7.120.0
+ >=virtual/perl-ExtUtils-ParseXS-3.10.0
+ virtual/perl-File-Path
+ fortran? ( >=dev-perl/ExtUtils-F77-1.130.0 )
+ test? (
+ dev-perl/Test-Exception
+ dev-perl/Test-Warn
+ dev-perl/Test-Deep
+ )
+"
+
+mydoc="BUGS DEPENDENCIES DEVELOPMENT Known_problems MANIFEST* Release_Notes"
+
+PATCHES=(
+ # Respect user choice for fortran compiler+flags, add pic
+ "${FILESDIR}"/${PN}-2.87.0-fortran.patch
+)
+
+pkg_setup() {
+ perl_set_version
+ use fortran && fortran-2_pkg_setup
+}
+
+src_prepare() {
+ perl-module_src_prepare
+ find . -name Makefile.PL -exec \
+ sed -i -e "s|/usr|${EPREFIX}/usr|g" {} \; || die
+}
+
+src_configure() {
+ sed -i \
+ -e '/USE_POGL/s/=>.*/=> 1,/' \
+ -e "/WITH_3D/s/=>.*/=> 1,/" \
+ -e "/HTML_DOCS/s/=>.*/=> $(use doc && echo 1 || echo 0),/" \
+ -e "/WITH_BADVAL/s/=>.*/=> $(use badval && echo 1|| echo 0),/" \
+ -e "/WITH_DEVEL_REPL/s/=>.*/=> $(use pdl2 && echo 1 || echo 0),/" \
+ -e "/WITH_GSL/s/=>.*/=> $(use gsl && echo 1 || echo 0),/" \
+ -e "/WITH_GD/s/=>.*/=> $(use gd && echo 1 || echo 0),/" \
+ -e "/WITH_HDF/s/=>.*/=> $(use hdf && echo 1 || echo 0),/" \
+ -e "/WITH_MINUIT/s/=>.*/=> $(use fortran && echo 1|| echo 0),/" \
+ -e "/WITH_PGPLOT/s/=>.*/=> $(use pgplot && echo 1 || echo 0),/" \
+ -e "/WITH_POSIX_THREADS/s/=>.*/=> 1,/" \
+ -e "/WITH_PROJ/s/=>.*/=> $(echo 0),/" \
+ -e "/WITH_SLATEC/s/=>.*/=> $(use fortran && echo 1|| echo 0),/" \
+ perldl.conf || die
+ perl-module_src_configure
+}
+
+src_test() {
+ MAKEOPTS+=" -j1" perl-module_src_test
+}
+
+src_install() {
+ perl-module_src_install
+ cp Doc/scantree.pl "${D}"/${VENDOR_ARCH}/PDL/Doc || die
+}
+
+pkg_postinst() {
+ perl "${VENDOR_ARCH}/PDL/Doc/scantree.pl" || die
+ elog "Building perldl.db done. You can recreate this at any time"
+ elog "by running:"
+ elog "perl ${VENDOR_ARCH}/PDL/Doc/scantree.pl"
+}
+
+pkg_prerm() {
+ rm -rf "${EROOT}"/var/lib/pdl/html
+ rm -f "${EROOT}"/var/lib/pdl/{pdldoc.db,Index.pod}
+}
diff --git a/dev-perl/PDL/files/PDL-2.87.0-fortran.patch b/dev-perl/PDL/files/PDL-2.87.0-fortran.patch
new file mode 100644
index 000000000000..96a676e970eb
--- /dev/null
+++ b/dev-perl/PDL/files/PDL-2.87.0-fortran.patch
@@ -0,0 +1,26 @@
+diff --git a/Libtmp/Minuit/Makefile.PL b/Libtmp/Minuit/Makefile.PL
+index bd2c933..2268225 100644
+--- a/Libtmp/Minuit/Makefile.PL
++++ b/Libtmp/Minuit/Makefile.PL
+@@ -125,7 +125,7 @@ undef &MY::postamble; # suppress warning
+ $orig .= "FFLAGS = $hack_64bit $mycflags \$(OPTIMIZE)\n";
+ $orig .= join "\n",map {
+ ("minuitlib/$_\$(OBJ_EXT): minuitlib/$_.f
+- $mycompiler -c \$(FFLAGS) -o minuitlib/$_\$(OBJ_EXT) minuitlib/$_.f
++ \$(FC) \$(FFLAGS) -fPIC -c -o minuitlib/$_\$(OBJ_EXT) $mycflags minuitlib/$_.f
+ " )} @minuitfiles;
+ return $orig;
+ };
+diff --git a/Libtmp/Slatec/Makefile.PL b/Libtmp/Slatec/Makefile.PL
+index 443d53b..b4675f7 100644
+--- a/Libtmp/Slatec/Makefile.PL
++++ b/Libtmp/Slatec/Makefile.PL
+@@ -85,7 +85,7 @@ undef &MY::postamble; # suppress warning
+ $orig =~ s/:\s*slatec\.pd/: slatec.pd/;
+ $orig .= "FFLAGS = $hack_64bit $mycflags \$(OPTIMIZE)\n";
+ join "\n", $orig, map "$_\$(OBJ_EXT): $_.f
+- $mycompiler -c \$(FFLAGS) -o $_\$(OBJ_EXT) $_.f", @slatecfiles;
++ \$(FC) \$(FFLAGS) -c -fPIC -o $_\$(OBJ_EXT) $mycflags $_.f", @slatecfiles;
+ };
+
+ # Remove i386 option for OS X recent versions for better build, dual arch does not work anyway