Ticket #32648: patch-reduce-algebra.diff

File patch-reduce-algebra.diff, 4.7 KB (added by pixilla (Bradley Giesbrecht), 12 years ago)

Mark's two uploads runpsl.in and Portfile as a patch. Removed unneeded revision.

  • math/reduce-algebra/files/runpsl.in

     
     1#! /bin/sh
     2
     3case `uname -m` in
     4i*)
     5      STORE=16000000
     6      ;;
     7x86_64)
     8      STORE=1000
     9      ;;
     10esac
     11
     12bin="@LIBEXECDIR@/pslbuild/psl/bpsl"
     13img="@LIBEXECDIR@/pslbuild/red/reduce.img"
     14
     15exec $bin -td $STORE -f $img $*
     16
  • math/reduce-algebra/Portfile

     
    44PortSystem          1.0
    55
    66name                reduce-algebra
    7 svn.revision        1530
     7svn.revision        1534
    88version             3.8.0-r${svn.revision}
    99categories          math
    1010platforms           darwin
     
    1313
    1414description         REDUCE algebra system
    1515
    16 long_description    REDUCE is an interactive program designed for general \
    17                     algebraic computations of interest to mathematicians, \
    18                     scientists and engineers.
     16long_description    REDUCE is an interactive program designed for general algebraic \
     17                    computations of interest to mathematicians, scientists and \
     18                    engineers. It supports numerical approximation with arbitrary \
     19                    precision and also interfaces with gnuplot to provide graphics.
    1920
    2021homepage            http://reduce-algebra.sourceforge.net/
    2122
     
    3637use_parallel_build  no
    3738universal_variant   no
    3839
    39 set dest_dir        ${prefix}/libexec/${name}
     40set topdir     ${prefix}/libexec/${name}
     41set sharedir   ${destroot}${prefix}/share/${name}
     42set libexecdir ${destroot}${prefix}/libexec/${name}
     43set docdir     ${destroot}${prefix}/share/doc/${name}
     44set bindir     ${destroot}${prefix}/bin
    4045
    4146destroot {
    42 # At present 'make install' is deeply broken, so manually install required files
    43     xinstall -d ${destroot}${dest_dir}/doc
     47# 'make install' is outdated, so manually install required files
     48    set builddir   [exec ${worksrcpath}/scripts/findhost.sh [exec ${worksrcpath}/config.guess]]
     49    set pslbuildir ${worksrcpath}/pslbuild/${builddir}
    4450
    45     xinstall -m 0644 -W ${worksrcpath} BUGS BUILDING Contributor-Release.txt \
    46         DEPENDENCY_TRACKING INSTALL README ${destroot}${dest_dir}/doc
     51    xinstall -d ${bindir} ${docdir} ${sharedir} ${libexecdir}/pslbuild
     52         
     53    eval copy ${worksrcpath}/doc/manual ${docdir}/manual
     54    eval copy ${worksrcpath}/packages ${sharedir}/packages
     55    eval copy ${worksrcpath}/psl ${libexecdir}/psl
     56    foreach d {buildlogs deps psl red} {
     57        eval copy ${pslbuildir}/$d ${libexecdir}/pslbuild/$d
     58    }
    4759
    48     xinstall -d ${destroot}${dest_dir}/bin
    49     xinstall ${worksrcpath}/bin/redpsl ${destroot}${dest_dir}/bin
    50 
    51     xinstall -d ${destroot}${dest_dir}/pslbuild
    52     eval copy [glob ${worksrcpath}/pslbuild/*] ${destroot}${dest_dir}/pslbuild
    53 
    54     xinstall -d ${destroot}${dest_dir}/scripts
    55     eval copy [glob ${worksrcpath}/scripts/*] ${destroot}${dest_dir}/scripts
    56 
    57     xinstall ${worksrcpath}/config.guess ${destroot}${dest_dir}
     60    xinstall ${filespath}/runpsl.in ${bindir}/redpsl
     61    reinplace "s|@LIBEXECDIR@|${prefix}/libexec/${name}|g" ${bindir}/redpsl
    5862}
    5963
    6064variant html description {Install documentation in HTML format} {
     
    6670    }
    6771
    6872    post-destroot {
    69         xinstall -d ${destroot}${dest_dir}/doc/html
    70         eval xinstall -m 0644 [glob ${worksrcpath}/doc/manual/*.html] ${destroot}${dest_dir}/doc/html
     73        eval xinstall -m 0644 [glob ${worksrcpath}/doc/manual/*.html] ${docdir}/manual
    7174    }
    7275}
    7376
     
    8083    }
    8184
    8285    post-destroot {
    83         xinstall -d ${destroot}${dest_dir}/doc/pdf
    84         xinstall -m 0644 ${worksrcpath}/doc/manual/manual-pdf.pdf ${destroot}${dest_dir}/doc/pdf
     86        xinstall -m 0644 ${worksrcpath}/doc/manual/manual-pdf.pdf ${docdir}/manual
    8587    }
    8688}
    8789
     90post-activate {
     91# create a second image after all modules have been built, with the final value of
     92# loaddirectories!*. Otherwise loading a module will always search the build directories
     93# in worksrcpath (which don't exist).
     94    set pslbuildir ${topdir}/pslbuild
     95
     96    system "cd ${pslbuildir}; exec sh -xv ${topdir}/psl/saveimage.sh ${pslbuildir}/red \
     97        ${pslbuildir}"
     98
     99    file rename -force ${pslbuildir}/log/reduce.blg \
     100                       ${pslbuildir}/buildlogs/reduce.img.blg
     101    file delete -force ${pslbuildir}/log
     102}
     103
    88104livecheck.type      none
    89 
    90 notes "
    91 To use the PSL version of Reduce, add this directory to your PATH environment variable:
    92     ${prefix}/libexec/reduce-algebra/bin/
    93 "