Bug 1109248: gyp changes to adapt to webrtc.org 40 update r=ted
authorRandell Jesup <rjesup@jesup.org>
Thu, 29 Jan 2015 18:33:36 -0500
changeset 226723 c3ef5a28bc0fcde54e82a2b878b4104ebe36e674
parent 226722 17ce90ec1773df28707afec76895291b7573f61c
child 226724 309a9690c49dec633e6d0285b5bd2c53ea11aef6
push id28205
push userryanvm@gmail.com
push dateFri, 30 Jan 2015 17:32:20 +0000
treeherdermozilla-central@d7e156a7a0a6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1109248
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1109248: gyp changes to adapt to webrtc.org 40 update r=ted
build/gyp.mozbuild
media/webrtc/moz.build
media/webrtc/trunk/peerconnection.gyp
media/webrtc/trunk/webrtc/base/base.gyp
media/webrtc/trunk/webrtc/build/common.gypi
media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi
media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi
media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture.gypi
media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
media/webrtc/trunk/webrtc/system_wrappers/source/system_wrappers.gyp
--- a/build/gyp.mozbuild
+++ b/build/gyp.mozbuild
@@ -17,19 +17,21 @@ gyp_vars = {
     'clang_use_chrome_plugins': 0,
     'enable_protobuf': 0,
     'include_tests': 0,
     'enable_android_opensl': 1,
     'enable_android_opensl_output': 0,
     # use_system_lib* still seems to be in use in trunk/build
     'use_system_libjpeg': 0,
     'use_system_libvpx': 0,
+    'build_json': 0,
     'build_libjpeg': 0,
+    'build_libyuv': 0,
     'build_libvpx': 0,
-    'build_libyuv': 0,
+    'build_ssl': 0,
     'libyuv_dir': '/media/libyuv',
     'yuv_disable_avx2': 0 if CONFIG['HAVE_X86_AVX2'] else 1,
     # don't use openssl
     'use_openssl': 0,
 
     # saves 4MB when webrtc_trace is off
     'enable_lazy_trace_alloc': 1 if CONFIG['RELEASE_BUILD'] else 0,
 
--- a/media/webrtc/moz.build
+++ b/media/webrtc/moz.build
@@ -8,17 +8,17 @@ include('/build/gyp.mozbuild')
 
 webrtc_non_unified_sources = [
     'trunk/webrtc/common_audio/vad/vad_core.c',                                  # Because of name clash in the kInitCheck variable
     'trunk/webrtc/common_audio/vad/webrtc_vad.c',                                # Because of name clash in the kInitCheck variable
     'trunk/webrtc/modules/audio_coding/codecs/g722/g722_decode.c',               # Because of name clash in the saturate function
     'trunk/webrtc/modules/audio_coding/codecs/g722/g722_encode.c',               # Because of name clash in the saturate function
     'trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c',   # Because of name clash in the kDampFilter variable
     'trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c', # Because of name clash in the kDampFilter variable
-    'trunk/webrtc/modules/audio_coding/neteq4/audio_vector.cc',                  # Because of explicit template specializations
+    'trunk/webrtc/modules/audio_coding/neteq/audio_vector.cc',                   # Because of explicit template specializations
     'trunk/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc',       # Because of LATE()
     'trunk/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc',# Because of LATE()
     'trunk/webrtc/modules/audio_device/opensl/opensles_input.cc',                # Because of name clash in the kOption variable
     'trunk/webrtc/modules/audio_device/opensl/opensles_output.cc',               # Because of name clash in the kOption variable
     'trunk/webrtc/modules/audio_device/opensl/single_rw_fifo.cc',                # Because of name clash with #define FF
     'trunk/webrtc/modules/audio_device/win/audio_device_core_win.cc',            # Because of ordering assumptions in strsafe.h
     'trunk/webrtc/modules/audio_processing/aec/aec_core.c',                      # Because of name clash in the ComfortNoise function
     'trunk/webrtc/modules/audio_processing/aecm/aecm_core.c',                    # Because of name clash in the ComfortNoise function
--- a/media/webrtc/trunk/peerconnection.gyp
+++ b/media/webrtc/trunk/peerconnection.gyp
@@ -30,18 +30,20 @@
 	  'inputs': [
 	     'dummy_file.txt',
           ],
           'message': 'Generating scream',
         }, ],
         'dependencies': [
           'webrtc/modules/modules.gyp:audio_device',
           'webrtc/modules/modules.gyp:video_capture_module',
-#          'webrtc/modules/modules.gyp:video_render_module',
+	  'webrtc/modules/modules.gyp:video_capture_module_internal_impl',
+          'webrtc/modules/modules.gyp:video_render_module_impl',
 #          'webrtc/system_wrappers/source/system_wrappers.gyp:system_wrappers',
+#	  'webrtc/system_wrappers/source/system_wrappers.gyp:metrics_default',
           'webrtc/video_engine/video_engine.gyp:video_engine_core',
           'webrtc/voice_engine/voice_engine.gyp:voice_engine',
         ],
         'conditions': [
           ['OS!="android"', {
             'dependencies': [
               'webrtc/modules/modules.gyp:desktop_capture',
             ],
--- a/media/webrtc/trunk/webrtc/base/base.gyp
+++ b/media/webrtc/trunk/webrtc/base/base.gyp
@@ -51,16 +51,24 @@
         'stringencode.cc',
         'stringencode.h',
         'stringutils.cc',
         'stringutils.h',
         'thread_annotations.h',
         'timeutils.cc',
         'timeutils.h',
       ],
+      'conditions': [
+        ['OS=="mac"', {
+          'sources': [
+            'macutils.cc',
+            'macutils.h',
+          ],
+        }],
+      ],
     },
     {
       'target_name': 'rtc_base',
       'type': 'static_library',
       'dependencies': [
         'rtc_base_approved',
       ],
       'defines': [
@@ -89,23 +97,23 @@
         'autodetectproxy.h',
         'bandwidthsmoother.cc',
         'bandwidthsmoother.h',
         'base64.cc',
         'base64.h',
         'basicdefs.h',
         'basictypes.h',
         'bind.h',
-        'bind.h.pump',
+#        'bind.h.pump',
         'buffer.h',
         'bytebuffer.cc',
         'bytebuffer.h',
         'byteorder.h',
         'callback.h',
-        'callback.h.pump',
+#        'callback.h.pump',
         'constructormagic.h',
         'common.cc',
         'common.h',
         'cpumonitor.cc',
         'cpumonitor.h',
         'crc32.cc',
         'crc32.h',
         'criticalsection.h',
@@ -144,19 +152,19 @@
         'ifaddrs-android.cc',
         'ifaddrs-android.h',
         'iosfilesystem.mm',
         'ipaddress.cc',
         'ipaddress.h',
         'json.cc',
         'json.h',
         'latebindingsymboltable.cc',
-        'latebindingsymboltable.cc.def',
+#        'latebindingsymboltable.cc.def',
         'latebindingsymboltable.h',
-        'latebindingsymboltable.h.def',
+#        'latebindingsymboltable.h.def',
         'libdbusglibsymboltable.cc',
         'libdbusglibsymboltable.h',
         'linux.cc',
         'linux.h',
         'linuxfdwalk.c',
         'linuxfdwalk.h',
         'linked_ptr.h',
         'logging.cc',
@@ -166,18 +174,19 @@
         'maccocoasocketserver.h',
         'maccocoasocketserver.mm',
         'maccocoathreadhelper.h',
         'maccocoathreadhelper.mm',
         'macconversion.cc',
         'macconversion.h',
         'macsocketserver.cc',
         'macsocketserver.h',
-        'macutils.cc',
-        'macutils.h',
+# moved by mozilla
+#        'macutils.cc',
+#        'macutils.h',
         'macwindowpicker.cc',
         'macwindowpicker.h',
         'mathutils.h',
         'messagedigest.cc',
         'messagedigest.h',
         'messagehandler.cc',
         'messagehandler.h',
         'messagequeue.cc',
@@ -358,38 +367,38 @@
             'asyncinvoker.h',
             'asyncinvoker-inl.h',
             'asyncresolverinterface.h',
             'atomicops.h',
             'bandwidthsmoother.cc',
             'bandwidthsmoother.h',
             'basictypes.h',
             'bind.h',
-            'bind.h.pump',
+#            'bind.h.pump',
             'buffer.h',
             'callback.h',
-            'callback.h.pump',
+#            'callback.h.pump',
             'constructormagic.h',
             'dbus.cc',
             'dbus.h',
             'diskcache_win32.cc',
             'diskcache_win32.h',
             'filelock.cc',
             'filelock.h',
             'fileutils_mock.h',
             'genericslot.h',
-            'genericslot.h.pump',
+#            'genericslot.h.pump',
             'httpserver.cc',
             'httpserver.h',
             'json.cc',
             'json.h',
             'latebindingsymboltable.cc',
-            'latebindingsymboltable.cc.def',
+#            'latebindingsymboltable.cc.def',
             'latebindingsymboltable.h',
-            'latebindingsymboltable.h.def',
+#            'latebindingsymboltable.h.def',
             'libdbusglibsymboltable.cc',
             'libdbusglibsymboltable.h',
             'linuxfdwalk.c',
             'linuxfdwalk.h',
             'x11windowpicker.cc',
             'x11windowpicker.h',
             'logging.cc',
             'logging.h',
--- a/media/webrtc/trunk/webrtc/build/common.gypi
+++ b/media/webrtc/trunk/webrtc/build/common.gypi
@@ -185,17 +185,17 @@
       }],
       ['OS=="ios"', {
         'build_libjpeg%': 0,
         'enable_protobuf%': 0,
       }],
       ['target_arch=="arm" or target_arch=="armv7"', {
         'prefer_fixed_point%': 1,
       }],
-      ['OS!="ios" and (target_arch!="arm" or arm_version>=7)', {
+      ['OS!="ios" and (target_arch!="arm" or arm_version>=7) and build_with_mozilla==0', {
         'rtc_use_openmax_dl%': 1,
       }, {
         'rtc_use_openmax_dl%': 0,
       }],
     ], # conditions
   },
   'target_defaults': {
     'include_dirs': [
--- a/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi
+++ b/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi
@@ -14,17 +14,26 @@
     {
       'target_name': 'webrtc_opus',
       'type': 'static_library',
       'conditions': [
         ['build_with_mozilla==1', {
           # Mozilla provides its own build of the opus library.
           'include_dirs': [
             '/media/libopus/include',
-           ]
+            '/media/libopus/src',
+            '/media/libopus/celt',
+          ],
+          'direct_dependent_settings': {
+            'include_dirs': [
+              '/media/libopus/include',
+              '/media/libopus/src',
+              '/media/libopus/celt',
+            ],
+          },
         }, {
           'dependencies': [
             '<(DEPTH)/third_party/opus/opus.gyp:opus'
           ],
         }],
       ],
       'include_dirs': [
         '<(webrtc_root)',
--- a/media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi
+++ b/media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi
@@ -23,51 +23,86 @@
         'neteq_dependencies': ['iLBC'],
         'neteq_defines': ['WEBRTC_CODEC_ILBC',],
       }],
       ['include_isac==1', {
         'neteq_dependencies': ['iSAC', 'iSACFix',],
         'neteq_defines': ['WEBRTC_CODEC_ISAC', 'WEBRTC_CODEC_ISACFIX',],
       }],
       ['include_opus==1', {
-        'codecs': ['webrtc_opus',],
+        'codecs': ['webrtc_opus'],
+        'neteq_dependencies': ['webrtc_opus'],
         'neteq_defines': ['WEBRTC_CODEC_OPUS',],
+        'conditions': [
+          ['build_with_mozilla==0', {
+            'neteq_dependencies': [
+              '<(DEPTH)/third_party/opus/opus.gyp:opus',
+	    ],
+	  }],
+ 	],
       }],
     ],
     'neteq_dependencies': [
       '<@(codecs)',
-      '<(DEPTH)/third_party/opus/opus.gyp:opus',
       '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
       '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
     ],
+
   },
   'targets': [
     {
       'target_name': 'neteq',
       'type': 'static_library',
+      'include_dirs': [
+        '../../../../../../media/opus/celt',
+      ],
+      'direct_dependent_settings': {
+        'include_dirs': [
+          '../../../../../../media/opus/celt',
+	],
+      },
       'dependencies': [
         '<@(neteq_dependencies)',
       ],
       'defines': [
         '<@(neteq_defines)',
       ],
-      'include_dirs': [
-        # Need Opus header files for the audio classifier.
-        '<(DEPTH)/third_party/opus/src/celt',
-        '<(DEPTH)/third_party/opus/src/src',
-      ],
-      'direct_dependent_settings': {
-        'include_dirs': [
-          # Need Opus header files for the audio classifier.
-          '<(DEPTH)/third_party/opus/src/celt',
-          '<(DEPTH)/third_party/opus/src/src',
-        ],
-      },
-      'export_dependent_settings': [
-        '<(DEPTH)/third_party/opus/opus.gyp:opus',
+      'conditions': [
+        ['build_with_mozilla==0', {
+          'include_dirs': [
+            # Need Opus header files for the audio classifier.
+            '<(DEPTH)/third_party/opus/src/celt',
+            '<(DEPTH)/third_party/opus/src/src',
+          ],
+          'direct_dependent_settings': {
+            'include_dirs': [
+              # Need Opus header files for the audio classifier.
+              '<(DEPTH)/third_party/opus/src/celt',
+              '<(DEPTH)/third_party/opus/src/src',
+            ],
+          },
+          'export_dependent_settings': [
+            '<(DEPTH)/third_party/opus/opus.gyp:opus',
+          ],
+	}],
+        ['build_with_mozilla==1', {
+          'include_dirs': [
+            # Need Opus header files for the audio classifier.
+            '<(DEPTH)/../../../media/opus/celt',
+#            '<(DEPTH)/third_party/opus/src/src',
+          ],
+          'direct_dependent_settings': {
+            'include_dirs': [
+              '../../../../../../media/opus/celt',
+              # Need Opus header files for the audio classifier.
+              '<(DEPTH)/../../../media/opus/celt',
+#              '<(DEPTH)/third_party/opus/src/src',
+            ],
+          },
+        }],
       ],
       'sources': [
         'interface/audio_decoder.h',
         'interface/neteq.h',
         'accelerate.cc',
         'accelerate.h',
         'audio_classifier.cc',
         'audio_classifier.h',
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture.gypi
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture.gypi
@@ -11,17 +11,17 @@
     'multi_monitor_screenshare%' : 0,
   },
   'targets': [
     {
       'target_name': 'desktop_capture',
       'type': 'static_library',
       'dependencies': [
         '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
-        '<(webrtc_root)/base/base.gyp:rtc_base',
+        '<(webrtc_root)/base/base.gyp:rtc_base_approved',
       ],
       'sources': [
         "desktop_and_cursor_composer.cc",
         "desktop_and_cursor_composer.h",
         "desktop_capture_types.h",
         "desktop_capturer.h",
         "desktop_frame.cc",
         "desktop_frame.h",
--- a/media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
+++ b/media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
@@ -39,27 +39,33 @@
     {
       # Default video capture module implementation that only supports external
       # capture.
       'target_name': 'video_capture_module_impl',
       'type': 'static_library',
       'dependencies': [
         'video_capture_module',
       ],
+      'cflags_mozilla': [
+        '$(NSPR_CFLAGS)',
+      ],
       'sources': [
         'external/device_info_external.cc',
         'external/video_capture_external.cc',
       ],
     },
     {
       'target_name': 'video_capture_module_internal_impl',
       'type': 'static_library',
       'dependencies': [
         'video_capture_module',
       ],
+      'cflags_mozilla': [
+        '$(NSPR_CFLAGS)',
+      ],
       'conditions': [
         ['include_v4l2_video_capture==1', {
           'sources': [
             'linux/device_info_linux.cc',
             'linux/device_info_linux.h',
             'linux/video_capture_linux.cc',
             'linux/video_capture_linux.h',
           ],
@@ -93,18 +99,16 @@
         # should not be used in chrome - issue 3831.
         ['OS=="win" and build_with_chromium==0', {
           'conditions': [
             ['build_with_mozilla==0', {
               'dependencies': [
                 '<(DEPTH)/third_party/winsdk_samples/winsdk_samples.gyp:directshow_baseclasses',
               ],
             }],
-          'dependencies': [
-            '<(DEPTH)/third_party/winsdk_samples/winsdk_samples.gyp:directshow_baseclasses',
           ],
           'sources': [
             'windows/device_info_ds.cc',
             'windows/device_info_ds.h',
             'windows/device_info_mf.cc',
             'windows/device_info_mf.h',
             'windows/help_functions_ds.cc',
             'windows/help_functions_ds.h',
--- a/media/webrtc/trunk/webrtc/system_wrappers/source/system_wrappers.gyp
+++ b/media/webrtc/trunk/webrtc/system_wrappers/source/system_wrappers.gyp
@@ -125,16 +125,21 @@
         }, {
           'sources!': [ 'data_log.cc', ],
         },],
         ['enable_lazy_trace_alloc==1', {
           'defines': [
             'WEBRTC_LAZY_TRACE_ALLOC',
           ],
         }],
+        ['build_with_mozilla', {
+          'sources': [
+            'metrics_default.cc',
+          ],
+        }],
         ['OS=="android" or moz_widget_toolkit_gonk==1', {
           'defines': [
             'WEBRTC_THREAD_RR',
             # TODO(leozwang): Investigate CLOCK_REALTIME and CLOCK_MONOTONIC
             # support on Android. Keep WEBRTC_CLOCK_TYPE_REALTIME for now,
             # remove it after I verify that CLOCK_MONOTONIC is fully functional
             # with condition and event functions in system_wrappers.
             'WEBRTC_CLOCK_TYPE_REALTIME',