aboutsummaryrefslogtreecommitdiffstats
path: root/devel/ocaml-sdl/Makefile
blob: a7a440a910a13f480ab3c1ca97c14724ca2bee0e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# ex:ts=8
# Ports collection makefile for:    ocaml-sdl
# Date created:         Jun 1, 2004
# Whom:             ijliao
#
# $FreeBSD$
#

PORTNAME=   sdl
PORTVERSION=    0.7.1
CATEGORIES= devel
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ocamlsdl
PKGNAMEPREFIX=  ocaml-
DISTNAME=   ocamlsdl-${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    An OCaml interface to the SDL

BUILD_DEPENDS=  ocamlc:${PORTSDIR}/lang/ocaml \
        ocamlfind:${PORTSDIR}/devel/ocaml-findlib \
        lablgl:${PORTSDIR}/graphics/ocaml-lablgl

USE_SDL=    sdl ttf image mixer
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= --with-findlib
USE_GMAKE=  yes

PKGDEINSTALL=   ${PKGINSTALL}

.if !defined(NOPORTDOCS)
PORTDOCS=   *

DOCSDIR=    ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
EXAMPLESDIR=    ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}
.endif

post-install:
    @${FIND} ${PREFIX}/lib/ocaml/site-lib/sdl ! -type d | \
        ${SED} "s,^${PREFIX}/,," >> ${TMPPLIST}
    @${ECHO_CMD} "@dirrm lib/ocaml/site-lib/${PORTNAME}" >> ${TMPPLIST}
    @${ECHO_CMD} "@unexec ocamlfind remove ${PORTNAME} 2>/dev/null || true" >> ${TMPPLIST}
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    ${CP} -R ${WRKSRC}/doc/html/ ${DOCSDIR}
.endif

.include <bsd.port.mk>