reduce-algebra portfile

Mark Brethen mark.brethen at
Sun Dec 11 17:33:43 PST 2011

I have a working portfile (included below) and verified that the psl variant builds. The user has two options : 1) Build Reduce using the CSL Lisp system [default] or 2) using the PSL Lisp system [variant]. Is this the preferred way of using a variant? 

At present "make install" is deeply broken and I get "Error: No files have been installed in the destroot directory!" 

The main directories supplied are
as follows, where MACHINE stands for a machine identification, eg

 trunk                    The main version of everything
   bin                    Scripts to launch REDUCE etc
   csl/cslbase            Main CSL Lisp sources
       fox                the FOX GUI toolkit, an LGPL package
   cslbuild/generated-c   Part of REDUCE compiled into C
            MACHINE/csl   where REDUCE binaries are built
                    fox   where the FOX GUI toolkit is built
   csllogs/MACHINE/build  logs from building REDUCE
                   test   logs from testing REDUCE
   packages/alg           REDUCE sources, on package per directory
   psl/psl-amd64          Ready-build binaries of the PSL Lisp system ...
       ...                ...
       psl/win32          ... for a variety of architectures
   pslbuild/MACHINE/.     where REDUCE gets built
                    psl   copy of relevant architecture-specific PSL
                    red   REDUCE built binary "fasl" and image files
                    deps  used to record dependencies in the build
   psllogs/build          logs from building REDUCE
           test           logs from testing REDUCE
   scripts                scripts used to maintain the system.

Using something like:

destroot {
	xinstall ${worksrcpath}/bin/redcsl ${destroot}${prefix}/bin

can be done,  but the binaries are actually built within cslbuild/<MACHINE>/ or pslbuild/<MACHINE>/, and the scripts like bin/redcsl deduce where to look and
chain to binaries there. Reduce needs some resources in the same directory as the bin executable so merely copying <MACHINE>/csl/reduce to somewhere else is not liable to be a good idea.

PortSystem          1.0
name                reduce-algebra
version             1273
categories          math
license             BSD License
maintainers         mdb openmaintainer
description         REDUCE algebra system
long_description \
   This is the REDUCE algebra system, which was originally developed by \
   Tony Hearn.

platforms           darwin


fetch.type          svn
svn.url \
svn.revision        ${version}
svn.method          checkout
worksrcdir          trunk

depends_build	    port:pkgconfig \
		    port:xorg-libX11 \
		    port:Xft2 \
		    port:xorg-libXext \

depends_lib	    port:xorg-libX11 \

use_autoconf        yes
autoconf.cmd	    ./

configure.args      --with-csl #Build CSL version of REDUCE 

variant psl  description { Build PSL version of REDUCE } {
	                  configure.args-replace s|--with-csl|--with-psl|

build.type 	    gnu
build.env 	    MAKE=${build.cmd}

universal_variant   no

livecheck.type      none


More information about the macports-dev mailing list