aboutsummaryrefslogtreecommitdiffstats
path: root/lang/see/Makefile
blob: 369941d7f1ba065264130bdf3bba4f4f95bc4dab (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
# New ports collection makefile for:   see
# Date created:        29 Oct 2005
# Whom:                Simun Mikecin <numisemis@yahoo.com>
#
# $FreeBSD$
#

PORTNAME=   see
PORTVERSION=    2.0.1131
PORTREVISION=   1
CATEGORIES= lang devel
MASTER_SITES=   http://www.powerband.net.au/~david.leonard/ \
        http://freshmeat.net/redir/see/45974/url_tgz/

MAINTAINER= numisemis@yahoo.com
COMMENT=    Simple ECMAScript Engine (SEE)

OPTIONS=    GC "Use Boehm-Weiser garbage collection package" on \
        OPTIMIZED_CFLAGS "Enable some additional optimizations" off \
        SEE_DEBUG "Internal SEE library debugging" off \
        MULTIPLE_THREADS "Enable thread-safety" on

CONFLICTS=  see-devel-[0-9]*

WRKSRC=     ${WRKDIR}/${PORTNAME}-${PORTVERSION}
LATEST_LINK=    ${PORTNAME}${PKGNAMESUFFIX}

USE_LDCONFIG=   yes
USE_PERL5_BUILD=yes
GNU_CONFIGURE=  yes

CONFIGURE_ENV=  LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib ${PTHREAD_LIBS}" \
        CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include ${PTHREAD_CFLAGS}"

.include <bsd.port.pre.mk>

.if defined(WITH_MULTIPLE_THREADS)
CFLAGS+=    -DMULTIPLE_THREADS
.endif

.if !defined(WITH_SEE_DEBUG)
CFLAGS+=    -DNDEBUG
.endif

.if defined(WITH_OPTIMIZED_CFLAGS)
CFLAGS+=    -O3 -fomit-frame-pointer
.endif

.if defined(WITH_GC)
LIB_DEPENDS+=   gc:${PORTSDIR}/devel/boehm-gc
.else
CONFIGURE_ARGS+=    --without-boehm-gc
.if !defined(WITH_MULTIPLE_THREADS)
PTHREAD_CFLAGS=
PTHREAD_LIBS=
.endif
.endif

post-patch:
    @${REINPLACE_CMD} -e "s|PACKAGE_BUGREPORT='leonard@users|PACKAGE_BUGREPORT='leonard\\\@users|" \
        ${WRKSRC}/configure

.if !defined(NOPORTDOCS)
post-install:
    ${MKDIR} ${DOCSDIR}
.for f in doc/USAGE.html AUTHORS NEWS README TODO COPYING
    ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.post.mk>