nixpkgs/pkgs/tools/graphics/transfig/builder.sh
Eelco Dolstra c556a6ea46 * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless
function, so obsolete it.

svn path=/nixpkgs/branches/stdenv-updates/; revision=31644
2012-01-18 20:16:00 +00:00

39 lines
670 B
Bash

source $stdenv/setup
patchPhase() {
for i in $patches; do
header "applying patch $i" 3
patch -p0 < $i
stopNest
done
configureImakefiles "s:__PREFIX_PNG:$libpng:"
configureImakefiles "s:__PREFIX:$out:"
}
configureImakefiles() {
local sedcmd=$1
sed "${sedcmd}" fig2dev/Imakefile > tmpsed
cp tmpsed fig2dev/Imakefile
sed "${sedcmd}" fig2dev/dev/Imakefile > tmpsed
cp tmpsed fig2dev/dev/Imakefile
sed "${sedcmd}" transfig/Imakefile > tmpsed
cp tmpsed transfig/Imakefile
}
buildPhase() {
xmkmf
make Makefiles
make
}
preInstall() {
mkdir -p $out
mkdir -p $out/lib
}
genericBuild