summaryrefslogtreecommitdiff
path: root/lang/racket-minimal/Makefile
blob: a7805f1e01a0811eac166c071a8e26d2f7352959 (plain)
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
PORTNAME=	racket
PORTVERSION=	8.5
PORTREVISION=	1
CATEGORIES=	lang scheme
MASTER_SITES=	http://mirror.racket-lang.org/installers/${PORTVERSION}/ \
		http://www.cs.utah.edu/plt/installers/${PORTVERSION}/ \
		http://www.eecs.northwestern.edu/racket/${PORTVERSION}/ \
		http://mirror.csclub.uwaterloo.ca/racket/racket-installers/${PORTVERSION}/ \
		http://mirror.informatik.uni-tuebingen.de/mirror/racket/${PORTVERSION}/ \
		http://racket.infogroep.be/${PORTVERSION}/
PKGNAMESUFFIX=	-minimal
DISTNAME=	${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION}-src-builtpkgs
DIST_SUBDIR=	${PORTNAME}${PKGNAMESUFFIX}/${PORTVERSION}

MAINTAINER=	olgeni@FreeBSD.org
COMMENT=	Interactive, integrated, graphical Scheme programming environment
WWW=		https://racket-lang.org/

LICENSE=	APACHE20 MIT
LICENSE_COMB=	dual
LICENSE_FILE=	${WRKSRC}/LICENSE.txt

NOT_FOR_ARCHS=	riscv64
NOT_FOR_ARCHS_REASON=	unsupported platform

LIB_DEPENDS=	libffi.so:devel/libffi

USES=		cpe gmake iconv libtool localbase tar:tgz
CPE_VENDOR=	${PORTNAME}-lang
GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--enable-libffi \
		--enable-places \
		--enable-pthread \
		--mandir=${MANPREFIX}/man
WRKSRC=		${WRKDIR}/racket-${PORTVERSION}/src
PATCH_WRKSRC=	${WRKDIR}/racket-${PORTVERSION}
USE_LDCONFIG=	yes
REINPLACE_ARGS=	-i ""
CONFLICTS=	racket

OPTIONS_DEFINE=		DOCS
OPTIONS_DEFAULT=	CS
OPTIONS_SUB=		yes

OPTIONS_DEFAULT_powerpc=	BC
OPTIONS_DEFAULT_powerpc64=	BC
OPTIONS_DEFINE_amd64=	FUTURES JIT
OPTIONS_DEFINE_i386=	FUTURES JIT
OPTIONS_EXCLUDE_powerpc=	CS
OPTIONS_EXCLUDE_powerpc64=	CS

OPTIONS_SINGLE=		BACKEND
OPTIONS_SINGLE_BACKEND=	BC CS

BACKEND_DESC=	Racket Backend
BC_DESC=	Build ByteCode backend (legacy)
CS_DESC=	Build ChezScheme backend
FUTURES_DESC=	Enable futures (only for BC backend)
JIT_DESC=	Enable JIT compiler (only for BC backend)

BC_CONFIGURE_ON=		--enable-bconly \
				--enable-libffi \
				--enable-places
CS_CONFIGURE_ON=		--enable-csonly \
				--enable-mach=${CHEZ_MACHTYPE}
FUTURES_CONFIGURE_ENABLE=	futures
FUTURES_IMPLIES=		JIT
FUTURES_PREVENTS=		CS
FUTURES_PREVENTS_MSG=		CS enables futures by default
JIT_CONFIGURE_ENABLE=		jit
JIT_PREVENTS=			CS
JIT_PREVENTS_MSG=		CS enables jit by default

.include <bsd.port.options.mk>

.if ${ARCH} == "amd64"
CHEZ_MACHTYPE=	ta6fb
.elif ${ARCH} == "arm"
CHEZ_MACHTYPE=	tarm32fb
.elif ${ARCH} == "arm64"
CHEZ_MACHTYPE=	tarm64fb
.elif ${ARCH} == "i386"
CHEZ_MACHTYPE=	ti3fb
.elif ${ARCH} == "powerpc"
CHEZ_MACHTYPE=	tppc32fb
.endif

post-patch:
	@${REINPLACE_CMD} -e 's/-liconv/${ICONV_LIB}/' ${WRKSRC}/ChezScheme/configure ${WRKSRC}/bc/configure ${WRKSRC}/cs/c/configure

post-install:
	${FIND} ${STAGEDIR}${PREFIX} -type d -empty -delete
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/racket/gracket

.include <bsd.port.mk>