reduce-algebra portfile dev

Mark Brethen mark.brethen at gmail.com
Sun Aug 21 10:39:46 PDT 2011


On Aug 20, 2011, at 9:42 PM, Joshua Root wrote:

> On 2011-8-21 12:35 , Mark Brethen wrote:
>> 
>> Installation is described here:  http://sourceforge.net/apps/mediawiki/reduce-algebra/index.php?title=Installation
>> 
>> If you look towards the end of the sect "Complete Sources and Supporting Files" you'll read:
>> 
>> "After compilation a suitable executable redcsl or redpsl (with a .bat extension for Windows) will be found in the trunk/bin subdirectory.
>> 
>> There is no make install for installing things somewhere else in your filetree. We recommend to add trunk/bin to your PATH."
>> 
>> It sounds like manual Portfile scripting is necessary?
> 
> Yes, something like:
> 
> destroot {
> 	xinstall ${worksrcpath}/bin/redcsl ${destroot}${prefix}/bin
> }
> 
> - Josh
The bin directory has several shell scripts also, and are intended to provide an easy way to launch
Reduce. The readme has this to say:

This remark may seem obvious, but the important aspect of it
is that these scripts identify directories where various Reduce resources are
to be found, and contain curious-looking code to do this. However you should
not copy any of these scripts and place them in a directory other than here
since they rely on paths relative to the place where they themselves live.

The redcsl.sh contains:

#! /bin/sh
a=$0
c=unknown
case $a in
/* )
  c=$a  
  ;;
*/* )
  case $a in
  ./* )
    a=`echo $a | sed -e s+./++`
    ;;
  esac
  c=`pwd`/$a
  ;;
* ) 
  for d in $PATH
  do
    if test -x $d/$a
    then
      c=$d/$a
    fi
  done
  if test $c = "unknown" ;then
    echo "Unable to find full path for script. Please re-try"
    echo "launching it using a fully rooted path."
    exit 1
  fi
  ;;
esac
while test -h "$c"; do
  lt=`ls -l "$c" | sed 's/.*->[ ]\+//'`
  if echo "$lt" | grep -q '^/'; then
    c="$lt"
  else
    dir=`dirname "$c"`
    c="$dir/$lt"
  fi
done
here=`echo $c | sed -e 's+/[^/]*$++;s+/[^/]*$++'`
exec $here/scripts/run.sh $here/scripts reduce redcsl $*

I expect the last line calls the binary that is compiled and probably need to stage the pertinent scripts as well as the binary.

Also, the following are listed as Linux packages necessary for building CSL Reduce:

g++
libx11-dev
libxft-dev
libxext-dev
libncurses5-dev

I gether that the MacPorts equivalent ports should go in a depends build statement in the Portfile.

Mark






More information about the macports-dev mailing list