2018-06-08 16:45:31 +00:00
|
|
|
# $OpenBSD: Makefile,v 1.354 2018/06/08 16:45:31 landry Exp $
|
2004-02-15 19:37:14 +00:00
|
|
|
|
2010-07-09 15:43:54 +00:00
|
|
|
COMMENT = Mozilla web browser
|
2017-08-08 10:17:15 +00:00
|
|
|
ONLY_FOR_ARCHS = amd64 i386
|
2004-02-15 19:37:14 +00:00
|
|
|
|
2010-07-01 20:32:08 +00:00
|
|
|
# Don't forget to bump www/firefox-i18n after updates.
|
2011-03-21 08:45:37 +00:00
|
|
|
|
2018-06-08 16:45:31 +00:00
|
|
|
MOZILLA_VERSION = 60.0.2
|
2018-03-13 19:29:35 +00:00
|
|
|
MOZILLA_BRANCH = release
|
2011-07-08 11:07:32 +00:00
|
|
|
MOZILLA_PROJECT = firefox
|
2010-07-09 15:43:54 +00:00
|
|
|
MOZILLA_CODENAME = browser
|
2010-07-01 20:32:08 +00:00
|
|
|
|
Update to firefox 60.
See https://www.mozilla.org/en-US/firefox/60.0/releasenotes/
Fixes https://www.mozilla.org/en-US/security/advisories/mfsa2018-11/
- Add initial/wip pledge() support, with distinct subsets for main &
content processes. The promises are runtime-configurable for now via
about:config knobs to ease debugging/testing. They're printed on stderr
when applied by the sandboxing codepaths (cf
patch-toolkit_xre_nsAppRunner_cpp and patch-dom_ipc_ContentChild_cpp).
- Add a bunch of patches (patch-widget_nsShmImage_cpp,
patch-xpcom_base_nsDebugImpl_cpp, patch-mozglue_misc_TimeStamp_posix_cpp and
patch-xpcom_base_nsMemoryReporterManager_cpp) to neuter non-critical
codepaths that calls pledge-forbidden syscalls.
- All this pledge() stuff being currently discussed upstream in
https://bugzilla.mozilla.org/show_bug.cgi?id=1457092 and done at p2k18.
Been running with it since then, and i'm fairly confident the pledge
subsets i come up with are now enough for most usages.
If you encounter crashes due to pledge, look into your kernel log, and
try to figure out what missing pledge is needed or what firefox codepath
hits it.
So far i know 'getpw' might be needed when uploading files but i havent
hit it, and 'proc' might be needed by the content process when there's
no dbus daemon running, but they're not needed in the 'common case', and
too broad.
- While here, tweak defaults to disable the pocket extension, and try to
disable the activity-stream/sponsored content that is being shown by
default on the new tab page in new profiles. Stop the madness, plz.
2018-05-11 20:00:57 +00:00
|
|
|
WRKDIST = ${WRKDIR}/${MOZILLA_DIST}-${MOZILLA_DIST_VERSION:C/b[0-9]*//}
|
2017-11-30 19:33:41 +00:00
|
|
|
HOMEPAGE = https://www.mozilla.org/firefox/
|
2018-05-11 20:09:01 +00:00
|
|
|
SO_VERSION = 77.0
|
2005-04-09 15:43:47 +00:00
|
|
|
# NOTE: Must bump minor version if any shlib's are removed from the
|
|
|
|
# components dir to avoid pkg_add -r issues.
|
2017-03-07 15:31:38 +00:00
|
|
|
MOZILLA_LIBS = mozavcodec mozavutil mozgtk xul clearkey lgpllibs
|
2007-02-05 00:11:55 +00:00
|
|
|
|
2010-07-09 15:43:54 +00:00
|
|
|
CATEGORIES = www
|
2004-02-15 19:37:14 +00:00
|
|
|
|
|
|
|
# mozilla public license
|
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
2007-01-12 21:46:17 +00:00
|
|
|
|
2010-07-09 15:43:54 +00:00
|
|
|
# lots of logic in mozilla.port.mk
|
2017-11-14 20:08:59 +00:00
|
|
|
MODULES = www/mozilla lang/python
|
2004-02-15 19:37:14 +00:00
|
|
|
|
2010-07-09 15:43:54 +00:00
|
|
|
MODPY_RUNDEP = No
|
2004-02-15 19:37:14 +00:00
|
|
|
|
2017-11-16 23:20:37 +00:00
|
|
|
COMPILER = base-clang ports-clang
|
2015-03-19 19:49:49 +00:00
|
|
|
MODCLANG_ARCHS = amd64 i386
|
2014-04-22 11:38:33 +00:00
|
|
|
|
2016-01-27 18:12:43 +00:00
|
|
|
# firefox >= 44 doesnt build with base libevent
|
|
|
|
MOZILLA_USE_BUNDLED_LIBEVENT = Yes
|
2016-04-27 13:50:27 +00:00
|
|
|
# firefox >= 46 defaults to gtk+3
|
|
|
|
MOZILLA_USE_GTK3 = Yes
|
2017-09-28 16:39:11 +00:00
|
|
|
# 56 requires 59.1
|
|
|
|
MOZILLA_USE_BUNDLED_ICU = Yes
|
2018-03-13 19:29:35 +00:00
|
|
|
# 59 is broken with system cairo and the option is being dropped
|
|
|
|
MOZILLA_USE_BUNDLED_CAIRO = Yes
|
2017-09-28 16:39:11 +00:00
|
|
|
|
2017-07-31 13:19:46 +00:00
|
|
|
# firefox >= 53 needs rust
|
|
|
|
BUILD_DEPENDS += lang/rust
|
2017-11-14 20:08:59 +00:00
|
|
|
# stylo build needs LLVM
|
|
|
|
BUILD_DEPENDS += devel/llvm
|
2016-01-27 18:12:43 +00:00
|
|
|
|
2018-03-13 19:29:35 +00:00
|
|
|
WANTLIB += X11-xcb intl xcb xcb-shm ${COMPILER_LIBCXX}
|
2016-11-15 22:01:15 +00:00
|
|
|
|
2004-02-15 19:37:14 +00:00
|
|
|
# Regression tests are too hard to adapt to run here
|
2013-03-11 11:35:43 +00:00
|
|
|
NO_TEST = Yes
|
2004-02-15 19:37:14 +00:00
|
|
|
|
2016-08-02 17:50:03 +00:00
|
|
|
CONFIGURE_STYLE = simple
|
|
|
|
CONFIGURE_ARGS += --prefix=${PREFIX}
|
2017-11-14 20:08:59 +00:00
|
|
|
MAKE_ENV += BUILD_VERBOSE_LOG="1"
|
2011-03-30 21:39:14 +00:00
|
|
|
|
2017-09-28 16:39:11 +00:00
|
|
|
# needed to find sqlite header
|
|
|
|
CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include"
|
|
|
|
|
2015-01-14 17:33:44 +00:00
|
|
|
# bug 857628
|
|
|
|
CONFIGURE_ARGS += --enable-pie
|
2017-09-28 16:39:11 +00:00
|
|
|
CONFIGURE_ARGS += --enable-release #1386371
|
|
|
|
CONFIGURE_ARGS += --enable-rust-simd #1261841
|
2017-11-14 20:08:59 +00:00
|
|
|
CONFIGURE_ARGS += --enable-webrender=build
|
|
|
|
.if ${MACHINE_ARCH} == "i386"
|
2018-01-27 07:53:50 +00:00
|
|
|
CONFIGURE_ARGS += --disable-debug-symbols
|
2017-12-04 17:35:12 +00:00
|
|
|
MAKE_ENV += RUSTFLAGS="-C target-cpu=pentium4 --cfg target_feature=\"sse2\""
|
2018-01-29 18:47:02 +00:00
|
|
|
DPB_PROPERTIES = lonesome
|
2017-11-14 20:08:59 +00:00
|
|
|
.endif
|
|
|
|
#CONFIGURE_ARGS += --enable-linker=lld
|
Update to firefox 60.
See https://www.mozilla.org/en-US/firefox/60.0/releasenotes/
Fixes https://www.mozilla.org/en-US/security/advisories/mfsa2018-11/
- Add initial/wip pledge() support, with distinct subsets for main &
content processes. The promises are runtime-configurable for now via
about:config knobs to ease debugging/testing. They're printed on stderr
when applied by the sandboxing codepaths (cf
patch-toolkit_xre_nsAppRunner_cpp and patch-dom_ipc_ContentChild_cpp).
- Add a bunch of patches (patch-widget_nsShmImage_cpp,
patch-xpcom_base_nsDebugImpl_cpp, patch-mozglue_misc_TimeStamp_posix_cpp and
patch-xpcom_base_nsMemoryReporterManager_cpp) to neuter non-critical
codepaths that calls pledge-forbidden syscalls.
- All this pledge() stuff being currently discussed upstream in
https://bugzilla.mozilla.org/show_bug.cgi?id=1457092 and done at p2k18.
Been running with it since then, and i'm fairly confident the pledge
subsets i come up with are now enough for most usages.
If you encounter crashes due to pledge, look into your kernel log, and
try to figure out what missing pledge is needed or what firefox codepath
hits it.
So far i know 'getpw' might be needed when uploading files but i havent
hit it, and 'proc' might be needed by the content process when there's
no dbus daemon running, but they're not needed in the 'common case', and
too broad.
- While here, tweak defaults to disable the pocket extension, and try to
disable the activity-stream/sponsored content that is being shown by
default on the new tab page in new profiles. Stop the madness, plz.
2018-05-11 20:00:57 +00:00
|
|
|
CONFIGURE_ARGS += --enable-sandbox --enable-content-sandbox
|
2017-11-14 20:08:59 +00:00
|
|
|
|
|
|
|
SUBST_VARS += LOCALBASE X11BASE
|
2018-03-13 19:29:35 +00:00
|
|
|
|
|
|
|
show-commit:
|
|
|
|
@curl -s https://releases.mozilla.org/pub/mozilla.org/firefox/releases/${MOZILLA_VERSION}/SOURCE| awk -F / '/^https:\/\/hg/ {print $$7 }'
|
2015-01-14 17:33:44 +00:00
|
|
|
|
2010-07-09 15:43:54 +00:00
|
|
|
post-install:
|
2014-08-10 09:58:04 +00:00
|
|
|
${SUBST_MAN} ${FILESDIR}/mozilla-firefox.1 \
|
2010-07-09 15:43:54 +00:00
|
|
|
${PREFIX}/man/man1/mozilla-firefox.1
|
2011-03-30 21:39:14 +00:00
|
|
|
cd ${PREFIX}/man/man1/ && ln -sf mozilla-firefox.1 firefox.1
|
|
|
|
cd ${PREFIX}/bin/ && ln -sf firefox mozilla-firefox
|
2014-03-24 21:11:37 +00:00
|
|
|
# install prefs
|
2018-03-13 19:29:35 +00:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/lib/${MOZILLA_PROJECT}/browser/defaults/preferences
|
2014-08-10 09:58:04 +00:00
|
|
|
${SUBST_DATA} ${FILESDIR}/all-openbsd.js \
|
2018-03-13 19:29:35 +00:00
|
|
|
${PREFIX}/lib/${MOZILLA_PROJECT}/browser/defaults/preferences/all-openbsd.js
|
2017-04-20 06:12:58 +00:00
|
|
|
# install distribution.ini file
|
2018-03-13 19:29:35 +00:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/lib/${MOZILLA_PROJECT}/distribution
|
2017-04-20 06:12:58 +00:00
|
|
|
echo "[Global]\nid=OpenBSD\nversion=${OSREV}\nabout=Packaged by ${MAINTAINER}\n" > \
|
2018-03-13 19:29:35 +00:00
|
|
|
${PREFIX}/lib/${MOZILLA_PROJECT}/distribution/distribution.ini
|
2011-03-30 21:39:14 +00:00
|
|
|
# install desktop file
|
2011-04-19 20:39:34 +00:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/applications/
|
2014-08-10 09:58:04 +00:00
|
|
|
${SUBST_DATA} ${FILESDIR}/${MOZILLA_PROJECT}.desktop \
|
2011-08-24 06:19:50 +00:00
|
|
|
${PREFIX}/share/applications/${MOZILLA_PROJECT}.desktop
|
2012-10-10 20:56:13 +00:00
|
|
|
# install icon for desktop file
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/pixmaps/
|
2018-03-13 19:29:35 +00:00
|
|
|
${INSTALL_DATA} ${PREFIX}/lib/${MOZILLA_PROJECT}/browser/chrome/icons/default/default128.png \
|
2012-10-10 20:56:13 +00:00
|
|
|
${PREFIX}/share/pixmaps/firefox.png
|
2011-04-19 20:39:34 +00:00
|
|
|
|
|
|
|
# link default48.png to default.png to be used by default by non-icccm compliant wm
|
2018-03-13 19:29:35 +00:00
|
|
|
ln ${PREFIX}/lib/${MOZILLA_PROJECT}/browser/chrome/icons/default/default{48,}.png
|
2012-06-11 15:29:56 +00:00
|
|
|
|
2004-02-15 19:37:14 +00:00
|
|
|
.include <bsd.port.mk>
|