|
| 1 | +#!/bin/bash |
| 2 | +set -xe |
| 3 | + |
| 4 | +# remove all old deps |
| 5 | +rm -rf curl libcron quickjspp rapidjson toml11 yaml-cpp |
| 6 | +# remove tmp folder |
| 7 | +rm -rf tmp |
| 8 | + |
| 9 | +# brew reinstall rapidjson zlib pcre2 pkgconfig |
| 10 | + |
| 11 | +#git clone https://github.com/curl/curl --depth=1 --branch curl-7_88_1 |
| 12 | +#cd curl |
| 13 | +#./buildconf > /dev/null |
| 14 | +#./configure --with-ssl=/usr/local/opt/[email protected] --without-mbedtls --disable-ldap --disable-ldaps --disable-rtsp --without-libidn2 > /dev/null |
| 15 | +#cmake -DCMAKE_USE_SECTRANSP=ON -DHTTP_ONLY=ON -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_USE_LIBSSH2=OFF . > /dev/null |
| 16 | +#make -j8 > /dev/null |
| 17 | +#cd .. |
| 18 | + |
| 19 | +git clone https://github.com/jbeder/yaml-cpp --depth=1 |
| 20 | +cd yaml-cpp |
| 21 | +cmake -DCMAKE_BUILD_TYPE=Debug -DYAML_CPP_BUILD_TESTS=OFF -DYAML_CPP_BUILD_TOOLS=OFF . > /dev/null |
| 22 | +make install -j8 > /dev/null |
| 23 | +cd .. |
| 24 | + |
| 25 | +git clone https://github.com/ftk/quickjspp --depth=1 |
| 26 | +cd quickjspp |
| 27 | +cmake -DCMAKE_BUILD_TYPE=Debug . |
| 28 | +make quickjs -j8 |
| 29 | +install -d /usr/local/lib/quickjs/ |
| 30 | +install -m644 quickjs/libquickjs.a /usr/local/lib/quickjs/ |
| 31 | +install -d /usr/local/include/quickjs/ |
| 32 | +install -m644 quickjs/quickjs.h quickjs/quickjs-libc.h /usr/local/include/quickjs/ |
| 33 | +install -m644 quickjspp.hpp /usr/local/include/ |
| 34 | +cd .. |
| 35 | + |
| 36 | +git clone https://github.com/PerMalmberg/libcron --depth=1 |
| 37 | +cd libcron |
| 38 | +git submodule update --init |
| 39 | +cmake -DCMAKE_BUILD_TYPE=Debug . |
| 40 | +make libcron install -j8 |
| 41 | +install -m644 libcron/out/Debug/liblibcron.a /usr/local/lib/ |
| 42 | +install -d /usr/local/include/libcron/ |
| 43 | +install -m644 libcron/include/libcron/* /usr/local/include/libcron/ |
| 44 | +install -d /usr/local/include/date/ |
| 45 | +install -m644 libcron/externals/date/include/date/* /usr/local/include/date/ |
| 46 | +cd .. |
| 47 | + |
| 48 | +git clone https://github.com/ToruNiina/toml11 --depth=1 |
| 49 | +cd toml11 |
| 50 | +cmake -DCMAKE_CXX_STANDARD=11 . |
| 51 | +make install -j4 |
| 52 | +cd .. |
| 53 | + |
| 54 | +cp /usr/local/opt/zlib/lib/libz.a . |
| 55 | +cp /usr/local/lib/libpcre2-8.a . |
| 56 | + |
| 57 | +cmake -DCMAKE_BUILD_TYPE=Debug . |
| 58 | +make -j8 |
| 59 | +rm subconverter |
| 60 | +# shellcheck disable=SC2046 |
| 61 | +c++ -Xlinker -unexported_symbol -Xlinker "*" -o base/subconverter -framework CoreFoundation -framework Security $(find CMakeFiles/subconverter.dir/src/ -name "*.o") $(find . -name "*.a") -lcurl -O3 |
| 62 | + |
| 63 | +python -m ensurepip |
| 64 | +python -m pip install gitpython |
| 65 | +python scripts/update_rules.py -c scripts/rules_config.conf |
| 66 | + |
| 67 | +cd base |
| 68 | +chmod +rx subconverter |
| 69 | +chmod +r ./* |
| 70 | +cd .. |
| 71 | +mv base subconverter |
| 72 | + |
| 73 | +set +xe |
0 commit comments