aboutsummaryrefslogtreecommitdiffstats
path: root/lang/maude/Makefile
blob: 95070cedc3856cc9b5d1987464d8893dc7801c7e (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
69
70
71
72
73
# Created by: Rick van der Zwet <rick@wzoeterwoude.net>
# $FreeBSD$

PORTNAME=   maude
PORTVERSION=    2.6
PORTREVISION=   1
CATEGORIES= lang
MASTER_SITES=   http://maude.cs.uiuc.edu/versions/${PORTVERSION}/
DISTNAME=   Maude-${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    High-performance reflective language

LICENSE=    GPLv2
LICENSE_FILE=   ${WRKSRC}/COPYING

BUILD_DEPENDS=  ${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex
LIB_DEPENDS=    libbdd.so:${PORTSDIR}/science/buddy \
        libtecla.so:${PORTSDIR}/devel/libtecla \
        libgmp.so:${PORTSDIR}/math/gmp \
        libsigsegv.so:${PORTSDIR}/devel/libsigsegv

USES=       autoreconf bison
GNU_CONFIGURE=  yes
CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib
CONFIGURE_ARGS= --datadir=${DATADIR}
MAKE_JOBS_UNSAFE=   yes

FULL_MAUDE_VER= 26b

OPTIONS_DEFINE= DOCS FULL_MAUDE
OPTIONS_DEFAULT=    FULL_MAUDE
FULL_MAUDE_DESC=    Install full-maude${FULL_MAUDE_VER}

PORTDOCS=   AUTHORS COPYING ChangeLog INSTALL NEWS README

.include <bsd.port.options.mk>

.if ${OSVERSION} >= 1000000
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-Mixfix-lexerAux
.endif

.if ${PORT_OPTIONS:MFULL_MAUDE}
MASTER_SITES+=  http://maude.lcc.uma.es/FullMaude/FM${FULL_MAUDE_VER}/:fm
FULL_MAUDE= full-maude${FULL_MAUDE_VER}.maude
FULL_MAUDE_DIST=    ${FULL_MAUDE}.zip
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX} ${FULL_MAUDE_DIST}:fm
EXTRACT_ONLY=   ${DISTNAME}${EXTRACT_SUFX}
EXTRACT_DEPENDS+=   ${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
PLIST_SUB+= FULL_MAUDE=""
PLIST_SUB+= FULL_MAUDE_VER="${FULL_MAUDE_VER}"
.else
PLIST_SUB+= FULL_MAUDE="@comment "
.endif

post-extract:
.if ${PORT_OPTIONS:MFULL_MAUDE}
    ${UNZIP_CMD} ${DISTDIR}/${FULL_MAUDE_DIST} ${FULL_MAUDE} -d ${WRKDIR}
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' \
        ${WRKSRC}/src/Mixfix/global.hh

post-install:
    ${MKDIR} ${STAGEDIR}${DOCSDIR}
    cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.if ${PORT_OPTIONS:MFULL_MAUDE}
    ${INSTALL_DATA} ${WRKDIR}/${FULL_MAUDE} ${STAGEDIR}${DATADIR}
.endif

.include <bsd.port.mk>