2017-04-28 22:22:36 +00:00
|
|
|
# $OpenBSD: Makefile,v 1.60 2017/04/28 22:22:36 robert Exp $
|
2016-08-25 20:00:07 +00:00
|
|
|
|
|
|
|
USE_WXNEEDED= Yes
|
2015-05-03 15:35:35 +00:00
|
|
|
|
|
|
|
ONLY_FOR_ARCHS= i386 amd64
|
|
|
|
DPB_PROPERTIES= parallel
|
|
|
|
|
|
|
|
COMMENT= Iridium browser
|
|
|
|
|
2017-04-28 22:22:36 +00:00
|
|
|
V= 58.0
|
2015-08-25 15:08:44 +00:00
|
|
|
DISTNAME= iridium-browser-${V}
|
2015-11-12 10:56:39 +00:00
|
|
|
PKGNAME= iridium-${V}
|
2016-10-27 18:30:40 +00:00
|
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
|
2015-06-22 16:42:14 +00:00
|
|
|
|
2015-05-03 15:35:35 +00:00
|
|
|
CATEGORIES= www
|
|
|
|
|
|
|
|
HOMEPAGE= https://iridiumbrowser.de/
|
|
|
|
|
|
|
|
MAINTAINER= Robert Nagy <robert@openbsd.org>
|
|
|
|
|
2017-04-28 22:22:36 +00:00
|
|
|
EXTRACT_SUFX= .tar.xz
|
2015-05-03 15:35:35 +00:00
|
|
|
|
|
|
|
FLAVORS= debug
|
|
|
|
FLAVOR?=
|
|
|
|
|
|
|
|
# BSD-like
|
|
|
|
PERMIT_PACKAGE_CDROM= patents
|
|
|
|
PERMIT_PACKAGE_FTP = Yes
|
|
|
|
|
2016-10-27 18:30:40 +00:00
|
|
|
MASTER_SITES= https://downloads.iridiumbrowser.de/source/ \
|
|
|
|
http://nerd.hu/distfiles/
|
2015-05-03 15:35:35 +00:00
|
|
|
|
2015-10-24 18:22:21 +00:00
|
|
|
MODULES= lang/clang lang/python gcc4
|
2015-05-03 15:35:35 +00:00
|
|
|
|
|
|
|
MODCLANG_ARCHS= *
|
|
|
|
MODCLANG_LANGS= c++
|
|
|
|
|
|
|
|
MODPY_RUNDEP= No
|
|
|
|
|
|
|
|
PATCHORIG= .orig.port
|
|
|
|
|
2016-01-15 19:57:23 +00:00
|
|
|
# uses pledge()
|
2015-05-03 15:35:35 +00:00
|
|
|
WANTLIB += X11 Xext Xfixes Xrender Xss c cairo cups dbus-1 event
|
|
|
|
WANTLIB += execinfo expat fontconfig freetype gconf-2 gdk-x11-2.0
|
|
|
|
WANTLIB += gdk_pixbuf-2.0 glib-2.0 gobject-2.0 gtk-x11-2.0
|
|
|
|
WANTLIB += m pango-1.0 pangocairo-1.0
|
2015-10-24 18:22:21 +00:00
|
|
|
WANTLIB += png pthread
|
2015-05-03 15:35:35 +00:00
|
|
|
WANTLIB += xml2 xslt
|
2015-08-17 17:21:31 +00:00
|
|
|
WANTLIB += sndio
|
2015-05-03 15:35:35 +00:00
|
|
|
WANTLIB += Xcomposite
|
2016-02-01 15:09:01 +00:00
|
|
|
WANTLIB += estdc++>=17
|
2015-05-03 15:35:35 +00:00
|
|
|
WANTLIB += Xi Xtst
|
|
|
|
WANTLIB += Xdamage
|
|
|
|
WANTLIB += Xcursor Xrandr gio-2.0
|
2016-02-01 15:09:01 +00:00
|
|
|
WANTLIB += nspr4 nss3 nssutil3 smime3
|
2015-10-24 18:22:21 +00:00
|
|
|
WANTLIB += atk-1.0 gmodule-2.0
|
2017-04-28 22:22:36 +00:00
|
|
|
WANTLIB += X11-xcb xcb
|
2015-05-03 15:35:35 +00:00
|
|
|
|
|
|
|
RUN_DEPENDS= devel/xdg-utils \
|
|
|
|
devel/desktop-file-utils \
|
2016-03-09 14:21:23 +00:00
|
|
|
fonts/noto/fonts \
|
2015-05-03 15:35:35 +00:00
|
|
|
graphics/libexif \
|
|
|
|
x11/gnome/libgnome-keyring \
|
|
|
|
x11/gtk+3,-guic
|
|
|
|
BUILD_DEPENDS= archivers/bzip2 \
|
|
|
|
devel/gperf \
|
|
|
|
devel/bison \
|
2017-04-28 22:22:36 +00:00
|
|
|
lang/node \
|
2015-05-03 15:35:35 +00:00
|
|
|
devel/yasm \
|
|
|
|
shells/bash \
|
|
|
|
sysutils/flock \
|
|
|
|
sysutils/pciutils \
|
2015-10-24 18:22:21 +00:00
|
|
|
x11/gnome/libgnome-keyring \
|
|
|
|
devel/ninja \
|
2017-04-22 11:53:55 +00:00
|
|
|
x11/gtk+3 \
|
2015-10-24 18:22:21 +00:00
|
|
|
lang/gcc/4.9,-c++>=4.9,<4.10
|
2015-05-03 15:35:35 +00:00
|
|
|
LIB_DEPENDS= devel/libexecinfo \
|
|
|
|
security/nss \
|
|
|
|
devel/gconf2 \
|
|
|
|
textproc/libxslt \
|
|
|
|
x11/gtk+2 \
|
2015-10-24 18:22:21 +00:00
|
|
|
print/cups,-libs \
|
|
|
|
lang/gcc/4.9,-libs>=4.9,<4.10
|
2015-05-03 15:35:35 +00:00
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
|
|
|
# Set BUILDTYPE to Debug for a debug build
|
|
|
|
.if ${FLAVOR:Mdebug}
|
|
|
|
BUILDTYPE= Debug
|
|
|
|
.else
|
|
|
|
BUILDTYPE= Release
|
|
|
|
.endif
|
|
|
|
|
2016-10-27 18:30:40 +00:00
|
|
|
ALL_TARGET= chrome
|
2015-05-03 15:35:35 +00:00
|
|
|
TEST_TARGET= base_unittests
|
|
|
|
|
|
|
|
CONFIGURE_STYLE=none # prevent python MODULE from overriding do-build
|
|
|
|
|
|
|
|
BUILDDIR= ${WRKSRC}/out/${BUILDTYPE}
|
|
|
|
|
2016-10-27 18:30:40 +00:00
|
|
|
# These libraries are used from the system and the build infrastructure
|
|
|
|
# removes them from the bundled third_party directory and replaces them
|
|
|
|
# with hooks to use them from the system.
|
|
|
|
GN_SYSTEM_LIBS= libevent \
|
|
|
|
libxml \
|
|
|
|
libxslt \
|
|
|
|
yasm
|
|
|
|
|
|
|
|
GN_ARGS= enable_nacl=false \
|
|
|
|
is_debug=false \
|
|
|
|
enable_webrtc=false \
|
|
|
|
enable_one_click_signin=true \
|
|
|
|
use_kerberos=false \
|
|
|
|
use_sndio=true \
|
|
|
|
use_cups=true \
|
2017-04-28 22:22:36 +00:00
|
|
|
use_experimental_allocator_shim=false \
|
2016-10-27 18:30:40 +00:00
|
|
|
is_clang=true \
|
|
|
|
use_sysroot=false \
|
|
|
|
treat_warnings_as_errors=false \
|
|
|
|
clang_use_chrome_plugins=false \
|
|
|
|
use_allocator=\"none\" \
|
2017-04-28 22:22:36 +00:00
|
|
|
is_official_build=true \
|
2017-04-19 05:16:46 +00:00
|
|
|
fieldtrial_testing_like_official_build=true \
|
2016-10-27 18:30:40 +00:00
|
|
|
extra_cppflags=\"-idirafter ${LOCALBASE}/include -idirafter ${X11BASE}/include\" \
|
|
|
|
extra_ldflags=\"-L${LOCALBASE}/lib -L${X11BASE}/lib\"
|
2015-05-03 15:35:35 +00:00
|
|
|
|
|
|
|
# Note: these keys are for OpenBSD use ONLY. For your own distribution,
|
|
|
|
# please get your own set of keys. It's free!
|
2016-10-27 18:30:40 +00:00
|
|
|
GN_ARGS+= google_api_key=\"AIzaSyA015yecfJyWi8UQpneQVrNzIKlxjv4MhI\" \
|
|
|
|
google_default_client_id=\"451220141585.apps.googleusercontent.com\" \
|
|
|
|
google_default_client_secret=\"nQcDyaBvDyCeDrsRqKIWSHJn\" \
|
|
|
|
ffmpeg_branding=\"Chrome\" \
|
|
|
|
proprietary_codecs=true
|
2015-10-24 18:22:21 +00:00
|
|
|
|
2015-05-03 15:35:35 +00:00
|
|
|
.if ${FLAVOR:Mdebug}
|
2016-10-27 18:30:40 +00:00
|
|
|
GN_ARGS+= remove_webcore_debug_symbols=true
|
2015-05-03 15:35:35 +00:00
|
|
|
MAKE_ENV+= V=1
|
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-configure:
|
|
|
|
@ln -sf ${MODPY_BIN} ${WRKDIR}/bin/python
|
|
|
|
.for _arch in x64 ia32
|
2017-04-19 05:16:46 +00:00
|
|
|
. for _dir in avcodec avformat avutil
|
|
|
|
@cp -pR ${WRKSRC}/third_party/ffmpeg/chromium/config/Chrome/linux/${_arch}/lib${_dir} \
|
|
|
|
${WRKSRC}/third_party/ffmpeg/chromium/config/Chrome/openbsd/${_arch}/lib${_dir}
|
|
|
|
. endfor
|
2015-05-03 15:35:35 +00:00
|
|
|
.endfor
|
2015-12-17 07:02:48 +00:00
|
|
|
@mkdir -p ${WRKSRC}/media/audio/sndio ${WRKSRC}/media/audio/openbsd
|
2016-04-27 12:46:16 +00:00
|
|
|
@cp ${FILESDIR}/sndio_{out,in}put.{cc,h} ${WRKSRC}/media/audio/sndio
|
2015-12-17 07:02:48 +00:00
|
|
|
@cp ${FILESDIR}/audio_manager_openbsd.{cc,h} ${WRKSRC}/media/audio/openbsd
|
2017-04-28 22:22:36 +00:00
|
|
|
@mkdir -p ${WRKSRC}/third_party/node/openbsd/node-openbsd/bin
|
|
|
|
@ln -sf ${TRUEPREFIX}/bin/node ${WRKSRC}/third_party/node/openbsd/node-openbsd/bin/node
|
2015-05-03 15:35:35 +00:00
|
|
|
|
2016-10-27 18:30:40 +00:00
|
|
|
# Configuration consists of three steps:
|
|
|
|
# 1. replace the specified bundled libraries with hooks to use the system libs
|
|
|
|
# 2. bootstrap gn, the tool to generate ninja files
|
|
|
|
# 3. run gn with the appropriate configuration arguments
|
2015-05-03 15:35:35 +00:00
|
|
|
do-configure:
|
2016-10-27 18:30:40 +00:00
|
|
|
@cd ${WRKSRC} && env -i ${MAKE_ENV} build/linux/unbundle/replace_gn_files.py \
|
|
|
|
--system-libraries ${GN_SYSTEM_LIBS}
|
|
|
|
@cd ${WRKSRC}/tools/gn && env -i ${MAKE_ENV} ${MODPY_BIN} bootstrap/bootstrap.py \
|
|
|
|
--no-clean -s --gn-gen-args "${GN_ARGS}"
|
|
|
|
@cd ${WRKSRC} && env -i ${CONFIGURE_ENV} ${WRKSRC}/out/${BUILDTYPE}/gn \
|
|
|
|
gen --args="${GN_ARGS}" out/Release
|
2015-05-03 15:35:35 +00:00
|
|
|
|
|
|
|
do-build:
|
|
|
|
@cd ${WRKSRC} && env -i ${MAKE_ENV} ninja \
|
|
|
|
-j ${MAKE_JOBS} -C out/${BUILDTYPE} ${ALL_TARGET}
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/iridium
|
|
|
|
${INSTALL_PROGRAM} ${BUILDDIR}/chrome ${PREFIX}/iridium/iridium
|
|
|
|
${SUBST_PROGRAM} ${FILESDIR}/iridium ${PREFIX}/bin/iridium
|
|
|
|
${INSTALL_MAN} ${BUILDDIR}/chrome.1 ${PREFIX}/man/man1/iridium.1
|
|
|
|
|
2015-12-17 07:02:48 +00:00
|
|
|
${INSTALL_DATA} ${BUILDDIR}/*.pak ${PREFIX}/iridium
|
|
|
|
|
2015-05-03 15:35:35 +00:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/iridium/locales
|
|
|
|
${INSTALL_DATA} ${BUILDDIR}/locales/* ${PREFIX}/iridium/locales
|
|
|
|
${INSTALL_DATA} ${BUILDDIR}/*.png ${PREFIX}/iridium
|
2017-04-19 05:16:46 +00:00
|
|
|
${INSTALL_DATA} ${BUILDDIR}/*.service ${PREFIX}/iridium
|
2015-05-03 15:35:35 +00:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/iridium/resources
|
|
|
|
@cp -Rp ${BUILDDIR}/resources/* ${PREFIX}/iridium/resources
|
|
|
|
@chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/iridium/resources
|
2016-10-27 18:30:40 +00:00
|
|
|
.for f in protoc icudtl.dat mksnapshot natives_blob.bin snapshot_blob.bin
|
2015-08-29 07:27:24 +00:00
|
|
|
${INSTALL_DATA} ${BUILDDIR}/${f} ${PREFIX}/iridium
|
2015-05-03 15:35:35 +00:00
|
|
|
.endfor
|
|
|
|
.for s in 22 24 48 64 128 256
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/icons/hicolor/${s}x${s}/apps
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/chrome/app/theme/chromium/product_logo_${s}.png \
|
|
|
|
${PREFIX}/share/icons/hicolor/${s}x${s}/apps/iridium.png
|
|
|
|
.endfor
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/applications
|
|
|
|
${INSTALL_DATA} ${FILESDIR}/iridium-browser.desktop \
|
|
|
|
${PREFIX}/share/applications/iridium-browser.desktop
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|