Ignore:
Timestamp:
Nov 27, 2013, 4:20:17 PM (5 years ago)
Author:
michaelld@…
Message:

octave:
+ move octave-devel to octave;
+ set octave-devel as replaced_by octave;
+ fix all possible octave modules to work correctly under 10.8 and 10.9;
+ set remaining 3 octave modules as deprecated because they do not work with octave 3.6 or newer, and there is no easy means to address the errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/octave-1.0.tcl

    r101770 r114034  
    2929# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    3030#
    31 #
    32 # This PortGroup automatically sets up the standard environment for building
    33 # an octave module.
     31# This PortGroup automatically sets up the standard environment for
     32# building an octave module.
    3433#
    3534# Usage:
     
    3837#   octave.setup            module version
    3938#
    40 # where module is the name of the module (e.g. communications) and version is
    41 # its version.
    42 
     39# where module is the name of the module (e.g. communications) and
     40# version is its version.
    4341
    4442options octave.module
     
    5755    depends_lib                 path:bin/octave:octave
    5856
     57    worksrcdir                  ${octave.module}
     58
    5959    # octave is not universal
     60
    6061    universal_variant           no
    61     use_configure               no
     62
     63    # do not build in parallel; many can't, and these are small builds
     64    # anyway, so no major need for this.
     65
     66    use_parallel_build          no
     67
     68    configure.pre_args
     69    configure.post_args
    6270
    6371    livecheck.type              regex
    6472    livecheck.url               http://octave.sourceforge.net/packages.php
    6573    livecheck.regex             http://downloads\\.sourceforge\\.net/octave/${octave.module}-(\\d+(\\.\\d+)*)\\.tar
     74
    6675}
    6776
    68 extract {
    69     xinstall -d -m 755 ${worksrcpath}
     77post-extract {
     78
     79    # rename the effective worksrcdir to always be ${octave.module}
     80
     81    set worksrcdir_name [exec /bin/ls ${workpath} | grep -v -E "^\\."]
     82    if {[string equal ${worksrcdir_name} ${octave.module}] == 0} {
     83        move ${workpath}/${worksrcdir_name} ${workpath}/${octave.module}
     84    }
     85
    7086}
    7187
    72 build {
    73     system "${prefix}/bin/octave -q -f --eval 'pkg build -verbose -nodeps ${worksrcpath} ${distpath}/${distfiles}'"
     88post-patch {
     89    # In 10.8+, set the locale to "C" otherwise /usr/bin/sed can fail
     90    # with an error when processing unicode characters.
     91
     92    set locale ""
     93    platform darwin {
     94        if {${os.major} >= 12} {
     95            set locale "-locale \"C\""
     96        }
     97    }
     98
     99    # do not auto-load; like, ever.  Not all files will need this, but
     100    # it's a simple catch-all.
     101
     102    eval [subst {
     103        reinplace ${locale} "/Autoload/s@yes@no@g" ${worksrcpath}/DESCRIPTION
     104    }]
     105
     106    # create a tarball of the resulting patched module
     107
     108    xinstall -d -m 755 ${workpath}
     109    system "cd ${workpath} && tar zcf .tmp/${octave.module}.tar.gz ${worksrcdir}"
     110    delete ${worksrcpath}
    74111}
     112
     113pre-configure {
     114
     115    # set parameters, now that variables are available for use
     116
     117    configure.cmd ${prefix}/bin/octave
     118    configure.args -q -f --eval 'pkg build -verbose -nodeps ${worksrcpath} ${workpath}/.tmp/${octave.module}.tar.gz'
     119
     120    # fix usage of LAPACK_LIBS to include FLIBS, such that -lgfortran
     121    # is always paired with the appropriate -Lpath statement.
     122
     123    configure.env-append \
     124        LAPACK_LIBS='[exec ${prefix}/bin/mkoctfile -p FLIBS] [exec ${prefix}/bin/mkoctfile -p LAPACK_LIBS]'
     125
     126    platform darwin {
     127        if {${os.major} >= 12} {
     128
     129            # In 10.8+, set the LC_CTYPE (locale) to "C" otherwise
     130            # /usr/bin/sed can fail with an error when processing
     131            # unicode characters.
     132
     133            configure.env-append LC_CTYPE="C"
     134        }
     135    }
     136}
     137
     138# dummy build phase, since this has already been done
     139
     140build {}
    75141
    76142destroot.keepdirs   ${destroot}${prefix}/lib/octave/packages \
     
    87153
    88154post-deactivate {
    89     system "${prefix}/bin/octave -q -f --eval 'pkg prefix ${prefix}/share/octave/packages ${prefix}/lib/octave/packages; pkg uninstall ${octave.module}'"
     155    system "${prefix}/bin/octave -q -f --eval 'pkg prefix ${prefix}/share/octave/packages ${prefix}/lib/octave/packages; pkg uninstall -nodeps ${octave.module}'"
    90156    system "${prefix}/bin/octave -q -f --eval 'pkg prefix ${prefix}/share/octave/packages ${prefix}/lib/octave/packages; pkg rebuild'"
    91157}
Note: See TracChangeset for help on using the changeset viewer.