Changeset 138659


Ignore:
Timestamp:
Jul 14, 2015, 11:54:04 PM (5 years ago)
Author:
devans@…
Message:

p5-ifeffit: set version to match ifeffit and increment epoch, add gcc compiler variants, default +gcc49 to match ifeffit, see important build notes in comments, copy Makefile.PL in pre-configure to make sure that ifeffit has already been installed and it's really there, other minor cleanups and comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/perl/p5-ifeffit/Portfile

    r138580 r138659  
    77perl5.branches      5.16 5.18 5.20 5.22
    88perl5.setup         Ifeffit 2
    9 set ifeffit_version 1.2.13
    10 revision            1
     9epoch               1
     10version             1.2.13
    1111
    1212platforms           darwin
     
    1414maintainers         nomaintainer
    1515
    16 description         perl interface to ifeffit
     16description         Perl interface to ifeffit
    1717
    1818long_description    ${description}
     
    2828worksrcdir          ifeffit-${distname}/wrappers/perl
    2929
     30# IMPORTANT BUILD NOTES
     31#
     32# ifeffit, pgplot and p5-ifeffit need to be using the same compiler libraries.
     33# therefore they must be built with the same gcc compiler variants.
     34# currently this is gcc49 by default but it you change one change them all and rebuild.
     35#
     36# p5-ifeffit is configured using a Makefile.PL that is generated when ifeffit is built.
     37# since the paths to the compiler libraries contain compiler version information,
     38# if the compiler version changes then both ifeffit and p5-ifeffit need to be rebuilt
     39# so that the Makefile.PL in use contains the correct paths.
     40#
     41# if in doubt rebuild everything
     42
     43variant gcc45 description {Use gfortran from gcc45} conflicts gcc46 gcc47 gcc48 gcc49 {}
     44variant gcc46 description {Use gfortran from gcc46} conflicts gcc45 gcc47 gcc48 gcc49 {}
     45variant gcc47 description {Use gfortran from gcc47} conflicts gcc45 gcc46 gcc48 gcc49 {}
     46variant gcc48 description {Use gfortran from gcc48} conflicts gcc45 gcc46 gcc47 gcc49 {}
     47variant gcc49 description {Use gfortran from gcc49} conflicts gcc45 gcc46 gcc47 gcc48 {}
     48
     49if {![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47] && ![variant_isset gcc48]} {
     50    default_variants +gcc49
     51}
     52
    3053if {${perl5.major} != ""} {
    31     depends_lib-append  port:ifeffit
     54    depends_lib-append \
     55                    port:ifeffit
    3256
    33     post-extract {
    34         # Copy ifeffit Makefile.PL because it is closer to correct than the default one
    35         file copy -force ${prefix}/share/ifeffit/config/Makefile.PL \
    36             ${worksrcpath}/Makefile.PL
     57    foreach gcc {gcc45 gcc46 gcc47 gcc48 gcc49} {
     58        if {[variant_isset ${gcc}]} {
     59            # this is depends_lib so the correct gfortran library is available at both at build and run time
     60            depends_lib-append port:${gcc}
     61        }
    3762    }
    3863
    39     post-patch {
    40         # Fix the location of the ifeffit library
    41         #             -lifeffit /opt/local/var/macports/build/_opt_mports_trunk_dports_science_ifeffit/ifeffit/work/ifeffit-1.2.11c/src/pgstub/libnopgplot.a
    42         reinplace -E "s|-lifeffit .+libnopgplot\.a|-lifeffit -lnopgplot|g" ${worksrcpath}/Makefile.PL
     64    pre-configure {
     65        # copy the preconfigured Makefile.PL generated during the build of ifeffit
     66        # this must be done in pre-configure to ensure that ifeffit is installed and active
     67        # before the copy is attempted
     68       
     69        copy -force ${prefix}/share/ifeffit/config/Makefile.PL ${worksrcpath}/Makefile.PL
    4370    }
    4471   
     
    4976}
    5077
    51 # disable irrelevant CPAN livecheck provided by perl5 portgroup
     78# this is the final release of ifeffit
    5279livecheck.type      none
Note: See TracChangeset for help on using the changeset viewer.