2010-10-13 18:54:31 +00:00
|
|
|
# New ports collection makefile for: chromium
|
|
|
|
# Date created: September 30 2009
|
|
|
|
# Whom: Florent Thoumie <flz@FreeBSD.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= chromium
|
|
|
|
DISTVERSIONPREFIX= courgette-redacted-
|
2011-10-04 20:58:08 +00:00
|
|
|
DISTVERSION= 14.0.835.202
|
2011-10-18 18:36:21 +00:00
|
|
|
PORTREVISION= 1
|
2010-10-13 18:54:31 +00:00
|
|
|
CATEGORIES= www
|
2011-01-18 21:06:09 +00:00
|
|
|
MASTER_SITES= http://download.goodking.org/downloads/ \
|
|
|
|
ftp://rene-ladan.nl/pub/distfiles/ \
|
2011-09-18 17:11:32 +00:00
|
|
|
http://files.etoilebsd.net/goodking/ \
|
2011-09-30 23:08:39 +00:00
|
|
|
http://distfiles.cybertron.gr/
|
2011-09-18 17:11:32 +00:00
|
|
|
|
2011-03-19 18:22:30 +00:00
|
|
|
MAINTAINER= chromium@FreeBSD.org
|
2010-10-13 18:54:31 +00:00
|
|
|
COMMENT= A mostly BSD-licensed web browser based on WebKit and Gtk+
|
|
|
|
|
2011-07-11 20:37:56 +00:00
|
|
|
LICENSE= BSD LGPL21 MPL
|
|
|
|
LICENSE_COMB= multi
|
|
|
|
|
2011-04-04 19:45:48 +00:00
|
|
|
BUILD_DEPENDS= ${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex \
|
|
|
|
${LOCALBASE}/bin/gperf:${PORTSDIR}/devel/gperf \
|
|
|
|
bash:${PORTSDIR}/shells/bash \
|
|
|
|
yasm:${PORTSDIR}/devel/yasm \
|
2011-09-30 23:08:39 +00:00
|
|
|
flock:${PORTSDIR}/sysutils/flock \
|
2011-08-02 21:12:37 +00:00
|
|
|
v4l_compat>=1.0.20110603:${PORTSDIR}/multimedia/v4l_compat \
|
2010-10-20 18:33:38 +00:00
|
|
|
nss>=3.12:${PORTSDIR}/security/nss
|
|
|
|
# minimal version of nss, LIB_DEPENDS does not enforce this
|
2010-10-13 18:54:31 +00:00
|
|
|
|
2011-04-04 19:45:48 +00:00
|
|
|
LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo \
|
|
|
|
cairo.2:${PORTSDIR}/graphics/cairo \
|
|
|
|
dbus-1.3:${PORTSDIR}/devel/dbus \
|
|
|
|
dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \
|
|
|
|
asound.2:${PORTSDIR}/audio/alsa-lib \
|
|
|
|
freetype.9:${PORTSDIR}/print/freetype2 \
|
|
|
|
nss3.1:${PORTSDIR}/security/nss \
|
2011-04-30 10:04:15 +00:00
|
|
|
gnome-keyring.0:${PORTSDIR}/security/libgnome-keyring \
|
2011-09-12 17:03:57 +00:00
|
|
|
cups.2:${PORTSDIR}/print/cups-client \
|
2011-09-18 17:11:32 +00:00
|
|
|
icuuc.48:${PORTSDIR}/devel/icu \
|
|
|
|
icui18n.48:${PORTSDIR}/devel/icu \
|
|
|
|
icudata.48:${PORTSDIR}/devel/icu \
|
|
|
|
event-1.4:${PORTSDIR}/devel/libevent \
|
|
|
|
vpx:${PORTSDIR}/multimedia/libvpx \
|
|
|
|
tcmalloc.2:${PORTSDIR}/devel/google-perftools
|
2010-10-13 18:54:31 +00:00
|
|
|
|
2011-01-18 21:06:09 +00:00
|
|
|
RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins \
|
2011-07-12 11:35:18 +00:00
|
|
|
${LOCALBASE}/lib/X11/fonts/Droid/fonts.dir:${PORTSDIR}/x11-fonts/droid-fonts-ttf \
|
|
|
|
${LOCALBASE}/lib/libgcrypt.so:${PORTSDIR}/security/libgcrypt
|
2011-01-18 21:06:09 +00:00
|
|
|
|
2010-10-13 18:54:31 +00:00
|
|
|
ONLY_FOR_ARCHS= i386 amd64
|
2010-11-13 09:22:45 +00:00
|
|
|
USE_XZ= yes
|
2010-10-13 18:54:31 +00:00
|
|
|
USE_BISON= build
|
|
|
|
USE_GMAKE= yes
|
2011-04-07 22:39:08 +00:00
|
|
|
USE_PERL5_BUILD= yes
|
|
|
|
USE_PYTHON_BUILD= 2.6+
|
|
|
|
USE_XORG= scrnsaverproto x11 xproto xscrnsaver xtst
|
|
|
|
USE_GNOME= glib20 gtk20 dconf libxslt pkgconfig
|
2010-10-13 18:54:31 +00:00
|
|
|
MAN1= chrome.1
|
|
|
|
|
2010-11-13 09:22:45 +00:00
|
|
|
DESKTOP_ENTRIES="Chromium" "${COMMENT}" "${DATADIR}/product_logo_48.png" \
|
|
|
|
"chrome" "Application;Network;WebBrowser;" true
|
|
|
|
|
2010-10-13 18:54:31 +00:00
|
|
|
ALL_TARGET= chrome
|
|
|
|
|
2011-09-18 17:11:32 +00:00
|
|
|
# See build/common.gypi for all the available variables.
|
|
|
|
GYP_DEFINES+= use_cups=1 \
|
|
|
|
use_system_icu=1 \
|
|
|
|
use_system_vpx=1 \
|
|
|
|
use_system_yasm=1 \
|
|
|
|
use_system_libxml=1 \
|
|
|
|
use_system_ffmpeg=0 \
|
|
|
|
use_system_libevent=1 \
|
|
|
|
use_system_tcmalloc=1 \
|
|
|
|
linux_use_heapchecker=0 \
|
|
|
|
disable_nacl=1 \
|
|
|
|
enable_webrtc=0 \
|
|
|
|
enable_openmax=1 \
|
|
|
|
os_ver=${OSVERSION} \
|
|
|
|
prefix_dir=${LOCALBASE} \
|
|
|
|
python_ver=${PYTHON_VER}
|
2010-12-05 11:05:38 +00:00
|
|
|
|
2011-08-02 21:12:37 +00:00
|
|
|
OPTIONS= CODECS "Compile and enable patented codecs like H.264" on \
|
2011-09-30 23:08:39 +00:00
|
|
|
GCONF "Use GConf2 for preferences" on \
|
|
|
|
CLANG "Compile Chromium with clang" off \
|
|
|
|
GCC45 "Compile Chromium with gcc 4.5+" off \
|
|
|
|
DEBUG "Compile with debug symbols and verbose output" off
|
2010-10-18 21:43:08 +00:00
|
|
|
|
2011-04-01 16:45:01 +00:00
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2011-09-30 23:08:39 +00:00
|
|
|
.if ${OSVERSION} < 900033 || defined(WITH_GCC45)
|
2011-04-01 16:45:01 +00:00
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils
|
|
|
|
CONFIGURE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
|
|
|
|
MAKE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
|
|
|
|
.endif
|
2010-12-05 11:05:38 +00:00
|
|
|
|
2011-08-13 21:29:28 +00:00
|
|
|
.if ${OSVERSION} < 801000
|
2011-08-21 11:00:38 +00:00
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-base__base.gypi-stub
|
2011-08-13 21:29:28 +00:00
|
|
|
.else
|
2011-08-21 11:00:38 +00:00
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-base__base.gypi-freebsd
|
2011-08-13 21:29:28 +00:00
|
|
|
.endif
|
|
|
|
|
2010-10-13 18:54:31 +00:00
|
|
|
.if defined(WITH_CODECS)
|
|
|
|
GYP_DEFINES+= ffmpeg_branding=Chrome
|
2011-04-01 16:45:01 +00:00
|
|
|
GYP_DEFINES+= use_proprietary_codecs=1
|
2010-10-13 18:54:31 +00:00
|
|
|
.else
|
|
|
|
GYP_DEFINES+= ffmpeg_branding=Chromium
|
2011-04-01 16:45:01 +00:00
|
|
|
GYP_DEFINES+= use_proprietary_codecs=0
|
2010-10-13 18:54:31 +00:00
|
|
|
.endif
|
|
|
|
|
2010-12-05 10:09:28 +00:00
|
|
|
.if defined(WITH_GCONF)
|
|
|
|
USE_GNOME+= gconf2
|
|
|
|
.else
|
|
|
|
GYP_DEFINES+= use_gconf=0
|
|
|
|
.endif
|
|
|
|
|
2011-04-07 22:39:08 +00:00
|
|
|
.if ! ${MACHINE_CPU:Msse2}
|
2010-12-05 10:09:28 +00:00
|
|
|
GYP_DEFINES+= disable_sse2=1
|
|
|
|
.endif
|
|
|
|
|
2011-10-08 21:53:08 +00:00
|
|
|
.if defined(WITH_GCC45) && defined(WITH_CLANG)
|
2011-10-06 23:50:40 +00:00
|
|
|
IGNORE= conflicting options (CLANG or GCC45)
|
|
|
|
.endif
|
|
|
|
|
2011-09-30 23:08:39 +00:00
|
|
|
.if defined(WITH_GCC45)
|
|
|
|
USE_GCC?= 4.5+
|
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-gcc
|
|
|
|
.endif
|
|
|
|
|
2011-09-18 17:11:32 +00:00
|
|
|
.if defined(WITH_CLANG)
|
2011-09-30 23:08:39 +00:00
|
|
|
.if ${OSVERSION} < 900033
|
|
|
|
BUILD_DEPENDS+= clang:${PORTSDIR}/lang/clang
|
|
|
|
.endif
|
|
|
|
CC= clang
|
|
|
|
CXX= clang++
|
2011-10-06 23:50:40 +00:00
|
|
|
GYP_DEFINES+= clang=1
|
2010-11-13 09:22:45 +00:00
|
|
|
.endif
|
|
|
|
|
2010-10-13 18:54:31 +00:00
|
|
|
.if !defined(WITH_DEBUG)
|
|
|
|
BUILDTYPE= Release
|
|
|
|
.else
|
2011-09-30 23:08:39 +00:00
|
|
|
MAKE_ENV+= V=1
|
2010-10-13 18:54:31 +00:00
|
|
|
BUILDTYPE= Debug
|
|
|
|
.endif
|
|
|
|
|
|
|
|
MAKE_ENV+= BUILDTYPE=${BUILDTYPE}
|
|
|
|
MAKE_JOBS_SAFE= yes
|
|
|
|
|
2011-05-23 19:19:17 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if ${PERL_LEVEL} >= 501400
|
|
|
|
BUILD_DEPENDS+= p5-Switch>=0:${PORTSDIR}/lang/p5-Switch
|
|
|
|
.endif
|
|
|
|
|
2010-10-13 18:54:31 +00:00
|
|
|
pre-everything::
|
|
|
|
@${ECHO_MSG}
|
|
|
|
@${ECHO_MSG} "To build Chromium, you should have around 1 GB of memory"
|
|
|
|
.if defined(WITH_DEBUG)
|
|
|
|
@${ECHO_MSG} "and lots of free diskspace (~ 7GB)."
|
|
|
|
.else
|
|
|
|
@${ECHO_MSG} "and a fair amount of free diskspace (~ 1.5GB)."
|
|
|
|
.endif
|
|
|
|
@${ECHO_MSG}
|
|
|
|
|
|
|
|
post-patch:
|
2011-04-04 19:45:48 +00:00
|
|
|
@${REINPLACE_CMD} -e "s|/usr/local|${LOCALBASE}|" \
|
|
|
|
${WRKSRC}/base/base.gypi \
|
|
|
|
${WRKSRC}/build/common.gypi \
|
2011-04-01 16:45:01 +00:00
|
|
|
${WRKSRC}/third_party/libvpx/libvpx.gyp \
|
|
|
|
${WRKSRC}/third_party/WebKit/Source/WebCore/plugins/PluginDatabase.cpp \
|
2011-09-18 17:11:32 +00:00
|
|
|
${WRKSRC}/v8/tools/gyp/v8.gyp
|
2011-04-01 16:45:01 +00:00
|
|
|
@${REINPLACE_CMD} -e "s|linux|freebsd|" \
|
|
|
|
${WRKSRC}/tools/gyp/pylib/gyp/generator/make.py
|
2010-10-25 22:35:00 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/gcc|${CC}|' \
|
2011-04-01 16:45:01 +00:00
|
|
|
${WRKSRC}/third_party/WebKit/Source/WebCore/bindings/scripts/IDLParser.pm \
|
|
|
|
${WRKSRC}/third_party/WebKit/Source/WebCore/dom/make_names.pl
|
2010-11-14 21:12:19 +00:00
|
|
|
@${REINPLACE_CMD} -e "s|'flex'|'${LOCALBASE}/bin/flex'|" \
|
2011-04-04 19:45:48 +00:00
|
|
|
${WRKSRC}/third_party/angle/src/build_angle.gyp \
|
2011-04-01 16:45:01 +00:00
|
|
|
${WRKSRC}/third_party/WebKit/Source/WebCore/WebCore.gyp/scripts/action_maketokenizer.py
|
2010-11-14 21:12:19 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|gperf --key-positions|${LOCALBASE}/bin/gperf --key-positions|' \
|
2011-04-04 19:45:48 +00:00
|
|
|
${WRKSRC}/third_party/WebKit/Source/WebCore/css/makeprop.pl \
|
|
|
|
${WRKSRC}/third_party/WebKit/Source/WebCore/css/makevalues.pl \
|
2011-04-01 16:45:01 +00:00
|
|
|
${WRKSRC}/third_party/WebKit/Source/WebCore/make-hash-tools.pl
|
2010-10-13 18:54:31 +00:00
|
|
|
|
|
|
|
do-configure:
|
|
|
|
cd ${WRKSRC} && \
|
2011-04-04 19:45:48 +00:00
|
|
|
GYP_DEFINES="${GYP_DEFINES}" ${PYTHON_CMD} \
|
|
|
|
./build/gyp_chromium chrome/chrome.gyp --depth .
|
2010-10-13 18:54:31 +00:00
|
|
|
|
|
|
|
do-install:
|
2011-04-04 19:45:48 +00:00
|
|
|
@${MKDIR} ${DATADIR}
|
2010-10-13 18:54:31 +00:00
|
|
|
${INSTALL_MAN} ${WRKSRC}/out/${BUILDTYPE}/chrome.1 ${MANPREFIX}/man/man1
|
2011-04-04 19:45:48 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/chrome.pak \
|
|
|
|
${WRKSRC}/out/${BUILDTYPE}/product_logo_48.png \
|
|
|
|
${WRKSRC}/out/${BUILDTYPE}/resources.pak ${DATADIR}
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/out/${BUILDTYPE}/chrome-wrapper \
|
|
|
|
${WRKSRC}/out/${BUILDTYPE}/xdg-settings ${DATADIR}
|
2010-10-13 18:54:31 +00:00
|
|
|
.for f in chrome ffmpegsumo_nolink libffmpegsumo.so mksnapshot protoc
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/${f} ${DATADIR}
|
|
|
|
.endfor
|
2011-04-04 19:45:48 +00:00
|
|
|
cd ${WRKSRC}/out/${BUILDTYPE} && \
|
|
|
|
${COPYTREE_SHARE} "locales resources" ${DATADIR}
|
|
|
|
${LN} -sf ${DATADIR}/chrome ${PREFIX}/bin
|
2010-10-13 18:54:31 +00:00
|
|
|
|
2011-05-23 19:19:17 +00:00
|
|
|
.include <bsd.port.post.mk>
|