mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 19:04:43 +03:00
devops(ffmpeg): compile zlib dependency that is needed for ffmpeg (#3940)
This patch adds zlib compilation that is required for ffmpeg.
This commit is contained in:
parent
731560ccbc
commit
2693c162b8
@ -1 +1 @@
|
||||
1002
|
||||
1003
|
||||
|
@ -12,6 +12,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ZLIB_VERSION="v1.2.11"
|
||||
ZLIB_CONFIG="--static"
|
||||
|
||||
LIBVPX_VERSION="v1.9.0"
|
||||
LIBVPX_CONFIG="--enable-static \
|
||||
--disable-shared \
|
||||
|
@ -36,6 +36,15 @@ elif ! [[ -d $(dirname "${output_path}") ]]; then
|
||||
die "ERROR: folder for output path ${output_path} does not exist."
|
||||
fi
|
||||
|
||||
function build_zlib {
|
||||
cd "${HOME}"
|
||||
git clone https://github.com/madler/zlib
|
||||
cd zlib
|
||||
git checkout "${ZLIB_VERSION}"
|
||||
./configure --prefix="${PREFIX}" ${ZLIB_CONFIG}
|
||||
make && make install
|
||||
}
|
||||
|
||||
function build_libvpx {
|
||||
cd "${HOME}"
|
||||
git clone https://chromium.googlesource.com/webm/libvpx
|
||||
@ -74,6 +83,7 @@ source ./CONFIG.sh
|
||||
apt-get update
|
||||
apt-get install -y git make yasm pkg-config
|
||||
|
||||
build_zlib
|
||||
build_libvpx
|
||||
build_ffmpeg
|
||||
|
||||
|
@ -31,6 +31,15 @@ BUILDDIR="${PWD}/build"
|
||||
PREFIX="${BUILDDIR}/osx_prefix"
|
||||
OUTPUT_PATH="${PWD}/output/ffmpeg-mac"
|
||||
|
||||
function build_zlib {
|
||||
cd "${BUILDDIR}"
|
||||
git clone https://github.com/madler/zlib
|
||||
cd zlib
|
||||
git checkout "${ZLIB_VERSION}"
|
||||
./configure --prefix="${PREFIX}" ${ZLIB_CONFIG}
|
||||
make && make install
|
||||
}
|
||||
|
||||
function build_libvpx {
|
||||
cd "${BUILDDIR}"
|
||||
git clone https://chromium.googlesource.com/webm/libvpx
|
||||
@ -79,6 +88,7 @@ set -x
|
||||
rm -rf "${BUILDDIR}"
|
||||
mkdir -p "${BUILDDIR}"
|
||||
|
||||
build_zlib
|
||||
build_libvpx
|
||||
build_ffmpeg
|
||||
|
||||
|
@ -21,7 +21,7 @@ trap "cd $(pwd -P)" EXIT
|
||||
cd "$(dirname $0)"
|
||||
|
||||
if [[ ("$1" == "-h") || ("$1" == "--help") ]]; then
|
||||
echo "usage: $(basename $0) [--mac|--cross-compile-win32|--cross-compile-win64]"
|
||||
echo "usage: $(basename $0) [--mac|--linux|--cross-compile-win32|--cross-compile-win64]"
|
||||
echo
|
||||
echo "Build ffmpeg for the given platform"
|
||||
echo
|
||||
|
@ -52,6 +52,23 @@ elif ! [[ -d $(dirname "${output_path}") ]]; then
|
||||
die "ERROR: folder for output path ${output_path} does not exist."
|
||||
fi
|
||||
|
||||
function build_zlib {
|
||||
cd "${HOME}"
|
||||
git clone https://github.com/madler/zlib
|
||||
cd zlib
|
||||
git checkout "${ZLIB_VERSION}"
|
||||
./configure --prefix="${PREFIX}" ${ZLIB_CONFIG}
|
||||
make \
|
||||
CC="${toolchain_prefix}gcc" \
|
||||
CXX="${toolchain_prefix}g++" \
|
||||
AR="${toolchain_prefix}ar" \
|
||||
PREFIX="$PREFIX" \
|
||||
RANLIB="${toolchain_prefix}ranlib" \
|
||||
LD="${toolchain_prefix}ld" \
|
||||
STRIP="${toolchain_prefix}strip"
|
||||
make install
|
||||
}
|
||||
|
||||
function build_libvpx {
|
||||
cd "${HOME}"
|
||||
git clone https://chromium.googlesource.com/webm/libvpx
|
||||
@ -109,6 +126,7 @@ source ./CONFIG.sh
|
||||
apt-get update
|
||||
apt-get install -y mingw-w64 git make yasm pkg-config
|
||||
|
||||
build_zlib
|
||||
build_libvpx
|
||||
build_ffmpeg
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user