@@ -34,6 +34,7 @@ elif [[ -f /proc/cpuinfo ]]; then
34
34
elif [[ " $OSTYPE " == " darwin" * ]]; then
35
35
MJOBS=$( sysctl -n machdep.cpu.thread_count)
36
36
CONFIGURE_OPTIONS=(" --enable-videotoolbox" )
37
+ MACOS_LIBTOOL=" $( which libtool) " # gnu libtool is installed in this script and need to avoid name conflict
37
38
else
38
39
MJOBS=4
39
40
fi
@@ -460,7 +461,7 @@ if build "cmake" "3.21.0"; then
460
461
fi
461
462
462
463
if ! $MACOS_M1 ; then
463
- if build " svtav1" $( date -I ) ; then
464
+ if build " svtav1" " $( date) " ; then
464
465
execute rm -f " ${PACKAGES} /SVT-AV1-master.tar.gz"
465
466
download " https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/master/SVT-AV1-master.tar.gz"
466
467
cd Build/linux || exit
@@ -469,7 +470,7 @@ if ! $MACOS_M1; then
469
470
execute make install
470
471
execute cp SvtAv1Enc.pc " ${WORKSPACE} /lib/pkgconfig/"
471
472
execute cp SvtAv1Dec.pc " ${WORKSPACE} /lib/pkgconfig/"
472
- build_done " svtav1" $( date -I )
473
+ build_done " svtav1" " $( date) " ;
473
474
fi
474
475
CONFIGURE_OPTIONS+=(" --enable-libsvtav1" )
475
476
fi
507
508
508
509
if $NONFREE_AND_GPL ; then
509
510
if build " x265" " 3.5" ; then
510
- download " https://github.com/videolan/x265/archive/Release_3.5.tar.gz" " x265-3.5.tar.gz"
511
+ download " https://github.com/videolan/x265/archive/Release_3.5.tar.gz" " x265-3.5.tar.gz" # This is actually 3.4 if looking at x265Version.txt
511
512
cd build/linux || exit
512
-
513
- execute cmake -DCMAKE_INSTALL_PREFIX=" ${WORKSPACE} " -DHIGH_BIT_DEPTH=ON -DENABLE_HDR10_PLUS=ON -DENABLE_SHARED=off -DBUILD_SHARED_LIBS=OFF ../../source
513
+ rm -rf 8bit 10bit 12bit
514
+ mkdir 8bit 10bit 12bit
515
+ cd 12bit || exit
516
+ execute cmake ../../../source -DCMAKE_INSTALL_PREFIX=" ${WORKSPACE} " -DENABLE_SHARED=OFF -DBUILD_SHARED_LIBS=OFF -DHIGH_BIT_DEPTH=ON -DENABLE_HDR10_PLUS=ON -DEXPORT_C_API=OFF -DENABLE_CLI=OFF -DMAIN12=ON
517
+ execute make -j $MJOBS
518
+ cd ../10bit || exit
519
+ execute cmake ../../../source -DCMAKE_INSTALL_PREFIX=" ${WORKSPACE} " -DENABLE_SHARED=OFF -DBUILD_SHARED_LIBS=OFF -DHIGH_BIT_DEPTH=ON -DENABLE_HDR10_PLUS=ON -DEXPORT_C_API=OFF -DENABLE_CLI=OFF
514
520
execute make -j $MJOBS
521
+ cd ../8bit || exit
522
+ ln -sf ../10bit/libx265.a libx265_main10.a
523
+ ln -sf ../12bit/libx265.a libx265_main12.a
524
+ execute cmake ../../../source -DCMAKE_INSTALL_PREFIX=" ${WORKSPACE} " -DENABLE_SHARED=OFF -DBUILD_SHARED_LIBS=OFF -DEXTRA_LIB=" x265_main10.a;x265_main12.a;-ldl" -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT=ON -DLINKED_12BIT=ON
525
+ execute make -j $MJOBS
526
+
527
+ mv libx265.a libx265_main.a
528
+
529
+ if [[ " $OSTYPE " == " darwin" * ]]; then
530
+ execute " ${MACOS_LIBTOOL} " -static -o libx265.a libx265_main.a libx265_main10.a libx265_main12.a 2> /dev/null
531
+ else
532
+ execute ar -M << EOF
533
+ CREATE libx265.a
534
+ ADDLIB libx265_main.a
535
+ ADDLIB libx265_main10.a
536
+ ADDLIB libx265_main12.a
537
+ SAVE
538
+ END
539
+ EOF
540
+ fi
541
+
515
542
execute make install
516
543
517
544
if [ -n " $LDEXEFLAGS " ]; then
@@ -712,7 +739,7 @@ CONFIGURE_OPTIONS+=("--enable-libwebp")
712
739
if build " zimg" " 3.0.3" ; then
713
740
download " https://github.com/sekrit-twc/zimg/archive/refs/tags/release-3.0.3.tar.gz" " zimg-3.0.3.tar.gz" " zimg"
714
741
cd zimg-release-3.0.3 || exit
715
- execute ${WORKSPACE} /bin/libtoolize -i -f -q
742
+ execute " ${WORKSPACE} /bin/libtoolize" -i -f -q
716
743
execute ./autogen.sh --prefix=" ${WORKSPACE} "
717
744
execute ./configure --prefix=" ${WORKSPACE} " --enable-static --disable-shared
718
745
execute make -j $MJOBS
@@ -790,9 +817,9 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
790
817
791
818
if build " amf" " 1.4.21.0" ; then
792
819
download " https://github.com/GPUOpen-LibrariesAndSDKs/AMF/archive/refs/tags/v.1.4.21.tar.gz" " AMF-1.4.21.tar.gz" " AMF-1.4.21"
793
- execute rm -rf ${WORKSPACE} /include/AMF
794
- execute mkdir -p ${WORKSPACE} /include/AMF
795
- execute cp -r ${PACKAGES} /AMF-1.4.21/AMF-v.1.4.21/amf/public/include/* ${WORKSPACE} /include/AMF/
820
+ execute rm -rf " ${WORKSPACE} /include/AMF"
821
+ execute mkdir -p " ${WORKSPACE} /include/AMF"
822
+ execute cp -r " ${PACKAGES} " /AMF-1.4.21/AMF-v.1.4.21/amf/public/include/* " ${WORKSPACE} /include/AMF/"
796
823
build_done " amf" " 1.4.21.0"
797
824
fi
798
825
CONFIGURE_OPTIONS+=(" --enable-amf" )
0 commit comments