summaryrefslogtreecommitdiff
path: root/lang/gforth/Makefile
blob: aaa829cf7f5a1a987254e76f0f9bbc5aa93fe9fd (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
95
# New ports collection makefile for:	gforth
# Date created:				12 October 2000
# Whom:					Cyrille Lefevre <clefevre@citeweb.net>
#
# $FreeBSD$
#

PORTNAME=	gforth
PORTVERSION=	0.6.2
PORTREVISION=	3
CATEGORIES=	lang
MASTER_SITES=	${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR=	gforth

MAINTAINER=	stas@FreeBSD.org
COMMENT=	Fast and portable Forth system

GNU_CONFIGURE=	yes
CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib
CFLAGS+=	-I${LOCALBASE}/include
USE_GMAKE=	yes
ALL_TARGET=	all info
USE_EMACS=	yes
EMACS_NO_BUILD_DEPENDS=	yes
EMACS_NO_RUN_DEPENDS=	yes

OPTIONS=	FFCALL	"Use ffcall"	on

CFLAGS+=	-fno-reorder-blocks -fno-inline
STRIP=		#none

PLIST_SUB=	PORTVERSION="${PORTVERSION}" \
		EMACS_DIR="${EMACS_SITE_LISPDIR}" \
		WORDSIZE=${WORDSIZE} BYTEORDER=${BYTEORDER}

DOC_FILES=	AUTHORS BUGS Benchres COPYING COPYING.DOC \
		INSTALL INSTALL.BINDIST NEWS README \
		NEWS.vmgen README.vmgen ToDo

MAN1=		gforth.1
INFO=		gforth vmgen
PORTDOCS=	*

.include <bsd.port.pre.mk>

.if !defined(WITHOUT_FFCALL)
BUILD_DEPENDS=	${LOCALBASE}/include/avcall.h:${PORTSDIR}/devel/ffcall
.endif

.if ${OSVERSION} < 700000
BROKEN=		Does not compile on ports build cluster
.endif

.if ${OSVERSION} >= 700042
.if ${ARCH} == "amd64" || ${ARCH} == "sparc64"
BROKEN=		Does not compile
.endif
.endif

.if ${ARCH} == i386 || ${ARCH} == "powerpc"
WORDSIZE=32
.else
WORDSIZE=64
.endif

.if ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
BYTEORDER=b
.else
BYTEORDER=l
.endif

post-install: install-doc install-el remove-empty-files remove-empty-dirs

install-doc:
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
.for filename in ${DOC_FILES}
	@${INSTALL_DATA} ${WRKSRC}/${filename} ${DOCSDIR}
.endfor
.endif

# Install Emacs syntax file
install-el:
	@${INSTALL_DATA} ${WRKSRC}/gforth.el ${PREFIX}/${EMACS_SITE_LISPDIR}

# Remove unused file
remove-empty-files:
	@${RM} -f ${DATADIR}/site-forth/siteinit.fs

# Remove unused directories
remove-empty-dirs:
	@${FIND} -d ${DATADIR}/${PORTVERSION}/arch/ -type d -empty -delete

.include <bsd.port.post.mk>