aboutsummaryrefslogtreecommitdiffstats
path: root/lang/mpd/Makefile
blob: ff60b8ba1cb25ec649e9bffee49e0ed99b039d5f (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
58
59
60
61
62
63
64
65
66
67
68
# New ports collection makefile for:    mpd
# Date Created: 2007-02-05
# Whom:     Kai Wang <kaiw27@gmail.com>
#
# $FreeBSD$
#

PORTNAME=   mpd
PORTVERSION=    1.0.1
PORTREVISION=   1
CATEGORIES= lang
MASTER_SITES=   http://www.cs.arizona.edu/mpd/download/ \
        http://crypto.riken.go.jp/pub/NetBSD/packages/distfiles/mpd-language/
DISTNAME=   ${PORTNAME}.${PORTVERSION}
EXTRACT_SUFX=   .tgz

MAINTAINER= kaiw27@gmail.com
COMMENT=    A concurrent programming language

ONLY_FOR_ARCHS= alpha i386
ONLY_FOR_ARCHS_REASON=  uses assembly code for the target machine

# net/mpd
CONFLICTS=  mpd-[^1]*
NO_LATEST_LINK= yes

USE_GMAKE=  yes

OPTIONS=    X11 "Enable X11 support" on

MAN1=       mpd.1 mpdl.1 mpdm.1 mpdprof.1
MAN3=       mpdanimator.3 mpdgetopt.3 mpdwin.3
MAN5=       mpdmap.5 mpdtrace.5

.include <bsd.port.pre.mk>

.if defined(WITHOUT_X11)
PLIST_SUB+= X11="@comment "
.else
PLIST_SUB+= X11=""
USE_XLIB=   yes
.endif

post-patch:
    @${REINPLACE_CMD} -Ee \
        "s%^(CCPATH =) .*%\1 `${WHICH} ${CC}`%; \
         s%^(MPDSRC =) .*%\1 ${WRKSRC}%; \
         s%^((MPD(CMD|LIB)|MAN[135]) =) /usr/local%\1 ${PREFIX}%" \
         ${WRKSRC}/Configuration
.if !defined(WITHOUT_X11)
    @${REINPLACE_CMD} -Ee 's%^(XINCL =) .*%\1 ${X11BASE}/include%' \
        ${WRKSRC}/Configuration
.else
    @${REINPLACE_CMD} -Ee 's%^(XINCL =) .*%\1%' ${WRKSRC}/Configuration
.endif

pre-install:
    @${MKDIR} ${PREFIX}/lib/mpd

post-install:
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    @${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
    @${MKDIR} ${EXAMPLESDIR}
    @${CP} -pR ${WRKSRC}/vsuite/examples/* ${EXAMPLESDIR}
.endif

.include <bsd.port.post.mk>