[138659] trunk/dports/perl/p5-ifeffit/Portfile
devans at macports.org
devans at macports.org
Tue Jul 14 16:54:04 PDT 2015
Revision: 138659
https://trac.macports.org/changeset/138659
Author: devans at macports.org
Date: 2015-07-14 16:54:04 -0700 (Tue, 14 Jul 2015)
Log 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.
Modified Paths:
--------------
trunk/dports/perl/p5-ifeffit/Portfile
Modified: trunk/dports/perl/p5-ifeffit/Portfile
===================================================================
--- trunk/dports/perl/p5-ifeffit/Portfile 2015-07-14 23:06:32 UTC (rev 138658)
+++ trunk/dports/perl/p5-ifeffit/Portfile 2015-07-14 23:54:04 UTC (rev 138659)
@@ -6,14 +6,14 @@
perl5.branches 5.16 5.18 5.20 5.22
perl5.setup Ifeffit 2
-set ifeffit_version 1.2.13
-revision 1
+epoch 1
+version 1.2.13
platforms darwin
license Permissive
maintainers nomaintainer
-description perl interface to ifeffit
+description Perl interface to ifeffit
long_description ${description}
@@ -27,19 +27,46 @@
distname 1.2.final
worksrcdir ifeffit-${distname}/wrappers/perl
+# IMPORTANT BUILD NOTES
+#
+# ifeffit, pgplot and p5-ifeffit need to be using the same compiler libraries.
+# therefore they must be built with the same gcc compiler variants.
+# currently this is gcc49 by default but it you change one change them all and rebuild.
+#
+# 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
+
+variant gcc45 description {Use gfortran from gcc45} conflicts gcc46 gcc47 gcc48 gcc49 {}
+variant gcc46 description {Use gfortran from gcc46} conflicts gcc45 gcc47 gcc48 gcc49 {}
+variant gcc47 description {Use gfortran from gcc47} conflicts gcc45 gcc46 gcc48 gcc49 {}
+variant gcc48 description {Use gfortran from gcc48} conflicts gcc45 gcc46 gcc47 gcc49 {}
+variant gcc49 description {Use gfortran from gcc49} conflicts gcc45 gcc46 gcc47 gcc48 {}
+
+if {![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47] && ![variant_isset gcc48]} {
+ default_variants +gcc49
+}
+
if {${perl5.major} != ""} {
- depends_lib-append port:ifeffit
+ depends_lib-append \
+ port:ifeffit
- post-extract {
- # Copy ifeffit Makefile.PL because it is closer to correct than the default one
- file copy -force ${prefix}/share/ifeffit/config/Makefile.PL \
- ${worksrcpath}/Makefile.PL
+ foreach gcc {gcc45 gcc46 gcc47 gcc48 gcc49} {
+ if {[variant_isset ${gcc}]} {
+ # this is depends_lib so the correct gfortran library is available at both at build and run time
+ depends_lib-append port:${gcc}
+ }
}
- post-patch {
- # Fix the location of the ifeffit library
- # -lifeffit /opt/local/var/macports/build/_opt_mports_trunk_dports_science_ifeffit/ifeffit/work/ifeffit-1.2.11c/src/pgstub/libnopgplot.a
- reinplace -E "s|-lifeffit .+libnopgplot\.a|-lifeffit -lnopgplot|g" ${worksrcpath}/Makefile.PL
+ pre-configure {
+ # 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
}
post-configure {
@@ -48,5 +75,5 @@
}
}
-# disable irrelevant CPAN livecheck provided by perl5 portgroup
+# this is the final release of ifeffit
livecheck.type none
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150714/c8d7270e/attachment.html>
More information about the macports-changes
mailing list