петък, 24 юли 2009 г.

Installing yodl on MAC OS X

> wget http://downloads.sourceforge.net/project/yodl/yodl/2.15.0/yodl_2.15.0.orig.tar.gz?use_mirror=switch

> tar xzvf yodl_2.15.0.orig.tar.gz

> cd yodl-2.15.0

Edit the file INSTALL.im and change the base install directory:

BASE = "/usr/local/yodl-2.15.0";

Edit the file scripts/configreplacements. There are three places where sed is used, change those lines to:

line 8> sed 's/.*STD_INCLUDE[[:space:]]\+\"\([^"]\+\)".*/\1/'`
line 24> sed 's/.*YODL_BIN[[:space:]]\+\"\([^"]\+\)".*/\1/'`
line 27> sed 's/.*VERSION[[:space:]]\+\"\([^"]\+\)".*/\1/'`

and the last few lines of sed'ing replace with:

STD_INCLUDE=`echo $STD_INCLUDE | sed "s/\//\\\\\\\\\//g"`
YODL_BIN=`echo $YODL_BIN | sed "s/\//\\\\\\\\\//g"`
cmd="sed 's/@STD_INCLUDE@/$STD_INCLUDE/' $1 | sed 's/@YODL_BIN@/$YODL_BIN/' $1 | sed 's/@VERSION@/$VERSION/' $1 > $2"
eval $cmd

(Why? We need to escape directory backslashes from STD_INCLUDE and YODL_BIN so that in the last sed they will appear as "\/" instead of "/". These variable can also contain quotations, so we first compose the last command in cmd="..." which will allow the $ vars to be properly expanded -- not so if it was in single quotes ['], while maintaining the single-quote expansion. Otherwise you'd get errors like this:

scripts/configreplacements scripts/yodl2whatever.in tmp/install//usr/bin/yodl2whatever
sed: 2: "
s,@STD_INCLUDE@,#define": unterminated substitute in regular expression
system - failure of system call (status 256)

or this

scripts/configreplacements macros/in/yodlversion.in tmp/install//usr/share/yodl/yodlversion.yo
sed: 2: "
s,@STD_INCLUDE@,#define": unterminated substitute in regular expression
system - failure of system call (status 256)

) // end of long comment

> ./build programs
> ./build macros

The easiest way to install is to just copy the tmp/install/usr/local/yodl-2.15.0/bin/ directory to /usr/local/yodl-2.15.0.

> cp -r tmp/install/usr/local/yodl-2.15.0 /usr/local/yodl-2.15.0

Няма коментари:

Публикуване на коментар