Skip to content

Commit

Permalink
fix for libzimg
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaek Korneev committed Mar 4, 2024
1 parent 12188bb commit 7c6f9e3
Showing 1 changed file with 138 additions and 19 deletions.
157 changes: 138 additions & 19 deletions ffmpeg/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,6 @@ if [[ "${ACLOCAL_PATH:-}" == C:\\msys64\\* ]]; then
export ACLOCAL_PATH=/mingw64/share/aclocal:/usr/share/aclocal
fi

cd zimg-release-$ZIMGLIB
autoreconf -iv
./configure --prefix=$INSTALL_PATH
make -j $MAKEJ V=0
make install
cd ..

cd nasm-$NASM_VERSION
# fix for build with GCC 8.x
sedinplace 's/void pure_func/void/g' include/nasmlib.h
Expand Down Expand Up @@ -142,10 +135,21 @@ case $PLATFORM in
export STRIP="$ANDROID_PREFIX-strip"
echo ""
echo "--------------------"
echo "Building zimg"
echo "--------------------"
echo ""
cd zimg-release-$ZIMGLIB
autoreconf -iv
./configure --prefix=$INSTALL_PATH ---host=arm-linux
make -j $MAKEJ V=0
make install
cd ..
echo ""
echo "--------------------"
echo "Building zlib"
echo "--------------------"
echo ""
cd $ZLIB
cd ../$ZLIB
./configure --prefix=$INSTALL_PATH --static --uname=arm-linux
make -j $MAKEJ V=0
make install
Expand Down Expand Up @@ -288,10 +292,21 @@ EOF
export STRIP="$ANDROID_PREFIX-strip"
echo ""
echo "--------------------"
echo "Building zimg"
echo "--------------------"
echo ""
cd zimg-release-$ZIMGLIB
autoreconf -iv
./configure --prefix=$INSTALL_PATH ---host=aarch64-linux
make -j $MAKEJ V=0
make install
cd ..
echo ""
echo "--------------------"
echo "Building zlib"
echo "--------------------"
echo ""
cd $ZLIB
cd ../$ZLIB
./configure --prefix=$INSTALL_PATH --static --uname=aarch64-linux
make -j $MAKEJ V=0
make install
Expand Down Expand Up @@ -433,10 +448,20 @@ EOF
export STRIP="$ANDROID_PREFIX-strip"
echo ""
echo "--------------------"
echo "Building zimg"
echo "--------------------"
echo ""
cd zimg-release-$ZIMGLIB
autoreconf -iv
./configure --prefix=$INSTALL_PATH --host=i686-linux
make -j $MAKEJ V=0
make install
echo ""
echo "--------------------"
echo "Building zlib"
echo "--------------------"
echo ""
cd $ZLIB
cd ../$ZLIB
./configure --prefix=$INSTALL_PATH --static --uname=i686-linux
make -j $MAKEJ V=0
make install
Expand Down Expand Up @@ -575,10 +600,20 @@ EOF
export STRIP="$ANDROID_PREFIX-strip"
echo ""
echo "--------------------"
echo "Building zimg"
echo "--------------------"
echo ""
cd zimg-release-$ZIMGLIB
autoreconf -iv
./configure --prefix=$INSTALL_PATH --host=x86_64-linux
make -j $MAKEJ V=0
make install
echo ""
echo "--------------------"
echo "Building zlib"
echo "--------------------"
echo ""
cd $ZLIB
cd ../$ZLIB
./configure --prefix=$INSTALL_PATH --static --uname=x86_64-linux
make -j $MAKEJ V=0
make install
Expand Down Expand Up @@ -712,10 +747,20 @@ EOF
export AS="nasm"
echo ""
echo "--------------------"
echo "Building zimg"
echo "--------------------"
echo ""
cd zimg-release-$ZIMGLIB
autoreconf -iv
./configure --prefix=$INSTALL_PATH --host=i686-linux
make -j $MAKEJ V=0
make install
echo ""
echo "--------------------"
echo "Building zlib"
echo "--------------------"
echo ""
cd $ZLIB
cd ../$ZLIB
CC="gcc -m32 -fPIC" ./configure --prefix=$INSTALL_PATH --static
make -j $MAKEJ V=0
make install
Expand Down Expand Up @@ -1003,12 +1048,22 @@ EOF
echo "Detected non arm arch so cross compiling";
fi

