Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146117009
D11554.id30632.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.id30632.diff
View Options
Index: devel/Makefile
===================================================================
--- devel/Makefile
+++ devel/Makefile
@@ -764,6 +764,7 @@
SUBDIR += glrparser
SUBDIR += glui
SUBDIR += gmake
+ SUBDIR += gn
SUBDIR += gnatcoll
SUBDIR += gnatpython
SUBDIR += gnome-builder
Index: devel/gn/Makefile
===================================================================
--- /dev/null
+++ devel/gn/Makefile
@@ -0,0 +1,25 @@
+# $FreeBSD$
+
+PORTNAME= chromium
+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}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+
+.include "${MASTERDIR}/Makefile"
Index: devel/gn/pkg-descr
===================================================================
--- /dev/null
+++ devel/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
@@ -1,17 +1,17 @@
# Created by: Florent Thoumie <flz@FreeBSD.org>
# $FreeBSD$
-PORTNAME= chromium
+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 \
+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
@@ -20,16 +20,19 @@
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
+.if !defined(GN_ONLY)
+BUILD_DEPENDS+= ffmpeg>=3.2.2,1:multimedia/ffmpeg \
+ node:www/node \
+ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \
+ ${LOCALBASE}/share/usbids/usb.ids:misc/usbids
+.endif
+
LIB_DEPENDS= libspeechd.so:accessibility/speech-dispatcher \
libsnappy.so:archivers/snappy \
libFLAC.so:audio/flac \
@@ -41,16 +44,8 @@
libpci.so:devel/libpci \
libnspr4.so:devel/nspr \
libre2.so:devel/re2 \
- libcairo.so:graphics/cairo \
- libdrm.so:graphics/libdrm \
libexif.so:graphics/libexif \
- libpng.so:graphics/png \
- libwebp.so:graphics/webp \
- libavcodec.so:multimedia/ffmpeg \
libcups.so:print/cups \
- libfreetype.so:print/freetype2 \
- libharfbuzz.so:print/harfbuzz \
- libharfbuzz-icu.so:print/harfbuzz-icu \
libgcrypt.so:security/libgcrypt \
libgnome-keyring.so:security/libgnome-keyring \
libnss3.so:security/nss \
@@ -58,10 +53,26 @@
libxml2.so:textproc/libxml2 \
libfontconfig.so:x11-fonts/fontconfig
+.if !defined(GN_ONLY)
+LIB_DEPENDS+= libcairo.so:graphics/cairo \
+ libdrm.so:graphics/libdrm \
+ libpng.so:graphics/png \
+ libwebp.so:graphics/webp \
+ libavcodec.so:multimedia/ffmpeg \
+ libfreetype.so:print/freetype2 \
+ libharfbuzz.so:print/harfbuzz \
+ libharfbuzz-icu.so:print/harfbuzz-icu
+
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 +83,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 +129,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 +188,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
@@ -189,9 +203,10 @@
# Work around base r261801
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100508
-GN_ARGS+= extra_cxxflags="-D_LIBCPP_TRIVIAL_PAIR_COPY_CTOR=1"
+#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,12 +230,14 @@
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}
@@ -278,4 +295,5 @@
${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chromedriver \
${STAGEDIR}${PREFIX}/bin
+.endif
.include <bsd.port.mk>
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",
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 28, 11:16 PM (5 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29086301
Default Alt Text
D11554.id30632.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