44
44
MJOBS=4
45
45
fi
46
46
47
- make_dir () {
48
- remove_dir " $1 "
49
- if ! mkdir " $1 " ; then
50
- printf " \n Failed to create dir %s" " $1 "
51
- exit 1
52
- fi
47
+ CONFIGURE_OPTIONS+=(" --extra-version=beamcube" )
48
+
49
+ make_dir () {
50
+ remove_dir " $1 "
51
+ if ! mkdir " $1 " ; then
52
+ printf " \n Failed to create dir %s" " $1 "
53
+ exit 1
54
+ fi
53
55
}
54
56
55
57
remove_dir () {
@@ -358,6 +360,11 @@ if build "autoconf" "2.71"; then
358
360
build_done " autoconf" " 2.71"
359
361
fi
360
362
363
+ if build " meson" ; then
364
+ execute python3 -m pip install meson ninja
365
+ build_done " meson"
366
+ fi
367
+
361
368
if build " automake" " 1.16.4" ; then
362
369
download " https://ftp.gnu.org/gnu/automake/automake-1.16.4.tar.gz"
363
370
execute ./configure --prefix=" ${WORKSPACE} "
492
499
mv libx265.a libx265_main.a
493
500
494
501
if [[ " $OSTYPE " == " darwin" * ]]; then
502
+ execute install_name_tool -id " ${WORKSPACE} /lib/libx265.198.dylib" libx265.198.dylib
495
503
execute " ${MACOS_LIBTOOL} " -static -o libx265.a libx265_main.a libx265_main10.a libx265_main12.a 2> /dev/null
496
504
else
497
505
execute ar -M << EOF
@@ -528,7 +536,7 @@ if build "libvpx" "1.10.0"; then
528
536
execute make -j $MJOBS
529
537
530
538
if [[ " $OSTYPE " == " darwin" * ]]; then
531
- install_name_tool -id " ${WORKSPACE} /lib/libvpx.6.dylib" libvpx.6.dylib
539
+ execute install_name_tool -id " ${WORKSPACE} /lib/libvpx.6.dylib" libvpx.6.dylib
532
540
fi
533
541
534
542
execute make install
@@ -569,13 +577,28 @@ CONFIGURE_OPTIONS+=("--enable-libvpx")
569
577
570
578
execute cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=" ${WORKSPACE} " -DUSE_OMP=OFF -DENABLE_SHARED=on .
571
579
execute make
580
+
581
+ if [[ " $OSTYPE " == " darwin" * ]]; then
582
+ execute install_name_tool -id " ${WORKSPACE} /lib/libvidstab.1.1.dylib" libvidstab.1.1.dylib
583
+ fi
584
+
572
585
execute make install
573
586
574
587
build_done " vid_stab" " 1.1.0"
575
588
fi
576
589
CONFIGURE_OPTIONS+=(" --enable-libvidstab" )
577
590
# fi
578
591
592
+ if build " twolame" ; then
593
+ download " https://downloads.sourceforge.net/twolame/twolame-0.4.0.tar.gz"
594
+ execute ./configure --prefix=" ${WORKSPACE} " --enable-shared --disable-static
595
+ execute make -j $MJOBS
596
+ execute make install
597
+
598
+ build_done " twolame"
599
+ fi
600
+ CONFIGURE_OPTIONS+=(" --enable-libtwolame" )
601
+
579
602
if build " av1" " ae2be80" ; then
580
603
# libaom ae2be80 == v3.1.2
581
604
download " https://aomedia.googlesource.com/aom/+archive/ae2be8030200925895fa6e98bd274ffdb595cbf6.tar.gz" " av1.tar.gz" " av1"
@@ -587,6 +610,9 @@ if build "av1" "ae2be80"; then
587
610
execute cmake -DEBUILD_SHARED_LIBS=1 -DENABLE_TESTS=0 -DCMAKE_INSTALL_PREFIX=" ${WORKSPACE} " -DCMAKE_INSTALL_LIBDIR=lib " $PACKAGES " /av1
588
611
fi
589
612
execute make -j $MJOBS
613
+ if [[ " $OSTYPE " == " darwin" * ]]; then
614
+ execute install_name_tool -id " ${WORKSPACE} /lib/libaom.2.dylib" libaom.2.dylib
615
+ fi
590
616
execute make install
591
617
592
618
build_done " av1" " ae2be80"
@@ -605,6 +631,17 @@ if build "zimg" "3.0.3"; then
605
631
fi
606
632
CONFIGURE_OPTIONS+=(" --enable-libzimg" )
607
633
634
+ # get prebuilt binaries
635
+ if build " openh264" ; then
636
+ download " https://github.com/cisco/openh264/archive/v2.1.1.tar.gz" " openh264-2.1.1.tar.gz"
637
+ execute export PREFIX=" ${WORKSPACE} "
638
+ execute make
639
+ execute make install-shared
640
+
641
+ build_done " openh264"
642
+ fi
643
+ CONFIGURE_OPTIONS+=(" --enable-libopenh264" )
644
+
608
645
# #
609
646
# # audio library
610
647
# #
713
750
714
751
if build " libvorbis" " 1.3.6" ; then
715
752
download " https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-1.3.6.tar.gz"
716
- execute ./configure --prefix=" ${WORKSPACE} " --with-ogg-libraries=" ${WORKSPACE} " /lib --with-ogg-includes=" ${WORKSPACE} " /include/ --disable-static --enable-shared --disable-oggtest
753
+ OGG_CFLAGS= " -I ${WORKSPACE} /include/ogg " OGG_LIBS= " -L ${WORKSPACE} /lib -logg " execute ./configure --prefix=" ${WORKSPACE} " --with-ogg-libraries=" ${WORKSPACE} " /lib --with-ogg-includes=" ${WORKSPACE} " /include/ --disable-static --enable-shared --disable-oggtest
717
754
execute make -j $MJOBS
718
755
execute make install
719
756
@@ -726,14 +763,47 @@ if build "libtheora" "1.1.1"; then
726
763
sed " s/-fforce-addr//g" configure > configure.patched
727
764
chmod +x configure.patched
728
765
mv configure.patched configure
729
- execute ./configure --prefix=" ${WORKSPACE} " --with-ogg-libraries=" ${WORKSPACE} " /lib --with-ogg-includes=" ${WORKSPACE} " /include/ --with-vorbis-libraries=" ${WORKSPACE} " /lib --with-vorbis-includes=" ${WORKSPACE} " /include/ --disable-static --enable-shared --disable-oggtest --disable-vorbistest --disable-examples --disable-asm --disable-spec
766
+ OGG_CFLAGS= " -I ${WORKSPACE} /include/ogg " OGG_LIBS= " -L ${WORKSPACE} /lib -logg " execute ./configure --prefix=" ${WORKSPACE} " --with-ogg-libraries=" ${WORKSPACE} " /lib --with-ogg-includes=" ${WORKSPACE} " /include/ --with-vorbis-libraries=" ${WORKSPACE} " /lib --with-vorbis-includes=" ${WORKSPACE} " /include/ --disable-static --enable-shared --disable-oggtest --disable-vorbistest --disable-examples --disable-asm --disable-spec
730
767
execute make -j $MJOBS
731
768
execute make install
732
769
733
770
build_done " libtheora" " 1.1.1"
734
771
fi
735
772
CONFIGURE_OPTIONS+=(" --enable-libtheora" )
736
773
774
+ if build " shine" ; then
775
+ download " https://github.com/toots/shine/archive/3.1.1.tar.gz" " shine-3.1.1.tar.gz"
776
+ execute autoreconf -i
777
+ execute ./configure --prefix=" ${WORKSPACE} " --enable-shared --disable-static
778
+ execute make -j $MJOBS
779
+ execute make install
780
+
781
+ build_done " shine"
782
+ fi
783
+ CONFIGURE_OPTIONS+=(" --enable-libshine" )
784
+
785
+ if build " soxr" ; then
786
+ download " http://ftp.debian.org/debian/pool/main/libs/libsoxr/libsoxr_0.1.3.orig.tar.xz" " soxr-0.1.3.tar.xz"
787
+ make_dir build
788
+ cd build || exit
789
+ execute cmake .. -DWITH_OPENMP:BOOL=OFF -Wno-dev -DCMAKE_INSTALL_PREFIX=" ${WORKSPACE} " -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS:BOOL=ON
790
+ execute make -j $MJOBS
791
+ execute make install
792
+
793
+ build_done " soxr"
794
+ fi
795
+ CONFIGURE_OPTIONS+=(" --enable-libsoxr" )
796
+
797
+ if build " speex" ; then
798
+ download " http://downloads.us.xiph.org/releases/speex/speex-1.2.0.tar.gz"
799
+ execute ./configure --prefix=" ${WORKSPACE} " --enable-shared --disable-static
800
+ execute make -j $MJOBS
801
+ execute make install
802
+
803
+ build_done " speex"
804
+ fi
805
+ CONFIGURE_OPTIONS+=(" --enable-libspeex" )
806
+
737
807
# #
738
808
# # image library
739
809
# #
@@ -770,6 +840,19 @@ if build "libwebp" "1.2.0"; then
770
840
fi
771
841
CONFIGURE_OPTIONS+=(" --enable-libwebp" )
772
842
843
+ if build " openjpeg" ; then
844
+ download " https://github.com/uclouvain/openjpeg/archive/v2.3.1.tar.gz" " openjpeg-v2.3.1.tar.gz"
845
+ make_dir build
846
+ cd build || exit
847
+ execute cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=" ${WORKSPACE} " -DBUILD_SHARED_LIBS:bool=on
848
+ execute make -j $MJOBS
849
+ execute make install
850
+
851
+ build_done " openjpeg"
852
+ fi
853
+ CONFIGURE_OPTIONS+=(" --enable-libopenjpeg" )
854
+
855
+
773
856
# #
774
857
# # other library
775
858
# #
@@ -783,21 +866,40 @@ if build "libsdl" "2.0.14"; then
783
866
build_done " libsdl" " 2.0.14"
784
867
fi
785
868
786
- # if build "srt"; then
787
- # download "https://github.com/Haivision/srt/archive/v1.4.1.tar.gz" "srt-1.4.1.tar.gz"
788
- # export OPENSSL_ROOT_DIR="${WORKSPACE}"
789
- # export OPENSSL_LIB_DIR="${WORKSPACE}"/lib
790
- # export OPENSSL_INCLUDE_DIR="${WORKSPACE}"/include/
791
- # execute cmake . -DCMAKE_INSTALL_PREFIX="${WORKSPACE}" -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_INCLUDEDIR=include -DENABLE_SHARED=ON -DENABLE_STATIC=OFF -DENABLE_APPS=OFF -DUSE_STATIC_LIBSTDCXX=ON
869
+ if build " snappy" ; then
870
+ download " https://github.com/google/snappy/archive/1.1.8.tar.gz"
871
+ make_dir build
872
+ cd build || exit
873
+ execute cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=" ${WORKSPACE} " -DBUILD_SHARED_LIBS:bool=on
874
+ execute make -j $MJOBS
875
+
876
+ if [[ " $OSTYPE " == " darwin" * ]]; then
877
+ execute install_name_tool -id " ${WORKSPACE} /lib/libsnappy.1.dylib" libsnappy.1.dylib
878
+ fi
879
+
880
+ execute make install
881
+
882
+ build_done " snappy"
883
+ fi
884
+ CONFIGURE_OPTIONS+=(" --enable-libsnappy" )
885
+
886
+ if build " xz" ; then
887
+ download " https://tukaani.org/xz/xz-5.2.5.tar.gz"
888
+ execute ./configure --prefix=" ${WORKSPACE} " --enable-shared --disable-static
889
+ execute make -j $MJOBS
890
+ execute make install
891
+
892
+ build_done " xz"
893
+ fi
894
+
895
+ # if build "libass"; then
896
+ # download "https://github.com/libass/libass/releases/download/0.15.0/libass-0.15.0.tar.gz"
897
+ # execute ./configure --prefix="${WORKSPACE}" --enable-shared --disable-static
898
+ # execute make -j $MJOBS
792
899
# execute make install
793
900
#
794
- # if [ -n "$LDEXEFLAGS" ]; then
795
- # sed -i.backup 's/-lgcc_s/-lgcc_eh/g' "${WORKSPACE}"/lib/pkgconfig/srt.pc # The -i.backup is intended and required on MacOS: https://stackoverflow.com/questions/5694228/sed-in-place-flag-that-works-both-on-mac-bsd-and-linux
796
- # fi
797
- #
798
- # build_done "srt"
901
+ # build_done "libass"
799
902
# fi
800
- # CONFIGURE_OPTIONS+=("--enable-libsrt")
801
903
802
904
803
905
# #
@@ -921,4 +1023,9 @@ elif [[ ! "$SKIPINSTALL" == "yes" ]]; then
921
1023
esac
922
1024
fi
923
1025
1026
+ cd $CWD
1027
+ if [[ " $OSTYPE " == " darwin" * ]]; then
1028
+ node copy_mac_libs.js
1029
+ fi
1030
+
924
1031
exit 0
0 commit comments