openbsd-ports/devel/c2hs/Makefile

69 lines
1.8 KiB
Makefile
Raw Normal View History

# $OpenBSD: Makefile,v 1.10 2007/11/28 21:04:36 kili Exp $
# $FreeBSD: ports/devel/hs-c2hs/Makefile,v 1.20 2004/03/25 08:29:28 obraun Exp $
COMMENT= interface generator for Haskell to C bindings
2007-11-18 11:30:36 -05:00
V= 0.15.0
DISTNAME= c2hs-${V}
CATEGORIES= devel
2007-11-18 11:30:36 -05:00
MAINTAINER= Matthias Kilian <kili@openbsd.org>
HOMEPAGE= http://www.cse.unsw.edu.au/~chak/haskell/c2hs/
MASTER_SITES= ${HOMEPAGE}
2007-11-18 11:30:36 -05:00
MASTER_SITES0= http://openbsd.dead-parrot.de/distfiles/
DISTFILES= ${DISTNAME}.tar.gz \
${DISTNAME}-doc.tgz:0 \
${DISTNAME}-tests.tgz:0
2004-08-10 04:23:36 -04:00
MODULES= lang/ghc
2007-11-18 11:30:36 -05:00
MODGHC_RUNTIME= No
2007-11-18 11:30:36 -05:00
SETUP_CONF_ARGS= configure -g --prefix=${PREFIX}
SETUP_CONF_ENV= HOME=${PORTHOME} ${CONFIGURE_ENV}
SETUP_PROG= ${WRKSRC}/Setup
SUBST_VARS= V
# GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
2007-11-18 11:30:36 -05:00
WANTLIB= c m
LIB_DEPENDS= gmp::devel/gmp
BUILD_DEPENDS= ::devel/alex ::devel/happy ::textproc/sgmlformat
2007-11-18 11:30:36 -05:00
do-configure:
@cd ${WRKSRC} && ghc --make -o ${SETUP_PROG} Setup.hs
@cd ${WRKBUILD} && exec ${SETENV} ${SETUP_CONF_ENV} \
${SETUP_PROG} ${SETUP_CONF_ARGS}
do-build:
@cd ${WRKBUILD} && exec ${SETENV} ${MAKE_ENV} ${SETUP_PROG} build
post-build:
@cd ${WRKSRC}/doc/c2hs && \
sed 's!@VERSION@!$V!g;s!@DOCDIR@!${PREFIX}/share/doc/c2hs!g' \
man1/c2hs.1.in > man1/c2hs.1 && \
sgmlfmt -f html c2hs.sgml
do-install:
@cd ${WRKBUILD} && exec ${SETENV} ${MAKE_ENV} \
${SETUP_PROG} copy --destdir=${DESTDIR}
post-install:
@cd ${WRKSRC}/doc/c2hs && \
${INSTALL_MAN} man1/c2hs.1 ${PREFIX}/man/man1
@${INSTALL_DATA_DIR} ${PREFIX}/share/doc/c2hs
@${INSTALL_DATA} ${WRKSRC}/doc/c2hs/*.html ${PREFIX}/share/doc/c2hs
@${INSTALL_DATA_DIR} ${PREFIX}/share/doc/c2hs/lib
@${INSTALL_DATA} ${WRKSRC}/doc/c2hs/lib/*.hs \
${PREFIX}/share/doc/c2hs/lib
do-regress:
@cd ${WRKDIST}/c2hs/tests && ${MAKE_PROGRAM}
.include <bsd.port.mk>