C->Haskell is an interface generator that simplifies the development of Haskell

bindings to C libraries. The tool processes existing C header files that
determine data layout and function signatures on the C side in conjunction with
Haskell modules that specify Haskell-side type signatures and marshaling
details. Hooks embedded in the Haskell code signal access to C structures and
functions -- they are expanded by the interfacing tool in dependence on
information from the corresponding C header file. Another noteworthy property
is the lightweight nature of the approach.
This commit is contained in:
Emil Sköldberg 2005-11-15 13:57:36 +00:00 committed by Thomas Klausner
parent cf2e93ef52
commit 23dbb36225
5 changed files with 93 additions and 0 deletions

8
c2hs/DESCR Normal file
View file

@ -0,0 +1,8 @@
C->Haskell is an interface generator that simplifies the development of Haskell
bindings to C libraries. The tool processes existing C header files that
determine data layout and function signatures on the C side in conjunction with
Haskell modules that specify Haskell-side type signatures and marshaling
details. Hooks embedded in the Haskell code signal access to C structures and
functions -- they are expanded by the interfacing tool in dependence on
information from the corresponding C header file. Another noteworthy property
is the lightweight nature of the approach.

35
c2hs/Makefile Normal file
View file

@ -0,0 +1,35 @@
# $NetBSD: Makefile,v 1.1.1.1 2005/11/15 13:57:36 emil_s Exp $
#
DISTNAME= c2hs-0.14.3
CATEGORIES= devel
MASTER_SITES= http://www.cse.unsw.edu.au/~chak/haskell/c2hs/
MAINTAINER= emil@math.su.se
HOMEPAGE= http://www.cse.unsw.edu.au/~chak/haskell/c2hs/
COMMENT= C->Haskell, an Interface Generator for Haskell
BUILD_DEPENDS+= cabal>=1.0.1:../../wip/cabal
EGDIR= ${PREFIX}/share/examples/${PKGBASE}
do-configure:
@cd ${WRKSRC} && \
runhaskell Setup.hs configure \
--ghc \
--prefix=${PREFIX} --with-compiler=${PREFIX}/bin/ghc \
--with-hc-pkg=${PREFIX}/bin/ghc-pkg
do-build:
@cd ${WRKSRC} && runhaskell Setup.hs build
do-install:
@cd ${WRKSRC} && runhaskell Setup.hs install
post-install:
${INSTALL_DATA_DIR} ${EGDIR}
@cd ${WRKSRC}/c2hs/tests && ${INSTALL_DATA} * ${EGDIR}
.include "../../lang/ghc/buildlink3.mk"
.include "../../wip/cabal/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

32
c2hs/PLIST Normal file
View file

@ -0,0 +1,32 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2005/11/15 13:57:36 emil_s Exp $
bin/c2hs
lib/${PKGNAME}/C2HS.hs
lib/${PKGNAME}/c2hs
share/examples/c2hs/Calls.chs
share/examples/c2hs/Calls.h
share/examples/c2hs/Cpp.chs
share/examples/c2hs/Cpp.h
share/examples/c2hs/Enums.chs
share/examples/c2hs/Enums.h
share/examples/c2hs/Makefile
share/examples/c2hs/Marsh.chs
share/examples/c2hs/Marsh.h
share/examples/c2hs/Pointer.chs
share/examples/c2hs/Pointer.h
share/examples/c2hs/Simple.chs
share/examples/c2hs/Simple.h
share/examples/c2hs/Structs.chs
share/examples/c2hs/Structs.h
share/examples/c2hs/calls.h
share/examples/c2hs/cpp.h
share/examples/c2hs/enums.c
share/examples/c2hs/enums.h
share/examples/c2hs/marsh.h
share/examples/c2hs/pointer.c
share/examples/c2hs/pointer.h
share/examples/c2hs/simple.c
share/examples/c2hs/simple.h
share/examples/c2hs/structs.c
share/examples/c2hs/structs.h
@dirrm share/examples/c2hs
@dirrm lib/${PKGNAME}

6
c2hs/distinfo Normal file
View file

@ -0,0 +1,6 @@
$NetBSD: distinfo,v 1.1.1.1 2005/11/15 13:57:36 emil_s Exp $
SHA1 (c2hs-0.14.3.tar.gz) = 11508e235c4a78f04f85b8932ea22f8b62c74747
RMD160 (c2hs-0.14.3.tar.gz) = d020f0224cfe56cdd2613887480186d57fbd858e
Size (c2hs-0.14.3.tar.gz) = 306118 bytes
SHA1 (patch-aa) = ee3fe5a4d3438a955a10999975d4b6d7bfcb849e

12
c2hs/patches/patch-aa Normal file
View file

@ -0,0 +1,12 @@
$NetBSD: patch-aa,v 1.1.1.1 2005/11/15 13:57:36 emil_s Exp $
--- c2hs.cabal.orig 2005-11-07 13:00:14.000000000 +0000
+++ c2hs.cabal
@@ -15,6 +15,7 @@ Description: C->Haskell assists in the d
libraries. It extracts C interface information from vanilla header
files and generates marshaling and signature code in Haskell.
Category: Development tool
+Build-Depends: base, haskell98
Executable: c2hs
Hs-Source-Dirs: base/admin