diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-29 21:51:34 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-29 21:51:34 +0000 |
commit | 422ab69bd6c9e059378e52d941ba18a0f6002cbc (patch) | |
tree | f45ac0b5aa9ccbfaf8df851e6ee501297c993522 /third_party | |
parent | aaf2ff9d4c18ed9c821e1d949595d194fe1e28e4 (diff) | |
download | chromium_src-422ab69bd6c9e059378e52d941ba18a0f6002cbc.zip chromium_src-422ab69bd6c9e059378e52d941ba18a0f6002cbc.tar.gz chromium_src-422ab69bd6c9e059378e52d941ba18a0f6002cbc.tar.bz2 |
Revert r19534 "Add in support for copying the ffmpeg binaries in linux and mac."
Review URL: http://codereview.chromium.org/151044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19538 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rwxr-xr-x | third_party/ffmpeg/copy_binaries.sh | 38 | ||||
-rwxr-xr-x | third_party/ffmpeg/ffmpeg.gyp | 88 |
2 files changed, 29 insertions, 97 deletions
diff --git a/third_party/ffmpeg/copy_binaries.sh b/third_party/ffmpeg/copy_binaries.sh index 5c7f412..fb59e15 100755 --- a/third_party/ffmpeg/copy_binaries.sh +++ b/third_party/ffmpeg/copy_binaries.sh @@ -1,39 +1,13 @@ #!/bin/bash # -# This is meant to replicate the behavior of cp, except that it will not fail -# if the source files are not present. Something like -# "cp ${SOURCES} ${DEST} || true" would also have worked except that -# gyp does not allow for specifying || in the action, and the windows -# cygwin envrionment does not include "true" making a script like this the -# least ugly solution. +# Copies FFmpeg binaries due to gyp limitations on how much you can cram +# into a rules action. -SOURCES="" -DESTINATION="" +SOURCE=$1 +DESTINATION=$2 -# Shift off every argument but the last and consider them the sources. -# It would have probably been easier to put the destination first, but -# this is not too hard and it replicates the argument ordering of cp. -while (( "$#" != 1 )); do - SOURCES="$SOURCES $1" - shift -done - -DESTINATION=$1 - -# Early out if there was not enough parameters to discern a destination. -# Also fail the command because this means we are being invoked incorrectly. -if test -z "$DESTINATION"; then - echo "ERROR: Destination empty." - exit 1 -fi - -# Only try to copy the source file if it exists. It is not an error -# if the input does not exist; we just silently ignore the input. -for i in $SOURCES; do - if test -f $i; then - cp -v -f $i $DESTINATION - fi -done +# Our cygwin environment is very limited: "if" isn't available. +test -f $SOURCE && cp -v -f $SOURCE $DESTINATION # Make sure we always succeed. exit 0 diff --git a/third_party/ffmpeg/ffmpeg.gyp b/third_party/ffmpeg/ffmpeg.gyp index 741b35b..ff066f1 100755 --- a/third_party/ffmpeg/ffmpeg.gyp +++ b/third_party/ffmpeg/ffmpeg.gyp @@ -26,9 +26,6 @@ }, 'target_name': 'ffmpeg', 'msvs_guid': 'D7A94F58-576A-45D9-A45F-EB87C63ABBB0', - 'dependencies': [ - 'ffmpeg_binaries', - ], 'sources': [ 'include/libavcodec/avcodec.h', 'include/libavcodec/opt.h', @@ -72,6 +69,9 @@ 'intermediate_dir': '<(INTERMEDIATE_DIR)', }, 'type': 'none', + 'dependencies': [ + 'ffmpeg_binaries', + ], 'sources!': [ '<(extra_header)', ], @@ -175,70 +175,28 @@ 'msvs_guid': '4E4070E1-EFD9-4EF1-8634-3960956F6F10', 'conditions': [ ['OS=="win"', { - 'variables': { - 'source_files': [ - 'binaries/avcodeec-52.dll', - 'binaries/avformat-52.dll', - 'binaries/avutil-50.dll', - 'binaries/pthreadGC2.dll', - ], - 'output_files': [ - '<(PRODUCT_DIR)/avcodec-52.dll', - '<(PRODUCT_DIR)/avformat-52.dll', - '<(PRODUCT_DIR)/avutil-50.dll', - '<(PRODUCT_DIR)/pthreadGC2.dll', - ], - }, - 'dependencies': ['../../build/win/system.gyp:cygwin'], - }], ['OS=="linux"', { - 'variables': { - 'source_files': [ - 'binaries/libavcodec.so.52', - 'binaries/libavformat.so.52', - 'binaries/libavutil.so.50', - ], - 'output_files': [ - '<(PRODUCT_DIR)/libavcodec.so.52', - '<(PRODUCT_DIR)/libavformat.so.52', - '<(PRODUCT_DIR)/libavutil.so.50', - ], - }, - }], ['OS=="mac"', { - 'variables': { - 'source_files': [ - 'binaries/libavcodec.52.dylib', - 'binaries/libavformat.52.dylib', - 'binaries/libavutil.50.dylib', - ], - 'output_files': [ - '<(PRODUCT_DIR)/libavcodec.52.dylib', - '<(PRODUCT_DIR)/libavformat.52.dylib', - '<(PRODUCT_DIR)/libavutil.50.dylib', - ], - }, - }], - ], - 'sources': [ - '<@(source_files)', - ], - 'actions': [ - { - 'action_name': 'copy_binaries', - 'extension': 'dll', - 'inputs': [ - 'copy_binaries.sh', - '<@(source_files)', + 'sources': [ + 'binaries/avcodec-52.dll', + 'binaries/avformat-52.dll', + 'binaries/avutil-50.dll', + 'binaries/pthreadGC2.dll', ], - 'outputs': [ - '<@(output_files)', - ], - 'action': [ - './copy_binaries.sh', - '<@(source_files)', - '<(PRODUCT_DIR)/' + 'dependencies': ['../../build/win/system.gyp:cygwin'], + 'rules': [ + { + 'rule_name': 'copy_binaries', + 'extension': 'dll', + 'inputs': [ + 'copy_binaries.sh', + ], + 'outputs': [ + '<(PRODUCT_DIR)/<(RULE_INPUT_NAME)', + ], + 'action': ['./copy_binaries.sh', '"<@(RULE_INPUT_PATH)"', '"<@(PRODUCT_DIR)/<@(RULE_INPUT_NAME)"'], + 'message': 'Copying binaries...', + }, ], - 'message': 'Copying FFmpeg binaries...', - }, + }], ], }, ], |