From owner-svn-ports-head@freebsd.org Fri Jun 30 19:05:33 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63EE3D98335; Fri, 30 Jun 2017 19:05:33 +0000 (UTC) (envelope-from cpm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 389BC78EA7; Fri, 30 Jun 2017 19:05:33 +0000 (UTC) (envelope-from cpm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5UJ5WGk066773; Fri, 30 Jun 2017 19:05:32 GMT (envelope-from cpm@FreeBSD.org) Received: (from cpm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5UJ5WxN066772; Fri, 30 Jun 2017 19:05:32 GMT (envelope-from cpm@FreeBSD.org) Message-Id: <201706301905.v5UJ5WxN066772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cpm set sender to cpm@FreeBSD.org using -f From: "Carlos J. Puga Medina" Date: Fri, 30 Jun 2017 19:05:32 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r444774 - head/www/chromium X-SVN-Group: ports-head X-SVN-Commit-Author: cpm X-SVN-Commit-Paths: head/www/chromium X-SVN-Commit-Revision: 444774 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 19:05:33 -0000 Author: cpm Date: Fri Jun 30 19:05:32 2017 New Revision: 444774 URL: https://svnweb.freebsd.org/changeset/ports/444774 Log: www/chromium: convert to option helpers - Drop USES=compiler as CC/CXX are set manually - Switch to option helpers - Cleanup Makefile PR: 202609 Submitted by: jbeich (based on) Modified: head/www/chromium/Makefile Modified: head/www/chromium/Makefile ============================================================================== --- head/www/chromium/Makefile Fri Jun 30 18:37:49 2017 (r444773) +++ head/www/chromium/Makefile Fri Jun 30 19:05:32 2017 (r444774) @@ -61,8 +61,8 @@ RUN_DEPENDS= xdg-open:devel/xdg-utils \ droid-fonts-ttf>0:x11-fonts/droid-fonts-ttf ONLY_FOR_ARCHS= amd64 i386 -USES= bison compiler cpe desktop-file-utils execinfo jpeg \ - ninja perl5 pkgconfig python:2,build shebangfix tar:xz +USES= bison cpe desktop-file-utils execinfo jpeg ninja perl5 \ + pkgconfig python:2,build shebangfix tar:xz CPE_VENDOR= google CPE_PRODUCT= chrome @@ -76,6 +76,10 @@ SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper ALL_TARGET= chrome INSTALLS_ICONS= yes +CC= clang40 +CXX= clang++40 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-clang + # TODO bz@ : install libwidevinecdm.so (see third_party/widevine/cdm/BUILD.gn) # # Run "./out/${BUILDTYPE}/gn args out/${BUILDTYPE} --list" for all variables. @@ -126,11 +130,42 @@ OPTIONS_GROUP_TESTS= DEBUG TEST OPTIONS_DEFAULT= ALSA CODECS DRIVER GCONF KERBEROS OPTIONS_SUB= yes -GCONF_USE= GNOME=gconf2 ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \ alsa-lib>=1.1.1_1:audio/alsa-lib +ALSA_VARS= GN_ARGS+=use_alsa=true +ALSA_VARS_OFF= GN_ARGS+=use_alsa=false + +CODECS_VARS= GN_ARGS+=ffmpeg_branding="Chrome" \ + GN_ARGS+=proprietary_codecs=true \ + GN_ARGS+=enable_hevc_demuxing=true +CODECS_VARS_OFF= GN_ARGS+=ffmpeg_branding="Chromium" \ + GN_ARGS+=proprietary_codecs=false \ + GN_ARGS+=enable_hevc_demuxing=false + +DEBUG_VARS= BUILDTYPE=Debug \ + GN_ARGS+=is_debug=true \ + GN_BOOTSTRAP_FLAGS+=--debug \ + WANTSPACE="lots of free diskspace (~ 8.5GB)" +DEBUG_VARS_OFF= BUILDTYPE=Release \ + GN_ARGS+=is_debug=false \ + GN_ARGS+=symbol_level=0 \ + GN_ARGS+=remove_webcore_debug_symbols=true \ + WANTSPACE="a fair amount of free diskspace (~ 3.7GB)" + +DRIVER_MAKE_ARGS= chromedriver + +GCONF_USE= GNOME=gconf2 +GCONF_VARS= GN_ARGS+=use_gconf=true +GCONF_VARS_OFF= GN_ARGS+=use_gconf=false + +KERBEROS_VARS= GN_ARGS+=use_kerberos=true +KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false + PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio +PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true +PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false + # With SNDIO=on we exclude audio_manager_linux from the build (see # media/audio/BUILD.gn) and use audio_manager_openbsd which does not # support falling back to ALSA. In theory it supports falling back to @@ -140,74 +175,16 @@ SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_VARS= GN_ARGS+=use_sndio=true SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false -DRIVER_MAKE_ARGS=chromedriver -TEST_DISTFILES= ${PORTNAME}-${DISTVERSION}-testdata${EXTRACT_SUFX}:source1 +.include "Makefile.tests" +TEST_ALL_TARGET= ${TEST_TARGETS} +TEST_DISTFILES= ${PORTNAME}-${DISTVERSION}-testdata${EXTRACT_SUFX}:source1 .include -.if ${PORT_OPTIONS:MALSA} -GN_ARGS+= use_alsa=true -.else -GN_ARGS+= use_alsa=false -.endif - -.if ${PORT_OPTIONS:MCODECS} -GN_ARGS+= ffmpeg_branding="Chrome" -GN_ARGS+= proprietary_codecs=true -GN_ARGS+= enable_hevc_demuxing=true -.else -GN_ARGS+= ffmpeg_branding="Chromium" -GN_ARGS+= proprietary_codecs=false -GN_ARGS+= enable_hevc_demuxing=false -.endif - -.if ${PORT_OPTIONS:MDEBUG} -BUILDTYPE= Debug -GN_ARGS+= is_debug=true -GN_BOOTSTRAP_FLAGS+= --debug -MAKE_ENV+= V=1 -.else -BUILDTYPE= Release -GN_ARGS+= is_debug=false -GN_ARGS+= symbol_level=0 -GN_ARGS+= remove_webcore_debug_symbols=true -.endif - -.if ${PORT_OPTIONS:MGCONF} -GN_ARGS+= use_gconf=true -.else -GN_ARGS+= use_gconf=false -.endif - -.if ${PORT_OPTIONS:MKERBEROS} -GN_ARGS+= use_kerberos=true -.else -GN_ARGS+= use_kerberos=false -.endif - -.if ${PORT_OPTIONS:MPULSEAUDIO} -GN_ARGS+= use_pulseaudio=true -.else -GN_ARGS+= use_pulseaudio=false -.endif - -.if ${PORT_OPTIONS:MTEST} -.include "Makefile.tests" -ALL_TARGET+= ${TEST_TARGETS} -.endif - -.include - -CC= clang40 -CXX= clang++40 -#optionally set AR, LD, NM, READELF ? - # TODO: -isystem, would be just as ugly as this approach, but more reliably # build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include -# TODO: move this big extra to small ones -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-clang # Work around base r261801 .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100508 @@ -216,13 +193,8 @@ GN_ARGS+= extra_cxxflags="-D_LIBCPP_TRIVIAL_PAIR_COPY_ pre-everything:: @${ECHO_MSG} - @${ECHO_MSG} "To build Chromium, you should have around 2GB of memory," -.if ${PORT_OPTIONS:MDEBUG} - @${ECHO_MSG} "lots of free diskspace (~ 40GB)" - @${ECHO_MSG} "and no less then 16GB of memory for linking." -.else - @${ECHO_MSG} "and a fair amount of free diskspace (~ 3.7GB)." -.endif + @${ECHO_MSG} "To build Chromium, you should have around 2GB of memory" + @${ECHO_MSG} "and ${WANTSPACE}." @${ECHO_MSG} post-extract: @@ -255,7 +227,7 @@ do-configure: @${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 -test regression-test: build +do-test-TEST-on: .for t in ${TEST_TARGETS} cd ${WRKSRC}/out/${BUILDTYPE} && ${SETENV} LC_ALL=en_US.UTF-8 \ ./${t} --gtest_filter=-${EXCLUDE_${t}:ts:} || ${TRUE} @@ -294,15 +266,15 @@ do-install: ${INSTALL_SCRIPT} ${WRKDIR}/chrome ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/mksnapshot \ ${STAGEDIR}${DATADIR} -.if ${PORT_OPTIONS:MDEBUG} + +post-install-DEBUG-on: ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/*.so \ ${STAGEDIR}${DATADIR} ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/character_data_generator \ ${STAGEDIR}${DATADIR} -.endif -.if ${PORT_OPTIONS:MDRIVER} + +post-install-DRIVER-on: ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chromedriver \ ${STAGEDIR}${PREFIX}/bin -.endif -.include +.include