aboutsummaryrefslogtreecommitdiffstats
path: root/lang/logo/Makefile
blob: db1024cb3d48ee87cfe22e2c8b52f2389f160386 (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# New ports collection makefile for:    logo
# Date created:     22 October 1994
# Whom:         jkh
#
# $FreeBSD$
#

PORTNAME=   ucblogo
PORTVERSION=    5.5
PORTREVISION=   2
CATEGORIES= lang
MASTER_SITES=   http://www.cs.berkeley.edu/~bh/downloads/
DISTNAME=   ${PORTNAME}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Brian Harvey's logo language interpreter

.if defined(EMACS_LOGO_MODE)
BUILD_DEPENDS=  emacs:${PORTSDIR}/editors/emacs
.endif
.if defined(WITH_FULL_DOCS)
.undef NOPORTDOCS

BUILD_DEPENDS+= tex:${PORTSDIR}/print/teTeX \
        ps2pdf:${PORTSDIR}/${GHOSTSCRIPT_PORT}
.endif

WRKSRC=     ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USE_XLIB=   yes
MAKEFILE=   makefile
HAS_CONFIGURE=  yes

ALL_TARGET= all

.if defined(WITH_FULL_DOCS) || defined(EMACS_LOGO_MODE)
USE_GMAKE=  yes
MAKE_ENV+=  LIBLOC="${PREFIX}/lib/logo" BINDIR="${PREFIX}/bin" DOCSDIR="${DOCSDIR}" INFODIR="${PREFIX}/${INFO_PATH}"
.endif

.if defined(WITH_FULL_DOCS)
INFO=       ucblogo loops
ALL_TARGET+=    docs
PLIST_SUB+= WITH_FULL_DOCS=""
.else
PLIST_SUB+= WITH_FULL_DOCS="@comment "
.endif

.if defined(EMACS_LOGO_MODE)
ALL_TARGET+=    logo-mode
PLIST_SUB+= EMACS_LOGO_MODE=""
.else
PLIST_SUB+= EMACS_LOGO_MODE="@comment "
.endif

.include <bsd.port.pre.mk>

.if ${OSVERSION} > 700000
BROKEN=     Does not compile on FreeBSD >= 7.0
.endif

pre-everything::
.if !defined(EMACS_LOGO_MODE)
    @${ECHO_MSG} ""
    @${ECHO_MSG} "      Define EMACS_LOGO_MODE to build the emacs logo mode"
    @${ECHO_MSG} ""
.endif
.if !defined(WITH_FULL_DOCS)
    @${ECHO_MSG} ""
    @${ECHO_MSG} "      Define WITH_FULL_DOCS to build ps, pdf and html docs"
    @${ECHO_MSG} "      This requires teTeX and ghostscript !"
    @${ECHO_MSG} ""
.endif

do-install:
.for d in lib/logo lib/logo/logolib \
    lib/logo/helpfiles
    ${MKDIR} ${PREFIX}/$d
.endfor
    ${MKDIR} ${EXAMPLESDIR}/csls
    ${INSTALL_PROGRAM} ${WRKSRC}/logo ${PREFIX}/bin
    ${INSTALL_DATA} ${WRKSRC}/logolib/* ${PREFIX}/lib/logo/logolib/
    ${INSTALL_DATA} ${WRKSRC}/helpfiles/* ${PREFIX}/lib/logo/helpfiles/
    ${INSTALL_DATA} ${WRKSRC}/csls/* ${EXAMPLESDIR}/csls/
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/usermanual ${DOCSDIR}
.endif
.if defined(WITH_FULL_DOCS)
    cd ${WRKSRC}/docs/ ;${SETENV} ${MAKE_ENV} ${GMAKE} install
.endif
.ifdef defined(EMACS_LOGO_MODE)
    cd ${WRKSRC}/emacs; ${SETENV} ${MAKE_ENV} ${GMAKE} install-emacs
.endif
.include <bsd.port.post.mk>