freebsd-ports/lang/v8/Makefile
2011-09-05 12:44:32 +00:00

78 lines
2.2 KiB
Makefile

# New ports collection makefile for: v8
# Date created: 12 November 2010
# Whom: siasia
#
# $FreeBSD$
#
PORTNAME= v8
PORTVERSION= 3.5.10
PORTREVISION= 0
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-g4cf15c7
FETCH_ARGS= -pRr
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTNAME}-${GITVERSION:S/^0-g//}
USE_SCONS= yes
USE_LDCONFIG= yes
OPTIONS= DEBUG "Build in debug mode" Off \
SNAPSHOT "Enable snapshots" Off
.include <bsd.port.options.mk>
SCONS_ARGS= visibility=default
.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}
@cd ${BUILD_WRKSRC} && \
${SETENV} ${SCONS_BUILDENV} ${SCONS_BIN} ${SCONS_ENV} ${_MAKE_JOBS} \
${SCONS_ARGS} library=shared ${SCONS_TARGET}
do-install:
${INSTALL_LIB} -m 755 ${WRKSRC}/libv8.a ${PREFIX}/lib/libv8.a
${INSTALL_LIB} -m 755 ${WRKSRC}/libv8.so ${PREFIX}/lib/libv8.so.1
${INSTALL_LIB} -m 755 ${WRKSRC}/libv8preparser.a ${PREFIX}/lib/libv8preparser.a
${INSTALL_LIB} -m 755 ${WRKSRC}/libv8preparser.so ${PREFIX}/lib/libv8preparser.so.1
${LN} -sf ${PREFIX}/lib/libv8.so.1 ${PREFIX}/lib/libv8.so
${LN} -sf ${PREFIX}/lib/libv8preparser.so.1 ${PREFIX}/lib/libv8preparser.so
${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>