diff options
author | Carlos J. Puga Medina <cpm@FreeBSD.org> | 2017-06-30 19:05:32 +0000 |
---|---|---|
committer | Carlos J. Puga Medina <cpm@FreeBSD.org> | 2017-06-30 19:05:32 +0000 |
commit | 84cd530e9168bc2b35bd1571dc3d11ba25a9c9b7 (patch) | |
tree | 9ba4807aa464dda43637e54d06b8337087993c53 /www/chromium/Makefile | |
parent | f2e6e3cde5cda28af11b89c36445f77eb6241351 (diff) | |
download | ports-84cd530e9168bc2b35bd1571dc3d11ba25a9c9b7.tar.gz ports-84cd530e9168bc2b35bd1571dc3d11ba25a9c9b7.zip |
Notes
Diffstat (limited to 'www/chromium/Makefile')
-rw-r--r-- | www/chromium/Makefile | 126 |
1 files changed, 49 insertions, 77 deletions
diff --git a/www/chromium/Makefile b/www/chromium/Makefile index 2adfd0cda90a..b110da2a1968 100644 --- a/www/chromium/Makefile +++ b/www/chromium/Makefile @@ -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 <bsd.port.options.mk> - -.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 +TEST_ALL_TARGET= ${TEST_TARGETS} +TEST_DISTFILES= ${PORTNAME}-${DISTVERSION}-testdata${EXTRACT_SUFX}:source1 -.include <bsd.port.pre.mk> - -CC= clang40 -CXX= clang++40 -#optionally set AR, LD, NM, READELF ? +.include <bsd.port.options.mk> # 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_CTOR=1" 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 <bsd.port.post.mk> +.include <bsd.port.mk> |