mirror of
https://github.com/tihmstar/futurerestore.git
synced 2025-04-20 14:31:41 +00:00
Completely rewrite CI
This commit is contained in:
parent
0c3afd521d
commit
00c914d81e
BIN
.github/workflows/bootstrap.tar.zst
vendored
Normal file
BIN
.github/workflows/bootstrap.tar.zst
vendored
Normal file
Binary file not shown.
54
.github/workflows/build.sh
vendored
54
.github/workflows/build.sh
vendored
|
@ -1,35 +1,41 @@
|
|||
#!/bin/zsh
|
||||
echo 'step 1:'
|
||||
set -e
|
||||
export DIR=$(pwd) SR=/usr/local/SYSROOT HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_MAKE_JOBS=16 export BASE=/Users/runner/work/futurerestore/futurerestore/.github/workflows HB=/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula CC='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' CXX='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' LD='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld' RANLIB='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib' AR='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar' CFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15' CXXFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15'
|
||||
brew install --force make cmake autoconf automake
|
||||
export DIR=$(pwd)
|
||||
echo "export PROCURSUS=/opt/procursus" >> ~/.bash_profile
|
||||
echo "export PATH=${PROCURSUS}/bin:${PROCURSUS}/libexec/gnubin:${PATH}" >> ~/.bash_profile
|
||||
echo "export PROCURSUS=/opt/procursus" >> ~/.zshrc
|
||||
echo "export PATH=${PROCURSUS}/bin:${PROCURSUS}/libexec/gnubin:${PATH}" >> ~/.zshrc
|
||||
export BASE=/Users/runner/work/futurerestore/futurerestore/.github/workflows
|
||||
export PROCURSUS=/opt/procursus
|
||||
export PATH=${PROCURSUS}/bin:${PROCURSUS}/libexec/gnubin:${PATH}
|
||||
ssh-keyscan github.com >> ~/.ssh/known_hosts
|
||||
echo 'step 2:'
|
||||
cd $BASE/../..
|
||||
git fetch origin test
|
||||
git reset --hard FETCH_HEAD
|
||||
zstd -dk bootstrap.tar.zst
|
||||
sudo gtar xf ${BASE}/bootstrap.tar -C / --warning=none || true || true
|
||||
sudo ${PROCURSUS}/bin/apt update -y
|
||||
sudo ${PROCURSUS}/bin/apt install make cmake coreutils pkg-config findutils sed tar patch bash openssl gnupg ldid libtool automake groff fakeroot dpkg zstd ncurses-bin wget cmake docbook-xsl python3 autoconf autoconf-archive triehash po4a grep -y
|
||||
echo 'step 3:'
|
||||
cd ${BASE}/../..
|
||||
export FUTURERESTORE_VERSION=$(git rev-parse HEAD | tr -d '\n')
|
||||
echo 'step 4:'
|
||||
git submodule init; git submodule update --recursive
|
||||
cd external/tsschecker
|
||||
git submodule init; git submodule update --recursive
|
||||
cd ../../
|
||||
find /usr/local/Cellar -type f \( -iname "*.a" ! -iname "libcrypto.a" ! -iname "libssl.a" ! -iname "libzstd.a" ! -iname "liblzma.a" ! -iname "liblzma.a" ! -iname "libzip.a" ! -iname "libusb-1.0.a" ! -iname "libplist-2.0.a" ! -iname "libplist++-2.0.a" ! -iname "libusbmuxd-2.0.a" ! -iname "libimobiledevice-1.0.a" ! -iname "libirecovery-1.0.a" ! -iname "libgeneral.a" ! -iname "libinsn.a" ! -iname "liboffsetfinder64.a" ! -iname "libfragmentzip.a" ! -iname "libimg4tool.a" ! -iname "libjssy.a" ! -iname "libiBoot32Patcher.a" ! -iname "libipatcher.a" ! -iname "libcommon.a" ! -iname "libxpwn.a" ! -iname "libpng16.*a" \)
|
||||
find /usr/local/opt -type f \( -iname "*.a" ! -iname "libcrypto.a" ! -iname "libssl.a" ! -iname "libzstd.a" ! -iname "liblzma.a" ! -iname "liblzma.a" ! -iname "libzip.a" ! -iname "libusb-1.0.a" ! -iname "libplist-2.0.a" ! -iname "libplist++-2.0.a" ! -iname "libusbmuxd-2.0.a" ! -iname "libimobiledevice-1.0.a" ! -iname "libirecovery-1.0.a" ! -iname "libgeneral.a" ! -iname "libinsn.a" ! -iname "liboffsetfinder64.a" ! -iname "libfragmentzip.a" ! -iname "libimg4tool.a" ! -iname "libjssy.a" ! -iname "libiBoot32Patcher.a" ! -iname "libipatcher.a" ! -iname "libcommon.a" ! -iname "libxpwn.a" ! -iname "libpng16.*a" \)
|
||||
find /usr/local/lib -type f \( -iname "*.a" ! -iname "libcrypto.a" ! -iname "libssl.a" ! -iname "libzstd.a" ! -iname "liblzma.a" ! -iname "liblzma.a" ! -iname "libzip.a" ! -iname "libusb-1.0.a" ! -iname "libplist-2.0.a" ! -iname "libplist++-2.0.a" ! -iname "libusbmuxd-2.0.a" ! -iname "libimobiledevice-1.0.a" ! -iname "libirecovery-1.0.a" ! -iname "libgeneral.a" ! -iname "libinsn.a" ! -iname "liboffsetfinder64.a" ! -iname "libfragmentzip.a" ! -iname "libimg4tool.a" ! -iname "libjssy.a" ! -iname "libiBoot32Patcher.a" ! -iname "libipatcher.a" ! -iname "libcommon.a" ! -iname "libxpwn.a" ! -iname "libpng16.*a" \)
|
||||
sudo find /usr/local/lib -name 'libzstd*.dylib' -delete
|
||||
sudo find /usr/local/lib -name 'libzstd*'
|
||||
sudo find /usr/local/lib -iname 'libzip*.dylib' -delete
|
||||
sudo find /usr/local/lib -iname 'liblzma*.dylib' -delete
|
||||
sudo find /usr/local/lib -iname 'libusb-1.0*.dylib' -delete
|
||||
sudo find /usr/local/lib -iname 'libpng*.dylib' -delete
|
||||
./autogen.sh --disable-dependency-tracking --disable-silent-rules --prefix=/usr/local --disable-debug CC='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' CXX='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' LD='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld' RANLIB='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib' AR='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar' CFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15 -DTSSCHECKER_NOMAIN=1 -DIDEVICERESTORE_NOMAIN=1' CXXFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15 -DTSSCHECKER_NOMAIN=1 -DIDEVICERESTORE_NOMAIN=1' LDFLAGS='-L/usr/local/lib -lzstd -lusbmuxd-2.0 -L/usr/lib -lbz2 -llzma -lcompression -framework CoreFoundation -framework IOKit'
|
||||
echo 'step 4:'
|
||||
gmake -j16
|
||||
cd ${BASE}
|
||||
mkdir ${BASE}/Procursus
|
||||
cd ${BASE}/Procursus
|
||||
git init
|
||||
git remote add origin https://github.com/ProcursusTeam/Procursus.git
|
||||
git fetch origin as2
|
||||
git reset --hard FETCH_HEAD
|
||||
git apply ${BASE}/proc_ci.diff
|
||||
gtar xf ${BASE}/build_base.tar
|
||||
echo 'step 5:'
|
||||
gmake -j16 install
|
||||
make futurerestore NO_PGP=1 MEMO_TARGET=darwin-amd64 MEMO_CFVER=1300
|
||||
echo 'step 6:'
|
||||
/usr/local/bin/futurerestore || true
|
||||
echo 'step 7:'
|
||||
otool -L /usr/local/bin/futurerestore
|
||||
echo 'step 8:'
|
||||
mv /usr/local/bin/futurerestore $BASE/futurerestore
|
||||
cp build_stage/darwin-amd64/1300/futurerestore/opt/procursus/bin/futurerestore ${BASE}
|
||||
cd ${BASE}
|
||||
otool -L futurerestore || true
|
||||
./futurerestore || true
|
||||
echo 'End'
|
||||
|
|
BIN
.github/workflows/build_base.tar
vendored
Normal file
BIN
.github/workflows/build_base.tar
vendored
Normal file
Binary file not shown.
105
.github/workflows/ci.yml
vendored
105
.github/workflows/ci.yml
vendored
|
@ -2,8 +2,6 @@ name: CI
|
|||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- test
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
|
@ -11,114 +9,11 @@ jobs:
|
|||
build:
|
||||
runs-on: macos-10.15
|
||||
steps:
|
||||
- name: Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cache-deps
|
||||
with:
|
||||
path: |
|
||||
/usr/local/lib/.DEP-CACHED
|
||||
/usr/local/SYSROOT/**
|
||||
/usr/local/opt/openssl/**
|
||||
/usr/local/opt/openssl@1.1/**
|
||||
/usr/local/opt/zstd/**
|
||||
/usr/local/opt/xz/**
|
||||
/usr/local/opt/libzip/**
|
||||
/usr/local/opt/libusb/**
|
||||
/usr/local/Cellar/openssl@1.1/**
|
||||
/usr/local/Cellar/zstd/**
|
||||
/usr/local/Cellar/xz/**
|
||||
/usr/local/Cellar/libzip/**
|
||||
/usr/local/Cellar/libusb/**
|
||||
/usr/local/lib/engines-1.1/**
|
||||
/usr/local/lib/pkgconfig/libcrypto.pc
|
||||
/usr/local/lib/pkgconfig/libssl.pc
|
||||
/usr/local/lib/pkgconfig/openssl.pc
|
||||
/usr/local/lib/pkgconfig/libzstd.pc
|
||||
/usr/local/lib/pkgconfig/liblzma.pc
|
||||
/usr/local/lib/pkgconfig/libzip.pc
|
||||
/usr/local/lib/pkgconfig/libusb-1.0.pc
|
||||
/usr/local/lib/pkgconfig/libplist-2.0.pc
|
||||
/usr/local/lib/pkgconfig/libusbmuxd-2.0.pc
|
||||
/usr/local/lib/pkgconfig/libimobiledevice-1.0.pc
|
||||
/usr/local/lib/pkgconfig/libirecovery-1.0.pc
|
||||
/usr/local/lib/pkgconfig/libgeneral.pc
|
||||
/usr/local/lib/pkgconfig/libinsn.pc
|
||||
/usr/local/lib/pkgconfig/liboffsetfinder64.pc
|
||||
/usr/local/lib/pkgconfig/libfragmentzip.pc
|
||||
/usr/local/lib/pkgconfig/libimg4tool.pc
|
||||
/usr/local/lib/pkgconfig/libipatcher.pc
|
||||
/usr/local/lib/pkgconfig/libpng.pc
|
||||
/usr/local/lib/pkgconfig/libpng16.pc
|
||||
/usr/local/lib/libcrypto.*a
|
||||
/usr/local/lib/libssl.*a
|
||||
/usr/local/lib/libzstd.*a
|
||||
/usr/local/lib/liblzma.*a
|
||||
/usr/local/lib/libzip.*a
|
||||
/usr/local/lib/libusb-1.0.*a
|
||||
/usr/local/lib/libplist-2.0.*a
|
||||
/usr/local/lib/libplist++-2.0.*a
|
||||
/usr/local/lib/libusbmuxd-2.0.*a
|
||||
/usr/local/lib/libimobiledevice-1.0.*a
|
||||
/usr/local/lib/libirecovery-1.0.*a
|
||||
/usr/local/lib/libgeneral.*a
|
||||
/usr/local/lib/libinsn.*a
|
||||
/usr/local/lib/liboffsetfinder64.*a
|
||||
/usr/local/lib/libfragmentzip.*a
|
||||
/usr/local/lib/libimg4tool.*a
|
||||
/usr/local/lib/libjssy.*a
|
||||
/usr/local/lib/libiBoot32Patcher.*a
|
||||
/usr/local/lib/libipatcher.*a
|
||||
/usr/local/lib/libcommon.*a
|
||||
/usr/local/lib/libxpwn.*a
|
||||
/usr/local/lib/libpng16.*a
|
||||
/usr/local/lib/cmake/libzip/**
|
||||
/usr/local/include/openssl/**
|
||||
/usr/local/include/zdict.h
|
||||
/usr/local/include/zstd_errors.h
|
||||
/usr/local/include/zstd.h
|
||||
/usr/local/include/lzma/**
|
||||
/usr/local/include/lzma.h
|
||||
/usr/local/include/zip.h
|
||||
/usr/local/include/zipconf.h
|
||||
/usr/local/include/libusb-1.0/**
|
||||
/usr/local/include/plist/**
|
||||
/usr/local/include/usbmuxd.h
|
||||
/usr/local/include/usbmuxd-proto.h
|
||||
/usr/local/include/libimobiledevice/**
|
||||
/usr/local/include/asprintf.h
|
||||
/usr/local/include/endianness.h
|
||||
/usr/local/include/libirecovery.h
|
||||
/usr/local/include/libgeneral/**
|
||||
/usr/local/include/libinsn/**
|
||||
/usr/local/include/liboffsetfinder64/**
|
||||
/usr/local/include/libfragmentzip/**
|
||||
/usr/local/include/img4tool/**
|
||||
/usr/local/include/libipatcher/**
|
||||
/usr/local/include/common.h
|
||||
/usr/local/include/abstractfile.h
|
||||
/usr/local/include/dmg/**
|
||||
/usr/local/include/hfs/**
|
||||
/usr/local/include/partial/**
|
||||
/usr/local/include/xpwn/**
|
||||
/usr/local/include/libpng16/**
|
||||
key: fr-${{ runner.os }}-build-${{ env.cache-name }}
|
||||
restore-keys: |
|
||||
fr-${{ runner.os }}-build-${{ env.cache-name }}
|
||||
fr-${{ runner.os }}-build-
|
||||
fr-${{ runner.os }}-
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'true'
|
||||
fetch-depth: 0
|
||||
- name: Deps
|
||||
id: deps
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd /Users/runner/work/futurerestore/futurerestore/.github/workflows
|
||||
./deps.sh
|
||||
- name: Build
|
||||
id: build
|
||||
run: |
|
||||
|
|
164
.github/workflows/deps.sh
vendored
164
.github/workflows/deps.sh
vendored
|
@ -1,164 +0,0 @@
|
|||
#!/bin/zsh
|
||||
echo 'step 1:'
|
||||
set -e
|
||||
export DIR=$(pwd) SR=/usr/local/SYSROOT HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_MAKE_JOBS=16 export BASE=/Users/runner/work/futurerestore/futurerestore/.github/workflows HB=/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula CC='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' CXX='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' LD='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld' RANLIB='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib' AR='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar' CFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15' CXXFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15'
|
||||
ssh-keyscan github.com >> ~/.ssh/known_hosts
|
||||
if [ ! -f "/usr/local/lib/.DEP-CACHED" ]; then
|
||||
sudo mkdir $SR
|
||||
echo 'step 2:'
|
||||
cd $BASE
|
||||
unzip -q xpwn.zip
|
||||
unzip -q libpng.zip
|
||||
echo 'step 4:'
|
||||
sudo find /usr/local/opt -name '*.a' -delete
|
||||
sudo find /usr/local/opt -name '*.la' -delete
|
||||
echo 'step 5:'
|
||||
sudo find /usr/local/lib -name '*.a' -delete
|
||||
sudo find /usr/local/lib -name '*.la' -delete
|
||||
echo 'step 6:'
|
||||
cp -v openssl@1.1.rb $HB
|
||||
cp -v zstd.rb $HB
|
||||
cp -v xz.rb $HB
|
||||
cp -v libusb.rb $HB
|
||||
echo 'step 7:'
|
||||
brew link --overwrite --force openssl@1.1 zstd xz libzip libusb
|
||||
echo 'step 8:'
|
||||
brew unlink openssl@1.1 zstd xz libzip libusb curl
|
||||
echo 'step 8:'
|
||||
brew install --force make cmake autoconf automake
|
||||
echo 'step 9:'
|
||||
brew reinstall --force -s openssl@1.1 zstd xz libusb
|
||||
echo 'step 10:'
|
||||
sudo find /usr/local/lib -name 'libzstd*.dylib' -delete
|
||||
sudo find /usr/local/lib -iname 'libzip*.dylib' -delete
|
||||
sudo find /usr/local/lib -iname 'liblzma*.dylib' -delete
|
||||
sudo find /usr/local/lib -iname 'libusb-1.0*.dylib' -delete
|
||||
sudo find /usr/local/lib -iname 'libpng*.dylib' -delete
|
||||
find /usr/local/Cellar -type f \( -iname "*.a" ! -iname "libcrypto.a" ! -iname "libssl.a" ! -iname "libzstd.a" ! -iname "liblzma.a" ! -iname "liblzma.a" ! -iname "libzip.a" ! -iname "libusb-1.0.a" ! -iname "libplist-2.0.a" ! -iname "libplist++-2.0.a" ! -iname "libusbmuxd-2.0.a" ! -iname "libimobiledevice-1.0.a" ! -iname "libirecovery-1.0.a" ! -iname "libgeneral.a" ! -iname "libinsn.a" ! -iname "liboffsetfinder64.a" ! -iname "libfragmentzip.a" ! -iname "libimg4tool.a" ! -iname "libjssy.a" ! -iname "libiBoot32Patcher.a" ! -iname "libipatcher.a" ! -iname "libcommon.a" ! -iname "libxpwn.a" ! -iname "libpng16.*a" \)
|
||||
find /usr/local/opt -type f \( -iname "*.a" ! -iname "libcrypto.a" ! -iname "libssl.a" ! -iname "libzstd.a" ! -iname "liblzma.a" ! -iname "liblzma.a" ! -iname "libzip.a" ! -iname "libusb-1.0.a" ! -iname "libplist-2.0.a" ! -iname "libplist++-2.0.a" ! -iname "libusbmuxd-2.0.a" ! -iname "libimobiledevice-1.0.a" ! -iname "libirecovery-1.0.a" ! -iname "libgeneral.a" ! -iname "libinsn.a" ! -iname "liboffsetfinder64.a" ! -iname "libfragmentzip.a" ! -iname "libimg4tool.a" ! -iname "libjssy.a" ! -iname "libiBoot32Patcher.a" ! -iname "libipatcher.a" ! -iname "libcommon.a" ! -iname "libxpwn.a" ! -iname "libpng16.*a" \)
|
||||
find /usr/local/lib -type f \( -iname "*.a" ! -iname "libcrypto.a" ! -iname "libssl.a" ! -iname "libzstd.a" ! -iname "liblzma.a" ! -iname "liblzma.a" ! -iname "libzip.a" ! -iname "libusb-1.0.a" ! -iname "libplist-2.0.a" ! -iname "libplist++-2.0.a" ! -iname "libusbmuxd-2.0.a" ! -iname "libimobiledevice-1.0.a" ! -iname "libirecovery-1.0.a" ! -iname "libgeneral.a" ! -iname "libinsn.a" ! -iname "liboffsetfinder64.a" ! -iname "libfragmentzip.a" ! -iname "libimg4tool.a" ! -iname "libjssy.a" ! -iname "libiBoot32Patcher.a" ! -iname "libipatcher.a" ! -iname "libcommon.a" ! -iname "libxpwn.a" ! -iname "libpng16.*a" \)
|
||||
echo 'step 10:'
|
||||
git clone https://github.com/nih-at/libzip.git
|
||||
cd libzip
|
||||
echo 'step 11:'
|
||||
git apply $BASE/libzip.patch
|
||||
echo 'step 12:'
|
||||
CC='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' CXX='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' LD='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld' RANLIB='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib' AR='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar' CFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15' CXXFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15' cmake .
|
||||
echo 'step 13:'
|
||||
CC='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' CXX='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' LD='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld' RANLIB='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib' AR='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar' CFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15' CXXFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15' gmake -j16
|
||||
echo 'step 14:'
|
||||
find /usr/local/lib -iname 'libzip.*' -delete
|
||||
gmake -j16 install
|
||||
echo 'step 15:'
|
||||
cd $BASE
|
||||
git clone --recursive https://github.com/libimobiledevice/libplist.git
|
||||
cd libplist
|
||||
echo 'step 16:'
|
||||
./autogen.sh --disable-dependency-tracking --disable-silent-rules --disable-shared --prefix=/usr/local --without-cython --disable-debug CC='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' CXX='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' LD='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld' RANLIB='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib' AR='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar' CFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15' CXXFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15'
|
||||
echo 'step 16:'
|
||||
gmake -j16
|
||||
echo 'step 17:'
|
||||
gmake -j16 install
|
||||
echo 'step 18:'
|
||||
cd $BASE
|
||||
git clone --recursive https://github.com/libimobiledevice/libusbmuxd.git
|
||||
cd libusbmuxd
|
||||
echo 'step 19:'
|
||||
./autogen.sh --disable-dependency-tracking --disable-silent-rules --disable-shared --prefix=/usr/local --disable-debug CC='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' CXX='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' LD='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld' RANLIB='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib' AR='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar' CFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15' CXXFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15'
|
||||
echo 'step 20:'
|
||||
gmake -j16
|
||||
echo 'step 21:'
|
||||
gmake -j16 install
|
||||
echo 'step 22:'
|
||||
cd $BASE
|
||||
git clone --recursive https://github.com/libimobiledevice/libimobiledevice.git
|
||||
cd libimobiledevice
|
||||
echo 'step 23:'
|
||||
./autogen.sh --disable-dependency-tracking --disable-silent-rules --disable-shared --prefix=/usr/local --disable-debug --without-cython CC='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' CXX='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' LD='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld' RANLIB='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib' AR='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar' CFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15' CXXFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15'
|
||||
echo 'step 24:'
|
||||
gmake -j16
|
||||
echo 'step 25:'
|
||||
gmake -j16 install
|
||||
echo 'step 26:'
|
||||
cd $BASE
|
||||
git clone --recursive https://github.com/libimobiledevice/libirecovery.git
|
||||
cd libirecovery
|
||||
echo 'step 27:'
|
||||
git apply $BASE/libirecovery.patch
|
||||
./autogen.sh --disable-dependency-tracking --disable-silent-rules --disable-shared --prefix=/usr/local --disable-debug CC='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' CXX='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' LD='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld' RANLIB='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib' AR='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar' CFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15' CXXFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15'
|
||||
echo 'step 28:'
|
||||
gmake -j16
|
||||
echo 'step 29:'
|
||||
gmake -j16 install
|
||||
echo 'step 30:'
|
||||
cd $BASE
|
||||
git clone --recursive https://github.com/tihmstar/libgeneral.git
|
||||
cd libgeneral
|
||||
echo 'step 31:'
|
||||
./autogen.sh --disable-dependency-tracking --disable-silent-rules --disable-shared --prefix=/usr/local --disable-debug CC='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' CXX='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' LD='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld' RANLIB='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib' AR='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar' CFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15' CXXFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15'
|
||||
echo 'step 32:'
|
||||
gmake -j16
|
||||
echo 'step 33:'
|
||||
gmake -j16 install
|
||||
echo 'step 34:'
|
||||
cd $BASE
|
||||
git clone --recursive https://github.com/tihmstar/libinsn.git
|
||||
cd libinsn
|
||||
echo 'step 35:'
|
||||
./autogen.sh --disable-dependency-tracking --disable-silent-rules --disable-shared --prefix=/usr/local --disable-debug CC='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' CXX='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' LD='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld' RANLIB='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib' AR='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar' CFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15' CXXFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15'
|
||||
echo 'step 36:'
|
||||
gmake -j16
|
||||
echo 'step 37:'
|
||||
gmake -j16 install
|
||||
echo 'step 38:'
|
||||
cd $BASE
|
||||
git clone --recursive https://github.com/tihmstar/liboffsetfinder64.git
|
||||
cd liboffsetfinder64
|
||||
echo 'step 39:'
|
||||
./autogen.sh --disable-dependency-tracking --disable-silent-rules --disable-shared --prefix=/usr/local --disable-debug CC='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' CXX='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' LD='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld' RANLIB='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib' AR='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar' CFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15' CXXFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15'
|
||||
echo 'step 40:'
|
||||
gmake -j16
|
||||
echo 'step 41:'
|
||||
gmake -j16 install
|
||||
echo 'step 42:'
|
||||
cd $BASE
|
||||
git clone --recursive https://github.com/tihmstar/libfragmentzip.git
|
||||
cd libfragmentzip
|
||||
echo 'step 43:'
|
||||
./autogen.sh --disable-dependency-tracking --disable-silent-rules --disable-shared --prefix=/usr/local --disable-debug CC='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' CXX='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' LD='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld' RANLIB='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib' AR='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar' CFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15' CXXFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15'
|
||||
echo 'step 44:'
|
||||
gmake -j16
|
||||
echo 'step 45:'
|
||||
gmake -j16 install
|
||||
echo 'step 46:'
|
||||
cd $BASE
|
||||
git clone --recursive https://github.com/tihmstar/img4tool.git
|
||||
cd img4tool
|
||||
echo 'step 47:'
|
||||
./autogen.sh --disable-dependency-tracking --disable-silent-rules --disable-shared --prefix=/usr/local --disable-debug CC='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' CXX='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' LD='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld' RANLIB='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib' AR='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar' CFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15' CXXFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15'
|
||||
echo 'step 48:'
|
||||
gmake -j16
|
||||
echo 'step 49:'
|
||||
gmake -j16 install
|
||||
echo 'step 50:'
|
||||
cd $BASE
|
||||
echo 'step 51:'
|
||||
rm -rv /usr/local/lib/libpng16.* || true
|
||||
cp -v $BASE/libpng16.a /usr/local/lib/
|
||||
cp -v $BASE/libxpwn.a /usr/local/lib/
|
||||
cp -v $BASE/libcommon.a /usr/local/lib/
|
||||
cp -rv $BASE/xpwn_include/* /usr/local/include/
|
||||
git clone --recursive https://github.com/tihmstar/libipatcher.git
|
||||
cd libipatcher
|
||||
echo 'step 52:'
|
||||
./autogen.sh --disable-dependency-tracking --disable-silent-rules --disable-shared --prefix=/usr/local --disable-debug CC='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' CXX='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' LD='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld' RANLIB='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib' AR='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar' CFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15' CXXFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15'
|
||||
echo 'step 53:'
|
||||
gmake -j16
|
||||
echo 'step 54:'
|
||||
gmake -j16 install
|
||||
echo 'step 55:'
|
||||
touch /usr/local/lib/.DEP-CACHED
|
||||
echo 'End'
|
||||
else
|
||||
echo 'End'
|
||||
fi
|
13
.github/workflows/libirecovery.patch
vendored
13
.github/workflows/libirecovery.patch
vendored
|
@ -1,13 +0,0 @@
|
|||
diff --git a/src/libirecovery.c b/src/libirecovery.c
|
||||
index c3b3341..d27d862 100644
|
||||
--- a/src/libirecovery.c
|
||||
+++ b/src/libirecovery.c
|
||||
@@ -1443,7 +1443,7 @@ IRECV_API irecv_error_t irecv_open_with_ecid(irecv_client_t* pclient, uint64_t e
|
||||
|
||||
if ((client->mode != IRECV_K_DFU_MODE) && (client->mode != IRECV_K_WTF_MODE)) {
|
||||
error = irecv_usb_set_interface(client, 0, 0);
|
||||
- if (client->mode > IRECV_K_RECOVERY_MODE_2) {
|
||||
+ if (client->mode <= IRECV_K_RECOVERY_MODE_2) {
|
||||
error = irecv_usb_set_interface(client, 1, 1);
|
||||
}
|
||||
} else {
|
BIN
.github/workflows/libpng.zip
vendored
BIN
.github/workflows/libpng.zip
vendored
Binary file not shown.
53
.github/workflows/libusb.rb
vendored
53
.github/workflows/libusb.rb
vendored
|
@ -1,53 +0,0 @@
|
|||
class Libusb < Formula
|
||||
desc "Library for USB device access"
|
||||
homepage "https://libusb.info/"
|
||||
url "https://github.com/libusb/libusb/releases/download/v1.0.24/libusb-1.0.24.tar.bz2"
|
||||
sha256 "7efd2685f7b327326dcfb85cee426d9b871fd70e22caa15bb68d595ce2a2b12a"
|
||||
license "LGPL-2.1-or-later"
|
||||
|
||||
livecheck do
|
||||
url :stable
|
||||
strategy :github_latest
|
||||
end
|
||||
|
||||
bottle do
|
||||
sha256 cellar: :any, arm64_big_sur: "1c40f64450705461a5373c3d54257e646d39914d44bffaf9d957bbe063db2129"
|
||||
sha256 cellar: :any, big_sur: "74e0067e968ddbea31e070885ae86bc1db5c66fd157588e84576e653e62894c8"
|
||||
sha256 cellar: :any, catalina: "034ae259f17afb5894860cdb1786fd6d391359e8d221c0f765eceed6210b60df"
|
||||
sha256 cellar: :any, mojave: "1318e1155192bdaf7d159562849ee8f73cb0f59b0cb77c142f8be99056ba9d9e"
|
||||
end
|
||||
|
||||
head do
|
||||
url "https://github.com/libusb/libusb.git"
|
||||
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "automake" => :build
|
||||
depends_on "libtool" => :build
|
||||
end
|
||||
|
||||
def install
|
||||
args = %W[--disable-dependency-tracking --disable-shared --prefix=#{prefix}]
|
||||
|
||||
system "./autogen.sh" if build.head?
|
||||
system "./configure", *args,
|
||||
"CFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15",
|
||||
"CXXFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15",
|
||||
"CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang",
|
||||
"CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++",
|
||||
"LD=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld",
|
||||
"AR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar"
|
||||
system "gmake", "-j16", "clean"
|
||||
system "gmake", "-j16"
|
||||
system "gmake", "-j16", "install"
|
||||
(pkgshare/"examples").install Dir["examples/*"] - Dir["examples/Makefile*"]
|
||||
end
|
||||
|
||||
test do
|
||||
cp_r (pkgshare/"examples"), testpath
|
||||
cd "examples" do
|
||||
system ENV.cc, "-lusb-1.0", "-L#{lib}", "-I#{include}/libusb-1.0",
|
||||
"listdevs.c", "-o", "test"
|
||||
system "./test"
|
||||
end
|
||||
end
|
||||
end
|
20
.github/workflows/libzip.patch
vendored
20
.github/workflows/libzip.patch
vendored
|
@ -1,20 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index afcc6fc3..4ea3466d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,4 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.0.2)
|
||||
+set(CMAKE_C_FLAGS "-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15")
|
||||
+set(CMAKE_CXX_FLAGS "-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
if (${CMAKE_VERSION} VERSION_LESS "3.17.0")
|
||||
@@ -54,7 +56,7 @@ if(WIN32)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-option(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
||||
+option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
||||
option(LIBZIP_DO_INSTALL "Install libzip and the related files" ON)
|
||||
|
||||
option(SHARED_LIB_VERSIONNING "Add SO version in .so build" ON)
|
179
.github/workflows/openssl@1.1.rb
vendored
179
.github/workflows/openssl@1.1.rb
vendored
|
@ -1,179 +0,0 @@
|
|||
class OpensslAT11 < Formula
|
||||
desc "Cryptography and SSL/TLS Toolkit"
|
||||
homepage "https://openssl.org/"
|
||||
url "https://www.openssl.org/source/openssl-1.1.1i.tar.gz"
|
||||
mirror "https://dl.bintray.com/homebrew/mirror/openssl-1.1.1i.tar.gz"
|
||||
mirror "https://www.mirrorservice.org/sites/ftp.openssl.org/source/openssl-1.1.1i.tar.gz"
|
||||
sha256 "e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242"
|
||||
license "OpenSSL"
|
||||
version_scheme 1
|
||||
|
||||
livecheck do
|
||||
url "https://www.openssl.org/source/"
|
||||
regex(/href=.*?openssl[._-]v?(1\.1(?:\.\d+)+[a-z]?)\.t/i)
|
||||
end
|
||||
|
||||
bottle do
|
||||
sha256 arm64_big_sur: "cb01d17d18af475c29e87e05b8ec866b813b9f24e8a3b438efbabdf548dc5649"
|
||||
sha256 big_sur: "8008537d37a7f09eedbcd03c575e15206c54f97fe162c6d36da904897e9cee31"
|
||||
sha256 catalina: "066b9f114617872e77fa3d4afee2337daabc2c181d7564fe60a5b26d89d69742"
|
||||
sha256 mojave: "f5a348793735d449d990693ab687049fb11c08ade0b74c6f7337a56fc0a77908"
|
||||
end
|
||||
|
||||
on_linux do
|
||||
resource "cacert" do
|
||||
# homepage "http://curl.haxx.se/docs/caextract.html"
|
||||
url "https://curl.haxx.se/ca/cacert-2020-01-01.pem"
|
||||
mirror "https://gist.githubusercontent.com/dawidd6/16d94180a019f31fd31bc679365387bc/raw/ef02c78b9d6427585d756528964d18a2b9e318f7/cacert-2020-01-01.pem"
|
||||
sha256 "adf770dfd574a0d6026bfaa270cb6879b063957177a991d453ff1d302c02081f"
|
||||
end
|
||||
|
||||
resource "Test::Harness" do
|
||||
url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Test-Harness-3.42.tar.gz"
|
||||
sha256 "0fd90d4efea82d6e262e6933759e85d27cbcfa4091b14bf4042ae20bab528e53"
|
||||
end
|
||||
|
||||
resource "Test::More" do
|
||||
url "https://cpan.metacpan.org/authors/id/E/EX/EXODIST/Test-Simple-1.302175.tar.gz"
|
||||
sha256 "c8c8f5c51ad6d7a858c3b61b8b658d8e789d3da5d300065df0633875b0075e49"
|
||||
end
|
||||
|
||||
resource "ExtUtils::MakeMaker" do
|
||||
url "https://cpan.metacpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.48.tar.gz"
|
||||
sha256 "94e64a630fc37e80c0ca02480dccfa5f2f4ca4b0dd4eeecc1d65acd321c68289"
|
||||
end
|
||||
end
|
||||
|
||||
# SSLv2 died with 1.1.0, so no-ssl2 no longer required.
|
||||
# SSLv3 & zlib are off by default with 1.1.0 but this may not
|
||||
# be obvious to everyone, so explicitly state it for now to
|
||||
# help debug inevitable breakage.
|
||||
|
||||
def configure_args
|
||||
ENV['CFLAGS'] = '-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15'
|
||||
ENV['CXXFLAGS'] = '-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15'
|
||||
ENV['CC'] = '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang'
|
||||
ENV['CXX'] = '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'
|
||||
ENV['LD'] = '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld'
|
||||
ENV['AR'] = '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar'
|
||||
args = %W[
|
||||
--prefix=#{prefix}
|
||||
--openssldir=#{openssldir}
|
||||
no-ssl3
|
||||
no-ssl3-method
|
||||
no-zlib
|
||||
no-asm
|
||||
no-shared
|
||||
]
|
||||
args += (ENV.cflags || "").split
|
||||
args += (ENV.cppflags || "").split
|
||||
args += (ENV.ldflags || "").split
|
||||
end
|
||||
|
||||
def install
|
||||
on_linux do
|
||||
ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5"
|
||||
|
||||
%w[ExtUtils::MakeMaker Test::Harness Test::More].each do |r|
|
||||
resource(r).stage do
|
||||
system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}"
|
||||
system "gmake", "-j16", "PERL5LIB=#{ENV["PERL5LIB"]}", "CC=#{ENV.cc}"
|
||||
system "gmake", "-j16", "install"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# This could interfere with how we expect OpenSSL to build.
|
||||
ENV.delete("OPENSSL_LOCAL_CONFIG_DIR")
|
||||
|
||||
# This ensures where Homebrew's Perl is needed the Cellar path isn't
|
||||
# hardcoded into OpenSSL's scripts, causing them to break every Perl update.
|
||||
# Whilst our env points to opt_bin, by default OpenSSL resolves the symlink.
|
||||
ENV["PERL"] = Formula["perl"].opt_bin/"perl" if which("perl") == Formula["perl"].opt_bin/"perl"
|
||||
|
||||
arch_args = []
|
||||
on_macos do
|
||||
arch_args += %W[darwin64-#{Hardware::CPU.arch}-cc enable-ec_nistp_64_gcc_128]
|
||||
end
|
||||
on_linux do
|
||||
if Hardware::CPU.intel?
|
||||
arch_args << (Hardware::CPU.is_64_bit? ? "linux-x86_64" : "linux-elf")
|
||||
elsif Hardware::CPU.arm?
|
||||
arch_args << (Hardware::CPU.is_64_bit? ? "linux-aarch64" : "linux-armv4")
|
||||
end
|
||||
end
|
||||
|
||||
ENV.deparallelize
|
||||
system "perl", "./Configure", *(configure_args + arch_args)
|
||||
system "make", "-j16"
|
||||
system "make", "-j16", "install", "MANDIR=#{man}", "MANSUFFIX=ssl"
|
||||
# system "make", "-j16", "test"
|
||||
end
|
||||
|
||||
def openssldir
|
||||
etc/"openssl@1.1"
|
||||
end
|
||||
|
||||
def post_install
|
||||
on_macos(&method(:macos_post_install))
|
||||
on_linux(&method(:linux_post_install))
|
||||
end
|
||||
|
||||
def macos_post_install
|
||||
keychains = %w[
|
||||
/System/Library/Keychains/SystemRootCertificates.keychain
|
||||
]
|
||||
|
||||
certs_list = `security find-certificate -a -p #{keychains.join(" ")}`
|
||||
certs = certs_list.scan(
|
||||
/-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----/m,
|
||||
)
|
||||
|
||||
valid_certs = certs.select do |cert|
|
||||
IO.popen("#{bin}/openssl x509 -inform pem -checkend 0 -noout >/dev/null", "w") do |openssl_io|
|
||||
openssl_io.write(cert)
|
||||
openssl_io.close_write
|
||||
end
|
||||
|
||||
$CHILD_STATUS.success?
|
||||
end
|
||||
|
||||
openssldir.mkpath
|
||||
(openssldir/"cert.pem").atomic_write(valid_certs.join("\n") << "\n")
|
||||
end
|
||||
|
||||
def linux_post_install
|
||||
# Download and install cacert.pem from curl.haxx.se
|
||||
cacert = resource("cacert")
|
||||
cacert.fetch
|
||||
rm_f openssldir/"cert.pem"
|
||||
filename = Pathname.new(cacert.url).basename
|
||||
openssldir.install cacert.files(filename => "cert.pem")
|
||||
end
|
||||
|
||||
def caveats
|
||||
<<~EOS
|
||||
A CA file has been bootstrapped using certificates from the system
|
||||
keychain. To add additional certificates, place .pem files in
|
||||
#{openssldir}/certs
|
||||
|
||||
and run
|
||||
#{opt_bin}/c_rehash
|
||||
EOS
|
||||
end
|
||||
|
||||
test do
|
||||
# Make sure the necessary .cnf file exists, otherwise OpenSSL gets moody.
|
||||
assert_predicate pkgetc/"openssl.cnf", :exist?,
|
||||
"OpenSSL requires the .cnf file for some functionality"
|
||||
|
||||
# Check OpenSSL itself functions as expected.
|
||||
(testpath/"testfile.txt").write("This is a test file")
|
||||
expected_checksum = "e2d0fe1585a63ec6009c8016ff8dda8b17719a637405a4e23c0ff81339148249"
|
||||
system bin/"openssl", "dgst", "-sha256", "-out", "checksum.txt", "testfile.txt"
|
||||
open("checksum.txt") do |f|
|
||||
checksum = f.read(100).split("=").last.strip
|
||||
assert_equal checksum, expected_checksum
|
||||
end
|
||||
end
|
||||
end
|
136
.github/workflows/proc_ci.diff
vendored
Normal file
136
.github/workflows/proc_ci.diff
vendored
Normal file
|
@ -0,0 +1,136 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 081b4dd..1a924f3 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -245,7 +245,8 @@ BUILD_CXXFLAGS :=
|
||||
BUILD_LDFLAGS :=
|
||||
|
||||
else ifeq ($(UNAME),Darwin)
|
||||
-ifeq ($(shell sw_vers -productName),macOS)
|
||||
+$(warning is Darin)
|
||||
+ifeq (Mac,Mac)
|
||||
ifneq ($(MEMO_QUIET),1)
|
||||
$(warning Building on MacOS)
|
||||
endif # ($(MEMO_QUIET),1)
|
||||
@@ -470,7 +471,7 @@ EXTRACT_TAR = -if [ ! -d $(BUILD_WORK)/$(3) ] || [ "$(4)" = "1" ]; then \
|
||||
$(CP) -af $(2)/. $(3); \
|
||||
rm -rf $(2); \
|
||||
fi; \
|
||||
- find $(BUILD_BASE) -name '*.la' -type f -delete
|
||||
+ find $(BUILD_BASE) \( -type f -name '*.la' -o -type l -name '*.la' \) -delete
|
||||
|
||||
DO_PATCH = cd $(BUILD_PATCH)/$(1); \
|
||||
for PATCHFILE in *; do \
|
||||
@@ -618,17 +619,17 @@ endif
|
||||
|
||||
TAR := tar # TODO: remove
|
||||
|
||||
-ifneq ($(shell PATH=$(PATH) tar --version | grep -q GNU && echo 1),1)
|
||||
+ifneq ($(shell tar --version | grep -q GNU && echo 1),1)
|
||||
$(error Install GNU tar)
|
||||
endif
|
||||
|
||||
SED := sed # TODO: remove
|
||||
|
||||
-ifneq ($(shell PATH=$(PATH) sed --version | grep -q GNU && echo 1),1)
|
||||
+ifneq ($(shell sed --version | grep -q GNU && echo 1),1)
|
||||
$(error Install GNU sed)
|
||||
endif
|
||||
|
||||
-ifneq ($(shell PATH=$(PATH) grep --version | grep -q GNU && echo 1),1)
|
||||
+ifneq ($(shell grep --version | grep -q GNU && echo 1),1)
|
||||
$(error Install GNU grep)
|
||||
endif
|
||||
|
||||
@@ -678,43 +679,43 @@ ifneq ($(call HAS_COMMAND,m4),1)
|
||||
$(error Install m4)
|
||||
endif
|
||||
|
||||
-ifneq ($(shell PATH=$(PATH) groff --version | grep -q 'version 1.2' && echo 1),1)
|
||||
+ifneq ($(shell groff --version | grep -q 'version 1.2' && echo 1),1)
|
||||
$(error Install newer groff)
|
||||
endif
|
||||
|
||||
-ifneq ($(shell PATH=$(PATH) patch --version | grep -q 'GNU patch' && echo 1),1)
|
||||
+ifneq ($(shell patch --version | grep -q 'GNU patch' && echo 1),1)
|
||||
$(error Install GNU patch)
|
||||
endif
|
||||
|
||||
-ifneq ($(shell PATH=$(PATH) find --version | grep -q 'GNU find' && echo 1),1)
|
||||
+ifneq ($(shell find --version | grep -q 'GNU find' && echo 1),1)
|
||||
$(error Install GNU findutils)
|
||||
endif
|
||||
|
||||
-ifneq ($(shell PATH=$(PATH) rmdir --version | grep -q 'GNU coreutils' && echo 1),1)
|
||||
+ifneq ($(shell rmdir --version | grep -q 'GNU coreutils' && echo 1),1)
|
||||
$(error Install GNU coreutils)
|
||||
endif
|
||||
|
||||
-ifeq ($(shell PATH=$(PATH) install --version | grep -q 'GNU coreutils' && echo 1),1)
|
||||
+ifeq ($(shell install --version | grep -q 'GNU coreutils' && echo 1),1)
|
||||
export GINSTALL := install # TODO: remove
|
||||
-export INSTALL := $(shell PATH=$(PATH) which install) --strip-program=$(STRIP)
|
||||
+export INSTALL := $(shell which install) --strip-program=$(STRIP)
|
||||
else
|
||||
$(error Install GNU coreutils)
|
||||
endif
|
||||
|
||||
-ifeq ($(shell PATH=$(PATH) wc --version | grep -q 'GNU coreutils' && echo 1),1)
|
||||
+ifeq ($(shell wc --version | grep -q 'GNU coreutils' && echo 1),1)
|
||||
WC := wc
|
||||
else
|
||||
$(error Install GNU coreutils)
|
||||
endif
|
||||
|
||||
-ifeq ($(shell PATH=$(PATH) cp --version | grep -q 'GNU coreutils' && echo 1),1)
|
||||
+ifeq ($(shell cp --version | grep -q 'GNU coreutils' && echo 1),1)
|
||||
CP := cp
|
||||
else
|
||||
$(error Install GNU coreutils)
|
||||
endif
|
||||
export CP
|
||||
|
||||
-ifeq ($(shell PATH=$(PATH) ln --version | grep -q 'GNU coreutils' && echo 1),1)
|
||||
+ifeq ($(shell ln --version | grep -q 'GNU coreutils' && echo 1),1)
|
||||
LN := ln
|
||||
else
|
||||
$(error Install GNU coreutils)
|
||||
diff --git a/futurerestore.mk b/futurerestore.mk
|
||||
index e90d6e0..1195ba0 100644
|
||||
--- a/futurerestore.mk
|
||||
+++ b/futurerestore.mk
|
||||
@@ -9,27 +9,22 @@ FUTURERESTORE_IDEVICERESTORE_COMMIT := d7d9996b3910902a56462fa8d9dc5909fcf8f4c9
|
||||
DEB_FUTURERESTORE_V ?= $(FUTURERESTORE_VERSION)-1
|
||||
|
||||
futurerestore-setup: setup tsschecker-setup
|
||||
- $(call GITHUB_ARCHIVE,m1stadev,futurerestore,$(FUTURERESTORE_COMMIT),$(FUTURERESTORE_COMMIT))
|
||||
- $(call GITHUB_ARCHIVE,m1stadev,idevicerestore,$(FUTURERESTORE_IDEVICERESTORE_COMMIT),$(FUTURERESTORE_IDEVICERESTORE_COMMIT))
|
||||
- $(call EXTRACT_TAR,futurerestore-$(FUTURERESTORE_COMMIT).tar.gz,futurerestore-$(FUTURERESTORE_COMMIT),futurerestore)
|
||||
-
|
||||
- -rmdir $(BUILD_WORK)/futurerestore/external/{idevicerestore,tsschecker}
|
||||
- $(call EXTRACT_TAR,idevicerestore-$(FUTURERESTORE_IDEVICERESTORE_COMMIT).tar.gz,idevicerestore-$(FUTURERESTORE_IDEVICERESTORE_COMMIT),futurerestore/external/idevicerestore)
|
||||
- cp -R $(BUILD_WORK)/tsschecker $(BUILD_WORK)/futurerestore/external
|
||||
-
|
||||
- $(SED) -i 's/git rev\-list \-\-count HEAD/printf ${FUTURERESTORE_VERSION}/g' $(BUILD_WORK)/futurerestore/configure.ac
|
||||
- $(SED) -i 's/git rev\-parse HEAD/printf ${FUTURERESTORE_COMMIT}/g' $(BUILD_WORK)/futurerestore/configure.ac
|
||||
+ ln -sf ${BASE}/../../../futurerestore $(BUILD_WORK)/
|
||||
|
||||
ifneq ($(wildcard $(BUILD_WORK)/futurerestore/.build_complete),)
|
||||
futurerestore:
|
||||
@echo "Using previously built futurerestore."
|
||||
else
|
||||
-futurerestore: futurerestore-setup libirecovery openssl libusbmuxd libimobiledevice img4tool libgeneral libzip libfragmentzip libipatcher
|
||||
+futurerestore: futurerestore-setup
|
||||
+ find $(BUILD_BASE) \( -type f -name '*.la' -o -type l -name '*.la' \) -delete
|
||||
+ find $(BUILD_BASE) \( -type f -name '*.dylib' -o -type l -name '*.dylib' \) -delete
|
||||
+ find $(BUILD_BASE) -name '*libusb-1.0*.a' -prune -o -name '*libusbmuxd-2.0*.a' -prune -o -name '*libxpwn*.a' -prune -o -name '*libcommon*.a' -prune -o -name '*libipatcher*.a' -prune -o -name '*libimobiledevice*.a' -prune -o -name '*libfragmentzip*.a' -prune -o -name '*libzip*.a' -prune -o -name '*libirecovery*.a' -prune -o -name '*libipatcher*.a' -prune -o -name '*libpng16*.a' -prune -o -name '*liboffsetfinder64*.a' -prune -o -name '*libinsn*.a' -prune -o -name '*libimg4tool*.a' -prune -o -name '*libssl*.a' -prune -o -name '*libcrypto*.a' -prune -o -name '*libplist*.a' -prune -o -name '*libgeneral*.a' -prune -o -name '*.a' -print | tr '\n' ' ' | xargs rm || true
|
||||
cd $(BUILD_WORK)/futurerestore && ./autogen.sh \
|
||||
$(DEFAULT_CONFIGURE_FLAGS) \
|
||||
--disable-silent-rules \
|
||||
zlib_LIBS="-L$(TARGET_SYSROOT)/usr/lib -lz" \
|
||||
- zlib_CFLAGS="-I$(TARGET_SYSROOT)/usr/include"
|
||||
+ zlib_CFLAGS="-I$(TARGET_SYSROOT)/usr/include" \
|
||||
+ LDFLAGS="$(LDFLAGS) -L$(TARGET_SYSROOT)/usr/lib -llzma -lcurl -lbz2 -lcompression -framework CoreFoundation -framework IOKit -L$(BUILD_BASE)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -lipatcher -lusb-1.0 -lusbmuxd-2.0 -lfragmentzip -L$(BUILD_BASE)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/xpwn -lcommon -lxpwn"
|
||||
+$(MAKE) -C $(BUILD_WORK)/futurerestore
|
||||
+$(MAKE) -C $(BUILD_WORK)/futurerestore install \
|
||||
DESTDIR="$(BUILD_STAGE)/futurerestore"
|
BIN
.github/workflows/xpwn.zip
vendored
BIN
.github/workflows/xpwn.zip
vendored
Binary file not shown.
53
.github/workflows/xz.rb
vendored
53
.github/workflows/xz.rb
vendored
|
@ -1,53 +0,0 @@
|
|||
# Upstream project has requested we use a mirror as the main URL
|
||||
# https://github.com/Homebrew/homebrew/pull/21419
|
||||
class Xz < Formula
|
||||
desc "General-purpose data compression with high compression ratio"
|
||||
homepage "https://tukaani.org/xz/"
|
||||
url "https://downloads.sourceforge.net/project/lzmautils/xz-5.2.5.tar.gz"
|
||||
mirror "https://tukaani.org/xz/xz-5.2.5.tar.gz"
|
||||
sha256 "f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10"
|
||||
license "GPL-2.0"
|
||||
|
||||
bottle do
|
||||
sha256 cellar: :any, arm64_big_sur: "c84206005787304416ed81094bd3a0cdd2ae8eb62649db5a3a44fa14b276d09f"
|
||||
sha256 cellar: :any, big_sur: "4fbd4a9e3eb49c27e83bd125b0e76d386c0e12ae1139d4dc9e31841fb8880a35"
|
||||
sha256 cellar: :any, catalina: "2dcc8e0121c934d1e34ffdb37fcd70f0f7b5c2f4755f2f7cbcf360e9e54cb43b"
|
||||
sha256 cellar: :any, mojave: "44483961b5d2b535b0ece1936c9d40b4bc7d9c7281646cca0fb476291ab9d4dc"
|
||||
sha256 cellar: :any, high_sierra: "1491b2b20c40c3cb0b990f520768d7e876e4ab4a7dc1da9994d0150da34ba5c6"
|
||||
end
|
||||
|
||||
def install
|
||||
ENV['CFLAGS'] = '-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15'
|
||||
ENV['CXXFLAGS'] = '-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15'
|
||||
ENV['CC'] = '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang'
|
||||
ENV['CXX'] = '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'
|
||||
ENV['LD'] = '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld'
|
||||
ENV['AR'] = '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar'
|
||||
system "./configure", "--disable-debug",
|
||||
"--disable-dependency-tracking",
|
||||
"--disable-silent-rules",
|
||||
"--prefix=#{prefix}",
|
||||
"CFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15",
|
||||
"CXXFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15",
|
||||
"CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang",
|
||||
"CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++",
|
||||
"LD=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld",
|
||||
"AR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar"
|
||||
system "gmake", "-j16", "check"
|
||||
system "gmake", "-j16", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
path = testpath/"data.txt"
|
||||
original_contents = "." * 1000
|
||||
path.write original_contents
|
||||
|
||||
# compress: data.txt -> data.txt.xz
|
||||
system bin/"xz", path
|
||||
refute_predicate path, :exist?
|
||||
|
||||
# decompress: data.txt.xz -> data.txt
|
||||
system bin/"xz", "-d", "#{path}.xz"
|
||||
assert_equal original_contents, path.read
|
||||
end
|
||||
end
|
40
.github/workflows/zstd.rb
vendored
40
.github/workflows/zstd.rb
vendored
|
@ -1,40 +0,0 @@
|
|||
class Zstd < Formula
|
||||
desc "Zstandard is a real-time compression algorithm"
|
||||
homepage "https://facebook.github.io/zstd/"
|
||||
url "https://github.com/facebook/zstd/archive/v1.4.8.tar.gz"
|
||||
sha256 "f176f0626cb797022fbf257c3c644d71c1c747bb74c32201f9203654da35e9fa"
|
||||
license "BSD-3-Clause"
|
||||
|
||||
bottle do
|
||||
sha256 cellar: :any, arm64_big_sur: "d3810a086fabf6504862103baf4026bac4c47fa185b748b319106c8bd0fd9e3c"
|
||||
sha256 cellar: :any, big_sur: "d015379ee322c5984c55803256ac876ed1389eca2c15767b251232a81f45b08b"
|
||||
sha256 cellar: :any, catalina: "ad897f36994db64c4ec410c1e9324b66dcf4f2175cf7d24c62ec647921b5dc7d"
|
||||
sha256 cellar: :any, mojave: "936b64748f097bf20c380f06ea3d8dc963e6051240d92935b36776546c406ade"
|
||||
end
|
||||
|
||||
depends_on "cmake" => :build
|
||||
|
||||
uses_from_macos "zlib"
|
||||
|
||||
def install
|
||||
ENV['CFLAGS'] = '-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15'
|
||||
ENV['CXXFLAGS'] = '-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.15'
|
||||
ENV['CC'] = '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang'
|
||||
ENV['CXX'] = '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'
|
||||
ENV['LD'] = '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld'
|
||||
ENV['AR'] = '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar'
|
||||
system "gmake", "-j16", "install", "PREFIX=#{prefix}/"
|
||||
|
||||
# Build parallel version
|
||||
system "gmake", "-j16", "-C", "contrib/pzstd", "PREFIX=#{prefix}"
|
||||
bin.install "contrib/pzstd/pzstd"
|
||||
end
|
||||
|
||||
test do
|
||||
assert_equal "hello\n",
|
||||
pipe_output("#{bin}/zstd | #{bin}/zstd -d", "hello\n", 0)
|
||||
|
||||
assert_equal "hello\n",
|
||||
pipe_output("#{bin}/pzstd | #{bin}/pzstd -d", "hello\n", 0)
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue