# $OpenBSD$

COMMENT =	R7RS Scheme to C compiler
PKGNAME =	cyclone-${GH_TAGNAME:S/v//}
CATEGORIES =	lang

GH_ACCOUNT =	justinethier
GH_PROJECT =	cyclone-bootstrap
GH_TAGNAME =	v0.6.3

HOMEPAGE =	https://justinethier.github.io/cyclone/
MAINTAINER =	Brian Callahan <bcallah@openbsd.org>

# MIT
PERMIT_PACKAGE_CDROM =	Yes

WANTLIB += c ck m pthread

BUILD_DEPENDS =	math/libtommath

LIB_DEPENDS =	devel/ck

RUN_DEPENDS =	math/libtommath

# COMP_CFLAGS is what cyclone calls cc with.
# LIBS is what cyclone calls cc with when linking.
USE_GMAKE =	Yes
MAKE_FLAGS =	CFLAGS="${CFLAGS} -fPIC -I${LOCALBASE}/include -Iinclude" \
		COMP_CFLAGS="${CFLAGS} -fPIC -I${LOCALBASE}/include" \
		LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib -L." \
		LIBS="${LDFLAGS} -L${LOCALBASE}/lib -pthread -lcyclone -lck -lm -ltommath"

FAKE_FLAGS =	DESTDIR=""

# Needs to be installed to run the tests...
TEST_DEPENDS =	lang/cyclone

.include <bsd.port.mk>
