[76998] trunk/dports/math/eigen3/Portfile
eborisch at macports.org
eborisch at macports.org
Thu Mar 17 09:16:32 PDT 2011
Revision: 76998
http://trac.macports.org/changeset/76998
Author: eborisch at macports.org
Date: 2011-03-17 09:16:30 -0700 (Thu, 17 Mar 2011)
Log Message:
-----------
eigen3: add +gcc44, +gcc45, and +blas variants.
Modified Paths:
--------------
trunk/dports/math/eigen3/Portfile
Modified: trunk/dports/math/eigen3/Portfile
===================================================================
--- trunk/dports/math/eigen3/Portfile 2011-03-17 15:29:17 UTC (rev 76997)
+++ trunk/dports/math/eigen3/Portfile 2011-03-17 16:16:30 UTC (rev 76998)
@@ -1,10 +1,11 @@
# $Id$
PortSystem 1.0
-PortGroup cmake 1.0
+#PortGroup cmake 1.0
name eigen3
version 3.0-rc1
+revision 1
license {{GPL-2+} {LGPL-3+}}
categories math science
maintainers eborisch \
@@ -23,15 +24,32 @@
rmd160 a6617b380e8fc0f89c7209279098059d2c8a44ce
# Variants
-variant llvm description { Enable llvm-g++ for 'port test' target.} requires configured {
- configure.compiler llvm-gcc-4.2
+variant llvm description { Enable llvm-g++ for 'port test' target.} requires configured conflicts gcc44 gcc45 {
+ configure.compiler llvm-gcc-4.2
}
+variant gcc44 description { Use MacPort's gcc44 compilers } conflicts gcc45 llvm {
+ configure.compiler macports-gcc-4.4
+}
+
+variant gcc45 description { Use MacPort's gcc44 compilers } conflicts gcc44 llvm {
+ configure.compiler macports-gcc-4.5
+}
+
variant doc description { Place local documentation into <prefix>/share/doc/eigen3/html } requires configured {
depends_build-append port:doxygen port:texlive-latex
build.target-append doc
}
+variant blas description { Build Eigen-based libblas. Conflicts with other BLAS sources. } requires configured {
+ if {![variant_isset gcc44] && ![variant_isset gcc45]} {
+ ui_error "eigen3 +blas needs either +gcc44 or +gcc45 to succeed!"
+ return -code error
+ } else {
+ build.target-append blas
+ }
+}
+
variant configured description { Enable configure steps. (Enables 'port test' target.) } {
}
@@ -42,9 +60,6 @@
file mkdir ${worksrcpath}
}
-# Out of source build
-configure.args-append ../eigen_src
-
# Install licenses and documentation (if +doc)
post-destroot {
set docdir ${destroot}${prefix}/share/doc/${name}
@@ -55,6 +70,12 @@
if {[variant_isset doc]} {
file copy ${worksrcpath}/doc/html ${docdir}
}
+
+ if {[variant_isset blas]} {
+ set libdir ${destroot}${prefix}/lib
+ xinstall -d ${libdir}
+ eval file copy [glob ${worksrcpath}/blas/libeigen_blas*] ${libdir}
+ }
}
# Are we doing a header-only or configured (for 'port test' or +doc) build?
@@ -62,7 +83,7 @@
# We can skip everything and just copy the headers -- fast!
# Just headers so noarch
supported_archs noarch
- use_configure no
+ use_configure no
build {}
destroot {
set incldir ${destroot}${prefix}/include/${name}
@@ -72,27 +93,47 @@
}
# Fail with message if user tries to test
- test.run yes
+ test.run yes
test {
- puts "!!! TESTING IS UNSUPPORTED WITHOUT +configured VARIANT !!!"
+ ui_error "!!! TESTING IS UNSUPPORTED WITHOUT +configured VARIANT !!!"
}
} else {
+ # 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
+
+ depends_build-append port:cmake
+
+ configure.cmd cmake
+
+ configure.pre_args -DCMAKE_INSTALL_PREFIX=${prefix}
+
+ 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
+
+ # Out of source build
+ configure.args-append ../eigen_src
+
# 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}
+ 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}
+ build.env-append EIGEN_MAKE_ARGS=-j{build.jobs}
# Binaries don't actually get installed; just test on default architecture
- universal_variant no
-
- post-destroot {
- }
+ universal_variant no
}
-livecheck.type regex
-livecheck.url ${homepage}index.php?title=ChangeLog
-livecheck.regex {Eigen (\d+(?:\.\d+)*)}
+livecheck.type regex
+livecheck.url ${homepage}index.php?title=ChangeLog
+livecheck.regex {Eigen (\d+(?:\.\d+)*)}
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110317/9670eb8f/attachment.html>
More information about the macports-changes
mailing list