Finished reduce-algebra portfile

Mark Brethen mark.brethen at gmail.com
Sat Dec 17 22:06:48 PST 2011


I've finished the portfile (listed below) which installs the PSL version of reduce. The contents of the build are copied to ${prefix}/libexec/reduce-algebra. According to the readme, you should put ${prefix}/libexec/reduce-algebra/bin in your PATH, since the scripts therein rely on paths relative to the place where they themselves live. I tried placing a symlink of the redpsl script in ${prefix}/bin but it did not work. Although it seems to be a wrapper script, I haven't attempted to rewrite it.

----------
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$

PortSystem          1.0
name                reduce-algebra
svn.revision        1530
version             3.8.0-r${svn.revision}
categories          math
license             modified BSD
maintainers         gmail.com:mark.brethen
description         REDUCE algebra system
long_description \
   REDUCE is an interactive program designed for general algebraic \
   computations of interest to mathematicians, scientists and engineers.

platforms           darwin

homepage            http://reduce-algebra.sourceforge.net/

fetch.type          svn
svn.url \
   https://reduce-algebra.svn.sourceforge.net/svnroot/reduce-algebra/trunk
svn.method          checkout
worksrcdir          trunk

depends_build       port:pkgconfig

depends_lib         port:xorg-libX11 \
                    port:Xft2 \
                    port:xorg-libXext \
                    port:ncurses

configure.args      --with-psl

use_parallel_build  no
universal_variant   no

post-build {
    if {[variant_isset html]} {
	    system "cd ${worksrcpath}/doc/manual; sh mkhtml.sh"
    } 
    
    if {[variant_isset pdf]} {
	    system "cd ${worksrcpath}/doc/manual; sh mkpdf.sh"
    }
}

variant html description {Installs documentation in HTML format} {
	depends_build-append bin:makeindex:texlive-basic
    depends_build-append bin:mk4ht:texlive-htmlxml
} 

variant pdf description {Installs documentation in PDF format} {
	depends_build-append bin:makeindex:texlive-basic
    depends_build-append bin:pdflatex:texlive-basic	
} 

destroot {
# At present 'make install' is deeply broken, so manually install required files
    set dest_dir  ${prefix}/libexec/${name}

    xinstall -d ${destroot}${dest_dir}/doc

    xinstall -m 0644 -W ${worksrcpath} BUGS BUILDING Contributor-Release.txt \
	    DEPENDENCY_TRACKING INSTALL README ${destroot}${dest_dir}/doc

    if {[variant_isset html]} {
        xinstall -d ${destroot}${dest_dir}/doc/html
        foreach f [glob [file join ${worksrcpath}/doc/manual *.html]] {
            eval xinstall -m 0644 ${f} ${destroot}${dest_dir}/doc/html
        }
    }

    if {[variant_isset pdf]} {
        xinstall -d ${destroot}${dest_dir}/doc/pdf
        xinstall -m 0644 ${worksrcpath}/doc/manual/manual-pdf.pdf ${destroot}${dest_dir}/doc/pdf
    }

    xinstall -d ${destroot}${dest_dir}/bin
    xinstall ${worksrcpath}/bin/redpsl ${destroot}${dest_dir}/bin

    xinstall -d ${destroot}${dest_dir}/pslbuild    
    system "cp -a ${worksrcpath}/pslbuild/* ${destroot}${dest_dir}/pslbuild"

    xinstall -d ${destroot}${dest_dir}/scripts
    system "cp -a ${worksrcpath}/scripts/* ${destroot}${dest_dir}/scripts"

    xinstall ${worksrcpath}/config.guess ${destroot}${dest_dir}
}

livecheck.type      none

notes "
	To use the PSL version of Reduce, add this directory to your PATH environment variable:
	    ${prefix}/libexec/reduce-algebra/bin/
	 
"


Mark






More information about the macports-dev mailing list