# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
perl5.branches 5.26 5.28 5.30
description Perl interface to ifeffit
long_description ${description}
homepage http://cars9.uchicago.edu/ifeffit/
master_sites https://github.com/newville/ifeffit/archive/
checksums rmd160 dedd8b9f6be0d0b0bce67e5f53c18faddf7b0912 \
sha256 72a7f5bd6e6e1ff2b41761cfe726f79f2da8e71606399d3c3307451496a1c0ef
worksrcdir ifeffit-${distname}/wrappers/perl
# p5-ifeffit is configured using a Makefile.PL that is generated when ifeffit is built.
# since the paths to the compiler libraries contain compiler version information,
# if the compiler version changes then both ifeffit and p5-ifeffit need to be rebuilt
# so that the Makefile.PL in use contains the correct paths.
# if in doubt rebuild everything
if {${perl5.major} != ""} {
compilers.setup require_fortran
compilers.enforce_fortran ifeffit
# this shows up in the contents of Makefile.PL, as the gcc/gfortran library
# copy the preconfigured Makefile.PL generated during the build of ifeffit
# this must be done in pre-configure to ensure that ifeffit is installed and active
# before the copy is attempted
copy -force ${prefix}/share/ifeffit/config/Makefile.PL ${worksrcpath}/Makefile.PL
# Need to patch the generated Makefile due to strange bug
reinplace "s|^PERL_ARCHIVE *= *$|PERL_ARCHIVE = \$(PERL_INC)/libperl.dylib|" ${worksrcpath}/Makefile