echo ""
echo "--------------------"
echo "Building zimg"
echo "--------------------"
echo ""
cd zimg-release-$ZIMGLIB
autoreconf -iv
./configure --prefix=$INSTALL_PATH --host=arm-linux-gnueabihf
make -j $MAKEJ V=0
make install
echo ""
echo "--------------------"
echo "Building zlib"
echo "--------------------"
echo ""
cd $ZLIB
cd ../$ZLIB
CC="arm-linux-gnueabihf-gcc -fPIC" ./configure --prefix=$INSTALL_PATH --static
make -j $MAKEJ V=0
make install
Expand Down Expand Up @@ -1203,10 +1258,20 @@ EOF
HOST_ARCH="$(uname -m)"
echo ""
echo "--------------------"
echo "Building zimg"
echo "--------------------"
echo ""
cd zimg-release-$ZIMGLIB
autoreconf -iv
./configure --prefix=$INSTALL_PATH --host=aarch64-linux-gnu
make -j $MAKEJ V=0
make install
echo ""
echo "--------------------"
echo "Building zlib"
echo "--------------------"
echo ""
cd $ZLIB
cd ../$ZLIB
CC="aarch64-linux-gnu-gcc -fPIC" ./configure --prefix=$INSTALL_PATH --static
make -j $MAKEJ V=0
make install
Expand Down Expand Up @@ -1340,10 +1405,24 @@ EOF
MACHINE_TYPE=$( uname -m )
echo ""
echo "--------------------"
echo "Building zimg"
echo "--------------------"
echo ""
cd zimg-release-$ZIMGLIB
autoreconf -iv
if [[ "$MACHINE_TYPE" =~ ppc64 ]]; then
CC="gcc -m64 -fPIC" ./configure --prefix=$INSTALL_PATH
else
CC="powerpc64le-linux-gnu-gcc -m64 -fPIC" ./configure --prefix=$INSTALL_PATH --host=powerpc64le-linux-gnu
fi
make -j $MAKEJ V=0
make install
echo ""
echo "--------------------"
echo "Building zlib"
echo "--------------------"
echo ""
cd $ZLIB
cd ../$ZLIB
if [[ "$MACHINE_TYPE" =~ ppc64 ]]; then
CC="gcc -m64 -fPIC" ./configure --prefix=$INSTALL_PATH --static
else
Expand Down Expand Up @@ -1555,10 +1634,20 @@ EOF
export CPPFLAGS="$CFLAGS"
echo ""
echo "--------------------"
echo "Building zimg"
echo "--------------------"
echo ""
cd zimg-release-$ZIMGLIB
autoreconf -iv
./configure --prefix=$INSTALL_PATH --host=aarch64-apple-darwin
make -j $MAKEJ V=0
make install
echo ""
echo "--------------------"
echo "Building zlib"
echo "--------------------"
echo ""
cd $ZLIB
cd ../$ZLIB
CC="clang -arch arm64 -fPIC" ./configure --prefix=$INSTALL_PATH --static
make -j $MAKEJ V=0
make install
Expand Down Expand Up @@ -1680,10 +1769,20 @@ EOF
export AS="nasm"
echo ""
echo "--------------------"
echo "Building zimg"
echo "--------------------"
echo ""
cd zimg-release-$ZIMGLIB
autoreconf -iv
./configure --prefix=$INSTALL_PATH
make -j $MAKEJ V=0
make install
echo ""
echo "--------------------"
echo "Building zlib"
echo "--------------------"
echo ""
cd $ZLIB
cd ../$ZLIB
CC="clang -fPIC" ./configure --prefix=$INSTALL_PATH --static
make -j $MAKEJ V=0
make install
Expand Down Expand Up @@ -1801,12 +1900,22 @@ EOF
;;

windows-x86)
echo ""
echo "--------------------"
echo "Building zimg"
echo "--------------------"
echo ""
cd zimg-release-$ZIMGLIB
autoreconf -iv
./configure --prefix=$INSTALL_PATH
make -j $MAKEJ V=0
make install
echo ""
echo "--------------------"
echo "Building zlib"
echo "--------------------"
echo ""
cd $ZLIB
cd ../$ZLIB
make -j $MAKEJ install -fwin32/Makefile.gcc BINARY_PATH=$INSTALL_PATH/bin/ INCLUDE_PATH=$INSTALL_PATH/include/ LIBRARY_PATH=$INSTALL_PATH/lib/
echo ""
echo "--------------------"
Expand Down Expand Up @@ -1932,12 +2041,22 @@ EOF
;;

windows-x86_64)
echo ""
echo "--------------------"
echo "Building zimg"
echo "--------------------"
echo ""
cd zimg-release-$ZIMGLIB
autoreconf -iv
./configure --prefix=$INSTALL_PATH
make -j $MAKEJ V=0
make install
echo ""
echo "--------------------"
echo "Building zlib"
echo "--------------------"
echo ""
cd $ZLIB
cd ../$ZLIB
make -j $MAKEJ install -fwin32/Makefile.gcc BINARY_PATH=$INSTALL_PATH/bin/ INCLUDE_PATH=$INSTALL_PATH/include/ LIBRARY_PATH=$INSTALL_PATH/lib/
echo ""
echo "--------------------"
Expand Down

0 comments on commit 7c6f9e3

Please sign in to comment.