build cdecl on darwin
This commit is contained in:
parent
3d32e49058
commit
dc6c1423cd
13
pkgs/development/tools/cdecl/cdecl-2.5-lex.patch
Normal file
13
pkgs/development/tools/cdecl/cdecl-2.5-lex.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 1643b74..8f1ae11 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -33,7 +33,7 @@ c++decl: cdgram.c cdlex.c cdecl.c
|
||||
rm -f cdecl
|
||||
|
||||
cdlex.c: cdlex.l
|
||||
- lex cdlex.l && mv lex.yy.c cdlex.c
|
||||
+ flex cdlex.l && mv lex.yy.c cdlex.c
|
||||
|
||||
cdgram.c: cdgram.y
|
||||
yacc cdgram.y && mv y.tab.c cdgram.c
|
@ -1,22 +1,25 @@
|
||||
{stdenv, fetchurl, yacc, flex, readline, ncurses}:
|
||||
{stdenv, fetchurl, yacc, flex, readline, ncurses, gnused}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "cdecl-2.5";
|
||||
src = fetchurl {
|
||||
url = ftp://metalab.unc.edu/pub/linux/devel/lang/c/cdecl-2.5.tar.gz;
|
||||
md5 = "29895dab52e85b2474a59449e07b7996";
|
||||
url = "http://cdecl.org/files/cdecl-blocks-2.5.tar.gz";
|
||||
md5 = "c1927e146975b1c7524cbaf07a7c10f8";
|
||||
};
|
||||
|
||||
patches = [ ./cdecl-2.5-implicit-pointer.patch ./cdecl-2.5.patch ./cdecl-2.5-gentoo.patch ];
|
||||
preBuild = "
|
||||
makeFlags=\"PREFIX=$out\"
|
||||
";
|
||||
patches = [ ./cdecl-2.5-lex.patch ];
|
||||
preBuild = ''
|
||||
${gnused}/bin/sed 's/getline/cdecl_getline/g' -i cdecl.c;
|
||||
makeFlagsArray=(CFLAGS="-DBSD -DUSE_READLINE -std=gnu89" LIBS=-lreadline);
|
||||
makeFlags="$makeFlags PREFIX=$out BINDIR=$out/bin MANDIR=$out/man1 CATDIR=$out/cat1";
|
||||
mkdir -p $out/bin;
|
||||
'';
|
||||
buildInputs = [yacc flex readline ncurses];
|
||||
|
||||
meta = {
|
||||
description = "Translator English -- C/C++ declarations";
|
||||
license = "Public Domain";
|
||||
maintainers = with stdenv.lib.maintainers; [viric];
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
# platforms = with stdenv.lib.platforms; linux;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user