Build FFmpeg with upstream yasm on macOS.

This commit is contained in:
John Preston 2021-09-07 16:45:02 +03:00
parent 54adf77d99
commit 374e3238ad

View file

@ -53,6 +53,7 @@ pathPrefixes = [
'ThirdParty\\Ninja', 'ThirdParty\\Ninja',
] if win else [ ] if win else [
'ThirdParty/gyp', 'ThirdParty/gyp',
'ThirdParty/yasm',
'ThirdParty/depot_tools', 'ThirdParty/depot_tools',
] ]
pathPrefix = '' pathPrefix = ''
@ -293,19 +294,13 @@ mac:
stage('yasm', """ stage('yasm', """
mac: mac:
git clone -b macos_padding https://github.com/desktop-app/yasm.git git clone https://github.com/yasm/yasm.git
cd yasm cd yasm
git checkout 41762bea
./autogen.sh ./autogen.sh
make $MAKE_THREADS_CNT make $MAKE_THREADS_CNT
""", 'ThirdParty') """, 'ThirdParty')
stage('macho_edit', """
mac:
git clone https://github.com/desktop-app/macho_edit.git
cd macho_edit
xcodebuild build -configuration Release -project macho_edit.xcodeproj -target macho_edit
""", 'ThirdParty')
stage('lzma', """ stage('lzma', """
win: win:
git clone https://github.com/desktop-app/lzma.git git clone https://github.com/desktop-app/lzma.git
@ -461,16 +456,11 @@ mac:
LDFLAGS=`freetype-config --libs` LDFLAGS=`freetype-config --libs`
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11/lib/pkgconfig PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11/lib/pkgconfig
depends:patches/macos_yasm_wrap.sh
depends:yasm/yasm depends:yasm/yasm
depends:macho_edit/build/Release/macho_edit
cp ../patches/macos_yasm_wrap.sh ./
./configure --prefix=$USED_PREFIX \ ./configure --prefix=$USED_PREFIX \
--extra-cflags="$MIN_VER $UNGUARDED -DCONFIG_SAFE_BITSTREAM_READER=1" \ --extra-cflags="$MIN_VER $UNGUARDED -DCONFIG_SAFE_BITSTREAM_READER=1" \
--extra-cxxflags="$MIN_VER $UNGUARDED -DCONFIG_SAFE_BITSTREAM_READER=1" \ --extra-cxxflags="$MIN_VER $UNGUARDED -DCONFIG_SAFE_BITSTREAM_READER=1" \
--extra-ldflags="$MIN_VER" \ --extra-ldflags="$MIN_VER" \
--x86asmexe=`pwd`/macos_yasm_wrap.sh \
--enable-protocol=file \ --enable-protocol=file \
--enable-libopus \ --enable-libopus \
--disable-programs \ --disable-programs \