From 52c39104347ed497aec0aeab1b7d8169c2c7a918 Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Sun, 27 Apr 2008 18:20:57 +0000 Subject: [PATCH] added cproto ( C function prototype generator ) svn path=/nixpkgs/trunk/; revision=11730 --- .../tools/misc/cproto/cproto_patch | 11 ++++++++++ .../development/tools/misc/cproto/default.nix | 20 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++++ 3 files changed, 35 insertions(+) create mode 100644 pkgs/development/tools/misc/cproto/cproto_patch create mode 100644 pkgs/development/tools/misc/cproto/default.nix diff --git a/pkgs/development/tools/misc/cproto/cproto_patch b/pkgs/development/tools/misc/cproto/cproto_patch new file mode 100644 index 000000000000..3743fef977b0 --- /dev/null +++ b/pkgs/development/tools/misc/cproto/cproto_patch @@ -0,0 +1,11 @@ +diff -Naur cproto-4.6-old/cproto.h cproto-4.6/cproto.h +--- cproto-4.6-old/cproto.h 1998-01-18 19:49:16.000000000 -0500 ++++ cproto-4.6/cproto.h 2004-03-14 00:02:32.148070032 -0500 +@@ -117,6 +117,7 @@ + Declarator *declarator; + DeclaratorList decl_list; + } YYSTYPE; ++#define YYSTYPE_IS_DECLARED 1 + + /* Prototype styles */ + #if OPT_LINTLIBRARY diff --git a/pkgs/development/tools/misc/cproto/default.nix b/pkgs/development/tools/misc/cproto/default.nix new file mode 100644 index 000000000000..dd2856975bd7 --- /dev/null +++ b/pkgs/development/tools/misc/cproto/default.nix @@ -0,0 +1,20 @@ +args: +args.stdenv.mkDerivation { + name = "cproto-4.6"; + + src = args.fetchurl { + url = mirror://sourceforge/cproto/cproto-4.6.tar.gz; + sha256 = "0ilhkx9iwc5bh65q47mf68p39iyk07d52fv00z431nl6qcb9hp9j"; + }; + + buildInputs =(with args; [flex bison]); + + # patch made by Joe Khoobyar copied from gentoo bugs + patches= ./cproto_patch ; + + meta = { + description = "generate C function prototypes from C source code"; + homepage = http://cproto.sourceforge.net/; + license = "public domain"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0b50710a1d7c..83bcdc3a0de1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1974,6 +1974,10 @@ let pkgs = rec { inherit fetchurl stdenv replace; }; + cproto = import ../development/tools/misc/cproto { + inherit fetchurl stdenv flex bison; + }; + dejagnu = import ../development/tools/misc/dejagnu { inherit fetchurl stdenv expect makeWrapper; };