- re-enable flock in the build

- add support for detecting if an sqlite3 db is on an NFS mount
- fix printing: Chrome can only print to PDF and that is why you
  cannot print to LPD directly. It requres CUPS.
This commit is contained in:
robert 2011-05-26 11:39:14 +00:00
parent 0b31bf01fa
commit dd0e30a71b
8 changed files with 139 additions and 31 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.49 2011/05/25 16:41:28 robert Exp $
# $OpenBSD: Makefile,v 1.50 2011/05/26 11:39:14 robert Exp $
ONLY_FOR_ARCHS= i386 amd64
@ -7,6 +7,8 @@ COMMENT= Chromium browser
V= 11.0.696.71
DISTNAME= chromium-${V}
REVISION= 0
CATEGORIES= www
HOMEPAGE= http://sightly.net/peter/openbsd/chromium/
@ -29,7 +31,8 @@ WANTLIB += gtk-x11-2.0 jpeg m nspr4 pango-1.0 pangocairo-1.0 pangoft2-1.0
WANTLIB += pixman-1 plc4 plds4 png pthread pthread-stubs xcb xml2
WANTLIB += z execinfo bz2 nss3 nssutil3 ssl3 smime3 softokn3 gconf-2
WANTLIB += GL Xxf86vm drm stdc++ xcb-render xcb-shm
WANTLIB += Xtst event xslt vpx kvm>=10.0 sndio
WANTLIB += Xtst event xslt vpx kvm>=10.0 sndio speex
WANTLIB += cups gcrypt
MASTER_SITES= http://build.chromium.org/buildbot/official/ \
http://blade2k.humppa.hu/distfiles/ \
@ -42,13 +45,15 @@ MODPY_RUNDEP= No
RUN_DEPENDS= sysutils/gamin,-server \
devel/xdg-utils \
devel/desktop-file-utils
devel/desktop-file-utils \
x11/gtk+2,-cups
BUILD_DEPENDS= archivers/bzip2 \
devel/gperf \
devel/bison \
devel/flex \
devel/yasm \
shells/bash
shells/bash \
sysutils/flock
LIB_DEPENDS= devel/libexecinfo \
archivers/bzip2 \
security/nss \
@ -56,7 +61,9 @@ LIB_DEPENDS= devel/libexecinfo \
multimedia/libvpx \
x11/gnome/libgnome-keyring \
textproc/libxslt \
x11/gtk+2
x11/gtk+2 \
audio/speex \
print/cups
.include <bsd.own.mk>
@ -81,6 +88,7 @@ GYP_DEFS= -Duse_system_bzip2=1 \
-Duse_system_libjpeg=1 \
-Duse_system_libpng=1 \
-Duse_system_libxml=1 \
-Duse_system_speex=1 \
-Duse_system_sqlite=0 \
-Duse_system_vpx=1 \
-Duse_system_yasm=1 \

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-app_gfx_gl_gl_context_egl_cc,v 1.4 2011/04/29 13:18:01 robert Exp $
--- app/gfx/gl/gl_context_egl.cc.orig Tue Apr 26 10:01:05 2011
+++ app/gfx/gl/gl_context_egl.cc Thu Apr 28 11:17:48 2011
$OpenBSD: patch-app_gfx_gl_gl_context_egl_cc,v 1.5 2011/05/26 11:39:14 robert Exp $
--- app/gfx/gl/gl_context_egl.cc.orig Fri May 20 10:34:51 2011
+++ app/gfx/gl/gl_context_egl.cc Wed May 25 21:40:31 2011
@@ -13,7 +13,7 @@
// it brings in #defines that cause conflicts.
#include "app/gfx/gl/gl_bindings.h"
@ -10,3 +10,12 @@ $OpenBSD: patch-app_gfx_gl_gl_context_egl_cc,v 1.4 2011/04/29 13:18:01 robert Ex
extern "C" {
#include <X11/Xlib.h>
}
@@ -85,7 +85,7 @@ bool BaseEGLContext::InitializeOneOff() {
if (initialized)
return true;
-#ifdef OS_LINUX
+#if defined(OS_LINUX) || defined(OS_OPENBSD)
EGLNativeDisplayType native_display = XOpenDisplay(NULL);
#else
EGLNativeDisplayType native_display = EGL_DEFAULT_DISPLAY;

View File

@ -0,0 +1,37 @@
$OpenBSD: patch-base_nss_util_cc,v 1.1 2011/05/26 11:39:14 robert Exp $
--- base/nss_util.cc.orig Wed May 25 21:43:26 2011
+++ base/nss_util.cc Wed May 25 22:15:10 2011
@@ -16,6 +16,9 @@
#if defined(OS_LINUX)
#include <linux/nfs_fs.h>
#include <sys/vfs.h>
+#elif defined(OS_OPENBSD)
+#include <sys/param.h>
+#include <sys/mount.h>
#endif
#include "base/file_util.h"
@@ -103,17 +106,21 @@ char* PKCS11PasswordFunc(PK11SlotInfo* slot, PRBool re
// Because this function sets an environment variable it must be run before we
// go multi-threaded.
void UseLocalCacheOfNSSDatabaseIfNFS(const FilePath& database_dir) {
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_OPENBSD)
struct statfs buf;
if (statfs(database_dir.value().c_str(), &buf) == 0) {
+#if defined(OS_LINUX)
if (buf.f_type == NFS_SUPER_MAGIC) {
+#elif defined(OS_OPENBSD)
+ if (strcmp(buf.f_fstypename, MOUNT_NFS) == 0) {
+#endif
scoped_ptr<Environment> env(Environment::Create());
const char* use_cache_env_var = "NSS_SDB_USE_CACHE";
if (!env->HasVar(use_cache_env_var))
env->SetVar(use_cache_env_var, "yes");
}
}
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) || defined(OS_OPENBSD)
}
// Load nss's built-in root certs.

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-build_common_gypi,v 1.5 2011/04/29 13:18:01 robert Exp $
--- build/common.gypi.orig Tue Apr 26 10:01:32 2011
+++ build/common.gypi Thu Apr 28 11:17:49 2011
$OpenBSD: patch-build_common_gypi,v 1.6 2011/05/26 11:39:14 robert Exp $
--- build/common.gypi.orig Fri May 20 10:35:18 2011
+++ build/common.gypi Thu May 26 11:41:51 2011
@@ -97,7 +97,7 @@
'fastbuild%': 0,
@ -37,6 +37,15 @@ $OpenBSD: patch-build_common_gypi,v 1.5 2011/04/29 13:18:01 robert Exp $
'conditions': [
['branding=="Chrome"', {
'linux_breakpad%': 1,
@@ -460,7 +460,7 @@
],
}],
- ['OS=="mac" or (OS=="linux" and chromeos==0 and target_arch!="arm")', {
+ ['OS=="mac" or OS=="openbsd" or (OS=="linux" and chromeos==0 and target_arch!="arm")', {
'use_cups%': 1,
}, {
'use_cups%': 0,
@@ -752,7 +752,7 @@
['exclude', '(^|/)(gtk|x11)_[^/]*\\.(h|cc)$'],
],

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-chrome_browser_browser_main_posix_cc,v 1.1 2011/05/26 11:39:14 robert Exp $
--- chrome/browser/browser_main_posix.cc.orig Thu May 26 09:51:56 2011
+++ chrome/browser/browser_main_posix.cc Thu May 26 11:05:25 2011
@@ -20,7 +20,7 @@
#include "chrome/common/chrome_switches.h"
#include "content/browser/browser_thread.h"
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) || defined(OS_OPENBSD)) && !defined(OS_CHROMEOS)
#include "chrome/browser/printing/print_dialog_gtk.h"
#endif
@@ -236,7 +236,7 @@ void BrowserMainPartsPosix::PostMainMessageLoopStart()
}
}
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) || defined(OS_OPENBSD)) && !defined(OS_CHROMEOS)
printing::PrintingContextCairo::SetPrintingFunctions(
&PrintDialogGtk::CreatePrintDialog,
&PrintDialogGtk::PrintDocument);

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-chrome_chrome_gyp,v 1.4 2011/04/29 13:18:01 robert Exp $
--- chrome/chrome.gyp.orig Tue Apr 26 10:01:59 2011
+++ chrome/chrome.gyp Thu Apr 28 11:17:49 2011
$OpenBSD: patch-chrome_chrome_gyp,v 1.5 2011/05/26 11:39:14 robert Exp $
--- chrome/chrome.gyp.orig Fri May 20 10:35:46 2011
+++ chrome/chrome.gyp Thu May 26 11:51:15 2011
@@ -99,6 +99,10 @@
}],
],
@ -39,3 +39,15 @@ $OpenBSD: patch-chrome_chrome_gyp,v 1.4 2011/04/29 13:18:01 robert Exp $
'dependencies': [
'../build/linux/system.gyp:gtk',
],
@@ -1178,6 +1182,11 @@
'-lgcrypt',
],
},
+ }],
+ ['OS=="openbsd"', {
+ 'include_dirs': [
+ '/usr/local/include',
+ ],
}],
],
}],

