# We follow the beta channel on https://omahaproxy.appspot.com/ # https://chromium.googlesource.com/v8/v8/+/refs/heads/9.9-lkgr PORTNAME= v8 PORTVERSION= 9.9.115.5 CATEGORIES= lang MASTER_SITES= LOCAL/sunpoet/v8/${PORTVERSION:R:R} PKGNAMESUFFIX= -beta DISTFILES= v8-${PORTVERSION}.tar.gz \ build-${BUILD_REV}.tar.gz \ buildtools-${BUILDTOOLS_REV}.tar.gz \ clang-${CLANG_REV}.tar.gz \ common-${COMMON_REV}.tar.gz \ googletest-${GOOGLETEST_REV}.tar.gz \ icu-${ICU_REV}.tar.gz \ zlib-${ZLIB_REV}.tar.gz DIST_SUBDIR= v8/${PORTVERSION:R:R} EXTRACT_ONLY= ${DISTNAME}.tar.gz MAINTAINER= sunpoet@FreeBSD.org COMMENT= Open source JavaScript engine by Google LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE ONLY_FOR_ARCHS= aarch64 amd64 i386 BUILD_DEPENDS= binutils>=0:devel/binutils \ gn:devel/gn \ ${PYTHON_PKGNAMEPREFIX}Jinja2>=0:devel/py-Jinja2@${PY_FLAVOR} LIB_DEPENDS= libicudata.so:devel/icu USES= compiler:c++17-lang cpe gnome ninja pkgconfig python:3.5+,build tar:xz USE_GNOME= glib20 BINARY_ALIAS= python3=${PYTHON_CMD} MAKE_ARGS= -C out/Release NO_WRKSUBDIR= yes USE_LDCONFIG= yes SUB_FILES= v8.pc v8_libbase.pc v8_libplatform.pc CPE_VENDOR= google CONFLICTS_INSTALL= v8 BUILD_REV= f3be6e847f004923466a350274aae3fbf048c19c BUILDTOOLS_REV= f78b4b9f33bd8ef9944d5ce643daff1c31880189 CLANG_REV= df50898d39a35c2467fa89f8d7a6eedac1fd6aa4 COMMON_REV= 7f36dbc19d31e2aad895c60261ca8f726442bfbb GOOGLETEST_REV= c9643a2e45ed0cb18b8409c62994be7c6e66dc1b ICU_REV= b9f6d0a5c5375dc4643f35360d257dba37c1d3e1 ZLIB_REV= fc5cfd78a357d5bb7735a58f383634faaafe706a # Run "gn args --list out/Release" for all variables. # Some parts don't have use_system_* flag, and can be turned on/off by using # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. GN_ARGS+= clang_use_chrome_plugins=false \ extra_cxxflags="${CXXFLAGS}" \ extra_ldflags="${LDFLAGS}" \ is_clang=true \ treat_warnings_as_errors=false \ use_aura=true \ use_lld=true \ use_custom_libcxx=false \ v8_use_external_startup_data=false post-extract: @${MKDIR} ${WRKSRC}/base/trace_event/common ${WRKSRC}/build ${WRKSRC}/buildtools ${WRKSRC}/third_party/googletest/src ${WRKSRC}/third_party/icu ${WRKSRC}/third_party/zlib ${WRKSRC}/tools/clang @${TAR} -xf ${DISTDIR}/${DIST_SUBDIR}/build-${BUILD_REV}.tar.gz -C ${WRKSRC}/build @${TAR} -xf ${DISTDIR}/${DIST_SUBDIR}/buildtools-${BUILDTOOLS_REV}.tar.gz -C ${WRKSRC}/buildtools @${TAR} -xf ${DISTDIR}/${DIST_SUBDIR}/clang-${CLANG_REV}.tar.gz -C ${WRKSRC}/tools/clang @${TAR} -xf ${DISTDIR}/${DIST_SUBDIR}/common-${COMMON_REV}.tar.gz -C ${WRKSRC}/base/trace_event/common @${TAR} -xf ${DISTDIR}/${DIST_SUBDIR}/googletest-${GOOGLETEST_REV}.tar.gz -C ${WRKSRC}/third_party/googletest/src @${TAR} -xf ${DISTDIR}/${DIST_SUBDIR}/icu-${ICU_REV}.tar.gz -C ${WRKSRC}/third_party/icu @${TAR} -xf ${DISTDIR}/${DIST_SUBDIR}/zlib-${ZLIB_REV}.tar.gz -C ${WRKSRC}/third_party/zlib post-patch: @${REINPLACE_CMD} -i '' 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/build/toolchain/gcc_toolchain.gni ${WRKSRC}/buildtools/third_party/libc++/BUILD.gn # https://github.com/klzgrad/naiveproxy/blob/master/src/build/config/gclient_args.gni @${ECHO_CMD} 'checkout_google_benchmark = false' > ${WRKSRC}/build/config/gclient_args.gni # Use ICU from ports and create needed directory pre-configure: @cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} ./build/linux/unbundle/replace_gn_files.py --system-libraries icu # || ${FALSE} @${MKDIR} ${WRKSRC}/out/Release/gen/shim_headers/icui18n_shim/third_party/icu/source/i18n/unicode ${WRKSRC}/out/Release/gen/shim_headers/icuuc_shim/third_party/icu/source/common/unicode @${MKDIR} ${WRKSRC}/out/Release/gen/include @${CP} -R ${LOCALBASE}/include/unicode ${WRKSRC}/out/Release/gen/include/unicode do-configure: @cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} gn gen out/Release --args='${GN_ARGS}' do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/include/cppgc ${STAGEDIR}${PREFIX}/include/libplatform ${INSTALL_PROGRAM} ${WRKSRC}/out/Release/d8 ${STAGEDIR}${PREFIX}/bin/d8 ${INSTALL_PROGRAM} ${WRKSRC}/out/Release/mkgrokdump ${STAGEDIR}${PREFIX}/bin/mkgrokdump ${INSTALL_PROGRAM} ${WRKSRC}/out/Release/mksnapshot ${STAGEDIR}${PREFIX}/bin/mksnapshot ${INSTALL_LIB} ${WRKSRC}/out/Release/libchrome_zlib.so ${STAGEDIR}${PREFIX}/lib/libchrome_zlib.so ${INSTALL_LIB} ${WRKSRC}/out/Release/libcppgc.so ${STAGEDIR}${PREFIX}/lib/libcppgc.so ${INSTALL_LIB} ${WRKSRC}/out/Release/libv8.so ${STAGEDIR}${PREFIX}/lib/libv8.so ${INSTALL_LIB} ${WRKSRC}/out/Release/libv8_libbase.so ${STAGEDIR}${PREFIX}/lib/libv8_libbase.so ${INSTALL_LIB} ${WRKSRC}/out/Release/libv8_libplatform.so ${STAGEDIR}${PREFIX}/lib/libv8_libplatform.so ${INSTALL_DATA} ${WRKSRC}/include/*.h ${STAGEDIR}${PREFIX}/include/ cd ${WRKSRC}/include/cppgc && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/include/cppgc '-name *\.h' ${INSTALL_DATA} ${WRKSRC}/include/libplatform/*.h ${STAGEDIR}${PREFIX}/include/libplatform/ ${INSTALL_DATA} ${WRKDIR}/v8*.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig/ .include