freebsd-ports/lang/v8/Makefile
Sergey A. Osokin 3f0d48c4ba Fix overkill for everytime changing GITVERSION and depends on
it WRKSRC.

Approved by:	vanilla
2011-06-13 19:29:35 +00:00

73 lines
1.9 KiB
Makefile

# New ports collection makefile for: v8
# Date created: 12 November 2010
# Whom: siasia
#
# $FreeBSD$
#
PORTNAME= v8
PORTVERSION= 3.4.1
CATEGORIES= lang
MASTER_SITES= http://github.com/${PORTNAME}/${PORTNAME}/tarball/${PORTVERSION}/
DISTNAME= ${PORTNAME}-${PORTNAME}-${PORTVERSION}-${GITVERSION}
MAINTAINER= vanilla@FreeBSD.org
COMMENT= Google\'s open source JavaScript engine
LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo
GITVERSION= 0-g064fc53
FETCH_ARGS= -pRr
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTNAME}-${GITVERSION:S/^0-g//}
USE_SCONS= yes
OPTIONS= DEBUG "Build in debug mode" Off \
SNAPSHOT "Enable snapshots" Off
.include <bsd.port.options.mk>
SCONS_ARGS=
.if defined(WITHOUT_DEBUG)
SCONS_ARGS+= mode=release
.else
SCONS_ARGS+= mode=debug
.endif
.if defined(WITHOUT_SNAPSHOT)
SCONS_ARGS+= snapshot=off
.else
SCONS_ARGS+= snapshot=on
.endif
ONLY_FOR_ARCHS= i386 amd64
.include <bsd.port.pre.mk>
.if ${ARCH} == i386
V8ARCH=ia32
.elif ${ARCH} == amd64
V8ARCH=x64
.endif
PLIST_SUB+= ARCH=${V8ARCH}
SCONS_ARGS+= arch=${V8ARCH}
do-build:
@cd ${BUILD_WRKSRC} && \
${SETENV} ${SCONS_BUILDENV} ${SCONS_BIN} ${SCONS_ENV} ${_MAKE_JOBS} \
${SCONS_ARGS} library=static ${SCONS_TARGET}
.if defined(WITH_SHARED)
@cd ${BUILD_WRKSRC} && \
${SETENV} ${SCONS_BUILDENV} ${SCONS_BIN} ${SCONS_ENV} ${_MAKE_JOBS} \
${SCONS_ARGS} library=shared ${SCONS_TARGET}
.endif
do-install:
${INSTALL_DATA} -m 755 ${WRKSRC}/libv8.a ${PREFIX}/lib
${INSTALL_DATA} -m 755 ${WRKSRC}/libv8preparser.a ${PREFIX}/lib
${INSTALL_DATA} ${WRKSRC}/include/v8.h ${PREFIX}/include/
${INSTALL_DATA} ${WRKSRC}/include/v8-debug.h ${PREFIX}/include/
${INSTALL_DATA} ${WRKSRC}/include/v8-preparser.h ${PREFIX}/include/
${INSTALL_DATA} ${WRKSRC}/include/v8-profiler.h ${PREFIX}/include/
${INSTALL_DATA} ${WRKSRC}/include/v8-testing.h ${PREFIX}/include/
${INSTALL_DATA} ${WRKSRC}/include/v8stdint.h ${PREFIX}/include/
.include <bsd.port.post.mk>