[107945] trunk/dports/math/octave-devel
michaelld at macports.org
michaelld at macports.org
Tue Jul 9 13:36:36 PDT 2013
Revision: 107945
https://trac.macports.org/changeset/107945
Author: michaelld at macports.org
Date: 2013-07-09 13:36:36 -0700 (Tue, 09 Jul 2013)
Log Message:
-----------
octave-devel:
* make metis a variant; warn when using about license issues;
* move fontconfig and freetype dependency to +fltk variant;
* remove special compiler for display.cc; seems to work without this;
* add patches for modern clang compiling (from upstream);
* redo logic to allow for +g95 as the Fortran compiler so long as MacPorts gcc are not used as the C/C++ compilers;
* do not allow +g95 and +atlas; these do not play nicely;
* addresses ticket #39277;
* addresses upstream needs for licensing.
Modified Paths:
--------------
trunk/dports/math/octave-devel/Portfile
Added Paths:
-----------
trunk/dports/math/octave-devel/files/patch-liboctave-eigs-base.cc.diff
trunk/dports/math/octave-devel/files/patch-liboctave-regexp.h.diff
Removed Paths:
-------------
trunk/dports/math/octave-devel/files/patch-configure.diff
Modified: trunk/dports/math/octave-devel/Portfile
===================================================================
--- trunk/dports/math/octave-devel/Portfile 2013-07-09 20:34:11 UTC (rev 107944)
+++ trunk/dports/math/octave-devel/Portfile 2013-07-09 20:36:36 UTC (rev 107945)
@@ -1,11 +1,12 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id$
-PortSystem 1.0
+PortSystem 1.0
+PortGroup active_variants 1.1
name octave-devel
version 3.6.4
-revision 4
+revision 5
conflicts octave
categories math science
maintainers michaelld openmaintainer
@@ -44,12 +45,9 @@
port:curl \
port:fftw-3 \
port:fftw-3-single \
- port:fontconfig \
- port:freetype \
port:glpk \
port:GraphicsMagick \
port:hdf5-18 \
- port:metis \
port:ncurses \
port:pcre \
port:qhull \
@@ -65,24 +63,11 @@
port:transfig \
port:pstoedit
-# allow us to disable checking for FLTK
-# via the environment variable "FLTK_CONFIG"
-patchfiles-append patch-configure.diff
-
universal_variant no
-# octave requires a fortran compiler, so require the use of one of the
-# MacPorts GCC ports (for now).
+# common configure arguments
-compiler.blacklist gcc-3.3 gcc-4.0 gcc-4.2 llvm-gcc-4.2 \
- apple-gcc-4.0 apple-gcc-4.2 clang macports-clang-2.9 \
- macports-clang-3.0 macports-clang-3.1 macports-clang-3.2 \
- macports-clang-3.3 macports-llvm-gcc-4.2
-
configure.args --disable-dependency-tracking \
- --without-x \
- --disable-docs \
- --with-cholmod="-lcholmod -lmetis" \
--with-umfpack="-lumfpack -lSuiteSparse"
# octave uses a number of other ports to create sources from template:
@@ -90,31 +75,30 @@
# MacPorts' versions. Python is not used if perl is available, so
# clear it out. grep is checked for in 'configure', but not used
# except inside that script; include it here for completion.
+
configure.perl ${prefix}/bin/perl
configure.python ' '
configure.awk ${prefix}/bin/gawk
configure.env-append GREP="${prefix}/bin/grep" \
- FLTK_CONFIG=no \
SED="${prefix}/bin/gsed" \
TEXI2DVI="${prefix}/bin/texi2dvi" \
- TEXI2PDF="${prefix}/bin/texi2pdf" \
- APPLE_CXX="/usr/bin/g++"
+ TEXI2PDF="${prefix}/bin/texi2pdf"
configure.cppflags
configure.ldflags
-pre-build {
- reinplace "/'display\.cc'/s@\$(CXX)@\$(APPLE_CXX)@g" \
- ${worksrcpath}/src/Makefile
-}
-
-build.env-append APPLE_CXX="/usr/bin/g++"
-
test.run yes
test.target check
+# temporary patches; these are fixed upstream already.
+
+patchfiles-append \
+ patch-liboctave-eigs-base.cc.diff \
+ patch-liboctave-regexp.h.diff
+
platform darwin 11 {
# 10.7 requires an extra patch; this patch will break the build on
# 10.6 and prior, so apply it only under 10.7.
+
patchfiles-append patch-src-display.cc.diff
}
@@ -129,64 +113,54 @@
build.args-append LANG="C"
}
-variant gcc43 description {build with the macports gcc43 toolchain} conflicts gcc49 gcc48 gcc47 gcc46 gcc45 gcc44 g95 {}
+variant gcc43 description {build with the macports gcc43 toolchain} \
+ conflicts gcc49 gcc48 gcc47 gcc46 gcc45 gcc44 g95 {}
-variant gcc44 description {build with the macports gcc44 toolchain} conflicts gcc49 gcc48 gcc47 gcc46 gcc45 gcc43 g95 {}
+variant gcc44 description {build with the macports gcc44 toolchain} \
+ conflicts gcc49 gcc48 gcc47 gcc46 gcc45 gcc43 g95 {}
-variant gcc45 description {build with the macports gcc45 toolchain} conflicts gcc49 gcc48 gcc47 gcc46 gcc44 gcc43 g95 {}
+variant gcc45 description {build with the macports gcc45 toolchain} \
+ conflicts gcc49 gcc48 gcc47 gcc46 gcc44 gcc43 g95 {}
-variant gcc46 description {build with the macports gcc46 toolchain} conflicts gcc49 gcc48 gcc47 gcc45 gcc44 gcc43 g95 {}
+variant gcc46 description {build with the macports gcc46 toolchain} \
+ conflicts gcc49 gcc48 gcc47 gcc45 gcc44 gcc43 g95 {}
-variant gcc47 description {build with the macports gcc47 toolchain} conflicts gcc49 gcc48 gcc46 gcc45 gcc44 gcc43 g95 {}
+variant gcc47 description {build with the macports gcc47 toolchain} \
+ conflicts gcc49 gcc48 gcc46 gcc45 gcc44 gcc43 g95 {}
-variant gcc48 description {build with the macports gcc48 toolchain} conflicts gcc49 gcc47 gcc46 gcc45 gcc44 gcc43 g95 {}
+variant gcc48 description {build with the macports gcc48 toolchain} \
+ conflicts gcc49 gcc47 gcc46 gcc45 gcc44 gcc43 g95 {}
-variant gcc49 description {build with the macports gcc49 toolchain} conflicts gcc48 gcc47 gcc46 gcc45 gcc44 gcc43 g95 {}
+variant gcc49 description {build with the macports gcc49 toolchain} \
+ conflicts gcc48 gcc47 gcc46 gcc45 gcc44 gcc43 g95 {}
-variant g95 description {build with g95} conflicts gcc49 gcc48 gcc47 gcc46 gcc45 gcc44 gcc43 {
- depends_build-append port:g95
- configure.f77 "${prefix}/bin/g95"
-}
+variant g95 description {build with g95 as the Fortran compiler} \
+ conflicts gcc49 gcc48 gcc47 gcc46 gcc45 gcc44 gcc43 {}
-variant atlas description {use BLAS from ATLAS} conflicts accelerate {
- depends_lib-append port:atlas
-}
+# check for GCC / G95 variants. The default here does not have to
+# match the default found in the 'atlas' port.
-variant accelerate description {use BLAS from Apple's Accelerate.framework} conflicts atlas {
- depends_lib-append port:dotwrp
- configure.args-append --with-blas="-ldotwrp -Wl,-framework -Wl,Accelerate"
- configure.args-append --with-lapack="-Wl,-framework -Wl,Accelerate"
-}
-
-if {[variant_isset g95]} {
- default_variants +accelerate
-} elseif {![variant_isset accelerate]} {
- default_variants +atlas
-}
-
-# check for GCC / G95 variants. The default here must match the
-# default found in the 'atlas' port (but, this is not checked for).
-
# check for setting the default variant (gcc47)
-if { ![variant_isset gcc43] && ![variant_isset gcc44] && \
- ![variant_isset gcc45] && ![variant_isset gcc46] && \
- ![variant_isset gcc47] && ![variant_isset gcc48] && \
- ![variant_isset gcc49] && ![variant_isset g95] } {
+if { ![variant_isset gcc43] && ![variant_isset gcc44] && \
+ ![variant_isset gcc45] && ![variant_isset gcc46] && \
+ ![variant_isset gcc47] && ![variant_isset gcc48] && \
+ ![variant_isset gcc49] && ![variant_isset g95] } {
default_variants +gcc47
}
# check if the user disabled just the default variant: -gcc47
-if { ![variant_isset gcc43] && ![variant_isset gcc44] && \
- ![variant_isset gcc45] && ![variant_isset gcc46] && \
- ![variant_isset gcc47] && ![variant_isset gcc48] && \
- ![variant_isset gcc49] && ![variant_isset g95] } {
- pre-fetch {
- error "You must select one of the compiler variants."
- }
+if { ![variant_isset gcc43] && ![variant_isset gcc44] && \
+ ![variant_isset gcc45] && ![variant_isset gcc46] && \
+ ![variant_isset gcc47] && ![variant_isset gcc48] && \
+ ![variant_isset gcc49] && ![variant_isset g95] } {
+ ui_error "\n\nYou cannot use the -gcc47 variant alone; a Fortran compiler is required.\n"
+ return -code error "Invalid variant selection"
}
+# use the correct +gccXY, if selected
+
set gcc_version ""
if {[variant_isset gcc43]} {
set gcc_version "4.3"
@@ -205,30 +179,165 @@
}
if {${gcc_version} != ""} {
+
set gcc_version_join [join [split ${gcc_version} "."] ""]
- configure.ldflags "-L${prefix}/lib/gcc${gcc_version_join}"
- configure.ldflags-append -lstdc++ -lgfortran
- depends_build-append port:gcc${gcc_version_join}
- configure.compiler macports-gcc-${gcc_version}
+ depends_build-append port:gcc${gcc_version_join}
+ configure.ldflags -L${prefix}/lib/gcc${gcc_version_join} \
+ -lstdc++ -lgfortran
+ configure.compiler macports-gcc-${gcc_version}
+
}
-variant docs description {Enable creation and installation of documentation} {
- depends_run-append port:texlive-basic
+variant atlas description {use BLAS from MacPorts' atlas port} \
+ conflicts g95 accelerate {}
+
+variant accelerate description \
+ {use BLAS from Apple's Accelerate.framework [might be buggy]} \
+ conflicts atlas {}
+
+if {[variant_isset g95]} {
+
+ # +g95, so no +gccXY; blacklist all of the MacPorts GCC compilers;
+ # all others should work OK, since they do not provide Fortran.
+ # When using +gccXY, the Fortran compiler from that variant must
+ # be used otherwise symbols will come up as undefined.
+
+ compiler.blacklist \
+ macports-gcc-4.2 macports-gcc-4.3 macports-gcc-4.4 \
+ macports-gcc-4.5 macports-gcc-4.6 macports-gcc-4.7 \
+ macports-gcc-4.8 macports-gcc-4.9
+
+ default_variants +accelerate
+
+ depends_build-append port:g95
+ configure.f77 ${prefix}/bin/g95
+
+} else {
+
+ # no +g95, so using +gccXY; blacklist all the other non-Fortran
+ # providing compilers; we cannot mix and match compilers if using
+ # +gccXY.
+
+ compiler.blacklist gcc-3.3 gcc-4.0 gcc-4.2 llvm-gcc-4.2 \
+ apple-gcc-4.0 apple-gcc-4.2 clang macports-clang-2.9 \
+ macports-clang-3.0 macports-clang-3.1 macports-clang-3.2 \
+ macports-clang-3.3 macports-llvm-gcc-4.2
+
+ # if using +gccXY, default to +atlas
+
+ if {![variant_isset accelerate] && ![variant_isset atlas]} {
+ default_variants +atlas
+ }
+}
+
+# make sure that either +accelerate or +atlas is selected
+
+if {![variant_isset accelerate] && ![variant_isset atlas]} {
+
+ ui_error "\n\nYou must select either the +accelerate or +atlas variant.\n"
+ return -code error "Invalid variant selection"
+
+}
+
+if {[variant_isset accelerate]} {
+
+ depends_lib-append port:dotwrp
+ configure.args-append \
+ --with-blas="-ldotwrp -Wl,-framework -Wl,Accelerate" \
+ --with-lapack="-Wl,-framework -Wl,Accelerate"
+
+} else {
+
+ depends_lib-append port:atlas
+ # NOTE: libtatlas does not work as of 3.10.1_5
+ configure.args-append --with-blas="-lcblas -lf77blas -latlas"
+
+}
+
+variant docs description {Enable creation and installation of \
+ documentation including manpages} {}
+
+if {[variant_isset docs]} {
+
+ depends_run-append port:texlive-basic
# latex needed for lcircle10 font etc.
- depends_build-append port:texlive-latex
- configure.args-replace s|--disable-docs|--enable-docs|
+ depends_build-append port:texlive-latex
+ configure.args-append --enable-docs
+
+} else {
+
+ configure.args-append --disable-docs
+
}
-variant x11 description {Enable use of X11} {
- configure.args-replace s|--without-x|--with-x|
- configure.args-append --x-includes=${prefix}
+variant x11 description {Enable use of X11} {}
+
+if {[variant_isset x11]} {
+
+ configure.args-append --with-x --x-includes=${prefix}
+
+} else {
+
+ configure.args-append --without-x
+
}
-variant fltk description {Include FLTK for graphical front-end} {
- depends_lib-append path:lib/libfltk.dylib:fltk
- configure.env-delete FLTK_CONFIG=no
+variant fltk description {Enable FLTK as a graphical front-end} {}
+
+if {[variant_isset fltk]} {
+
+ depends_lib-append path:lib/libfltk.dylib:fltk \
+ port:fontconfig \
+ port:freetype
+ configure.args-append --with-opengl
+
+} else {
+
+ configure.args-append --without-opengl
+
}
+variant metis description {Use SuiteSparse + Metis for graph partitioning} {
+ pre-fetch {
+ ui_msg "\nWARNING: ${name} variant +metis uses the metis port, whose license metis is incompatible with Octave's. You can use this combination locally, but you cannot distribute them as a single package (e.g., tarball, m/pkg, archive)."
+ }
+}
+
+if {[variant_isset metis]} {
+
+ depends_lib-append port:metis
+ configure.args-append --with-cholmod="-lcholmod -lmetis"
+
+ # make sure SuiteSparse is installed with +metis
+ require_active_variants SuiteSparse metis
+
+} else {
+
+ configure.args-append --with-cholmod="-lcholmod"
+
+ # make sure SuiteSparse is installed without +metis
+ require_active_variants SuiteSparse {} metis
+
+}
+
+pre-fetch {
+
+ # check for +accelerate here as well as in dependent ports;
+ # Apple's VecLib has bugs that cause Octave to crash sometimes,
+ # while Atlas does not have these issues. Print a warning if this
+ # variant is in use, but do not force the use of +atlas (for now).
+
+ if {![catch {set result [active_variants arpack accelerate {}]}]} {
+ if {$result} {
+ ui_msg "\nWARNING: Dependency 'arpack' is installed with the +accelerate variant, using Apple's Vector Libraries which have known bugs that can cause Octave to crash if using certain functions in arpack. The +atlas variant does not have these issues with Octave, and is considered by Octave developers a better way to go.\n"
+ }
+ }
+
+ if {[variant_isset accelerate]} {
+ ui_msg "\nWARNING: The +accelerate variant has been selected, using Apple's Vector Libraries which have known bugs that can cause Octave to crash. The +atlas variant does not have these issues with Octave, and is considered by Octave developers a better way to go.\n"
+ }
+}
+
livecheck.type regex
livecheck.url http://www.gnu.org/software/octave/download.html
livecheck.regex GNU Octave (\[\^\ \]*) was
Deleted: trunk/dports/math/octave-devel/files/patch-configure.diff
===================================================================
--- trunk/dports/math/octave-devel/files/patch-configure.diff 2013-07-09 20:34:11 UTC (rev 107944)
+++ trunk/dports/math/octave-devel/files/patch-configure.diff 2013-07-09 20:36:36 UTC (rev 107945)
@@ -1,43 +0,0 @@
---- configure.orig 2012-09-21 11:41:47.000000000 -0400
-+++ configure 2012-09-21 11:42:36.000000000 -0400
-@@ -32450,8 +32450,8 @@
- LDFLAGS="$LDFLAGS -framework Carbon"
- ac_ext=cpp
- ac_cpp='$CXXCPP $CPPFLAGS'
--ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
--ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compile='$APPLE_CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$APPLE_CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-@@ -37034,6 +37034,21 @@
-
- ## fltk (www.fltk.org)
-
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fltk..." >&5
-+$as_echo_n "checking for fltk... " >&6; }
-+
-+# Check whether FLTK_CONFIG is set and equal to "no"
-+use_fltk="auto detect"
-+if test "${FLTK_CONFIG+set}" = set ; then
-+ if test "${FLTK_CONFIG}" = "no" ; then
-+ use_fltk="disabled"
-+ fi
-+fi
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${use_fltk}" >&5
-+$as_echo "${use_fltk}" >&6; }
-+
-+if test "${use_fltk}" != "disabled"; then
-
- # Check whether --with-fltk-prefix was given.
- if test "${with_fltk_prefix+set}" = set; then :
-@@ -37110,6 +37125,7 @@
- $as_echo "no" >&6; }
- fi
-
-+fi
-
-
- warn_fltk_config=""
Added: trunk/dports/math/octave-devel/files/patch-liboctave-eigs-base.cc.diff
===================================================================
--- trunk/dports/math/octave-devel/files/patch-liboctave-eigs-base.cc.diff (rev 0)
+++ trunk/dports/math/octave-devel/files/patch-liboctave-eigs-base.cc.diff 2013-07-09 20:36:36 UTC (rev 107945)
@@ -0,0 +1,58 @@
+--- liboctave/eigs-base.cc.orig 2013-07-08 16:37:38.000000000 -0400
++++ liboctave/eigs-base.cc 2013-07-08 16:47:33.000000000 -0400
+@@ -3833,43 +3833,43 @@
+ #endif
+
+ #ifndef _MSC_VER
+-template static octave_idx_type
++template octave_idx_type
+ lusolve (const SparseMatrix&, const SparseMatrix&, Matrix&);
+
+-template static octave_idx_type
++template octave_idx_type
+ lusolve (const SparseComplexMatrix&, const SparseComplexMatrix&,
+ ComplexMatrix&);
+
+-template static octave_idx_type
++template octave_idx_type
+ lusolve (const Matrix&, const Matrix&, Matrix&);
+
+-template static octave_idx_type
++template octave_idx_type
+ lusolve (const ComplexMatrix&, const ComplexMatrix&, ComplexMatrix&);
+
+-template static ComplexMatrix
++template ComplexMatrix
+ ltsolve (const SparseComplexMatrix&, const ColumnVector&,
+ const ComplexMatrix&);
+
+-template static Matrix
++template Matrix
+ ltsolve (const SparseMatrix&, const ColumnVector&, const Matrix&);
+
+-template static ComplexMatrix
++template ComplexMatrix
+ ltsolve (const ComplexMatrix&, const ColumnVector&, const ComplexMatrix&);
+
+-template static Matrix
++template Matrix
+ ltsolve (const Matrix&, const ColumnVector&, const Matrix&);
+
+-template static ComplexMatrix
++template ComplexMatrix
+ utsolve (const SparseComplexMatrix&, const ColumnVector&,
+ const ComplexMatrix&);
+
+-template static Matrix
++template Matrix
+ utsolve (const SparseMatrix&, const ColumnVector&, const Matrix&);
+
+-template static ComplexMatrix
++template ComplexMatrix
+ utsolve (const ComplexMatrix&, const ColumnVector&, const ComplexMatrix&);
+
+-template static Matrix
++template Matrix
+ utsolve (const Matrix&, const ColumnVector&, const Matrix&);
+ #endif
+
Added: trunk/dports/math/octave-devel/files/patch-liboctave-regexp.h.diff
===================================================================
--- trunk/dports/math/octave-devel/files/patch-liboctave-regexp.h.diff (rev 0)
+++ trunk/dports/math/octave-devel/files/patch-liboctave-regexp.h.diff 2013-07-09 20:36:36 UTC (rev 107945)
@@ -0,0 +1,11 @@
+--- liboctave/regexp.h.orig 2013-07-08 15:56:42.000000000 -0400
++++ liboctave/regexp.h 2013-07-08 15:56:48.000000000 -0400
+@@ -87,7 +87,7 @@
+ std::string replace (const std::string& buffer,
+ const std::string& replacement);
+
+- struct opts
++ class opts
+ {
+ public:
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130709/7b392d13/attachment-0001.html>
More information about the macports-changes
mailing list