Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141935690
D11554.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
10 KB
Referenced Files
None
Subscribers
None
D11554.diff
View Options
Index: head/devel/Makefile
===================================================================
--- head/devel/Makefile
+++ head/devel/Makefile
@@ -276,6 +276,7 @@
SUBDIR += checkheaders
SUBDIR += cheritrace-devel
SUBDIR += cherivis-devel
+ SUBDIR += chromium-gn
SUBDIR += chrpath
SUBDIR += chruby
SUBDIR += cil
Index: head/devel/chromium-gn/Makefile
===================================================================
--- head/devel/chromium-gn/Makefile
+++ head/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: head/devel/chromium-gn/pkg-descr
===================================================================
--- head/devel/chromium-gn/pkg-descr
+++ head/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: head/www/chromium/Makefile
===================================================================
--- head/www/chromium/Makefile
+++ head/www/chromium/Makefile
@@ -4,32 +4,36 @@
PORTNAME= chromium
PORTVERSION= 59.0.3071.115
PORTREVISION= 2
-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 \
+BUILD_DEPENDS= python:lang/python \
+ 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 \
clang40:devel/llvm40 \
yasm:devel/yasm \
- python:lang/python \
ffmpeg>=3.2.2,1:multimedia/ffmpeg \
- bash:shells/bash \
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
+.if !defined(GN_ONLY)
LIB_DEPENDS= libspeechd.so:accessibility/speech-dispatcher \
libsnappy.so:archivers/snappy \
libFLAC.so:audio/flac \
@@ -62,9 +66,17 @@
droid-fonts-ttf>0:x11-fonts/droid-fonts-ttf
ONLY_FOR_ARCHS= amd64 i386
-USES= bison cpe desktop-file-utils execinfo jpeg ninja perl5 \
+.endif
+
+.if defined(GN_ONLY)
+USES= compiler:c++11-lib ninja pkgconfig python:2,build shebangfix tar:xz
+.else
+USES= bison cpe desktop-file-utils execinfo jpeg ninja perl5 \
pkgconfig python:2,build shebangfix tar:xz
+.endif
+MAKE_ARGS= -C out/${BUILDTYPE}
+.if !defined(GN_ONLY)
CPE_VENDOR= google
CPE_PRODUCT= chrome
USE_LDCONFIG= ${DATADIR}
@@ -72,13 +84,14 @@
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
CC= clang40
CXX= clang++40
+.endif
+
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-clang
# TODO bz@ : install libwidevinecdm.so (see third_party/widevine/cdm/BUILD.gn)
@@ -118,6 +131,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 +190,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 +208,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 +232,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 +254,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 +298,5 @@
post-install-DRIVER-on:
${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chromedriver \
${STAGEDIR}${PREFIX}/bin
-
+.endif
.include <bsd.port.mk>
Index: head/www/chromium/files/patch-third__party_ffmpeg_ffmpeg__generated.gni
===================================================================
--- head/www/chromium/files/patch-third__party_ffmpeg_ffmpeg__generated.gni
+++ head/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",
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 14, 8:15 AM (21 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27635598
Default Alt Text
D11554.diff (10 KB)
Attached To
Mode
D11554: devel/chromium-gn: meta-build system that generates NinjaBuild files
Attached
Detach File
Event Timeline
Log In to Comment