1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-30 17:41:12 +00:00
nixpkgs/pkgs/applications/graphics/xfig/builder.sh
Tuomas Tynkkynen 3dafe7a466 xfig: Fix build failure now visible due to #7524
The first 'find' command in postUnpack that attempts to add +x
permissions fails, because the +x permission is needed by the find
itself, and with the xargs method it's added too late.
2015-06-27 18:44:06 +03:00

29 lines
678 B
Bash

source $stdenv/setup
makeFlags="XAWLIB=-lXaw3d BINDIR=$out/bin XAPPLOADDIR=$out/etc/X11/app-defaults LIBDIR=$out/lib/X11 XFIGDOCDIR=$out/share/doc/xfig MANPATH=$out/man"
# We need chmod +wx on dirs, not just chmod +w
dontMakeSourcesWritable=1
postUnpack() {
find . -type d -exec chmod +x '{}' \;
}
preBuild() {
echo "#define XAW3D" >> Imakefile.tmp
echo "#define XAW3D1_5E" >> Imakefile.tmp
cat Imakefile >> Imakefile.tmp
mv Imakefile.tmp Imakefile
xmkmf
sed -e 's@[$][$]m@-- &@g' -i Makefile
}
installPhase() {
make install.all $makeFlags
wrapProgram $out/bin/xfig \
--set XAPPLRESDIR $out/etc/X11/app-defaults
}
genericBuild