Initial import of Chromium for OpenBSD, a multi-month effort! :)
i386 and amd64 supported.
Chromium is an open-source browser project that aims
to build a safer, faster, and more stable way for all
Internet users to experience the web. http://www.chromium.org/
This is version 4.0.251.0 with a tarball already including hundreds
of patches by myself, Sprewell, Ben Laurie and others from the original
FreeBSD effort. See homepage for more details and known issue:
http://sightly.net/peter/openbsd/chromium/
(right now, there are i386 & amd64 -current packages there that can
be pkg_add'ed, links to the FreeBSD page for more info, etc)
The patches are being cleaned up and sent upstream in chunks, the
goal will be to have a clean tarball eventually. I _just_ got this
working earlier this week so it may crash and burn (especially on
amd64 as some parts do not appear 64-bit clean), let me know.
"commit it and let's work on it in-tree" espie@, robert@ & others
2009-12-18 17:25:56 -05:00
|
|
|
#!/bin/sh
|
2012-05-17 04:52:59 -04:00
|
|
|
# $OpenBSD: chrome,v 1.9 2012/05/17 08:52:59 robert Exp $
|
Initial import of Chromium for OpenBSD, a multi-month effort! :)
i386 and amd64 supported.
Chromium is an open-source browser project that aims
to build a safer, faster, and more stable way for all
Internet users to experience the web. http://www.chromium.org/
This is version 4.0.251.0 with a tarball already including hundreds
of patches by myself, Sprewell, Ben Laurie and others from the original
FreeBSD effort. See homepage for more details and known issue:
http://sightly.net/peter/openbsd/chromium/
(right now, there are i386 & amd64 -current packages there that can
be pkg_add'ed, links to the FreeBSD page for more info, etc)
The patches are being cleaned up and sent upstream in chunks, the
goal will be to have a clean tarball eventually. I _just_ got this
working earlier this week so it may crash and burn (especially on
amd64 as some parts do not appear 64-bit clean), let me know.
"commit it and let's work on it in-tree" espie@, robert@ & others
2009-12-18 17:25:56 -05:00
|
|
|
|
2012-01-11 11:24:07 -05:00
|
|
|
DATASIZE="716800"
|
|
|
|
OPENFILES="400"
|
2011-02-08 04:43:02 -05:00
|
|
|
|
2012-01-11 11:24:07 -05:00
|
|
|
xm_log() {
|
|
|
|
echo -n "$@\nDo you want to run Chromium anyway?\n\
|
|
|
|
(If you don't increase these limits, Chromium might fail to work properly.)" | \
|
|
|
|
${X11BASE}/bin/xmessage -file - -center -buttons yes:0,no:1 -default no
|
|
|
|
}
|
2011-02-08 16:10:28 -05:00
|
|
|
|
2012-01-11 11:24:07 -05:00
|
|
|
if [ $(ulimit -Sd) -lt ${DATASIZE} ]; then
|
|
|
|
ulimit -Sd ${DATASIZE} || \
|
|
|
|
xm_log "Cannot increase datasize-cur to at least ${DATASIZE}"
|
|
|
|
[ $? -eq 0 ] || exit
|
2011-02-08 04:43:02 -05:00
|
|
|
fi
|
|
|
|
|
2012-01-11 11:24:07 -05:00
|
|
|
if [ $(ulimit -Sn) -lt ${OPENFILES} ]; then
|
|
|
|
ulimit -Sn ${OPENFILES} || \
|
|
|
|
xm_log "Cannot increase openfiles-cur to at least ${OPENFILES}"
|
|
|
|
[ $? -eq 0 ] || exit
|
2011-02-08 04:43:02 -05:00
|
|
|
fi
|
|
|
|
|
2012-05-17 04:52:59 -04:00
|
|
|
#
|
|
|
|
# Temporary workaround for the case when chromium crashes and leaves
|
|
|
|
# the SingletonLock, which prevents chromium to start up.
|
|
|
|
#
|
|
|
|
if [ -h ${HOME}/.config/chromium/SingletonLock ]; then
|
|
|
|
_pid=`readlink ${HOME}/.config/chromium/SingletonLock | cut -d '-' -f 2`
|
|
|
|
kill -0 ${_pid} 2>/dev/null
|
|
|
|
if [ $? -gt 0 ]; then
|
|
|
|
rm ${HOME}/.config/chromium/SingletonLock
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-01-11 11:24:07 -05:00
|
|
|
exec "${TRUEPREFIX}/chrome/chrome" "${@}"
|