Index: devel/Makefile =================================================================== --- devel/Makefile +++ devel/Makefile @@ -272,6 +272,7 @@ SUBDIR += checkheaders SUBDIR += cheritrace-devel SUBDIR += cherivis-devel + SUBDIR += chromium-gn SUBDIR += chrpath SUBDIR += chruby SUBDIR += cil Index: devel/chromium-gn/Makefile =================================================================== --- /dev/null +++ devel/chromium-gn/Makefile @@ -0,0 +1,24 @@ +# $FreeBSD$ + +CATEGORIES= devel www +PKGNAMESUFFIX= -gn + +MAINTAINER= luca.pizzamiglio@gmail.com +COMMENT= Gn meta build framework + +MASTERDIR= ${.CURDIR}/../../www/chromium + +BUILDTYPE= Release +NO_BUILD= yes + +PLIST= ${.CURDIR}/pkg-plist +PKGMESSAGE= ${.CURDIR}/pkg-message +DESCR= ${.CURDIR}/pkg-descr +PLIST_FILES= bin/gn + +GN_ONLY= yes + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/gn ${STAGEDIR}${PREFIX}/bin + +.include "${MASTERDIR}/Makefile" Index: devel/chromium-gn/pkg-descr =================================================================== --- /dev/null +++ devel/chromium-gn/pkg-descr @@ -0,0 +1,4 @@ +GN is a meta-build system that generates NinjaBuild files so that you can build +Chromium with Ninja. + +WWW: https://chromium.googlesource.com/chromium/src/tools/gn/ Index: www/chromium/Makefile =================================================================== --- www/chromium/Makefile +++ www/chromium/Makefile @@ -4,33 +4,37 @@ PORTNAME= chromium PORTVERSION= 59.0.3071.115 PORTREVISION= 1 -CATEGORIES= www +CATEGORIES?= www MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/:source1 \ LOCAL/cpm:source2 DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:source1 \ ${PORTNAME}-freetype2${EXTRACT_SUFX}:source2 -MAINTAINER= chromium@FreeBSD.org -COMMENT= Google web browser based on WebKit +MAINTAINER?= chromium@FreeBSD.org +COMMENT?= Google web browser based on WebKit LICENSE= BSD3CLAUSE LGPL21 MPL LICENSE_COMB= multi -BUILD_DEPENDS= gperf:devel/gperf \ - clang40:devel/llvm40 \ - yasm:devel/yasm \ +BUILD_DEPENDS= clang40:devel/llvm40 \ python:lang/python \ - ffmpeg>=3.2.2,1:multimedia/ffmpeg \ bash:shells/bash \ + ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2 \ + ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply + +.if !defined(GN_ONLY) +BUILD_DEPENDS+= gperf:devel/gperf \ + yasm:devel/yasm \ + ffmpeg>=3.2.2,1:multimedia/ffmpeg \ flock:sysutils/flock \ node:www/node \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ ${LOCALBASE}/share/usbids/usb.ids:misc/usbids \ - ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2 \ - ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply \ ${PYTHON_PKGNAMEPREFIX}html5lib>0:www/py-html5lib +.endif -LIB_DEPENDS= libspeechd.so:accessibility/speech-dispatcher \ +.if !defined(GN_ONLY) +LIB_DEPENDS+= libspeechd.so:accessibility/speech-dispatcher \ libsnappy.so:archivers/snappy \ libFLAC.so:audio/flac \ libspeex.so:audio/speex \ @@ -60,8 +64,14 @@ RUN_DEPENDS= xdg-open:devel/xdg-utils \ droid-fonts-ttf>0:x11-fonts/droid-fonts-ttf +.endif ONLY_FOR_ARCHS= amd64 i386 + +USES= ninja pkgconfig python:2,build shebangfix tar:xz +MAKE_ARGS= -C out/${BUILDTYPE} + +.if !defined(GN_ONLY) USES= bison cpe desktop-file-utils execinfo jpeg ninja perl5 \ pkgconfig python:2,build shebangfix tar:xz @@ -72,10 +82,10 @@ USE_XORG= scrnsaverproto x11 xcb xcomposite xcursor xext xdamage xfixes xi \ xproto xrandr xrender xscrnsaver xtst USE_GNOME= atk dconf glib20 gtk20 gtk30 libxml2 libxslt -MAKE_ARGS= -C out/${BUILDTYPE} SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper ALL_TARGET= chrome INSTALLS_ICONS= yes +.endif CC= clang40 CXX= clang++40 @@ -118,6 +128,7 @@ google_default_client_id="996322985003.apps.googleusercontent.com" \ google_default_client_secret="IR1za9-1VK0zZ0f_O8MVFicn" +.if !defined(GN_ONLY) SUB_FILES= chromium-browser.desktop chrome SUB_LIST+= COMMENT="${COMMENT}" @@ -176,6 +187,8 @@ SNDIO_VARS= GN_ARGS+=use_sndio=true SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false +.endif + .include "Makefile.tests" TEST_ALL_TARGET= ${TEST_TARGETS} TEST_DISTFILES= ${PORTNAME}-${DISTVERSION}-testdata${EXTRACT_SUFX}:source1 @@ -192,6 +205,7 @@ GN_ARGS+= extra_cxxflags="-D_LIBCPP_TRIVIAL_PAIR_COPY_CTOR=1" .endif +.if !defined(GN_ONLY) pre-everything:: @${ECHO_MSG} @${ECHO_MSG} "To build Chromium, you should have around 2GB of memory" @@ -215,18 +229,21 @@ cd ${WRKSRC} && ${PYTHON_CMD} \ ./build/linux/unbundle/replace_gn_files.py --system-libraries \ ffmpeg flac harfbuzz-ng libwebp libxml libxslt snappy yasm || ${FALSE} +.endif do-configure: # GN generator bootstrapping and generating ninja files cd ${WRKSRC} && ${SETENV} CC=${CC} CXX=${CXX} LD=${CXX} \ READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} +.if !defined(GN_ONLY) cd ${WRKSRC} && ${SETENV} ./out/${BUILDTYPE}/gn \ gen --args='${GN_ARGS}' out/${BUILDTYPE} # Setup nodejs dependency @${MKDIR} ${WRKSRC}/third_party/node/linux/node-linux-x64/bin ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/linux/node-linux-x64/bin/node +.endif do-test-TEST-on: .for t in ${TEST_TARGETS} @@ -234,6 +251,7 @@ ./${t} --gtest_filter=-${EXCLUDE_${t}:ts:} || ${TRUE} .endfor +.if !defined(GN_ONLY) do-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_MAN} ${WRKSRC}/out/${BUILDTYPE}/chrome.1 ${STAGEDIR}${MANPREFIX}/man/man1 @@ -277,5 +295,5 @@ post-install-DRIVER-on: ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chromedriver \ ${STAGEDIR}${PREFIX}/bin - +.endif .include Index: www/chromium/files/patch-third__party_ffmpeg_ffmpeg__generated.gni =================================================================== --- www/chromium/files/patch-third__party_ffmpeg_ffmpeg__generated.gni +++ www/chromium/files/patch-third__party_ffmpeg_ffmpeg__generated.gni @@ -23,7 +23,7 @@ } -if ((current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_win && ffmpeg_branding == "Chrome")) { -+if ((current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux | is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_win && ffmpeg_branding == "Chrome")) { ++if ((current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_win && ffmpeg_branding == "Chrome")) { ffmpeg_c_sources += [ "libavcodec/aac_ac3_parser.c", "libavcodec/aac_parser.c",