[98001] trunk/dports/math/eigen3/Portfile
eborisch at macports.org
eborisch at macports.org
Fri Sep 21 12:02:51 PDT 2012
Revision: 98001
http://trac.macports.org//changeset/98001
Author: eborisch at macports.org
Date: 2012-09-21 12:02:51 -0700 (Fri, 21 Sep 2012)
Log Message:
-----------
eigen3: set noarch when installed without +blas; fix indentation. Warn when +gcc4N variants selected without +blas (no effect.)
Modified Paths:
--------------
trunk/dports/math/eigen3/Portfile
Modified: trunk/dports/math/eigen3/Portfile
===================================================================
--- trunk/dports/math/eigen3/Portfile 2012-09-21 17:37:14 UTC (rev 98000)
+++ trunk/dports/math/eigen3/Portfile 2012-09-21 19:02:51 UTC (rev 98001)
@@ -5,7 +5,7 @@
name eigen3
version 3.1.1
-revision 1
+revision 2
license {{MPL-2} {LGPL-3+}}
categories math science
maintainers eborisch \
@@ -29,161 +29,175 @@
rmd160 8bb1ee6092bacd787c8feedc0dd4cb6c9849b380 \
sha256 531a97c3d96d151c72951e6f295b5e5f3f68f668fd04c9b1a0d84187547121ab
-universal_variant yes
-configure.universal_args ""
-
# Install via CMake by default. Slower than a header-only install, but makes
# other CMake-based builds happy
default_variants +cmake
# Variants
-variant gcc44 description {Use MacPorts' gcc44 compilers} \
- conflicts gcc45 gcc46 gcc47 {
- depends_build-append port:gcc44
- configure.compiler macports-gcc-4.4
+variant gcc44 description {Use MacPorts' gcc44 compilers for +blas} \
+ conflicts gcc45 gcc46 gcc47 {
+ depends_build-append port:gcc44
+ configure.compiler macports-gcc-4.4
}
-variant gcc45 description {Use MacPorts' gcc45 compilers} \
- conflicts gcc44 gcc46 gcc47 {
- depends_build-append port:gcc45
- configure.compiler macports-gcc-4.5
+variant gcc45 description {Use MacPorts' gcc45 compilers for +blas} \
+ conflicts gcc44 gcc46 gcc47 {
+ depends_build-append port:gcc45
+ configure.compiler macports-gcc-4.5
}
-variant gcc46 description {Use MacPorts' gcc46 compilers} \
- conflicts gcc44 gcc45 gcc47 {
- depends_build-append port:gcc46
- configure.compiler macports-gcc-4.6
+variant gcc46 description {Use MacPorts' gcc46 compilers for +blas} \
+ conflicts gcc44 gcc45 gcc47 {
+ depends_build-append port:gcc46
+ configure.compiler macports-gcc-4.6
}
-variant gcc47 description {Use MacPorts' gcc47 compilers} \
- conflicts gcc44 gcc45 gcc46 {
- depends_build-append port:gcc47
- configure.compiler macports-gcc-4.7
+variant gcc47 description {Use MacPorts' gcc47 compilers for +blas} \
+ conflicts gcc44 gcc45 gcc46 {
+ depends_build-append port:gcc47
+ configure.compiler macports-gcc-4.7
}
variant doc \
- description {Place local documentation into <prefix>/share/doc/eigen3/html} \
- requires cmake {
- depends_build-append port:doxygen port:texlive-latex
- build.target-append doc
+ description \
+ {Place local documentation into <prefix>/share/doc/eigen3/html}\
+ requires cmake {
+ depends_build-append port:doxygen port:texlive-latex
+ build.target-append doc
}
variant blas description \
- {Build eigen-based blas (libeigen_blas*) : needs +gcc4*} \
- requires cmake {
- if {![variant_isset gcc44] &&
- ![variant_isset gcc45] &&
- ![variant_isset gcc46] &&
- ![variant_isset gcc47]} {
- ui_error "eigen3: To use +blas please select +gcc44, +gcc45, +gcc46 or +gcc47!!!"
- return -code error
- } else {
- build.target-append blas
- }
+ {Build eigen-based blas (libeigen_blas*) : needs +gcc4N} \
+ requires cmake {
+ if {![variant_isset gcc44] &&
+ ![variant_isset gcc45] &&
+ ![variant_isset gcc46] &&
+ ![variant_isset gcc47]} {
+ ui_error "eigen3: To use +blas please select +gcc4\[4567\]!!!"
+ return -code error
+ } else {
+ PortGroup muniversal 1.0
+ build.target-append blas
+ universal_variant yes
+ configure.universal_args ""
+ }
}
-variant cmake \
- description {CMake-based install: Disabling removes CMake support} {
- PortGroup muniversal 1.0
- # Not using cmake portgroup as it sets -DCMAKE_OSX_ARCHITECTURES
- # in a way we don't seem to be able disable.
- set cmake_share_module_dir ${prefix}/share/cmake/modules
+if {([variant_isset gcc44] ||
+ [variant_isset gcc45] ||
+ [variant_isset gcc46] ||
+ [variant_isset gcc47]) && ![variant_isset blas]} {
+ ui_warn "eigen3: gcc4* only impacts +blas"
+}
- depends_build-append port:cmake
+variant cmake description \
+{CMake-based install: Disabling removes CMake support} {
+ # Not using cmake portgroup as it sets -DCMAKE_OSX_ARCHITECTURES
+ # in a way we don't seem to be able disable.
+ set cmake_share_module_dir ${prefix}/share/cmake/modules
- configure.cmd cmake
+ depends_build-append port:cmake
- configure.pre_args -DCMAKE_INSTALL_PREFIX=${prefix}
+ configure.cmd cmake
- configure.args -DCMAKE_VERBOSE_MAKEFILE=ON \
- -DCMAKE_COLOR_MAKEFILE=ON \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
- -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib \
- -DCMAKE_SYSTEM_PREFIX_PATH=\"${prefix}\;/usr\" \
- -DCMAKE_MODULE_PATH=${cmake_share_module_dir} \
- -Wno-dev
+ configure.pre_args -DCMAKE_INSTALL_PREFIX=${prefix}
- # Out of source build
- configure.args-append ../eigen_src
+ configure.args -DCMAKE_VERBOSE_MAKEFILE=ON \
+ -DCMAKE_COLOR_MAKEFILE=ON \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
+ -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib \
+ -DCMAKE_SYSTEM_PREFIX_PATH=\"${prefix}\;/usr\" \
+ -DCMAKE_MODULE_PATH=${cmake_share_module_dir} \
+ -Wno-dev
- # Enable test cases if we've actually configured
- test.run yes
- test.target check
- test.env-append EIGEN_MAKE_ARGS=-j{build.jobs} \
- EIGEN_CTEST_ARGS=-j{build.jobs}
+ # Out of source build
+ configure.args-append ../eigen_src
- # Enable parallel builds
- build.env-append EIGEN_MAKE_ARGS=-j{build.jobs}
+ # Enable test cases if we've actually configured
+ test.run yes
+ test.target check
+ test.env-append EIGEN_MAKE_ARGS=-j{build.jobs} \
+ EIGEN_CTEST_ARGS=-j{build.jobs}
+
+ # Enable parallel builds
+ build.env-append EIGEN_MAKE_ARGS=-j{build.jobs}
}
# Conditional phase modifications
+if {![variant_isset blas]} {
+ # No architecture-dependent files installed; set noarch
+ supported_archs noarch
+}
+
# Are we doing a header-only or cmake (for 'port test' or +doc/+blas) build?
if {![variant_isset cmake]} {
- # We can skip everything and just copy the headers -- fast!
- use_configure no
- build {}
- destroot {
- set incldir ${destroot}${prefix}/include/${name}
- xinstall -d ${incldir}
- file copy ${workpath}/eigen_src/Eigen ${incldir}
- file copy ${workpath}/eigen_src/unsupported ${incldir}
- }
+ # We can skip everything and just copy the headers -- fast!
+ use_configure no
+ build {}
+ destroot {
+ set incldir ${destroot}${prefix}/include/${name}
+ xinstall -d ${incldir}
+ file copy ${workpath}/eigen_src/Eigen ${incldir}
+ file copy ${workpath}/eigen_src/unsupported ${incldir}
+ }
- # Fail with message if user tries to test
- test.run yes
- test {
- ui_error "!!! TESTING IS UNSUPPORTED WITHOUT +cmake VARIANT !!!"
- }
+ # Fail with message if user tries to test
+ test.run yes
+ test {
+ ui_error "!!! TESTING IS UNSUPPORTED WITHOUT +cmake VARIANT !!!"
+ }
}
# Phase modifications
pre-extract {
- file mkdir ${worksrcpath}
+ file mkdir ${worksrcpath}
}
# Avoid issues when archive changes the top-level directory name
extract.post_args-append -C ${worksrcpath} --strip-components 1
post-patch {
- # Move directory for out-of-source build
- move ${worksrcpath} ${workpath}/eigen_src
- file mkdir ${worksrcpath}
+ # Move directory for out-of-source build
+ move ${worksrcpath} ${workpath}/eigen_src
+ file mkdir ${worksrcpath}
}
# Install licenses and documentation (if +doc)
pre-destroot {
- set build_suffix {}
- if {![info exists universal_archs_to_use]} {
- lappend build_suffix ""
- } else {
- set dash "-"
- foreach arch ${universal_archs_to_use} {
- lappend build_suffix ${dash}${arch}
+ set build_suffix {}
+ if {![info exists universal_archs_to_use]} {
+ lappend build_suffix ""
+ } else {
+ set dash "-"
+ foreach arch ${universal_archs_to_use} {
+ lappend build_suffix ${dash}${arch}
+ }
}
- }
- foreach sfx ${build_suffix} {
- set docdir ${destroot}${sfx}${prefix}/share/doc/${name}
- xinstall -d ${docdir}
- xinstall -m 644 -W ${workpath}/eigen_src COPYING.GPL COPYING.LGPL ${docdir}
+ foreach sfx ${build_suffix} {
+ set docdir ${destroot}${sfx}${prefix}/share/doc/${name}
+ xinstall -d ${docdir}
+ xinstall -m 644 -W ${workpath}/eigen_src \
+ COPYING.GPL COPYING.LGPL ${docdir}
- # Install documentation if requested
- if {[variant_isset doc]} {
- if {[string equal ${sfx} [lindex ${build_suffix} 0]]} {
- # The documentation created is slightly different for each arch
- # which makes muniversal hiccup. Just copy one set of docs
- # into destroot directories.
- file copy ${worksrcpath}${sfx}/doc/html ${docdir}
- }
- }
+ # Install documentation if requested
+ if {[variant_isset doc]} {
+ if {[string equal ${sfx} [lindex ${build_suffix} 0]]} {
+ # The documentation created is slightly different for each arch
+ # which makes muniversal hiccup. Just copy one set of docs
+ # into destroot directories.
+ file copy ${worksrcpath}${sfx}/doc/html ${docdir}
+ }
+ }
- if {[variant_isset blas]} {
- set libdir ${destroot}${sfx}${prefix}/lib
- xinstall -d ${libdir}
- eval file copy [glob ${worksrcpath}${sfx}/blas/libeigen_blas*] ${libdir}
+ if {[variant_isset blas]} {
+ set libdir ${destroot}${sfx}${prefix}/lib
+ xinstall -d ${libdir}
+ eval file copy \
+ [glob ${worksrcpath}${sfx}/blas/libeigen_blas*] ${libdir}
+ }
}
- }
}
livecheck.type regex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120921/da99d761/attachment.html>
More information about the macports-changes
mailing list