# $OpenBSD$

COMMENT=	"a free, standards-compilant jvm with a small footprint"

ONLY_FOR_ARCHS= i386 powerpc arm amd64

DISTNAME=	jamvm-1.4.1
PKGNAME= $(DISTNAME)p0

CATEGORIES=	lang java

MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=jamvm/}

HOMEPAGE=	http://jamvm.sourceforge.net/

MAINTAINER= Frederick C. Druseikis <fredd@cse.sc.edu>

# GPL 2
PERMIT_PACKAGE_CDROM=	Yes
PERMIT_PACKAGE_FTP=		Yes
PERMIT_DISTFILES_CDROM=	Yes
PERMIT_DISTFILES_FTP=	Yes

WANTLIB=	c m

AUTOMAKE_VERSION=    1.9
AUTOCONF_VERSION=    2.59
USE_GMAKE= Yes
USE_LIBTOOL = Yes
CONFIGURE_STYLE= automake

.if $(MACHINE:L:Mi386)
# the configure script recognizes openbsd but doesn't like the i386 processor
CONFIGURE_ARGS+= --host=i486-unknown-openbsd --build=i486-unknown-openbsd
.endif

LDFLAGS+= -lpthread

CONFIGURE_ARGS+= --with-classpath-install-dir=$(LOCALBASE)

# starting with JamVM 1.3.3 stdint.h is referenced
# the OpenBSD /usr/include/inttypes.h meets the need
# which is limited to 64-bin pointer decls.

pre-configure:
	ln -s /usr/include/inttypes.h $(WRKSRC)/src/stdint.h

.include <bsd.port.mk>