View File

@ -1,7 +1,19 @@
$OpenBSD: patch-printing_printing_gyp,v 1.3 2011/04/29 13:18:01 robert Exp $
--- printing/printing.gyp.orig Tue Apr 26 10:01:07 2011
+++ printing/printing.gyp Thu Apr 28 11:17:49 2011
@@ -170,7 +170,7 @@
$OpenBSD: patch-printing_printing_gyp,v 1.4 2011/05/26 11:39:14 robert Exp $
--- printing/printing.gyp.orig Fri May 20 10:34:53 2011
+++ printing/printing.gyp Thu May 26 11:46:28 2011
@@ -142,6 +142,11 @@
],
},
}],
+ ['OS=="openbsd"', {
+ 'include_dirs': [
+ '/usr/local/include',
+ ],
+ }],
],
}],
],
@@ -170,7 +175,7 @@
'units_unittest.cc',
],
'conditions': [
@ -10,7 +22,7 @@ $OpenBSD: patch-printing_printing_gyp,v 1.3 2011/04/29 13:18:01 robert Exp $
['OS!="mac"', {'sources/': [['exclude', '_mac_unittest\\.(cc|mm?)$']]}],
['OS!="win"', {'sources/': [['exclude', '_win_unittest\\.cc$']]
}, { # else: OS=="win"
@@ -181,14 +181,12 @@
@@ -181,14 +186,12 @@
'dependencies': [
'../build/linux/system.gyp:gtk',
],

View File

@ -1,15 +1,6 @@
$OpenBSD: patch-tools_gyp_pylib_gyp_generator_make_py,v 1.3 2011/04/29 13:18:02 robert Exp $
--- tools/gyp/pylib/gyp/generator/make.py.orig Thu Apr 28 15:08:18 2011
+++ tools/gyp/pylib/gyp/generator/make.py Thu Apr 28 15:40:24 2011
@@ -114,7 +114,7 @@ all_deps :=
# export LINK="$(CXX)"
#
# This will allow make to invoke N linker processes as specified in -jN.
-LINK ?= flock $(builddir)/linker.lock $(CXX) %(LINK_flags)s
+LINK ?= $(CXX) %(LINK_flags)s
CC.target ?= $(CC)
CFLAGS.target ?= $(CFLAGS)
$OpenBSD: patch-tools_gyp_pylib_gyp_generator_make_py,v 1.4 2011/05/26 11:39:14 robert Exp $
--- tools/gyp/pylib/gyp/generator/make.py.orig Fri May 20 10:55:35 2011
+++ tools/gyp/pylib/gyp/generator/make.py Thu May 26 11:19:24 2011
@@ -129,13 +129,13 @@ ARFLAGS.target ?= %(ARFLAGS.target)s
# in gyp's make.py where ARFLAGS.host etc. is computed.
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
@ -31,3 +22,12 @@ $OpenBSD: patch-tools_gyp_pylib_gyp_generator_make_py,v 1.3 2011/04/29 13:18:02
ARFLAGS.host := %(ARFLAGS.host)s
# Flags to make gcc output dependency info. Note that you need to be
@@ -249,7 +249,7 @@ command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$@))
# so we can check their command lines.
# $? -- new prerequisites
# $| -- order-only dependencies
-prereq_changed = $(filter-out $|,$?)
+prereq_changed = $(filter-out FORCE_DO_CMD $|,$?)
# do_cmd: run a command via the above cmd_foo names, if necessary.
# Should always run for a given target to handle command-line changes.