freebsd-ports/x11-toolkits/hs-OpenGLRaw/Makefile
Gabor Pali 6b35716ec9 OpenGLRaw is a raw Haskell binding for the OpenGL 3.2 graphics system and
lots of OpenGL extensions. It is basically a 1:1 mapping of OpenGL's C API,
intended as a basis for a nicer interface. OpenGLRaw offers access to all
necessary functions, tokens and types plus a general facility for loading
extension entries. The module hierarchy closely mirrors the naming structure
of the OpenGL extensions, making it easy to find the right module to import.
All API entries are loaded dynamically, so no special C header files are
needed for building this package. If an API entry is not found at runtime, a
userError is thrown.

WWW: http://www.haskell.org/HOpenGL/

PR:		ports/142125
Submitted by:	Jacula Modyun <jacula(at)gmail.com>
2010-01-05 19:38:32 +00:00

80 lines
2.1 KiB
Makefile

# New ports collection makefile for: hs-OpenGLRaw-ghc
# Date created: December 20 2009
# Whom: Giuseppe Pilichi aka Jacula Modyun <jacula@gmail.com>
#
# $FreeBSD$
#
PORTNAME= OpenGLRaw
PORTVERSION= 1.1.0.1
CATEGORIES= x11-toolkits haskell
MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
PKGNAMEPREFIX= hs-
PKGNAMESUFFIX= -ghc
MAINTAINER= jacula@gmail.com
COMMENT= A raw Haskell binding for the OpenGL graphics system
BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
USE_GL= gl
GHC_VERSION= 6.10.4
HSOPENGLRAW_VERSION= ${PORTVERSION}
GHC_CMD= ${LOCALBASE}/bin/ghc
SETUP_CMD= ./setup
DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
HSOPENGLRAW_LIBDIR_REL= lib/${DISTNAME}
PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
HSOPENGLRAW_VERSION=${HSOPENGLRAW_VERSION} \
HSOPENGLRAW_LIBDIR_REL=${HSOPENGLRAW_LIBDIR_REL}
.if defined(NOPORTDOCS)
PLIST_SUB+= NOPORTDOCS=""
.else
PLIST_SUB+= NOPORTDOCS="@comment "
.endif
.if !defined(NOPORTDOCS)
PORT_HADDOCK!= (cd ${.CURDIR}/../../lang/ghc && ${MAKE} -V PORT_HADDOCK)
.if !empty(PORT_HADDOCK:M?0)
BUILD_DEPENDS+= haddock:${PORTSDIR}/devel/hs-haddock
.endif
BUILD_DEPENDS+= HsColour:${PORTSDIR}/print/hs-hscolour
HSCOLOUR_VERSION= 1.15
HSCOLOUR_DATADIR= ${PREFIX}/share/hscolour-${HSCOLOUR_VERSION}
PORTDOCS= *
.endif
.SILENT:
do-configure:
cd ${WRKSRC} && ${GHC_CMD} --make Setup.hs -o setup -package Cabal \
&& ${SETUP_CMD} configure --haddock-options=-w --prefix=${PREFIX} \
--extra-include-dirs=${LOCALBASE}/include \
--extra-lib-dirs=${LOCALBASE}/lib
do-build:
cd ${WRKSRC} && ${SETUP_CMD} build \
&& ${SETUP_CMD} register --gen-script
.if !defined(NOPORTDOCS)
cd ${WRKSRC} && ${SETUP_CMD} haddock --hyperlink-source \
--hscolour-css=${HSCOLOUR_DATADIR}/hscolour.css
.endif
do-install:
cd ${WRKSRC} && ${SETUP_CMD} install \
&& ${INSTALL_SCRIPT} register.sh ${PREFIX}/${HSOPENGLRAW_LIBDIR_REL}/register.sh
post-install:
${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
.include <bsd.port.mk>