aboutsummaryrefslogtreecommitdiffstats
path: root/lang/afnix/Makefile
blob: 7d7dec8381b94b95e5e9b1b69bae89c0ed48e8a8 (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
50
51
52
53
54
55
56
57
# Created by: Ying-Chieh Liao <ijliao@FreeBSD.org>
# $FreeBSD$

PORTNAME=   afnix
PORTVERSION=    2.4.0
CATEGORIES= lang
MASTER_SITES=   http://www.afnix.org/ftp/ \
        ftp://ftp.stack.nl/pub/users/johans/afnix/
DISTNAME=   ${PORTNAME}-src-${PORTVERSION}
EXTRACT_SUFX=   .tgz

MAINTAINER= johans@FreeBSD.org
COMMENT=    A multi-threaded functional programming language

USES=       gmake
USE_LDCONFIG=   yes
HAS_CONFIGURE=  yes
CONFIGURE_SCRIPT=   cnf/bin/afnix-setup
CONFIGURE_ARGS=     -o --prefix "${PREFIX}" --altdir "${PREFIX}" \
            --shrdir "${PREFIX}/share" --compiler freebsd
MAKE_ENV=   PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
        PTHREAD_LIBS="${PTHREAD_LIBS}"

PORTDOCS=   *
PLIST_SUB=  PORTVER=${PORTVERSION:R}

.include <bsd.port.pre.mk>

.if ${ARCH} == "powerpc"
BROKEN=     Does not configure on powerpc
.endif

post-extract:
    @cd ${WRKSRC}/cnf/mak && ${CP} -f afnix-gcc-4.mak afnix-freebsd.mak

post-patch:
    @${REINPLACE_CMD} -e 's|$$(CP)|$$(BSD_INSTALL_PROGRAM)|' \
        ${WRKSRC}/src/*/*/exe/Makefile
    @${REINPLACE_CMD} -e '/\.rtf/d' ${WRKSRC}/etc/Makefile
    @${REINPLACE_CMD} -e '/uname -r/s/\\\./[.-]/' \
        ${WRKSRC}/cnf/bin/afnix-guess

post-build:
    @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} doc
    @cd ${WRKSRC}/prj && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} doc

post-install:
.if ! ${PORT_OPTIONS:MDOCS}
. for i in ${MAN1} ${MAN3} ${MAN7}
    ${INSTALL_MAN} ${WRKSRC}/bld/${PORTNAME}-doc-${PORTVERSION}/man/$i \
        ${STAGEDIR}${MANPREFIX}/man/man${i:E}/
. endfor
.else
    @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} DESTDIR=${STAGEDIR} ${MAKE_CMD} publish
.endif

.include <bsd.port.post.mk>