* By popular demand: xfig.

svn path=/nixpkgs/trunk/; revision=7278
This commit is contained in:
Eelco Dolstra 2006-12-08 01:17:21 +00:00
parent 3a4312f263
commit 3691639db1
5 changed files with 72 additions and 18 deletions

View File

@ -0,0 +1,26 @@
source $stdenv/setup
source $makeWrapper
makeFlags="XAWLIB=-lXaw3d BINDIR=$out/bin XAPPLOADDIR=$out/etc/X11/app-defaults LIBDIR=$out/lib/X11 XFIGDOCDIR=$out/share/doc/xfig MANPATH=$out/man"
preBuild=preBuild
preBuild() {
echo "#define XAW3D" >> Imakefile.tmp
echo "#define XAW3D1_5E" >> Imakefile.tmp
cat Imakefile >> Imakefile.tmp
mv Imakefile.tmp Imakefile
xmkmf
}
dontMakeInstall=1
preInstall=preInstall
preInstall() {
make install.all $makeFlags
mv $out/bin/xfig $out/bin/.xfig
makeWrapper $out/bin/.xfig $out/bin/xfig \
--set XAPPLRESDIR $out/etc/X11/app-defaults
}
genericBuild

View File

@ -0,0 +1,23 @@
{ stdenv, fetchurl, makeWrapper, imake
, x11, libXpm, libXmu, libXi, libXp, Xaw3d, libpng, libjpeg}:
stdenv.mkDerivation {
name = "xfig-3.2.5-pre-alpha-5";
src = fetchurl {
url = http://xfig.org/software/xfig/3.2.5-alpha/xfig.3.2.5-alpha5.full.tar.gz;
md5 = "7547b66232569e3c12e4a0639bd92629";
};
builder = ./builder.sh;
buildInputs = [imake x11 libXpm libXmu libXi libXp Xaw3d libpng libjpeg];
inherit makeWrapper;
NIX_CFLAGS_COMPILE = "-I${libXpm}/include/X11";
meta = {
description = "An interactive drawing tool for X11";
};
}

View File

@ -2,27 +2,27 @@ source $stdenv/setup
patchPhase=patchPhase
patchPhase() {
for i in $patches; do
header "applying patch $i" 3
patch -p0 < $i || fail
stopNest
done
for i in $patches; do
header "applying patch $i" 3
patch -p0 < $i || fail
stopNest
done
configureImakefiles "s:__PREFIX_PNG:$libpng:"
configureImakefiles "s:__PREFIX:$out:"
configureImakefiles "s:__PREFIX_PNG:$libpng:"
configureImakefiles "s:__PREFIX:$out:"
}
configureImakefiles() {
local sedcmd=$1
local sedcmd=$1
sed "${sedcmd}" fig2dev/Imakefile > tmpsed
cp tmpsed fig2dev/Imakefile
sed "${sedcmd}" fig2dev/Imakefile > tmpsed
cp tmpsed fig2dev/Imakefile
sed "${sedcmd}" fig2dev/dev/Imakefile > tmpsed
cp tmpsed fig2dev/dev/Imakefile
sed "${sedcmd}" fig2dev/dev/Imakefile > tmpsed
cp tmpsed fig2dev/dev/Imakefile
sed "${sedcmd}" transfig/Imakefile > tmpsed
cp tmpsed transfig/Imakefile
sed "${sedcmd}" transfig/Imakefile > tmpsed
cp tmpsed transfig/Imakefile
}
buildPhase=buildPhase
@ -34,10 +34,8 @@ buildPhase() {
preInstall=preInstall
preInstall() {
ensureDir $out
ensureDir $out/lib
ensureDir $out
ensureDir $out/lib
}
genericBuild

View File

@ -2708,6 +2708,12 @@ rec {
inherit fetchurl stdenv wxGTK chmlib;
};
xfig = import ../applications/graphics/xfig {
stdenv = overrideGCC (overrideSetup stdenv ../stdenv/generic/setup-new.sh) gcc34;
inherit fetchurl makeWrapper x11 Xaw3d libpng libjpeg;
inherit (xlibs) imake libXpm libXmu libXi libXp;
};
xineUI = import ../applications/video/xine-ui {
inherit fetchurl stdenv x11 xineLib libpng;
};

View File

@ -131,6 +131,7 @@ let {
vlc
wget
xchm
xfig
xineUI
xmltv
xmms