summaryrefslogtreecommitdiffstats
path: root/gears
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 20:23:01 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 20:23:01 +0000
commitd924c436f199eb90b3d5c10e8d5aedd991de4f1d (patch)
tree7b5b127eca25377c5f0b1d2e1bd7e7b3367bed46 /gears
parent295659c7f84cc46843da8b602b60b682059237a1 (diff)
downloadchromium_src-d924c436f199eb90b3d5c10e8d5aedd991de4f1d.zip
chromium_src-d924c436f199eb90b3d5c10e8d5aedd991de4f1d.tar.gz
chromium_src-d924c436f199eb90b3d5c10e8d5aedd991de4f1d.tar.bz2
Fix SF, FF2, and FF3 builds on osx in gears-scons build. OFFICIAL_BUILD=0 now
works as well. Review URL: http://codereview.chromium.org/10923 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5504 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gears')
-rw-r--r--gears/SConscript15
-rw-r--r--gears/SConscript.browser114
-rw-r--r--gears/SConscript.common2
-rwxr-xr-xgears/SConscript.inputs19
-rw-r--r--gears/SConscript.portaudio2
5 files changed, 89 insertions, 63 deletions
diff --git a/gears/SConscript b/gears/SConscript
index f300de3..4bdb0c7 100644
--- a/gears/SConscript
+++ b/gears/SConscript
@@ -634,6 +634,7 @@ elif env['OS'] == 'osx':
'$THIRD_PARTY_DIR/breakpad_osx/src',
],
CCFLAGS = [
+ '-mmacosx-version-min=10.4',
('-arch', 'ppc'),
('-arch', 'i386'),
'-fPIC',
@@ -667,15 +668,13 @@ elif env['OS'] == 'osx':
('-isysroot', '$OSX_SDK_ROOT')
],
LINKFLAGS = [
- '-fPIC',
+ '-mmacosx-version-min=10.4',
+ '-fPIC',
'-Bsymbolic',
- '-arch',
- 'ppc',
- '-arch',
- 'i386',
- '-isysroot',
- '$OSX_SDK_ROOT',
- '-Wl,-dead_strip'
+ ('-arch', 'ppc'),
+ ('-arch', 'i386'),
+ ('-isysroot', '$OSX_SDK_ROOT'),
+ '-Wl,-dead_strip',
],
)
if env['MODE'] == 'dbg':
diff --git a/gears/SConscript.browser b/gears/SConscript.browser
index c24c870..090bab7 100644
--- a/gears/SConscript.browser
+++ b/gears/SConscript.browser
@@ -82,28 +82,6 @@ elif env['BROWSER'] in ['FF2', 'FF3']:
env['GECKO_BASE'] = '$THIRD_PARTY_DIR/gecko_1.9'
env.PrependENVPath('PATH', env.Dir('#/$GECKO_BIN').abspath)
-elif env['BROWSER'] == 'SF':
- env.Replace(
-# Enable breakpad for Safari on MacOSX.
- USING_BREAKPAD_OSX = '1')
-
- env.Append(
- CPPDEFINES = [
-# Remove these - During development, it was convenient to have these defined in
-# the Safari port. Before release we want to clean this up, and replace these
-# with a single BROWSER_SF symbol.
-# We also want to consolidate the include paths, so we don't have to add these
-# paths here.
- 'BROWSER_NPAPI',
- 'BROWSER_WEBKIT',
- 'BROWSER_SAFARI'
- ],
- CCFLAGS = [
-# These flags are needed so that instead of exporting all symbols defined in
-# the code, we just export those specifically marked, this reduces the output size.
- '-fvisibility=hidden'
- ],
- CPPPATH = ['$THIRD_PARTY/spidermonkey/nspr/pr/include'])
def MyIdlEmitter(target, source, env):
"""Produce the list of outputs generated by our IDL compiler. Outputs
@@ -174,22 +152,36 @@ elif env['BROWSER'] == 'NPAPI' and env['OS'] == 'win32':
'BROWSER_CHROME=1',
],
)
+elif env['BROWSER'] == 'SF':
+ env.Replace(
+# Enable breakpad for Safari on MacOSX.
+ USING_BREAKPAD_OSX = '1')
+
+ env.Append(
+ CPPDEFINES = [
+# Remove these - During development, it was convenient to have these defined in
+# the Safari port. Before release we want to clean this up, and replace these
+# with a single BROWSER_SF symbol.
+# We also want to consolidate the include paths, so we don't have to add these
+# paths here.
+ 'BROWSER_NPAPI',
+ 'BROWSER_WEBKIT',
+ 'BROWSER_SAFARI'
+ ],
+ CCFLAGS = [
+# These flags are needed so that instead of exporting all symbols defined in
+# the code, we just export those specifically marked, this reduces the output
+# size.
+ '-fvisibility=hidden'
+ ],
+ CPPPATH = ['$THIRD_PARTY/spidermonkey/nspr/pr/include']
+ )
env.Append(
- CPPPATH = [
-# '$LIBPNG_DIR',
-# '$SKIA_DIR/include',
-# '$SKIA_DIR/include/corecg',
-# '$SKIA_DIR/platform',
- ],
LIBS = [
-# 'base',
'googleurl-gears',
-# env['ICU_LIBS'], # TODO(sgk): '$ICU_LIBS' when scons is fixed
-# 'modp_b64',
'png-gears',
'sqlite-gears',
-# 'skia',
'zlib-gears',
],
)
@@ -197,7 +189,6 @@ env.Append(
if env['OS'] == 'osx':
env.Append(
LINKFLAGS = [
- '-mmacosx-version-min=10.4',
'-bundle'
],
LIBS = [
@@ -217,6 +208,13 @@ if env['OS'] == 'osx':
'WebKit',
]
)
+ if not env['OFFICIAL_BUILD']:
+ # For PortAudio:
+ env.Append(FRAMEWORKS = [
+ 'CoreAudio',
+ 'AudioToolbox',
+ 'AudioUnit',
+ ])
# Add in libraries for in-development APIs for non-official builds.
if not env['OFFICIAL_BUILD']:
@@ -232,11 +230,6 @@ if not env['OFFICIAL_BUILD']:
'gd',
'jpeg-gears',
])
- elif env['OS'] == 'osx':
- env.FilterOut(LIBS = [
- 'gd',
- 'portaudio',
- ])
if env['BROWSER'] == 'IE':
if env['OS'] == 'win32':
@@ -278,16 +271,18 @@ if env['BROWSER'] == 'IE':
],
)
elif env['BROWSER'] in ['FF2', 'FF3']:
- env.Append(
- LIBPATH = '$GECKO_LIB',
- LIBS = [
- 'xpcom',
- 'xpcomglue_s',
- ],
- )
+ env.Append(LIBPATH = '$GECKO_LIB')
+
+ if env['BROWSER'] == 'FF2':
+ env.Append(LIBS = '$FF2_LIBS')
+ else:
+ env.Append(LIBS = '$FF3_LIBS')
+
if env['OS'] == 'win32':
env.Append(
LIBS = [
+ 'xpcom',
+ 'xpcomglue_s',
'nspr4.lib',
'js3250.lib',
'ole32.lib',
@@ -300,10 +295,31 @@ elif env['BROWSER'] in ['FF2', 'FF3']:
],
)
elif env['OS'] == 'linux':
- # Although the 1.9 SDK contains libnspr4, it is better to link against
- # libxul, which in turn depends on libnspr4. In Ubuntu 8.04, libnspr4 was
- # not listed in /usr/lib, only libxul was.
- env.Append(LIBS = (env['BROWSER'] == 'FF2' and 'nspr4' or 'xul'))
+ env.Append(
+ LIBS = [
+ 'xpcom',
+ 'xpcomglue_s',
+ ],
+# Although the 1.9 SDK contains libnspr4, it is better to link against
+# libxul, which in turn depends on libnspr4. In Ubuntu 8.04, libnspr4 was
+# not listed in /usr/lib, only libxul was.
+ FF2_LIBS = ['nspr4'],
+ FF3_LIBS = ['xul'],
+ )
+ elif env['OS'] == 'osx':
+ env.Append(
+ LIBS = [
+ 'xpcom',
+ 'mozjs',
+ 'nspr4',
+ 'plds4',
+ 'plc4',
+ ],
+ FF2_LIBS = ['xpcom_core'],
+# TODO(mpcomplete): the Makefiles specify many more libs, but we link fine with
+# just this. Why?
+ FF3_LIBS = ['xpcomglue_s'],
+ )
elif env['BROWSER'] == 'NPAPI':
env.Append(
LIBS = [
diff --git a/gears/SConscript.common b/gears/SConscript.common
index 2500e39..4c6ad5c 100644
--- a/gears/SConscript.common
+++ b/gears/SConscript.common
@@ -60,6 +60,8 @@ if GetInputs('$COMMON_BINSRCS'):
'$COMMON_GENFILES_DIR/${SOURCE.file}.from_bin.cc', src))
for src in GetInputs('$COMMON_BINSRCS')]
common_targets['link'] = [env.SharedObject(bin) for bin in bins]
+else:
+ common_targets['link'] = []
Export('common_targets')
diff --git a/gears/SConscript.inputs b/gears/SConscript.inputs
index 09c78a6..ff5ff4b 100755
--- a/gears/SConscript.inputs
+++ b/gears/SConscript.inputs
@@ -258,7 +258,8 @@ if env['OS'] == 'osx':
env.Append(BROWSER_CPPSRCS = [
'$OPEN_DIR/base/common/common_osx.mm',
'$OPEN_DIR/base/safari/nsstring_utils.mm',
- '$OPEN_DIR/base/common/user_config_osx.cc'
+ '$OPEN_DIR/base/common/user_config_osx.cc',
+ '$OPEN_DIR/notifier/notifier_process_osx.mm',
])
#-----------------------------------------------------------------------------
@@ -293,6 +294,11 @@ env.Append(FF3_CPPSRCS = [
'$OPEN_DIR/base/firefox/xpcom_dynamic_load.cc',
])
+if env['OS'] == 'osx':
+ env.Append(FF3_CPPSRCS = [
+ '$OPEN_DIR/base/common/ipc_message_queue_test_osx.mm',
+ ])
+
#-----------------------------------------------------------------------------
# base/ie
@@ -406,7 +412,7 @@ env.Append(BROWSER_CPPSRCS = [
# canvas
# The Canvas API is not yet enabled in official builds.
-if not env['OFFICIAL_BUILD'] and env['OS'] in ['win32', 'osx']:
+if not env['OFFICIAL_BUILD'] and env['OS'] in ['win32', 'osx']:
env.Append(BROWSER_CPPSRCS = [
'$OPEN_DIR/canvas/blob_backed_skia_input_stream.cc',
'$OPEN_DIR/canvas/blob_backed_skia_output_stream.cc',
@@ -978,10 +984,13 @@ env.Append(COMMON_RESOURCES = [
#-----------------------------------------------------------------------------
# libs
+if not env['OFFICIAL_BUILD'] and env['OS'] in ['win32', 'osx']:
+ env.Append(
+ LIBPATH = ['$THIRD_PARTY_DIR/skia'],
+ LIBS = ['${LIBPREFIX}skia-${MODE}-${OS}-${ARCH}${LIBSUFFIX}'],
+ )
+
if env['OS'] == 'win32':
- env.Append(BROWSER_LINKSRCS = [
- '$THIRD_PARTY_DIR/skia/skia-${MODE}-${OS}-${ARCH}.lib',
- ])
env.Append(NPAPI_LINKSRCS = [
'$THIRD_PARTY_DIR/v8/bin-${MODE}/libv8core.lib',
'$THIRD_PARTY_DIR/v8/bin-${MODE}/no_snapshotv8.lib',
diff --git a/gears/SConscript.portaudio b/gears/SConscript.portaudio
index 5b65208..f053763 100644
--- a/gears/SConscript.portaudio
+++ b/gears/SConscript.portaudio
@@ -100,7 +100,7 @@ elif env['OS'] == 'osx':
'$PA_DIR/src/hostapi/coreaudio/pa_mac_core.c',
'$PA_DIR/src/hostapi/coreaudio/pa_mac_core_blocking.c',
'$PA_DIR/src/hostapi/coreaudio/pa_mac_core_utilities.c',
- '$PA_DIR/src/os/osx/pa_mac_hostapis.c',
+ '$PA_DIR/src/os/mac_osx/pa_mac_hostapis.c',
'$PA_DIR/src/os/unix/pa_unix_util.c',
]