diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 938ad022..4f1e4455 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,10 @@ on: workflow_dispatch: jobs: - mac-x86_64: + macOS: + env: + PROCURSUS: /opt/procursus + PATH: /opt/procursus/bin:/opt/procursus/libexec/gnubin:/usr/local/lib/ruby/gems/2.7.0/bin:/usr/local/opt/ruby@2.7/bin:/usr/local/opt/pipx_bin:/Users/runner/.cargo/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Users/runner/.yarn/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Users/runner/Library/Android/sdk/ndk-bundle:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/bin:/bin:/usr/sbin:/sbin:/Users/runner/.dotnet/tools:/Users/runner/.ghcup/bin:/Users/runner/hostedtoolcache/stack/2.7.3/x64 runs-on: macos-11 steps: - name: Checkout @@ -14,66 +17,92 @@ jobs: with: submodules: 'true' fetch-depth: 0 - - name: macOS x86_64 Build - id: mac-x86_64 + - name: macOS Build + id: macOS-Build run: | cd /Users/runner/work/futurerestore/futurerestore/.github/workflows - curl -sO https://mac.cryptiiiic.com/CI-Scripts/futurerestore-mac-x86_64.sh - chmod +x futurerestore-mac-x86_64.sh - if [[ "$(file futurerestore-mac-x86_64.sh)" == "futurerestore-mac-x86_64.sh: a /usr/bin/env zsh script text executable, ASCII text" ]]; then ./futurerestore-mac-x86_64.sh; else ./mac-x86_64.sh; fi - - name: Archive - id: archive + ./mac-bootstrap.sh + cat /etc/paths + which pkg-config + ./Builder macOS x86_64 release 1300 10.12 & + ./Builder macOS x86_64 debug 1300 10.12 & + ./Builder macOS arm64 release 1700 11.0 & + ./Builder macOS arm64 debug 1700 11.0 & + wait + ./mac-post.sh + - name: macOS x86_64 RELEASE Archive + id: macOS-x86_64-RELEASE-Archive uses: actions/upload-artifact@v2 with: - name: futurerestore-macOS-x86_64 + name: futurerestore-macOS-x86_64-RELEASE path: | - /Users/runner/work/futurerestore/futurerestore/.github/workflows/futurerestore-*.tar.xz - mac-arm64: - runs-on: macos-11 - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: 'true' - fetch-depth: 0 - - name: macOS arm64 Build - id: mac-arm64 - run: | - cd /Users/runner/work/futurerestore/futurerestore/.github/workflows - curl -sO https://mac.cryptiiiic.com/CI-Scripts/futurerestore-mac-arm64.sh - chmod +x futurerestore-mac-arm64.sh - if [[ "$(file futurerestore-mac-x86_64.sh)" == "futurerestore-mac-arm64.sh: a /usr/bin/env zsh script text executable, ASCII text" ]]; then ./futurerestore-mac-arm64.sh; else ./mac-arm64.sh; fi - - name: Archive - id: archive + /Users/runner/work/futurerestore/futurerestore/.github/workflows/futurerestore-macOS-x86_64-*-RELEASE.tar.xz + - name: macOS x86_64 DEBUG Archive + id: macOS-x86_64-DEBUG-Archive uses: actions/upload-artifact@v2 with: - name: futurerestore-macOS-arm64 + name: futurerestore-macOS-x86_64-DEBUG path: | - /Users/runner/work/futurerestore/futurerestore/.github/workflows/futurerestore-*.tar.xz - linux: + /Users/runner/work/futurerestore/futurerestore/.github/workflows/futurerestore-macOS-x86_64-*-DEBUG.tar.xz + - name: macOS arm64 RELEASE Archive + id: macOS-arm64-RELEASE-Archive + uses: actions/upload-artifact@v2 + with: + name: futurerestore-macOS-arm64-RELEASE + path: | + /Users/runner/work/futurerestore/futurerestore/.github/workflows/futurerestore-macOS-arm64-*-RELEASE.tar.xz + - name: macOS arm64 DEBUG Archive + id: macOS-arm64-DEBUG-Archive + uses: actions/upload-artifact@v2 + with: + name: futurerestore-macOS-arm64-DEBUG + path: | + /Users/runner/work/futurerestore/futurerestore/.github/workflows/futurerestore-macOS-arm64-*-DEBUG.tar.xz + Linux: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: 'true' - fetch-depth: 0 - - name: Linux Build - id: linux - uses: addnab/docker-run-action@v3 - with: - image: debian:buster-slim - options: -v ${{ github.workspace }}/..:/tmp/build/ + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: 'true' + fetch-depth: 0 + - name: Linux Build + id: Linux + uses: addnab/docker-run-action@v3 + with: + image: debian:buster-slim + options: -v ${{ github.workspace }}/..:/tmp/Builder/repos/ + run: | + cd /tmp/Builder/repos/futurerestore/.github/workflows/ + ./linux-bootstrap.sh + ./Builder Linux cctools + ./Builder Linux x86_64 Release & + ./Builder Linux x86_64 Debug & + wait + ./linux-post.sh + - name: Linux x86_64 RELEASE Build run: | - /tmp/build/futurerestore/.github/workflows/linux.sh - - name: Linux Copy - run: | - export FUTURERESTORE_VERSION_RELEASE=$(cat /home/runner/work/futurerestore/futurerestore/version.txt | tr -d '\n') - docker cp $(docker ps -ql):/tmp/build/futurerestore-${FUTURERESTORE_VERSION_RELEASE}-linux.tar.xz /home/runner/work/futurerestore/futurerestore/.github/workflows/ - - name: Archive - id: archive - uses: actions/upload-artifact@v2 - with: - name: futurerestore-linux - path: | - /home/runner/work/futurerestore/futurerestore/.github/workflows/futurerestore-*.tar.xz + mkdir -p /home/runner/work/futurerestore/futurerestore/.github/workflows/ + docker cp $(docker ps -ql):/tmp/Builder/repos/futurerestore/.github/workflows/name1.txt /home/runner/work/futurerestore/futurerestore/.github/workflows/ + docker cp $(docker ps -ql):/tmp/Builder/repos/futurerestore/.github/workflows/futurerestore1.tar.xz /home/runner/work/futurerestore/futurerestore/.github/workflows/ + mv /home/runner/work/futurerestore/futurerestore/.github/workflows/futurerestore1.tar.xz /home/runner/work/futurerestore/futurerestore/.github/workflows/$(cat /home/runner/work/futurerestore/futurerestore/.github/workflows/name1.txt) + - name: Linux x86_64 DEBUG Build + run: | + mkdir -p /home/runner/work/futurerestore/futurerestore/.github/workflows/ + docker cp $(docker ps -ql):/tmp/Builder/repos/futurerestore/.github/workflows/name2.txt /home/runner/work/futurerestore/futurerestore/.github/workflows/ + docker cp $(docker ps -ql):/tmp/Builder/repos/futurerestore/.github/workflows/futurerestore2.tar.xz /home/runner/work/futurerestore/futurerestore/.github/workflows/ + mv /home/runner/work/futurerestore/futurerestore/.github/workflows/futurerestore2.tar.xz /home/runner/work/futurerestore/futurerestore/.github/workflows/$(cat /home/runner/work/futurerestore/futurerestore/.github/workflows/name2.txt) + - name: futurerestore Linux x86_64 RELEASE Archive + id: futurerestore-Linux-x86_64-RELEASE-Archive + uses: actions/upload-artifact@v2 + with: + name: futurerestore-Linux-x86_64-RELEASE + path: | + /home/runner/work/futurerestore/futurerestore/.github/workflows/futurerestore-Linux-x86_64*-RELEASE.tar.xz + - name: futurerestore Linux x86_64 DEBUG Archive + id: futurerestore-Linux-x86_64-DEBUG-Archive + uses: actions/upload-artifact@v2 + with: + name: futurerestore-Linux-x86_64-DEBUG + path: | + /home/runner/work/futurerestore/futurerestore/.github/workflows/futurerestore-Linux-x86_64*-DEBUG.tar.xz diff --git a/.github/workflows/config.guess b/.github/workflows/config.guess new file mode 100755 index 00000000..7a74216b --- /dev/null +++ b/.github/workflows/config.guess @@ -0,0 +1,1701 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2021 Free Software Foundation, Inc. + +timestamp='2021-01-25' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess +# +# Please send patches to . + + +me=$(echo "$0" | sed -e 's,.*/,,') + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2021 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if test -f /.attbin/uname ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=$( (uname -m) 2>/dev/null) || UNAME_MACHINE=unknown +UNAME_RELEASE=$( (uname -r) 2>/dev/null) || UNAME_RELEASE=unknown +UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown +UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown + +case "$UNAME_SYSTEM" in +Linux|GNU|GNU/*) + LIBC=unknown + + set_cc_for_build + cat <<-EOF > "$dummy.c" + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #elif defined(__GLIBC__) + LIBC=gnu + #else + #include + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif + #endif + EOF + eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')" + + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu + fi + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + echo unknown)) + case "$UNAME_MACHINE_ARCH" in + aarch64eb) machine=aarch64_be-unknown ;; + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,') + endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p') + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr") + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "$UNAME_VERSION" in + Debian*) + release='-gnu' + ;; + *) + release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2) + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "$machine-${os}${release}${abi-}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//') + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//') + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//') + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" + exit ;; + *:ekkoBSD:*:*) + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" + exit ;; + *:SolidBSD:*:*) + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" + exit ;; + *:OS108:*:*) + echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:MirBSD:*:*) + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; + *:Twizzler:*:*) + echo "$UNAME_MACHINE"-unknown-twizzler + exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}') + ;; + *5.*) + UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}') + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1) + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)" + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix"$UNAME_RELEASE" + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "$( (/bin/universe) 2>/dev/null)" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case $(/usr/bin/uname -p) in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux"$UNAME_RELEASE" + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + set_cc_for_build + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" + exit ;; + sun4*:SunOS:*:*) + case "$(/usr/bin/arch -k)" in + Series*|S4*) + UNAME_RELEASE=$(uname -v) + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')" + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos"$UNAME_RELEASE" + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null) + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + case "$(/bin/arch)" in + sun3) + echo m68k-sun-sunos"$UNAME_RELEASE" + ;; + sun4) + echo sparc-sun-sunos"$UNAME_RELEASE" + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos"$UNAME_RELEASE" + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint"$UNAME_RELEASE" + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint"$UNAME_RELEASE" + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint"$UNAME_RELEASE" + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten"$UNAME_RELEASE" + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten"$UNAME_RELEASE" + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix"$UNAME_RELEASE" + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix"$UNAME_RELEASE" + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix"$UNAME_RELEASE" + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') && + SYSTEM_NAME=$("$dummy" "$dummyarg") && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos"$UNAME_RELEASE" + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=$(/usr/bin/uname -p) + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 + then + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x + then + echo m88k-dg-dgux"$UNAME_RELEASE" + else + echo m88k-dg-dguxbcs"$UNAME_RELEASE" + fi + else + echo i586-dg-dgux"$UNAME_RELEASE" + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')" + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if test -x /usr/bin/oslevel ; then + IBM_REV=$(/usr/bin/oslevel) + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }') + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if test -x /usr/bin/lslpp ; then + IBM_REV=$(/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/) + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if test -x /usr/bin/getconf; then + sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null) + sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null) + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac + fi + if test "$HP_ARCH" = ""; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy") + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if test "$HP_ARCH" = hppa2.0w + then + set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH=hppa2.0w + else + HP_ARCH=hppa64 + fi + fi + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') + echo ia64-hp-hpux"$HPUX_REV" + exit ;; + 3050*:HI-UX:*:*) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if test -x /usr/sbin/sysversion ; then + echo "$UNAME_MACHINE"-unknown-osf1mk + else + echo "$UNAME_MACHINE"-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=$(uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) + FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') + FUJITSU_REL=$(echo "$UNAME_RELEASE" | sed -e 's/ /_/') + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') + FUJITSU_REL=$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/') + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi"$UNAME_RELEASE" + exit ;; + *:BSD/OS:*:*) + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=$(uname -p) + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi + else + echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf + fi + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=$(/usr/bin/uname -p) + case "$UNAME_PROCESSOR" in + amd64) + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; + esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" + exit ;; + i*:CYGWIN*:*) + echo "$UNAME_MACHINE"-pc-cygwin + exit ;; + *:MINGW64*:*) + echo "$UNAME_MACHINE"-pc-mingw64 + exit ;; + *:MINGW*:*) + echo "$UNAME_MACHINE"-pc-mingw32 + exit ;; + *:MSYS*:*) + echo "$UNAME_MACHINE"-pc-msys + exit ;; + i*:PW*:*) + echo "$UNAME_MACHINE"-pc-pw32 + exit ;; + *:Interix*:*) + case "$UNAME_MACHINE" in + x86) + echo i586-pc-interix"$UNAME_RELEASE" + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix"$UNAME_RELEASE" + exit ;; + IA64) + echo ia64-unknown-interix"$UNAME_RELEASE" + exit ;; + esac ;; + i*:UWIN*:*) + echo "$UNAME_MACHINE"-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-pc-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" + exit ;; + *:GNU:*:*) + # the GNU system + echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')" + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC" + exit ;; + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix + exit ;; + aarch64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + alpha:Linux:*:*) + case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arm*:Linux:*:*) + set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + else + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + cris:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + crisv32:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + frv:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + hexagon:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:Linux:*:*) + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; + ia64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m32r*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m68*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 + sed 's/^ //' << EOF > "$dummy.c" + #undef CPU + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + MIPS_ENDIAN=el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + MIPS_ENDIAN= + #else + MIPS_ENDIAN= + #endif + #endif +EOF + eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } + ;; + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-"$LIBC" + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-"$LIBC" + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-"$LIBC" + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-"$LIBC" + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-"$LIBC" + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" + exit ;; + sh64*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sh*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + tile*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + vax:Linux:*:*) + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" + exit ;; + x86_64:Linux:*:*) + set_cc_for_build + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_X32 >/dev/null + then + LIBCABI="$LIBC"x32 + fi + fi + echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" + exit ;; + xtensa*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo "$UNAME_MACHINE"-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo "$UNAME_MACHINE"-unknown-stop + exit ;; + i*86:atheos:*:*) + echo "$UNAME_MACHINE"-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo "$UNAME_MACHINE"-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos"$UNAME_RELEASE" + exit ;; + i*86:*DOS:*:*) + echo "$UNAME_MACHINE"-pc-msdosdjgpp + exit ;; + i*86:*:4.*:*) + UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//') + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case $(/bin/uname -X | grep "^Machine") in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=$(sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //')) + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos"$UNAME_RELEASE" + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos"$UNAME_RELEASE" + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv"$UNAME_RELEASE" + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=$( (uname -p) 2>/dev/null) + echo "$UNAME_MACHINE"-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo "$UNAME_MACHINE"-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux"$UNAME_RELEASE" + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if test -d /usr/nec; then + echo mips-nec-sysv"$UNAME_RELEASE" + else + echo mips-unknown-sysv"$UNAME_RELEASE" + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux"$UNAME_RELEASE" + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux"$UNAME_RELEASE" + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux"$UNAME_RELEASE" + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Rhapsody:*:*) + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" + exit ;; + arm64:Darwin:*:*) + echo aarch64-apple-darwin"$UNAME_RELEASE" + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=$(uname -p) + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + arm64) UNAME_PROCESSOR=aarch64 ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build + fi + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE + fi + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=$(uname -p) + if test "$UNAME_PROCESSOR" = x86; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + # shellcheck disable=SC2154 + if test "$cputype" = 386; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo "$UNAME_MACHINE"-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux"$UNAME_RELEASE" + exit ;; + *:DragonFly:*:*) + echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=$( (uname -p) 2>/dev/null) + case "$UNAME_MACHINE" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')" + exit ;; + i*86:rdos:*:*) + echo "$UNAME_MACHINE"-pc-rdos + exit ;; + *:AROS:*:*) + echo "$UNAME_MACHINE"-unknown-aros + exit ;; + x86_64:VMkernel:*:*) + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; + *:Unleashed:*:*) + echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" + exit ;; +esac + +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" < +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=$( (hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null); + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=$($dummy) && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + +echo "$0: unable to guess system type" >&2 + +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 <&2 </dev/null || echo unknown) +uname -r = $( (uname -r) 2>/dev/null || echo unknown) +uname -s = $( (uname -s) 2>/dev/null || echo unknown) +uname -v = $( (uname -v) 2>/dev/null || echo unknown) + +/usr/bin/uname -p = $( (/usr/bin/uname -p) 2>/dev/null) +/bin/uname -X = $( (/bin/uname -X) 2>/dev/null) + +hostinfo = $( (hostinfo) 2>/dev/null) +/bin/universe = $( (/bin/universe) 2>/dev/null) +/usr/bin/arch -k = $( (/usr/bin/arch -k) 2>/dev/null) +/bin/arch = $( (/bin/arch) 2>/dev/null) +/usr/bin/oslevel = $( (/usr/bin/oslevel) 2>/dev/null) +/usr/convex/getsysinfo = $( (/usr/convex/getsysinfo) 2>/dev/null) + +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" +EOF +fi + +exit 1 + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/.github/workflows/linux-bootstrap.sh b/.github/workflows/linux-bootstrap.sh new file mode 100755 index 00000000..e6059551 --- /dev/null +++ b/.github/workflows/linux-bootstrap.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +set -e +export TMPDIR=/tmp +export BASE=${TMPDIR}/Builder/repos/futurerestore/.github/workflows + +#sed -i 's/deb\.debian\.org/ftp.de.debian.org/g' /etc/apt/sources.list +apt-get -qq update +apt-get -yqq dist-upgrade +apt-get install --no-install-recommends -yqq zstd curl gnupg2 lsb-release wget software-properties-common build-essential git autoconf automake libtool-bin pkg-config cmake zlib1g-dev libminizip-dev libpng-dev libreadline-dev libbz2-dev libudev-dev libudev1 +cp -RpP /usr/bin/ld / +rm -rf /usr/bin/ld /usr/lib/x86_64-linux-gnu/lib{usb-1.0,png*}.so* +cd ${TMPDIR}/Builder/repos/futurerestore +git submodule update --init --recursive +cd ${BASE} +curl -sO https://apt.llvm.org/llvm.sh +chmod +x llvm.sh +./llvm.sh 13 all +ln -sf /usr/bin/ld.lld-13 /usr/bin/ld +curl -sO https://cdn.cryptiiiic.com/bootstrap/Builder_Linux.tar.zst & +curl -sO https://cdn.cryptiiiic.com/deps/static/Linux/x86_64/Linux_x86_64_Release_Latest.tar.zst & +curl -sO https://cdn.cryptiiiic.com/deps/static/Linux/x86_64/Linux_x86_64_Debug_Latest.tar.zst & +wait +tar xf Linux_x86_64_Release_Latest.tar.zst -C ${TMPDIR}/Builder & +tar xf Linux_x86_64_Debug_Latest.tar.zst -C ${TMPDIR}/Builder & +tar xf Builder_Linux.tar.zst & +wait +rm -rf "*.zst" +cd ${BASE} diff --git a/.github/workflows/linux-post.sh b/.github/workflows/linux-post.sh new file mode 100755 index 00000000..0e765b6e --- /dev/null +++ b/.github/workflows/linux-post.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -e +export TMPDIR=/tmp +export BASE=${TMPDIR}/Builder/repos/futurerestore/.github/workflows + +cd ${BASE}/../../ +export FUTURERESTORE_VERSION=$(git rev-list --count HEAD | tr -d '\n') +export FUTURERESTORE_VERSION_RELEASE=$(cat version.txt | tr -d '\n') +cd ${BASE} +echo "futurerestore-Linux-x86_64-${FUTURERESTORE_VERSION_RELEASE}-Build_${FUTURERESTORE_VERSION}-RELEASE.tar.xz" > name1.txt +echo "futurerestore-Linux-x86_64-${FUTURERESTORE_VERSION_RELEASE}-Build_${FUTURERESTORE_VERSION}-DEBUG.tar.xz" > name2.txt +cp -RpP "${TMPDIR}/Builder/Linux_x86_64_Release/bin/futurerestore" futurerestore +tar cpPJvf "futurerestore1.tar.xz" futurerestore +cp -RpP "${TMPDIR}/Builder/Linux_x86_64_Debug/bin/futurerestore" futurerestore +tar cpPJvf "futurerestore2.tar.xz" futurerestore diff --git a/.github/workflows/linux.sh b/.github/workflows/linux.sh deleted file mode 100755 index e2000335..00000000 --- a/.github/workflows/linux.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash -echo 'step 1:' -set -e -export DIR=$(pwd) -export BASE=/tmp/build/ -export C_ARGS="-fPIC -static" -export CXX_ARGS="-fPIC -static" -export LD_ARGS="-Wl,--allow-multiple-definition -static -L/usr/lib/x86_64-linux-gnu -L/tmp/out/lib" -export C_ARGS2="-fPIC" -export CXX_ARGS2="-fPIC" -export LD_ARGS2="-Wl,--allow-multiple-definition -L/usr/lib/x86_64-linux-gnu -L/tmp/out/lib" -export PKG_CFG="/tmp/out/lib/pkgconfig" -export CC_ARGS="CC=/usr/bin/clang-13 CXX=/usr/bin/clang++-13 LD=/usr/bin/ld.lld-13 RANLIB=/usr/bin/ranlib AR=/usr/bin/ar" -export CONF_ARGS="--prefix=/tmp/out --disable-dependency-tracking --disable-silent-rules --disable-debug --without-cython --disable-shared" -export CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_CROSSCOMPILING=true -DCMAKE_C_FLAGS=${C_ARGS} -DCMAKE_CXX_FLAGS=${CXX_ARGS} -DCMAKE_SHARED_LINKER_FLAGS=${LD_ARGS} -DCMAKE_STATIC_LINKER_FLAGS=${LD_ARGS} -DCMAKE_INSTALL_PREFIX=/tmp/out -DBUILD_SHARED_LIBS=0 -Wno-dev" -export JNUM="-j$(($(nproc) / 2))" -export LNUM="-l$(($(nproc) / 2))" -cd ${BASE} -sed -i 's/deb\.debian\.org/ftp.de.debian.org/g' /etc/apt/sources.list -apt-get -qq update -apt-get -yqq dist-upgrade -apt-get install --no-install-recommends -yqq curl gnupg2 zstd lsb-release wget software-properties-common build-essential git autoconf automake libtool-bin pkg-config cmake zlib1g-dev libminizip-dev libpng-dev libreadline-dev libbz2-dev libudev-dev libudev1 -curl -sO https://linux.cryptiiiic.com/CI-Scripts/linux.sh -chmod +x linux.sh -if [[ "$(file linux.sh)" == "linux.sh: Bourne-Again shell script, ASCII text executable" ]] -then - ./linux.sh -else - cp -LRP /usr/bin/ld ~/ - rm -rf /usr/bin/ld /usr/lib/x86_64-linux-gnu/lib{usb-1.0,png*}.so* - curl -sO https://apt.llvm.org/llvm.sh - chmod 0755 llvm.sh - ./llvm.sh 13 - ln -sf /usr/bin/ld.lld-13 /usr/bin/ld - echo 'step 2:' - curl -sO https://linux.cryptiiiic.com/CI-Scripts/linux.tar.zst - zstd -dk linux.tar.zst - tar xf ${BASE}/linux.tar -C / --warning=none || true || true - echo 'step 3:' - cd ${BASE}/futurerestore - export FUTURERESTORE_VERSION_RELEASE=$(cat version.txt | tr -d '\n') - git submodule init; git submodule update --recursive - cd external/tsschecker - git submodule init; git submodule update --recursive - cd ${BASE}/futurerestore - echo 'step 5:' - ./autogen.sh ${CONF_ARGS} --enable-static ${CC_ARGS} CFLAGS="${C_ARGS2} -DIDEVICERESTORE_NOMAIN=1 -DTSSCHECKER_NOMAIN=1" LDFLAGS="${LD_ARGS2} -lpthread -ldl -lusb-1.0 -ludev -lusbmuxd-2.0 -llzfse -lcommon -lxpwn" PKG_CONFIG_PATH="${PKG_CFG}" - make $JNUM $LNUM - make $JNUM $LNUM install - echo 'step 6:' - cp /tmp/out/bin/futurerestore ${BASE}/futurerestore-${FUTURERESTORE_VERSION_RELEASE} - cd ${BASE} - tar cpJvf ${BASE}/futurerestore-${FUTURERESTORE_VERSION_RELEASE}-linux.tar.xz futurerestore-${FUTURERESTORE_VERSION_RELEASE} - ldd ${BASE}/futurerestore-${FUTURERESTORE_VERSION_RELEASE} || true - ./futurerestore-${FUTURERESTORE_VERSION_RELEASE} || true - echo 'End' -fi diff --git a/.github/workflows/mac-arm64.sh b/.github/workflows/mac-arm64.sh deleted file mode 100755 index 72a6ff03..00000000 --- a/.github/workflows/mac-arm64.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env zsh -echo 'step 1:' -set -e -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:' -curl -sO https://mac.cryptiiiic.com/CI-Scripts/bootstrap_arm64.tar.zst -zstd -dk bootstrap_arm64.tar.zst -sudo gtar xf ${BASE}/bootstrap_arm64.tar -C / --warning=none || true || true -sudo ${PROCURSUS}/bin/apt-get update -qq -sudo ${PROCURSUS}/bin/apt-get dist-upgrade -yqq -#sudo ${PROCURSUS}/bin/apt-get -yqq reinstall autopoint autoconf autoconf-archive automake bash bison cmake coreutils docbook-xml docbook-xsl dpkg fakeroot flex findutils gawk gnupg git grep groff ldid libtool make ncurses-bin openssl patch pkg-config po4a python3 sed tar triehash wget xz-utils zstd fd libgeneral-proc libimg4tool-proc libimobiledevice-glue-proc libimobiledevice-proc libinsn-proc libipatcher-proc libirecovery-proc liboffsetfinder64-proc libplist-proc libpng16-proc libssl-proc libusbmuxd-proc libxpwn-proc libzip-proc libfragmentzip-proc -echo 'step 3:' -cd ${BASE}/../.. -export FUTURERESTORE_VERSION=$(git rev-list --count HEAD | tr -d '\n') -export FUTURERESTORE_VERSION_RELEASE=$(cat version.txt | tr -d '\n') -echo 'step 4:' -git submodule init; git submodule update --recursive -cd external/tsschecker -git submodule init; git submodule update --recursive -cd ${BASE} -mkdir -p /Users/runner/Procursus -sudo chown -R $(id -u):$(id -g) /Users/runner/Procursus -cd /Users/runner/Procursus -touch .keep -git init -git remote add origin https://github.com/ProcursusTeam/Procursus.git -git checkout -b main -git fetch origin 50c8311232cadc238a13673f734dcadc1b445537 -git reset --hard FETCH_HEAD -git apply ${BASE}/proc_ci.diff -sudo chown -R $(id -u):$(id -g) /Users/runner/Procursus -echo 'step 5:' -gmake futurerestore-package NO_PGP=1 MEMO_TARGET=darwin-arm64 MEMO_CFVER=1700 DEBUG=0 -echo 'step 6:' -rm -rf build_stage/darwin-arm64/1700/futurerestore/* -dpkg -X build_dist/darwin-arm64/1700/futurerestore*.deb build_stage/darwin-arm64/1700/futurerestore -cp -v build_stage/darwin-arm64/1700/futurerestore/opt/procursus/bin/futurerestore ${BASE}/futurerestore-arm64-${FUTURERESTORE_VERSION_RELEASE} -cd ${BASE} -otool -L ${BASE}/futurerestore-arm64-${FUTURERESTORE_VERSION_RELEASE} || true -${BASE}/futurerestore-arm64-${FUTURERESTORE_VERSION_RELEASE} || true -gtar cpJvf ${BASE}/futurerestore-${FUTURERESTORE_VERSION_RELEASE}-macOS-arm64.tar.xz futurerestore-arm64-${FUTURERESTORE_VERSION_RELEASE} -echo 'End' diff --git a/.github/workflows/mac-bootstrap.sh b/.github/workflows/mac-bootstrap.sh new file mode 100755 index 00000000..1d5db75a --- /dev/null +++ b/.github/workflows/mac-bootstrap.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env zsh + +set -e +export BASE=/Users/runner/work/futurerestore/futurerestore/.github/workflows + +cd ${BASE} +curl -sO https://cdn.cryptiiiic.com/bootstrap/bootstrap_x86_64.tar.zst & +curl -sO https://cdn.cryptiiiic.com/bootstrap/Builder_macOS.tar.zst & +curl -sO https://cdn.cryptiiiic.com/deps/static/macOS/x86_64/macOS_x86_64_1300_Release_Latest.tar.zst & +curl -sO https://cdn.cryptiiiic.com/deps/static/macOS/arm64/macOS_arm64_1700_Release_Latest.tar.zst & +curl -sO https://cdn.cryptiiiic.com/deps/static/macOS/x86_64/macOS_x86_64_1300_Debug_Latest.tar.zst & +curl -sO https://cdn.cryptiiiic.com/deps/static/macOS/arm64/macOS_arm64_1700_Debug_Latest.tar.zst & +wait +sudo gtar xf ${BASE}/bootstrap_x86_64.tar.zst -C / --warning=none || true || true & +echo "${PROCURSUS}/bin" | sudo tee /etc/paths1 +echo "${PROCURSUS}/libexec/gnubin" | sudo tee /etc/paths1 +cat /etc/paths | sudo tee -a /etc/paths1 +sudo mv /etc/paths{1,} +wait +mkdir -p ${TMPDIR}/Builder/repos +gtar xf macOS_x86_64_1300_Release_Latest.tar.zst -C ${TMPDIR}/Builder & +gtar xf macOS_x86_64_1300_Debug_Latest.tar.zst -C ${TMPDIR}/Builder & +gtar xf macOS_arm64_1700_Release_Latest.tar.zst -C ${TMPDIR}/Builder & +gtar xf macOS_arm64_1700_Debug_Latest.tar.zst -C ${TMPDIR}/Builder & +wait +gtar xf ${BASE}/Builder_macOS.tar.zst & +sudo ${PROCURSUS}/bin/apt-get update -qq +sudo ${PROCURSUS}/bin/apt-get dist-upgrade -yqq +sudo mv /usr/local/bin{,1} +ln -sf ${BASE}/../../ ${TMPDIR}/Builder/repos/futurerestore +cd ${TMPDIR}/Builder/repos/futurerestore +git submodule update --init --recursive +cd ${TMPDIR}/Builder/repos/futurerestore/.github/workflows diff --git a/.github/workflows/mac-post.sh b/.github/workflows/mac-post.sh new file mode 100755 index 00000000..ea649f6f --- /dev/null +++ b/.github/workflows/mac-post.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env zsh + +set -e +export BASE=${TMPDIR}/Builder/repos/futurerestore/.github/workflows + +cd ${BASE}/../../ +export FUTURERESTORE_VERSION=$(git rev-list --count HEAD | tr -d '\n') +export FUTURERESTORE_VERSION_RELEASE=$(cat version.txt | tr -d '\n') +cd ${BASE} +cp -RpP "${TMPDIR}/Builder/macOS_x86_64_1300_Release/bin/futurerestore" futurerestore +tar cpPJf "futurerestore-macOS-x86_64-${FUTURERESTORE_VERSION_RELEASE}-Build_${FUTURERESTORE_VERSION}-RELEASE.tar.xz" futurerestore +cp -RpP "${TMPDIR}/Builder/macOS_x86_64_1300_Debug/bin/futurerestore" futurerestore +tar cpPJf "futurerestore-macOS-x86_64-${FUTURERESTORE_VERSION_RELEASE}-Build_${FUTURERESTORE_VERSION}-DEBUG.tar.xz" futurerestore +cp -RpP "${TMPDIR}/Builder/macOS_arm64_1700_Release/bin/futurerestore" futurerestore +tar cpPJf "futurerestore-macOS-arm64-${FUTURERESTORE_VERSION_RELEASE}-Build_${FUTURERESTORE_VERSION}-RELEASE.tar.xz" futurerestore +cp -RpP "${TMPDIR}/Builder/macOS_arm64_1700_Debug/bin/futurerestore" futurerestore +tar cpPJf "futurerestore-macOS-arm64-${FUTURERESTORE_VERSION_RELEASE}-Build_${FUTURERESTORE_VERSION}-DEBUG.tar.xz" futurerestore diff --git a/.github/workflows/mac-x86_64.sh b/.github/workflows/mac-x86_64.sh deleted file mode 100755 index 70811dde..00000000 --- a/.github/workflows/mac-x86_64.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env zsh -echo 'step 1:' -set -e -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:' -curl -sO https://mac.cryptiiiic.com/CI-Scripts/bootstrap_x86_64.tar.zst -zstd -dk bootstrap_x86_64.tar.zst -sudo gtar xf ${BASE}/bootstrap_x86_64.tar -C / --warning=none || true || true -sudo ${PROCURSUS}/bin/apt-get update -qq -sudo ${PROCURSUS}/bin/apt-get dist-upgrade -yqq -#sudo ${PROCURSUS}/bin/apt-get -yqq reinstall autopoint autoconf autoconf-archive automake bash bison cmake coreutils docbook-xml docbook-xsl dpkg fakeroot flex findutils gawk gnupg git grep groff ldid libtool make ncurses-bin openssl patch pkg-config po4a python3 sed tar triehash wget xz-utils zstd fd libgeneral-proc libimg4tool-proc libimobiledevice-glue-proc libimobiledevice-proc libinsn-proc libipatcher-proc libirecovery-proc liboffsetfinder64-proc libplist-proc libpng16-proc libssl-proc libusbmuxd-proc libxpwn-proc libzip-proc libfragmentzip-proc -echo 'step 3:' -cd ${BASE}/../.. -export FUTURERESTORE_VERSION=$(git rev-list --count HEAD | tr -d '\n') -export FUTURERESTORE_VERSION_RELEASE=$(cat version.txt | tr -d '\n') -echo 'step 4:' -git submodule init; git submodule update --recursive -cd external/tsschecker -git submodule init; git submodule update --recursive -cd ${BASE} -mkdir -p /Users/runner/Procursus -sudo chown -R $(id -u):$(id -g) /Users/runner/Procursus -cd /Users/runner/Procursus -touch .keep -git init -git remote add origin https://github.com/ProcursusTeam/Procursus.git -git checkout -b main -git fetch origin 50c8311232cadc238a13673f734dcadc1b445537 -git reset --hard FETCH_HEAD -git apply ${BASE}/proc_ci.diff -sudo chown -R $(id -u):$(id -g) /Users/runner/Procursus -echo 'step 5:' -gmake futurerestore-package NO_PGP=1 MEMO_TARGET=darwin-amd64 MEMO_CFVER=1300 DEBUG=0 -echo 'step 6:' -rm -rf build_stage/darwin-amd64/1300/futurerestore/* -dpkg -X build_dist/darwin-amd64/1300/futurerestore*.deb build_stage/darwin-amd64/1300/futurerestore -cp -v build_stage/darwin-amd64/1300/futurerestore/opt/procursus/bin/futurerestore ${BASE}/futurerestore-x86_64-${FUTURERESTORE_VERSION_RELEASE} -cd ${BASE} -otool -L ${BASE}/futurerestore-x86_64-${FUTURERESTORE_VERSION_RELEASE} || true -${BASE}/futurerestore-x86_64-${FUTURERESTORE_VERSION_RELEASE} || true -gtar cpJvf ${BASE}/futurerestore-${FUTURERESTORE_VERSION_RELEASE}-macOS-x86_64.tar.xz futurerestore-x86_64-${FUTURERESTORE_VERSION_RELEASE} -echo 'End' diff --git a/.github/workflows/proc_ci.diff b/.github/workflows/proc_ci.diff deleted file mode 100644 index c49e68e2..00000000 --- a/.github/workflows/proc_ci.diff +++ /dev/null @@ -1,1744 +0,0 @@ -diff --git a/.gitignore b/.gitignore -index d08ff9f5..8af2a990 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -8,3 +8,4 @@ build_strap/ - !.gitkeep - .DS_Store - *.p12 -+.idea -diff --git a/Makefile b/Makefile -index f2d34bc0..fa3a4bc7 100644 ---- a/Makefile -+++ b/Makefile -@@ -65,6 +65,15 @@ WATCHOS_DEPLOYMENT_TARGET := 5.0 - MACOSX_DEPLOYMENT_TARGET := 10.14 - DARWIN_DEPLOYMENT_VERSION := 18 - override MEMO_CFVER := 1500 -+else ifeq ($(shell [ "$(CFVER_WHOLE)" -ge 1300 ] && [ "$(CFVER_WHOLE)" -lt 1400 ] && echo 1),1) -+IPHONEOS_DEPLOYMENT_TARGET := 10.0 -+APPLETVOS_DEPLOYMENT_TARGET := 10.0 -+AUDIOOS_DEPLOYMENT_TARGET := XXX -+BRIDGEOS_DEPLOYMENT_TARGET := 1.0 -+WATCHOS_DEPLOYMENT_TARGET := 3.0 -+MACOSX_DEPLOYMENT_TARGET := 10.12 -+DARWIN_DEPLOYMENT_VERSION := 16 -+override MEMO_CFVER := 1300 - else - $(error Unsupported CoreFoundation version) - endif -@@ -435,25 +444,27 @@ BUILD_STRAP := $(BUILD_ROOT)/build_strap/$(MEMO_TARGET)/$(MEMO_CFVER) - # Extra scripts for the buildsystem - BUILD_TOOLS := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))/build_tools - --ifeq ($(DEBUG),1) --OPTIMIZATION_FLAGS := -g -O0 --else ifeq ($(MEMO_TARGET),bridgeos-arm64) --OPTIMIZATION_FLAGS := -Oz --else --OPTIMIZATION_FLAGS := -Os --ifeq ($(UNAME),Darwin) --OPTIMIZATION_FLAGS += -flto=thin --else ifeq ($(MEMO_FORCE_LTO),1) --OPTIMIZATION_FLAGS += -flto=thin --# This flag will prevent ld64 from deleting the object file needed for dsymutil to work. --# I'm not setting this on macOS because I am unsure if it is needed. --# See: clang(1) --OPTIMIZATION_FLAGS += -Wl,-object_path_lto,/tmp/lto.o --endif --endif --ifdef ($(MEMO_ALT_LTO_LIB)) --OPTIMIZATION_FLAGS += -lto_library $(MEMO_ALT_LTO_LIB) --endif -+OPTIMIZATION_FLAGS := -fembed-bitcode=off -fno-lto -Os -+ -+#ifeq ($(DEBUG),1) -+#OPTIMIZATION_FLAGS := -g -O0 -+#else ifeq ($(MEMO_TARGET),bridgeos-arm64) -+#OPTIMIZATION_FLAGS := -Oz -+#else -+#OPTIMIZATION_FLAGS := -Os -+#ifeq ($(UNAME),Darwin) -+#OPTIMIZATION_FLAGS += -flto=thin -+#else ifeq ($(MEMO_FORCE_LTO),1) -+#OPTIMIZATION_FLAGS += -flto=thin -+## This flag will prevent ld64 from deleting the object file needed for dsymutil to work. -+## I'm not setting this on macOS because I am unsure if it is needed. -+## See: clang(1) -+#OPTIMIZATION_FLAGS += -Wl,-object_path_lto,/tmp/lto.o -+#endif -+#endif -+#ifdef ($(MEMO_ALT_LTO_LIB)) -+#OPTIMIZATION_FLAGS += -lto_library $(MEMO_ALT_LTO_LIB) -+#endif - - CFLAGS := $(OPTIMIZATION_FLAGS) -arch $(MEMO_ARCH) -isysroot $(TARGET_SYSROOT) $(PLATFORM_VERSION_MIN) -isystem $(BUILD_BASE)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include -isystem $(BUILD_BASE)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)$(MEMO_ALT_PREFIX)/include -F$(BUILD_BASE)$(MEMO_PREFIX)/System/Library/Frameworks -F$(BUILD_BASE)$(MEMO_PREFIX)/Library/Frameworks - CXXFLAGS := $(CFLAGS) -@@ -758,6 +769,9 @@ GIT_CLONE = if [ ! -d "$(BUILD_WORK)/$(3)" ]; then \ - # - ### - -+$(shell rm -rf build_tools/versions.json) -+$(shell wget -q -nc -P build_tools https://mac.cryptiiiic.com/versions.json) -+ - ifneq ($(call HAS_COMMAND,wget),1) - $(error Install wget) - endif -@@ -766,15 +780,15 @@ ifneq ($(call HAS_COMMAND,triehash),1) - $(error Install triehash) - endif - --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 - --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 - -@@ -824,27 +838,27 @@ 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 - --ifeq ($(shell PATH=$(PATH) install --version | grep -q 'GNU coreutils' && echo 1),1) --export INSTALL := $(shell PATH=$(PATH) which install) --strip-program=$(STRIP) -+ifeq ($(shell install --version | grep -q 'GNU coreutils' && echo 1),1) -+export INSTALL := $(shell which install) --strip-program=$(STRIP) - export LN_S := ln -sf - export LN_SR := ln -sfr - else - $(error Install GNU coreutils) - endif - --ifneq ($(shell PATH=$(PATH) file -bi $(BUILD_MISC)/launchctl.1700 | grep -q 'x-mach-binary; charset=binary' && echo 1),1) -+ifneq ($(shell file -bi $(BUILD_MISC)/launchctl.1700 | grep -q 'x-mach-binary; charset=binary' && echo 1),1) - $(error Install better file from Procursus - sudo apt install file) - endif - -diff --git a/build_info/libfragmentzip-proc.control b/build_info/libfragmentzip-proc.control -new file mode 100644 -index 00000000..29c9b274 ---- /dev/null -+++ b/build_info/libfragmentzip-proc.control -@@ -0,0 +1,8 @@ -+Package: libfragmentzip-proc -+Version: @DEB_LIBFRAGMENTZIP_V@ -+Architecture: @DEB_ARCH@ -+Maintainer: @DEB_MAINTAINER@ -+Depends: libzip-proc (>= 1.7.3), libgeneral-proc -+Section: Libraries -+Priority: optional -+Description: For use in Github Actions macOS CI, installs to /Users/runner/Procursus/build_base -diff --git a/build_info/libgeneral-proc.control b/build_info/libgeneral-proc.control -new file mode 100644 -index 00000000..c1180ba7 ---- /dev/null -+++ b/build_info/libgeneral-proc.control -@@ -0,0 +1,7 @@ -+Package: libgeneral-proc -+Version: @DEB_LIBGENERAL_V@ -+Architecture: @DEB_ARCH@ -+Maintainer: @DEB_MAINTAINER@ -+Section: Libraries -+Priority: optional -+Description: For use in Github Actions macOS CI, installs to /Users/runner/Procursus/build_base -diff --git a/build_info/libimg4tool-proc.control b/build_info/libimg4tool-proc.control -new file mode 100644 -index 00000000..8487d7f2 ---- /dev/null -+++ b/build_info/libimg4tool-proc.control -@@ -0,0 +1,8 @@ -+Package: libimg4tool-proc -+Maintainer: @DEB_MAINTAINER@ -+Architecture: @DEB_ARCH@ -+Version: @DEB_IMG4TOOL_V@ -+Depends: libplist-proc, libssl-proc, libgeneral-proc -+Section: Libraries -+Priority: optional -+Description: For use in Github Actions macOS CI, installs to /Users/runner/Procursus/build_base -diff --git a/build_info/libimobiledevice-glue-dev.control b/build_info/libimobiledevice-glue-dev.control -new file mode 100644 -index 00000000..c8f0d120 ---- /dev/null -+++ b/build_info/libimobiledevice-glue-dev.control -@@ -0,0 +1,8 @@ -+Package: libimobiledevice-glue-dev -+Version: @DEB_LIBIMOBILEDEVICEGLUE_V@ -+Architecture: @DEB_ARCH@ -+Maintainer: @DEB_MAINTAINER@ -+Depends: libimobiledevice-glue (= @DEB_LIBIMOBILEDEVICEGLUE_V@), libplist-dev (>= 2.2.0) -+Section: Development -+Priority: standard -+Description: Library with common code used by the libraries and tools around the libimobiledevice project - devel -diff --git a/build_info/libimobiledevice-glue-proc.control b/build_info/libimobiledevice-glue-proc.control -new file mode 100644 -index 00000000..249ca79f ---- /dev/null -+++ b/build_info/libimobiledevice-glue-proc.control -@@ -0,0 +1,8 @@ -+Package: libimobiledevice-glue-proc -+Version: @DEB_LIBIMOBILEDEVICEGLUE_V@ -+Architecture: @DEB_ARCH@ -+Maintainer: @DEB_MAINTAINER@ -+Depends: libplist-proc (>= 2.2.0) -+Section: Libraries -+Priority: optional -+Description: For use in Github Actions macOS CI, installs to /Users/runner/Procursus/build_base -diff --git a/build_info/libimobiledevice-glue.control b/build_info/libimobiledevice-glue.control -new file mode 100644 -index 00000000..0194648c ---- /dev/null -+++ b/build_info/libimobiledevice-glue.control -@@ -0,0 +1,8 @@ -+Package: libimobiledevice-glue -+Version: @DEB_LIBIMOBILEDEVICEGLUE_V@ -+Architecture: @DEB_ARCH@ -+Maintainer: @DEB_MAINTAINER@ -+Depends: libplist (>= 2.2.0) -+Section: Development -+Priority: standard -+Description: Library with common code used by the libraries and tools around the libimobiledevice project -diff --git a/build_info/libimobiledevice-proc.control b/build_info/libimobiledevice-proc.control -new file mode 100644 -index 00000000..dcb9cbb5 ---- /dev/null -+++ b/build_info/libimobiledevice-proc.control -@@ -0,0 +1,8 @@ -+Package: libimobiledevice-proc -+Version: @DEB_LIBIMOBILEDEVICE_V@ -+Architecture: @DEB_ARCH@ -+Maintainer: @DEB_MAINTAINER@ -+Depends: libssl-proc, libplist-proc, libusbmuxd-proc, libimobiledevice-glue-proc -+Section: Libraries -+Priority: optional -+Description: For use in Github Actions macOS CI, installs to /Users/runner/Procursus/build_base -diff --git a/build_info/libinsn-proc.control b/build_info/libinsn-proc.control -new file mode 100644 -index 00000000..961f422f ---- /dev/null -+++ b/build_info/libinsn-proc.control -@@ -0,0 +1,8 @@ -+Package: libinsn-proc -+Version: @DEB_LIBINSN_V@ -+Architecture: @DEB_ARCH@ -+Maintainer: @DEB_MAINTAINER@ -+Depends: libgeneral-proc -+Section: Libraries -+Priority: optional -+Description: For use in Github Actions macOS CI, installs to /Users/runner/Procursus/build_base -diff --git a/build_info/libipatcher-proc.control b/build_info/libipatcher-proc.control -new file mode 100644 -index 00000000..73be3e86 ---- /dev/null -+++ b/build_info/libipatcher-proc.control -@@ -0,0 +1,8 @@ -+Package: libipatcher-proc -+Version: @DEB_LIBIPATCHER_V@ -+Architecture: @DEB_ARCH@ -+Maintainer: @DEB_MAINTAINER@ -+Depends: libpng16-proc, liboffsetfinder64-proc, libimg4tool-proc, libssl-proc, libplist-proc, libinsn-proc, libgeneral-proc -+Section: Libraries -+Priority: optional -+Description: For use in Github Actions macOS CI, installs to /Users/runner/Procursus/build_base -diff --git a/build_info/libirecovery-proc.control b/build_info/libirecovery-proc.control -new file mode 100644 -index 00000000..2ca37c2c ---- /dev/null -+++ b/build_info/libirecovery-proc.control -@@ -0,0 +1,8 @@ -+Package: libirecovery-proc -+Version: @DEB_LIBIRECOVERY_V@ -+Architecture: @DEB_ARCH@ -+Maintainer: @DEB_MAINTAINER@ -+Depends: libimobiledevice-glue-proc -+Section: Libraries -+Priority: optional -+Description: For use in Github Actions macOS CI, installs to /Users/runner/Procursus/build_base -diff --git a/build_info/liboffsetfinder64-proc.control b/build_info/liboffsetfinder64-proc.control -new file mode 100644 -index 00000000..ac88d9e3 ---- /dev/null -+++ b/build_info/liboffsetfinder64-proc.control -@@ -0,0 +1,8 @@ -+Package: liboffsetfinder64-proc -+Version: @DEB_LIBOFFSETFINDER64_V@ -+Architecture: @DEB_ARCH@ -+Maintainer: @DEB_MAINTAINER@ -+Depends: libgeneral-proc, libinsn-proc, libimg4tool-proc, libssl-proc, libplist-proc -+Section: Libraries -+Priority: optional -+Description: For use in Github Actions macOS CI, installs to /Users/runner/Procursus/build_base -diff --git a/build_info/libplist-proc.control b/build_info/libplist-proc.control -new file mode 100644 -index 00000000..9cd4b3e6 ---- /dev/null -+++ b/build_info/libplist-proc.control -@@ -0,0 +1,7 @@ -+Package: libplist-proc -+Version: @DEB_LIBPLIST_V@ -+Architecture: @DEB_ARCH@ -+Maintainer: @DEB_MAINTAINER@ -+Section: Libraries -+Priority: optional -+Description: For use in Github Actions macOS CI, installs to /Users/runner/Procursus/build_base -diff --git a/build_info/libpng16-proc.control b/build_info/libpng16-proc.control -new file mode 100644 -index 00000000..1eba86b2 ---- /dev/null -+++ b/build_info/libpng16-proc.control -@@ -0,0 +1,7 @@ -+Package: libpng16-proc -+Version: @DEB_LIBPNG16_V@ -+Architecture: @DEB_ARCH@ -+Maintainer: @DEB_MAINTAINER@ -+Section: Libraries -+Priority: optional -+Description: For use in Github Actions macOS CI, installs to /Users/runner/Procursus/build_base -diff --git a/build_info/libssl-proc.control b/build_info/libssl-proc.control -new file mode 100644 -index 00000000..ee3059fa ---- /dev/null -+++ b/build_info/libssl-proc.control -@@ -0,0 +1,7 @@ -+Package: libssl-proc -+Version: @DEB_OPENSSL_V@ -+Architecture: @DEB_ARCH@ -+Maintainer: @DEB_MAINTAINER@ -+Section: Libraries -+Priority: optional -+Description: For use in Github Actions macOS CI, installs to /Users/runner/Procursus/build_base -diff --git a/build_info/libusbmuxd-proc.control b/build_info/libusbmuxd-proc.control -new file mode 100644 -index 00000000..1e056036 ---- /dev/null -+++ b/build_info/libusbmuxd-proc.control -@@ -0,0 +1,8 @@ -+Package: libusbmuxd-proc -+Version: @DEB_LIBUSBMUXD_V@ -+Architecture: @DEB_ARCH@ -+Maintainer: @DEB_MAINTAINER@ -+Depends: libplist-proc, libimobiledevice-glue-proc -+Section: Libraries -+Priority: optional -+Description: For use in Github Actions macOS CI, installs to /Users/runner/Procursus/build_base -diff --git a/build_info/libxpwn-proc.control b/build_info/libxpwn-proc.control -new file mode 100644 -index 00000000..9c399eda ---- /dev/null -+++ b/build_info/libxpwn-proc.control -@@ -0,0 +1,8 @@ -+Package: libxpwn-proc -+Version: @DEB_XPWN_V@ -+Architecture: @DEB_ARCH@ -+Maintainer: @DEB_MAINTAINER@ -+Depends: libssl-proc -+Section: Libraries -+Priority: optional -+Description: For use in Github Actions macOS CI, installs to /Users/runner/Procursus/build_base -diff --git a/build_info/libzip-proc.control b/build_info/libzip-proc.control -new file mode 100644 -index 00000000..a1ace41d ---- /dev/null -+++ b/build_info/libzip-proc.control -@@ -0,0 +1,8 @@ -+Package: libzip-proc -+Version: @DEB_LIBZIP_V@ -+Architecture: @DEB_ARCH@ -+Maintainer: @DEB_MAINTAINER@ -+Depends: libssl-proc (>= 1.1.0) -+Section: Libraries -+Priority: optional -+Description: For use in Github Actions macOS CI, installs to /Users/runner/Procursus/build_base -diff --git a/build_tools/versions.json b/build_tools/versions.json -new file mode 100644 -index 00000000..729199aa ---- /dev/null -+++ b/build_tools/versions.json -@@ -0,0 +1,132 @@ -+{ -+ "versions": { -+ "futurerestore": { -+ "version": "259", -+ "version2": "2.0.0-test+git20211025", -+ "commit": "a58821b95f6417ad649ed7a5460337dcd82e200e", -+ "url": "https://github.com/m1stadev/futurerestore", -+ "branch": "test" -+ }, -+ "idevicerestore_submodule": { -+ "version": "831", -+ "version2": "831+git20211025", -+ "commit": "febc22e0b81d2dc33dc46b20cefb6453b08c05b5", -+ "url": "https://github.com/m1stadev/idevicerestore", -+ "branch": "test" -+ }, -+ "tsschecker": { -+ "version": "357", -+ "version2": "357+git20210927", -+ "commit": "8c5122131cf7b7a2493a82674551787e7a4285f4", -+ "url": "https://github.com/1Conan/tsschecker", -+ "brah": "master" -+ }, -+ "openssl": { -+ "version": "24081", -+ "version2": "1.1.1l+git20211024", -+ "commit": "95fd012db5827d4e29f33213b0ba178a4628c40d", -+ "url": "https://github.com/openssl/openssl", -+ "branch": "OpenSSL_1_1_1-stable" -+ }, -+ "libzip": { -+ "version": "3063", -+ "version2": "1.8.0+git20211015", -+ "commit": "547d98ce0810f6529716b1810a003fab9f9189b4", -+ "url": "https://github.com/nih-at/libzip", -+ "branch": "master" -+ }, -+ "libpng16": { -+ "version": "4098", -+ "version2": "1.6.37+git20210312", -+ "commit": "a37d4836519517bdce6cb9d956092321eca3e73b", -+ "url": "https://github.com/glennrp/libpng", -+ "branch": "libpng16" -+ }, -+ "libplist": { -+ "version": "818", -+ "version2": "2.2.0+git20210921", -+ "commit": "cf7a3f3d7c06b197ee71c9f97eb9aa05f26d63b5", -+ "url": "https://github.com/libimobiledevice/libplist", -+ "branch": "master" -+ }, -+ "libimobiledevice_glue": { -+ "version": "20", -+ "version2": "1.0.0+git20211018", -+ "commit": "7c37434360f1c49975c286566efc3f0c935a84ef", -+ "url": "https://github.com/libimobiledevice/libimobiledevice-glue", -+ "branch": "master" -+ }, -+ "libusbmuxd": { -+ "version": "192", -+ "version2": "2.0.2+git20210913", -+ "commit": "2ec5354a6ff2ba5e2740eabe7402186f29294f79", -+ "url": "https://github.com/libimobiledevice/libusbmuxd", -+ "branch": "master" -+ }, -+ "libimobiledevice": { -+ "version": "1655", -+ "version2": "1.3.0+git20211011", -+ "commit": "fa8bfb65c70edd4d2617fbbf970302beb9a4ced2", -+ "url": "https://github.com/libimobiledevice/libimobiledevice", -+ "branch": "master" -+ }, -+ "libirecovery": { -+ "version": "324", -+ "version2": "1.0.0+git20211023", -+ "commit": "08a7c94569160eeb6f8e757c361d5e04a6492700", -+ "url": "https://github.com/libimobiledevice/libirecovery", -+ "branch": "master" -+ }, -+ "libgeneral": { -+ "version": "56", -+ "version2": "56+git20210702", -+ "commit": "e0d98cbeedece5d62e3e9432c3ed37cd87da5338", -+ "url": "https://github.com/tihmstar/libgeneral", -+ "branch": "master" -+ }, -+ "libfragmentzip": { -+ "version": "64", -+ "version2": "64+git20210209", -+ "commit": "aaf6fae83a0aa6f7aae1c94721857076d04a14e8", -+ "url": "https://github.com/tihmstar/libfragmentzip", -+ "branch": "master" -+ }, -+ "img4tool": { -+ "version": "197", -+ "version2": "197+git20210129", -+ "commit": "aca6cf005c94caf135023263cbb5c61a0081804f", -+ "url": "https://github.com/tihmstar/img4tool", -+ "branch": "master" -+ }, -+ "libinsn": { -+ "version": "37", -+ "version2": "37+git20210425", -+ "commit": "e795956b0c0e0c2fcbb074ee1f1cfd84e98f0918", -+ "url": "https://github.com/tihmstar/libinsn", -+ "branch": "master" -+ }, -+ "xpwn": { -+ "version": "403", -+ "version2": "0.5.8+git20210410", -+ "commit": "f6baa79ee898657229c71c8fbcc2c7e39f31f35a", -+ "url": "https://github.com/nyuszika7h/xpwn", -+ "branch": "master" -+ }, -+ "liboffsetfinder64": { -+ "version": "143", -+ "version2": "143+git20211025", -+ "commit": "8548e5dd312829fc5be43dbf3bbed03be5cca967", -+ "url": "https://github.com/Cryptiiiic/liboffsetfinder64", -+ "branch": "cryptic" -+ }, -+ "libipatcher": { -+ "version": "88", -+ "version2": "88+git20210810", -+ "commit": "1e855d70c84419014e363bdbcaead7b145fe3e1f", -+ "url": "https://github.com/Cryptiiiic/libipatcher", -+ "branch": "main" -+ } -+ }, -+ "lastupdate": "1635212273" -+} -+ -diff --git a/makefiles/curl.mk b/makefiles/curl.mk -index 84ab9086..4c9282ca 100644 ---- a/makefiles/curl.mk -+++ b/makefiles/curl.mk -@@ -3,7 +3,7 @@ $(error Use the main Makefile) - endif - - SUBPROJECTS += curl --CURL_VERSION := 7.77.0 -+CURL_VERSION := 7.78.0 - DEB_CURL_V ?= $(CURL_VERSION) - - curl-setup: setup -diff --git a/makefiles/futurerestore.mk b/makefiles/futurerestore.mk -index 3a15cdc5..723fbedb 100644 ---- a/makefiles/futurerestore.mk -+++ b/makefiles/futurerestore.mk -@@ -3,33 +3,28 @@ $(error Use the main Makefile) - endif - - SUBPROJECTS += futurerestore --FUTURERESTORE_VERSION := 195 --FUTURERESTORE_COMMIT := 55db758b5d4d6c08daa48af9aad1abf2b6466f36 --FUTURERESTORE_IDEVICERESTORE_COMMIT := d7d9996b3910902a56462fa8d9dc5909fcf8f4c9 --DEB_FUTURERESTORE_V ?= $(FUTURERESTORE_VERSION)-1 -+DEB_FUTURERESTORE_V ?= $(FUTURERESTORE_VERSION) - - 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 -+ fd -pe dylib -X rm \; '.*' build_* - cd $(BUILD_WORK)/futurerestore && ./autogen.sh \ - $(DEFAULT_CONFIGURE_FLAGS) \ - --disable-silent-rules \ -+ libfragmentzip_LIBS="-L$(TARGET_SYSROOT)/usr/lib -lcurl" \ -+ libfragmentzip_CFLAGS="-I$(TARGET_SYSROOT)/usr/include" \ -+ libcurl_LIBS="-L$(TARGET_SYSROOT)/usr/lib -lcurl" \ -+ libcurl_CFLAGS="-I$(TARGET_SYSROOT)/usr/include" \ -+ LDFLAGS="$(LDFLAGS) -L$(TARGET_SYSROOT)/usr/lib -lcompression -framework CoreFoundation -framework IOKit -L$(BUILD_BASE)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -lfragmentzip -lusbmuxd-2.0 -limobiledevice-glue-1.0 -limobiledevice-1.0 -L$(BUILD_BASE)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/xpwn -lcommon -lxpwn" \ - zlib_LIBS="-L$(TARGET_SYSROOT)/usr/lib -lz" \ -- zlib_CFLAGS="-I$(TARGET_SYSROOT)/usr/include" -+ zlib_CFLAGS="-I$(TARGET_SYSROOT)/usr/include"; \ -+ cat config.log - +$(MAKE) -C $(BUILD_WORK)/futurerestore - +$(MAKE) -C $(BUILD_WORK)/futurerestore install \ - DESTDIR="$(BUILD_STAGE)/futurerestore" -diff --git a/makefiles/idevicerestore.mk b/makefiles/idevicerestore.mk -index 526a7123..64fe3961 100644 ---- a/makefiles/idevicerestore.mk -+++ b/makefiles/idevicerestore.mk -@@ -3,24 +3,28 @@ $(error Use the main Makefile) - endif - - SUBPROJECTS += idevicerestore --IDEVICERESTORE_COMMIT := a2010182daa49f9f3bb63e8993908f8cdbca8b5e --IDEVICERESTORE_VERSION := 1.0.0+git20210526.$(shell echo $(IDEVICERESTORE_COMMIT) | cut -c -7) -+#IDEVICERESTORE_COMMIT := a2010182daa49f9f3bb63e8993908f8cdbca8b5e -+#IDEVICERESTORE_VERSION := 1.0.0+git20210526.$(shell echo $(IDEVICERESTORE_COMMIT) | cut -c -7) - DEB_IDEVICERESTORE_V ?= $(IDEVICERESTORE_VERSION) - - idevicerestore-setup: setup -- $(call GITHUB_ARCHIVE,libimobiledevice,idevicerestore,$(IDEVICERESTORE_COMMIT),$(IDEVICERESTORE_COMMIT)) -- $(call EXTRACT_TAR,idevicerestore-$(IDEVICERESTORE_COMMIT).tar.gz,idevicerestore-$(IDEVICERESTORE_COMMIT),idevicerestore) -+ ln -sf ~/source/idevicerestore $(BUILD_WORK)/ -+# $(call GITHUB_ARCHIVE,libimobiledevice,idevicerestore,$(IDEVICERESTORE_COMMIT),$(IDEVICERESTORE_COMMIT)) -+# $(call EXTRACT_TAR,idevicerestore-$(IDEVICERESTORE_COMMIT).tar.gz,idevicerestore-$(IDEVICERESTORE_COMMIT),idevicerestore) - - ifneq ($(wildcard $(BUILD_WORK)/idevicerestore/.build_complete),) - idevicerestore: - @echo "Using previously built idevicerestore." - else --idevicerestore: idevicerestore-setup curl libimobiledevice libirecovery libplist libzip -+idevicerestore: idevicerestore-setup libimobiledevice libirecovery libplist libzip -+ fd -pe dylib -X rm \; '.*' build_* - cd $(BUILD_WORK)/idevicerestore && ./autogen.sh \ - $(DEFAULT_CONFIGURE_FLAGS) \ -+ libcurl_LIBS="-L$(TARGET_SYSROOT)/usr/lib -lcurl" \ -+ libcurl_CFLAGS="-I$(TARGET_SYSROOT)/usr/include" \ - zlib_LIBS="-L$(TARGET_SYSROOT)/usr/lib -lz" \ -- zlib_CFLAGS="-I$(TARGET_SYSROOT)/usr/include" -- +$(MAKE) -C $(BUILD_WORK)/idevicerestore -+ zlib_CFLAGS="-I$(TARGET_SYSROOT)/usr/include" \ -+ LDFLAGS="$(LDFLAGS) -L$(TARGET_SYSROOT)/usr/lib -framework CoreFoundation -framework IOKit -L$(BUILD_BASE)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -limobiledevice-glue-1.0 -lusbmuxd-2.0" - +$(MAKE) -C $(BUILD_WORK)/idevicerestore install \ - DESTDIR="$(BUILD_STAGE)/idevicerestore" - $(call AFTER_BUILD) -diff --git a/makefiles/img4tool.mk b/makefiles/img4tool.mk -index 7c2ce9d9..3103a97e 100644 ---- a/makefiles/img4tool.mk -+++ b/makefiles/img4tool.mk -@@ -3,13 +3,13 @@ $(error Use the main Makefile) - endif - - SUBPROJECTS += img4tool --IMG4TOOL_VERSION := 197 --IMG4TOOL_COMMIT := aca6cf005c94caf135023263cbb5c61a0081804f --DEB_IMG4TOOL_V ?= $(IMG4TOOL_VERSION)-1 -+IMG4TOOL_VERSION := $(shell cat build_tools/versions.json | jq -r '.versions.img4tool.version2' | tr -d '\n') -+IMG4TOOL_COMMIT := $(shell cat build_tools/versions.json | jq -r '.versions.img4tool.commit' | tr -d '\n') -+DEB_IMG4TOOL_V ?= $(IMG4TOOL_VERSION) - - img4tool-setup: setup -- $(call GITHUB_ARCHIVE,tihmstar,img4tool,$(IMG4TOOL_VERSION),$(IMG4TOOL_VERSION)) -- $(call EXTRACT_TAR,img4tool-$(IMG4TOOL_VERSION).tar.gz,img4tool-$(IMG4TOOL_VERSION),img4tool) -+ $(call GITHUB_ARCHIVE,tihmstar,img4tool,$(IMG4TOOL_COMMIT),$(IMG4TOOL_COMMIT)) -+ $(call EXTRACT_TAR,img4tool-$(IMG4TOOL_COMMIT).tar.gz,img4tool-$(IMG4TOOL_COMMIT),img4tool) - sed -i 's/git rev\-list \-\-count HEAD/printf ${IMG4TOOL_VERSION}/g' $(BUILD_WORK)/img4tool/configure.ac - sed -i 's/git rev\-parse HEAD/printf ${IMG4TOOL_COMMIT}/g' $(BUILD_WORK)/img4tool/configure.ac - -@@ -20,7 +20,6 @@ else - img4tool: img4tool-setup openssl libplist libgeneral - cd $(BUILD_WORK)/img4tool && ./autogen.sh \ - $(DEFAULT_CONFIGURE_FLAGS) -- +$(MAKE) -C $(BUILD_WORK)/img4tool - +$(MAKE) -C $(BUILD_WORK)/img4tool install \ - DESTDIR="$(BUILD_STAGE)/img4tool" - $(call AFTER_BUILD,copy) -@@ -29,26 +28,18 @@ endif - img4tool-package: img4tool-stage - # img4tool.mk Package Structure - rm -rf $(BUILD_DIST)/*img4tool*/ -- mkdir -p $(BUILD_DIST)/{img4tool/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin,libimg4tool0/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib,libimg4tool-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/{lib/pkgconfig,include}} -+ mkdir -p $(BUILD_DIST)/libimg4tool-proc/{Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX),Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/img4tool} - -- # img4tool.mk Prep img4tool -- cp -a $(BUILD_STAGE)/img4tool/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin/img4tool $(BUILD_DIST)/img4tool/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin -- -- # img4tool.mk Prep libimg4tool0 -- cp -a $(BUILD_STAGE)/img4tool/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/libimg4tool.0.dylib $(BUILD_DIST)/libimg4tool0/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- -- # img4tool.mk Prep libimg4tool-dev -- cp -a $(BUILD_STAGE)/img4tool/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/{libimg4tool.dylib,pkgconfig} $(BUILD_DIST)/libimg4tool-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- cp -a $(BUILD_STAGE)/img4tool/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include/img4tool $(BUILD_DIST)/libimg4tool-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include -+ # img4tool.mk Prep libimg4tool-proc -+ cp -a $(BUILD_STAGE)/img4tool/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib $(BUILD_DIST)/libimg4tool-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ cp -a $(BUILD_STAGE)/img4tool/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libimg4tool-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ touch $(BUILD_DIST)/libimg4tool-proc/Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/img4tool/.build_complete - - # img4tool.mk Sign -- $(call SIGN,img4tool,general.xml) -- $(call SIGN,libimg4tool0,general.xml) -+ $(call SIGN,libimg4tool-proc,general.xml) - - # img4tool.mk Make .debs -- $(call PACK,img4tool,DEB_IMG4TOOL_V) -- $(call PACK,libimg4tool0,DEB_IMG4TOOL_V) -- $(call PACK,libimg4tool-dev,DEB_IMG4TOOL_V) -+ $(call PACK,libimg4tool-proc,DEB_IMG4TOOL_V) - - # img4tool.mk Build cleanup - rm -rf $(BUILD_DIST)/*img4tool*/ -diff --git a/makefiles/libfragmentzip.mk b/makefiles/libfragmentzip.mk -index 28a5846e..fef6b1df 100644 ---- a/makefiles/libfragmentzip.mk -+++ b/makefiles/libfragmentzip.mk -@@ -3,14 +3,13 @@ $(error Use the main Makefile) - endif - - SUBPROJECTS += libfragmentzip --LIBFRAGMENTZIP_VERSION := 60 --LIBFRAGMENTZIP_COMMIT := 120447d0f410dffb49948fa155467fc5d91ca3c8 --DEB_LIBFRAGMENTZIP_V ?= $(LIBFRAGMENTZIP_VERSION)-3 -+LIBFRAGMENTZIP_VERSION := $(shell cat build_tools/versions.json | jq -r '.versions.libfragmentzip.version' | tr -d '\n') -+LIBFRAGMENTZIP_COMMIT := $(shell cat build_tools/versions.json | jq -r '.versions.libfragmentzip.commit' | tr -d '\n') -+DEB_LIBFRAGMENTZIP_V ?= $(LIBFRAGMENTZIP_VERSION) - - libfragmentzip-setup: setup -- $(call GITHUB_ARCHIVE,tihmstar,libfragmentzip,$(LIBFRAGMENTZIP_VERSION),$(LIBFRAGMENTZIP_VERSION)) -- $(call EXTRACT_TAR,libfragmentzip-$(LIBFRAGMENTZIP_VERSION).tar.gz,libfragmentzip-$(LIBFRAGMENTZIP_VERSION),libfragmentzip) -- sed -i 's/@libz_requires@//;s/\(Libs:.*\)/\1 -lz/' $(BUILD_WORK)/libfragmentzip/libfragmentzip.pc.in -+ $(call GITHUB_ARCHIVE,tihmstar,libfragmentzip,$(LIBFRAGMENTZIP_COMMIT),$(LIBFRAGMENTZIP_COMMIT)) -+ $(call EXTRACT_TAR,libfragmentzip-$(LIBFRAGMENTZIP_COMMIT).tar.gz,libfragmentzip-$(LIBFRAGMENTZIP_COMMIT),libfragmentzip) - sed -i 's/git rev\-list \-\-count HEAD/printf ${LIBFRAGMENTZIP_VERSION}/g' $(BUILD_WORK)/libfragmentzip/configure.ac - sed -i 's/git rev\-parse HEAD/printf ${LIBFRAGMENTZIP_COMMIT}/g' $(BUILD_WORK)/libfragmentzip/configure.ac - -@@ -18,12 +17,13 @@ ifneq ($(wildcard $(BUILD_WORK)/libfragmentzip/.build_complete),) - libfragmentzip: - @echo "Using previously built libfragmentzip." - else --libfragmentzip: libfragmentzip-setup libgeneral libzip curl -+libfragmentzip: libfragmentzip-setup libgeneral libzip - cd $(BUILD_WORK)/libfragmentzip && ./autogen.sh \ - $(DEFAULT_CONFIGURE_FLAGS) \ -+ curl_LIBS="-L$(TARGET_SYSROOT)/usr/lib -lz" \ -+ curl_CFLAGS="-I$(TARGET_SYSROOT)/usr/include" \ - zlib_LIBS="-L$(TARGET_SYSROOT)/usr/lib -lz" \ - zlib_CFLAGS="-I$(TARGET_SYSROOT)/usr/include" -- +$(MAKE) -C $(BUILD_WORK)/libfragmentzip - +$(MAKE) -C $(BUILD_WORK)/libfragmentzip install \ - DESTDIR="$(BUILD_STAGE)/libfragmentzip" - $(call AFTER_BUILD,copy) -@@ -31,24 +31,21 @@ endif - - libfragmentzip-package: libfragmentzip-stage - # libfragmentzip.mk Package Structure -- rm -rf $(BUILD_DIST)/libfragmentzip{0,-dev} -- mkdir -p $(BUILD_DIST)/libfragmentzip{0,-dev}/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -+ rm -rf $(BUILD_DIST)/libfragmentzip-proc -+ mkdir -p $(BUILD_DIST)/libfragmentzip-proc/{Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX),Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libfragmentzip} - -- # libfragmentzip.mk Prep libfragmentzip0 -- cp -a $(BUILD_STAGE)/libfragmentzip/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/libfragmentzip.0.dylib $(BUILD_DIST)/libfragmentzip0/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- -- # libfragmentzip.mk Prep libfragmentzip-dev -- cp -a $(BUILD_STAGE)/libfragmentzip/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/!(libfragmentzip.0.dylib) $(BUILD_DIST)/libfragmentzip-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- cp -a $(BUILD_STAGE)/libfragmentzip/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libfragmentzip-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ # libfragmentzip.mk Prep libfragmentzip-proc -+ cp -a $(BUILD_STAGE)/libfragmentzip/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib $(BUILD_DIST)/libfragmentzip-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ cp -a $(BUILD_STAGE)/libfragmentzip/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libfragmentzip-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ touch $(BUILD_DIST)/libfragmentzip-proc/Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libfragmentzip/.build_complete - - # libfragmentzip.mk Sign -- $(call SIGN,libfragmentzip0,general.xml) -+ $(call SIGN,libfragmentzip-proc,general.xml) - - # libfragmentzip.mk Make .debs -- $(call PACK,libfragmentzip0,DEB_LIBFRAGMENTZIP_V) -- $(call PACK,libfragmentzip-dev,DEB_LIBFRAGMENTZIP_V) -+ $(call PACK,libfragmentzip-proc,DEB_LIBFRAGMENTZIP_V) - - # libfragmentzip.mk Build cleanup -- rm -rf $(BUILD_DIST)/libfragmentzip{0,-dev} -+ rm -rf $(BUILD_DIST)/libfragmentzip-proc - - .PHONY: libfragmentzip libfragmentzip-package -diff --git a/makefiles/libgeneral.mk b/makefiles/libgeneral.mk -index 48a1891f..6caee9bf 100644 ---- a/makefiles/libgeneral.mk -+++ b/makefiles/libgeneral.mk -@@ -3,13 +3,13 @@ $(error Use the main Makefile) - endif - - SUBPROJECTS += libgeneral --LIBGENERAL_VERSION := 54 --LIBGENERAL_COMMIT := b04a27d0584c4c10c4b376325bb928c0ad12e285 --DEB_LIBGENERAL_V ?= $(LIBGENERAL_VERSION)-1 -+LIBGENERAL_VERSION := $(shell cat build_tools/versions.json | jq -r '.versions.libgeneral.version2' | tr -d '\n') -+LIBGENERAL_COMMIT := $(shell cat build_tools/versions.json | jq -r '.versions.libgeneral.commit' | tr -d '\n') -+DEB_LIBGENERAL_V ?= $(LIBGENERAL_VERSION) - - libgeneral-setup: setup -- $(call GITHUB_ARCHIVE,tihmstar,libgeneral,$(LIBGENERAL_VERSION),$(LIBGENERAL_VERSION)) -- $(call EXTRACT_TAR,libgeneral-$(LIBGENERAL_VERSION).tar.gz,libgeneral-$(LIBGENERAL_VERSION),libgeneral) -+ $(call GITHUB_ARCHIVE,tihmstar,libgeneral,$(LIBGENERAL_COMMIT),$(LIBGENERAL_COMMIT)) -+ $(call EXTRACT_TAR,libgeneral-$(LIBGENERAL_COMMIT).tar.gz,libgeneral-$(LIBGENERAL_COMMIT),libgeneral) - - sed -i 's/git rev\-list \-\-count HEAD/printf ${LIBGENERAL_VERSION}/g' $(BUILD_WORK)/libgeneral/configure.ac - sed -i 's/git rev\-parse HEAD/printf ${LIBGENERAL_COMMIT}/g' $(BUILD_WORK)/libgeneral/configure.ac -@@ -21,7 +21,6 @@ else - libgeneral: libgeneral-setup - cd $(BUILD_WORK)/libgeneral && ./autogen.sh \ - $(DEFAULT_CONFIGURE_FLAGS) -- +$(MAKE) -C $(BUILD_WORK)/libgeneral - +$(MAKE) -C $(BUILD_WORK)/libgeneral install \ - DESTDIR="$(BUILD_STAGE)/libgeneral" - $(call AFTER_BUILD,copy) -@@ -29,24 +28,21 @@ endif - - libgeneral-package: libgeneral-stage - # libgeneral.mk Package Structure -- rm -rf $(BUILD_DIST)/libgeneral{0,-dev} -- mkdir -p $(BUILD_DIST)/libgeneral{0,-dev}/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -+ rm -rf $(BUILD_DIST)/libgeneral-proc -+ mkdir -p $(BUILD_DIST)/libgeneral-proc/{Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX),Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libgeneral} - -- # libgeneral.mk Prep libgeneral0 -- cp -a $(BUILD_STAGE)/libgeneral/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/libgeneral.0.dylib $(BUILD_DIST)/libgeneral0/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- -- # libgeneral.mk Prep libgeneral-dev -- cp -a $(BUILD_STAGE)/libgeneral/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/!(libgeneral.0.dylib) $(BUILD_DIST)/libgeneral-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- cp -a $(BUILD_STAGE)/libgeneral/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libgeneral-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ # libgeneral.mk Prep libgeneral-proc -+ cp -a $(BUILD_STAGE)/libgeneral/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib $(BUILD_DIST)/libgeneral-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ cp -a $(BUILD_STAGE)/libgeneral/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libgeneral-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ touch $(BUILD_DIST)/libgeneral-proc/Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libgeneral/.build_complete - - # libgeneral.mk Sign -- $(call SIGN,libgeneral0,general.xml) -+ $(call SIGN,libgeneral-proc,general.xml) - - # libgeneral.mk Make .debs -- $(call PACK,libgeneral0,DEB_LIBGENERAL_V) -- $(call PACK,libgeneral-dev,DEB_LIBGENERAL_V) -+ $(call PACK,libgeneral-proc,DEB_LIBGENERAL_V) - - # libgeneral.mk Build cleanup -- rm -rf $(BUILD_DIST)/libgeneral{0,-dev} -+ rm -rf $(BUILD_DIST)/libgeneral-proc - - .PHONY: libgeneral libgeneral-package -diff --git a/makefiles/libimobiledevice-glue.mk b/makefiles/libimobiledevice-glue.mk -new file mode 100644 -index 00000000..e41c4966 ---- /dev/null -+++ b/makefiles/libimobiledevice-glue.mk -@@ -0,0 +1,46 @@ -+ifneq ($(PROCURSUS),1) -+$(error Use the main Makefile) -+endif -+ -+SUBPROJECTS += libimobiledevice-glue -+LIBIMOBILEDEVICEGLUE_COMMIT := $(shell cat build_tools/versions.json | jq -r '.versions.libimobiledevice_glue.commit' | tr -d '\n') -+LIBIMOBILEDEVICEGLUE_VERSION := $(shell cat build_tools/versions.json | jq -r '.versions.libimobiledevice_glue.version2' | tr -d '\n').$(shell echo $(LIBIMOBILEDEVICEGLUE_COMMIT) | cut -c -7) -+DEB_LIBIMOBILEDEVICEGLUE_V ?= $(LIBIMOBILEDEVICEGLUE_VERSION) -+ -+libimobiledevice-glue-setup: setup -+ $(call GITHUB_ARCHIVE,libimobiledevice,libimobiledevice-glue,$(LIBIMOBILEDEVICEGLUE_COMMIT),$(LIBIMOBILEDEVICEGLUE_COMMIT)) -+ $(call EXTRACT_TAR,libimobiledevice-glue-$(LIBIMOBILEDEVICEGLUE_COMMIT).tar.gz,libimobiledevice-glue-$(LIBIMOBILEDEVICEGLUE_COMMIT),libimobiledevice-glue) -+ -+ifneq ($(wildcard $(BUILD_WORK)/libimobiledevice-glue/.build_complete),) -+libimobiledevice-glue: -+ @echo "Using previously built libimobiledevice-glue." -+else -+libimobiledevice-glue: libimobiledevice-glue-setup libplist -+ cd $(BUILD_WORK)/libimobiledevice-glue && ./autogen.sh \ -+ $(DEFAULT_CONFIGURE_FLAGS) \ -+ --without-cython -+ +$(MAKE) -C $(BUILD_WORK)/libimobiledevice-glue install \ -+ DESTDIR="$(BUILD_STAGE)/libimobiledevice-glue" -+ $(call AFTER_BUILD,copy) -+endif -+ -+libimobiledevice-glue-package: libimobiledevice-glue-stage -+ # libimobiledevice-glue.mk Package Structure -+ rm -rf $(BUILD_DIST)/libimobiledevice-glue-proc -+ mkdir -p $(BUILD_DIST)/libimobiledevice-glue-proc/{Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX),Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libimobiledevice-glue} -+ -+ # libimobiledevice-glue.mk Prep libimobiledevice-glue-proc -+ cp -a $(BUILD_STAGE)/libimobiledevice-glue/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib $(BUILD_DIST)/libimobiledevice-glue-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ cp -a $(BUILD_STAGE)/libimobiledevice-glue/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libimobiledevice-glue-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ touch $(BUILD_DIST)/libimobiledevice-glue-proc/Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libimobiledevice-glue/.build_complete -+ -+ # libimobiledevice-glue.mk Sign -+ $(call SIGN,libimobiledevice-glue-proc,general.xml) -+ -+ # libimobiledevice-glue.mk Make .debs -+ $(call PACK,libimobiledevice-glue-proc,DEB_LIBIMOBILEDEVICEGLUE_V) -+ -+ # libimobiledevice-glue.mk Build cleanup -+ rm -rf $(BUILD_DIST)/libimobiledevice-glue-proc -+ -+.PHONY: libimobiledevice-glue libimobiledevice-glue-package -diff --git a/makefiles/libimobiledevice.mk b/makefiles/libimobiledevice.mk -index e05b0269..f59c3c66 100644 ---- a/makefiles/libimobiledevice.mk -+++ b/makefiles/libimobiledevice.mk -@@ -3,8 +3,8 @@ $(error Use the main Makefile) - endif - - SUBPROJECTS += libimobiledevice --LIBIMOBILEDEVICE_COMMIT := 25059d4c7d75e03aab516af2929d7c6e6d4c17de --LIBIMOBILEDEVICE_VERSION := 1.3.0+git20210304.$(shell echo $(LIBIMOBILEDEVICE_COMMIT) | cut -c -7) -+LIBIMOBILEDEVICE_COMMIT := $(shell cat build_tools/versions.json | jq -r '.versions.libimobiledevice.commit' | tr -d '\n') -+LIBIMOBILEDEVICE_VERSION := $(shell cat build_tools/versions.json | jq -r '.versions.libimobiledevice.version2' | tr -d '\n').$(shell echo $(LIBIMOBILEDEVICE_COMMIT) | cut -c -7) - DEB_LIBIMOBILEDEVICE_V ?= $(LIBIMOBILEDEVICE_VERSION) - - libimobiledevice-setup: setup -@@ -15,11 +15,12 @@ ifneq ($(wildcard $(BUILD_WORK)/libimobiledevice/.build_complete),) - libimobiledevice: - @echo "Using previously built libimobiledevice." - else --libimobiledevice: libimobiledevice-setup libusbmuxd libplist openssl -+libimobiledevice: libimobiledevice-setup libusbmuxd libplist openssl libimobiledevice-glue -+ fd -pe dylib -X rm \; '.*' build_* - cd $(BUILD_WORK)/libimobiledevice && ./autogen.sh \ - $(DEFAULT_CONFIGURE_FLAGS) \ -+ --disable-shared \ - --without-cython -- +$(MAKE) -C $(BUILD_WORK)/libimobiledevice - +$(MAKE) -C $(BUILD_WORK)/libimobiledevice install \ - DESTDIR="$(BUILD_STAGE)/libimobiledevice" - $(call AFTER_BUILD,copy) -@@ -27,31 +28,21 @@ endif - - libimobiledevice-package: libimobiledevice-stage - # libimobiledevice.mk Package Structure -- rm -rf $(BUILD_DIST)/libimobiledevice{6,-dev,-utils} -- mkdir -p $(BUILD_DIST)/libimobiledevice6/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib \ -- $(BUILD_DIST)/libimobiledevice-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib \ -- $(BUILD_DIST)/libimobiledevice-utils/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ rm -rf $(BUILD_DIST)/libimobiledevice-proc -+ mkdir -p $(BUILD_DIST)/libimobiledevice-proc/{Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX),Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libimobiledevice} - -- # libimobiledevice.mk Prep libimobiledevice6 -- cp -a $(BUILD_STAGE)/libimobiledevice/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/libimobiledevice-1.0.6.dylib $(BUILD_DIST)/libimobiledevice6/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- -- # libimobiledevice.mk Prep libimobiledevice-dev -- cp -a $(BUILD_STAGE)/libimobiledevice/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/{pkgconfig,libimobiledevice-1.0.{a,dylib}} $(BUILD_DIST)/libimobiledevice-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- cp -a $(BUILD_STAGE)/libimobiledevice/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libimobiledevice-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -- -- # libimobiledevice.mk Prep libimobiledevice-utils -- cp -a $(BUILD_STAGE)/libimobiledevice/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/{bin,share} $(BUILD_DIST)/libimobiledevice-utils/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ # libimobiledevice.mk Prep libimobiledevice-proc -+ cp -a $(BUILD_STAGE)/libimobiledevice/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib $(BUILD_DIST)/libimobiledevice-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ cp -a $(BUILD_STAGE)/libimobiledevice/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libimobiledevice-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ touch $(BUILD_DIST)/libimobiledevice-proc/Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libimobiledevice/.build_complete - - # libimobiledevice.mk Sign -- $(call SIGN,libimobiledevice6,general.xml) -- $(call SIGN,libimobiledevice-utils,general.xml) -+ $(call SIGN,libimobiledevice-dev,general.xml) - - # libimobiledevice.mk Make .debs -- $(call PACK,libimobiledevice6,DEB_LIBIMOBILEDEVICE_V) -- $(call PACK,libimobiledevice-dev,DEB_LIBIMOBILEDEVICE_V) -- $(call PACK,libimobiledevice-utils,DEB_LIBIMOBILEDEVICE_V) -+ $(call PACK,libimobiledevice-proc,DEB_LIBIMOBILEDEVICE_V) - - # libimobiledevice.mk Build cleanup -- rm -rf $(BUILD_DIST)/libimobiledevice{6,-dev,-utils} -+ rm -rf $(BUILD_DIST)/libimobiledevice-proc - - .PHONY: libimobiledevice libimobiledevice-package -diff --git a/makefiles/libinsn.mk b/makefiles/libinsn.mk -index c1f5f546..c7d587e9 100644 ---- a/makefiles/libinsn.mk -+++ b/makefiles/libinsn.mk -@@ -3,9 +3,9 @@ $(error Use the main Makefile) - endif - - SUBPROJECTS += libinsn --LIBINSN_VERSION := 35 --LIBINSN_COMMIT := 64124fd2b1b57d7b76a0e2b0c06434a7048758d2 --DEB_LIBINSN_V ?= $(LIBINSN_VERSION)-1 -+LIBINSN_VERSION := $(shell cat build_tools/versions.json | jq -r '.versions.libinsn.version2' | tr -d '\n') -+LIBINSN_COMMIT := $(shell cat build_tools/versions.json | jq -r '.versions.libinsn.commit' | tr -d '\n') -+DEB_LIBINSN_V ?= $(LIBINSN_VERSION) - - libinsn-setup: setup - $(call GITHUB_ARCHIVE,tihmstar,libinsn,$(LIBINSN_COMMIT),$(LIBINSN_COMMIT)) -@@ -20,7 +20,6 @@ else - libinsn: libinsn-setup libgeneral - cd $(BUILD_WORK)/libinsn && ./autogen.sh \ - $(DEFAULT_CONFIGURE_FLAGS) -- +$(MAKE) -C $(BUILD_WORK)/libinsn - +$(MAKE) -C $(BUILD_WORK)/libinsn install \ - DESTDIR="$(BUILD_STAGE)/libinsn" - $(call AFTER_BUILD,copy) -@@ -28,24 +27,21 @@ endif - - libinsn-package: libinsn-stage - # libinsn.mk Package Structure -- rm -rf $(BUILD_DIST)/libinsn{0,-dev} -- mkdir -p $(BUILD_DIST)/libinsn{0,-dev}/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -+ rm -rf $(BUILD_DIST)/libinsn-proc -+ mkdir -p $(BUILD_DIST)/libinsn-proc/{Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX),Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libinsn} - -- # libinsn.mk Prep libinsn0 -- cp -a $(BUILD_STAGE)/libinsn/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/libinsn.0.dylib $(BUILD_DIST)/libinsn0/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- -- # libinsn.mk Prep libinsn-dev -- cp -a $(BUILD_STAGE)/libinsn/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/!(libinsn.0.dylib) $(BUILD_DIST)/libinsn-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- cp -a $(BUILD_STAGE)/libinsn/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libinsn-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ # libinsn.mk Prep libinsn-proc -+ cp -a $(BUILD_STAGE)/libinsn/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib $(BUILD_DIST)/libinsn-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ cp -a $(BUILD_STAGE)/libinsn/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libinsn-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ touch $(BUILD_DIST)/libinsn-proc/Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libinsn/.build_complete - - # libinsn.mk Sign -- $(call SIGN,libinsn0,general.xml) -+ $(call SIGN,libinsn-proc,general.xml) - - # libinsn.mk Make .debs -- $(call PACK,libinsn0,DEB_LIBINSN_V) -- $(call PACK,libinsn-dev,DEB_LIBINSN_V) -+ $(call PACK,libinsn-proc,DEB_LIBINSN_V) - - # libinsn.mk Build cleanup -- rm -rf $(BUILD_DIST)/libinsn{0,-dev} -+ rm -rf $(BUILD_DIST)/libinsn-proc - - .PHONY: libinsn libinsn-package -diff --git a/makefiles/libipatcher.mk b/makefiles/libipatcher.mk -index f0777429..9255e151 100644 ---- a/makefiles/libipatcher.mk -+++ b/makefiles/libipatcher.mk -@@ -3,17 +3,17 @@ $(error Use the main Makefile) - endif - - SUBPROJECTS += libipatcher --LIBIPATCHER_VERSION := 81 --LIBIPATCHER_COMMIT := ad44d0da23f5120c3c77a72062bd627c50f37e71 --DEB_LIBIPATCHER_V ?= $(LIBIPATCHER_VERSION)-1 -+LIBIPATCHER_VERSION := $(shell cat build_tools/versions.json | jq -r '.versions.libipatcher.version2' | tr -d '\n') -+LIBIPATCHER_COMMIT := $(shell cat build_tools/versions.json | jq -r '.versions.libipatcher.commit' | tr -d '\n') -+DEB_LIBIPATCHER_V ?= $(LIBIPATCHER_VERSION) - - libipatcher-setup: setup -- $(call GITHUB_ARCHIVE,tihmstar,libipatcher,$(LIBIPATCHER_VERSION),$(LIBIPATCHER_VERSION)) -- $(call EXTRACT_TAR,libipatcher-$(LIBIPATCHER_VERSION).tar.gz,libipatcher-$(LIBIPATCHER_VERSION),libipatcher) -+ $(call GITHUB_ARCHIVE,Cryptiiiic,libipatcher,$(LIBIPATCHER_COMMIT),$(LIBIPATCHER_COMMIT)) -+ $(call EXTRACT_TAR,libipatcher-$(LIBIPATCHER_COMMIT).tar.gz,libipatcher-$(LIBIPATCHER_COMMIT),libipatcher) - -+ rm -rf $(BUILD_WORK)/libipatcher/external/{jssy,iBoot32Patcher} - $(call GITHUB_ARCHIVE,tihmstar,iBoot32Patcher,master,master) - $(call GITHUB_ARCHIVE,tihmstar,jssy,master,master) -- rm -rf $(BUILD_WORK)/libipatcher/external/{jssy,iBoot32Patcher} - $(call EXTRACT_TAR,jssy-master.tar.gz,jssy-master,libipatcher/external/jssy) - $(call EXTRACT_TAR,iBoot32Patcher-master.tar.gz,iBoot32Patcher-master,libipatcher/external/iBoot32Patcher) - -@@ -27,39 +27,35 @@ ifneq ($(wildcard $(BUILD_WORK)/libipatcher/.build_complete),) - libipatcher: - @echo "Using previously built libipatcher." - else --libipatcher: libipatcher-setup libpng16 openssl img4tool liboffsetfinder64 libgeneral libplist curl xpwn -+libipatcher: libipatcher-setup libpng16 openssl img4tool liboffsetfinder64 libgeneral libplist xpwn - cd $(BUILD_WORK)/libipatcher && ./autogen.sh \ - $(DEFAULT_CONFIGURE_FLAGS) \ - CFLAGS="$(CFLAGS) -I$(BUILD_BASE)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include/xpwn" \ - CPPFLAGS="$(CPPFLAGS) -I$(BUILD_BASE)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include/xpwn" \ - LDFLAGS="$(LDFLAGS) -L$(BUILD_BASE)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/xpwn" -- +$(MAKE) -C $(BUILD_WORK)/libipatcher \ -- LIBS="-lcurl" - +$(MAKE) -C $(BUILD_WORK)/libipatcher install \ -+ LIBS="-lcurl" \ - DESTDIR="$(BUILD_STAGE)/libipatcher" - $(call AFTER_BUILD,copy) - endif - - libipatcher-package: libipatcher-stage - # libipatcher.mk Package Structure -- rm -rf $(BUILD_DIST)/libipatcher{0,-dev} -- mkdir -p $(BUILD_DIST)/libipatcher{0,-dev}/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- -- # libipatcher.mk Prep libipatcher0 -- cp -a $(BUILD_STAGE)/libipatcher/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/libipatcher.0.dylib $(BUILD_DIST)/libipatcher0/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -+ rm -rf $(BUILD_DIST)/libipatcher-proc -+ mkdir -p $(BUILD_DIST)/libipatcher-proc/{Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX),Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libipatcher} - -- # libipatcher.mk Prep libipatcher-dev -- cp -a $(BUILD_STAGE)/libipatcher/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/!(libipatcher.0.dylib) $(BUILD_DIST)/libipatcher-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- cp -a $(BUILD_STAGE)/libipatcher/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libipatcher-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ # libipatcher.mk Prep libipatcher-proc -+ cp -a $(BUILD_STAGE)/libipatcher/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib $(BUILD_DIST)/libipatcher-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ cp -a $(BUILD_STAGE)/libipatcher/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libipatcher-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ touch $(BUILD_DIST)/libipatcher-proc/Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libipatcher/.build_complete - - # libipatcher.mk Sign -- $(call SIGN,libipatcher0,general.xml) -+ $(call SIGN,libipatcher-proc,general.xml) - - # libipatcher.mk Make .debs -- $(call PACK,libipatcher0,DEB_LIBIPATCHER_V) -- $(call PACK,libipatcher-dev,DEB_LIBIPATCHER_V) -+ $(call PACK,libipatcher-proc,DEB_LIBIPATCHER_V) - - # libipatcher.mk Build cleanup -- rm -rf $(BUILD_DIST)/libipatcher{0,-dev} -+ rm -rf $(BUILD_DIST)/libipatcher-proc - - .PHONY: libipatcher libipatcher-package -diff --git a/makefiles/libirecovery.mk b/makefiles/libirecovery.mk -index ff54eb16..592fae0a 100644 ---- a/makefiles/libirecovery.mk -+++ b/makefiles/libirecovery.mk -@@ -3,8 +3,8 @@ $(error Use the main Makefile) - endif - - SUBPROJECTS += libirecovery --LIBIRECOVERY_COMMIT := 47934949e0015165a4562b08e824adb3f664c0ea --LIBIRECOVERY_VERSION := 1.0.0+git20210526.$(shell echo $(LIBIRECOVERY_COMMIT) | cut -c -7) -+LIBIRECOVERY_COMMIT := $(shell cat build_tools/versions.json | jq -r '.versions.libirecovery.commit' | tr -d '\n') -+LIBIRECOVERY_VERSION := $(shell cat build_tools/versions.json | jq -r '.versions.libirecovery.version2' | tr -d '\n').$(shell echo $(LIBIRECOVERY_COMMIT) | cut -c -7) - DEB_LIBIRECOVERY_V ?= $(LIBIRECOVERY_VERSION) - - libirecovery-setup: setup -@@ -15,12 +15,10 @@ ifneq ($(wildcard $(BUILD_WORK)/libirecovery/.build_complete),) - libirecovery: - @echo "Using previously built libirecovery." - else --libirecovery: libirecovery-setup readline libusb -+libirecovery: libirecovery-setup libimobiledevice-glue - cd $(BUILD_WORK)/libirecovery && ./autogen.sh \ - $(DEFAULT_CONFIGURE_FLAGS) \ -- --with-iokit=no -- +$(MAKE) -C $(BUILD_WORK)/libirecovery \ -- CFLAGS="$(CFLAGS) -I$(BUILD_BASE)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include/libusb-1.0" -+ --with-iokit=yes - +$(MAKE) -C $(BUILD_WORK)/libirecovery install \ - DESTDIR=$(BUILD_STAGE)/libirecovery - $(call AFTER_BUILD,copy) -@@ -28,31 +26,21 @@ endif - - libirecovery-package: libirecovery-stage - # libirecovery.mk Package Structure -- rm -rf $(BUILD_DIST)/libirecovery{3,-dev,-utils} -- mkdir -p $(BUILD_DIST)/libirecovery3/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib \ -- $(BUILD_DIST)/libirecovery-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib \ -- $(BUILD_DIST)/libirecovery-utils/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ rm -rf $(BUILD_DIST)/libirecovery-proc -+ mkdir -p $(BUILD_DIST)/libirecovery-proc/{Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX),Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libirecovery} - -- # libirecovery.mk Prep libirecovery3 -- cp -a $(BUILD_STAGE)/libirecovery/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/libirecovery-1.0.3.dylib $(BUILD_DIST)/libirecovery3/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/ -- -- # libirecovery.mk Prep libirecovery-dev -- cp -a $(BUILD_STAGE)/libirecovery/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/{pkgconfig,libirecovery-1.0.{a,dylib}} $(BUILD_DIST)/libirecovery-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- cp -a $(BUILD_STAGE)/libirecovery/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libirecovery-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -- -- # libirecovery.mk Prep libirecovery-utils -- cp -a $(BUILD_STAGE)/libirecovery/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin $(BUILD_DIST)/libirecovery-utils/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ # libirecovery.mk Prep libirecovery-proc -+ cp -a $(BUILD_STAGE)/libirecovery/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib $(BUILD_DIST)/libirecovery-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ cp -a $(BUILD_STAGE)/libirecovery/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libirecovery-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ touch $(BUILD_DIST)/libirecovery-proc/Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libirecovery/.build_complete - - # libirecovery.mk Sign -- $(call SIGN,libirecovery3,general.xml) -- $(call SIGN,libirecovery-utils,general.xml) -+ $(call SIGN,libirecovery-proc,general.xml) - - # libirecovery.mk Make .debs -- $(call PACK,libirecovery3,DEB_LIBIRECOVERY_V) -- $(call PACK,libirecovery-dev,DEB_LIBIRECOVERY_V) -- $(call PACK,libirecovery-utils,DEB_LIBIRECOVERY_V) -+ $(call PACK,libirecovery-proc,DEB_LIBIRECOVERY_V) - - # libirecovery.mk Build cleanup -- rm -rf $(BUILD_DIST)/libirecovery{3,-dev,-utils} -+ rm -rf $(BUILD_DIST)/libirecovery-proc - - .PHONY: libirecovery libirecovery-package -diff --git a/makefiles/liboffsetfinder64.mk b/makefiles/liboffsetfinder64.mk -index 8a697085..67d21eea 100644 ---- a/makefiles/liboffsetfinder64.mk -+++ b/makefiles/liboffsetfinder64.mk -@@ -3,12 +3,12 @@ $(error Use the main Makefile) - endif - - SUBPROJECTS += liboffsetfinder64 --LIBOFFSETFINDER64_VERSION := 132 --LIBOFFSETFINDER64_COMMIT := 35d3411bf675a83bdb768bc0ec26fe2344be16f3 --DEB_LIBOFFSETFINDER64_V ?= $(LIBOFFSETFINDER64_VERSION)-1 -+LIBOFFSETFINDER64_VERSION := $(shell cat build_tools/versions.json | jq -r '.versions.liboffsetfinder64.version2' | tr -d '\n') -+LIBOFFSETFINDER64_COMMIT := $(shell cat build_tools/versions.json | jq -r '.versions.liboffsetfinder64.commit' | tr -d '\n') -+DEB_LIBOFFSETFINDER64_V ?= $(LIBOFFSETFINDER64_VERSION) - - liboffsetfinder64-setup: setup -- $(call GITHUB_ARCHIVE,tihmstar,liboffsetfinder64,$(LIBOFFSETFINDER64_COMMIT),$(LIBOFFSETFINDER64_COMMIT)) -+ $(call GITHUB_ARCHIVE,Cryptiiiic,liboffsetfinder64,$(LIBOFFSETFINDER64_COMMIT),$(LIBOFFSETFINDER64_COMMIT)) - $(call EXTRACT_TAR,liboffsetfinder64-$(LIBOFFSETFINDER64_COMMIT).tar.gz,liboffsetfinder64-$(LIBOFFSETFINDER64_COMMIT),liboffsetfinder64) - - sed -i 's/git rev\-list \-\-count HEAD/printf ${LIBOFFSETFINDER64_VERSION}/g' $(BUILD_WORK)/liboffsetfinder64/configure.ac -@@ -21,7 +21,6 @@ else - liboffsetfinder64: liboffsetfinder64-setup libgeneral libinsn img4tool openssl libplist - cd $(BUILD_WORK)/liboffsetfinder64 && ./autogen.sh \ - $(DEFAULT_CONFIGURE_FLAGS) -- +$(MAKE) -C $(BUILD_WORK)/liboffsetfinder64 - +$(MAKE) -C $(BUILD_WORK)/liboffsetfinder64 install \ - DESTDIR="$(BUILD_STAGE)/liboffsetfinder64" - $(call AFTER_BUILD,copy) -@@ -29,24 +28,21 @@ endif - - liboffsetfinder64-package: liboffsetfinder64-stage - # liboffsetfinder64.mk Package Structure -- rm -rf $(BUILD_DIST)/liboffsetfinder64-{0,dev} -- mkdir -p $(BUILD_DIST)/liboffsetfinder64-{0,dev}/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -+ rm -rf $(BUILD_DIST)/liboffsetfinder64-proc -+ mkdir -p $(BUILD_DIST)/liboffsetfinder64-proc/{Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX),Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/liboffsetfinder64} - -- # liboffsetfinder64.mk Prep liboffsetfinder64-0 -- cp -a $(BUILD_STAGE)/liboffsetfinder64/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/liboffsetfinder64.0.dylib $(BUILD_DIST)/liboffsetfinder64-0/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- -- # liboffsetfinder64.mk Prep liboffsetfinder64-dev -- cp -a $(BUILD_STAGE)/liboffsetfinder64/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/!(liboffsetfinder64.0.dylib) $(BUILD_DIST)/liboffsetfinder64-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- cp -a $(BUILD_STAGE)/liboffsetfinder64/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/liboffsetfinder64-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ # liboffsetfinder64.mk Prep liboffsetfinder64-proc -+ cp -a $(BUILD_STAGE)/liboffsetfinder64/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib $(BUILD_DIST)/liboffsetfinder64-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ cp -a $(BUILD_STAGE)/liboffsetfinder64/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/liboffsetfinder64-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ touch $(BUILD_DIST)/liboffsetfinder64-proc/Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/liboffsetfinder64/.build_complete - - # liboffsetfinder64.mk Sign -- $(call SIGN,liboffsetfinder64-0,general.xml) -+ $(call SIGN,liboffsetfinder64-proc,general.xml) - - # liboffsetfinder64.mk Make .debs -- $(call PACK,liboffsetfinder64-0,DEB_LIBOFFSETFINDER64_V) -- $(call PACK,liboffsetfinder64-dev,DEB_LIBOFFSETFINDER64_V) -+ $(call PACK,liboffsetfinder64-proc,DEB_LIBOFFSETFINDER64_V) - - # liboffsetfinder64.mk Build cleanup -- rm -rf $(BUILD_DIST)/liboffsetfinder64-{0,dev} -+ rm -rf $(BUILD_DIST)/liboffsetfinder64-proc - - .PHONY: liboffsetfinder64 liboffsetfinder64-package -diff --git a/makefiles/libplist.mk b/makefiles/libplist.mk -index 13c07db8..01ae375c 100644 ---- a/makefiles/libplist.mk -+++ b/makefiles/libplist.mk -@@ -3,12 +3,13 @@ $(error Use the main Makefile) - endif - - SUBPROJECTS += libplist --LIBPLIST_VERSION := 2.2.0 --DEB_LIBPLIST_V ?= $(LIBPLIST_VERSION) -+LIBPLIST_COMMIT := $(shell cat build_tools/versions.json | jq -r '.versions.libplist.commit' | tr -d '\n') -+LIBPLIST_VERSION := $(shell cat build_tools/versions.json | jq -r '.versions.libplist.version2' | tr -d '\n').$(shell echo $(LIBPLIST_COMMIT) | cut -c -7) -+DEB_LIBPLIST_V ?= $(LIBPLIST_VERSION) - - libplist-setup: setup -- $(call GITHUB_ARCHIVE,libimobiledevice,libplist,$(LIBPLIST_VERSION),$(LIBPLIST_VERSION)) -- $(call EXTRACT_TAR,libplist-$(LIBPLIST_VERSION).tar.gz,libplist-$(LIBPLIST_VERSION),libplist) -+ $(call GITHUB_ARCHIVE,libimobiledevice,libplist,$(LIBPLIST_COMMIT),$(LIBPLIST_COMMIT)) -+ $(call EXTRACT_TAR,libplist-$(LIBPLIST_COMMIT).tar.gz,libplist-$(LIBPLIST_COMMIT),libplist) - - ifneq ($(wildcard $(BUILD_WORK)/libplist/.build_complete),) - libplist: -@@ -18,7 +19,6 @@ libplist: libplist-setup - cd $(BUILD_WORK)/libplist && ./autogen.sh \ - $(DEFAULT_CONFIGURE_FLAGS) \ - --without-cython -- +$(MAKE) -C $(BUILD_WORK)/libplist - +$(MAKE) -C $(BUILD_WORK)/libplist install \ - DESTDIR="$(BUILD_STAGE)/libplist" - $(call AFTER_BUILD,copy) -@@ -27,45 +27,22 @@ endif - libplist-package: .SHELLFLAGS=-O extglob -c - libplist-package: libplist-stage - # libplist.mk Package Structure -- rm -rf $(BUILD_DIST)/libplist{3,-dev,-utils} $(BUILD_DIST)/libplist++{3v5,-dev} -- mkdir -p $(BUILD_DIST)/libplist3/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib \ -- $(BUILD_DIST)/libplist-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/{include/plist,lib/pkgconfig} \ -- $(BUILD_DIST)/libplist-utils/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) \ -- $(BUILD_DIST)/libplist++3v5/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib \ -- $(BUILD_DIST)/libplist++-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/{include/plist,lib/pkgconfig} -+ rm -rf $(BUILD_DIST)/libplist-proc -+ mkdir -p $(BUILD_DIST)/libplist-proc/{Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX),Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libplist} - -- # libplist.mk Prep libplist3 -- cp -a $(BUILD_STAGE)/libplist/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/libplist-2.0.3.dylib $(BUILD_DIST)/libplist3/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib - -- # libplist.mk Prep libplist-dev -- cp -a $(BUILD_STAGE)/libplist/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include/plist/plist.h $(BUILD_DIST)/libplist-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include/plist -- cp -a $(BUILD_STAGE)/libplist/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/libplist-2.0.{a,dylib} $(BUILD_DIST)/libplist-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- cp -a $(BUILD_STAGE)/libplist/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/pkgconfig/libplist-2.0.pc $(BUILD_DIST)/libplist-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/pkgconfig -- -- # libplist.mk Prep libplist-utils -- cp -a $(BUILD_STAGE)/libplist/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/{bin,share} $(BUILD_DIST)/libplist-utils/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -- -- # libplist.mk Prep libplist++3v5 -- cp -a $(BUILD_STAGE)/libplist/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/libplist++-2.0.3.dylib $(BUILD_DIST)/libplist++3v5/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- -- # libplist.mk Prep libplist++-dev -- cp -a $(BUILD_STAGE)/libplist/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include/plist/!(plist).h $(BUILD_DIST)/libplist++-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include/plist -- cp -a $(BUILD_STAGE)/libplist/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/libplist++-2.0.{a,dylib} $(BUILD_DIST)/libplist++-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- cp -a $(BUILD_STAGE)/libplist/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/pkgconfig/libplist++-2.0.pc $(BUILD_DIST)/libplist++-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/pkgconfig -+ # libplist.mk Prep libplist-proc -+ cp -a $(BUILD_STAGE)/libplist/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib $(BUILD_DIST)/libplist-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ cp -a $(BUILD_STAGE)/libplist/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libplist-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ touch $(BUILD_DIST)/libplist-proc/Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libplist/.build_complete - - # libplist.mk Sign -- $(call SIGN,libplist3,general.xml) -- $(call SIGN,libplist-utils,general.xml) -- $(call SIGN,libplist++3v5,general.xml) -+ $(call SIGN,libplist-proc,general.xml) - - # libplist.mk Make .debs -- $(call PACK,libplist3,DEB_LIBPLIST_V) -- $(call PACK,libplist-dev,DEB_LIBPLIST_V) -- $(call PACK,libplist-utils,DEB_LIBPLIST_V) -- $(call PACK,libplist++3v5,DEB_LIBPLIST_V) -- $(call PACK,libplist++-dev,DEB_LIBPLIST_V) -+ $(call PACK,libplist-proc,DEB_LIBPLIST_V) - - # libplist.mk Build cleanup -- rm -rf $(BUILD_DIST)/libplist{3,-dev,-utils} $(BUILD_DIST)/libplist++{3v5,-dev} -+ rm -rf $(BUILD_DIST)/libplist-proc - - .PHONY: libplist libplist-package -diff --git a/makefiles/libpng16.mk b/makefiles/libpng16.mk -index 6a851596..eea42582 100644 ---- a/makefiles/libpng16.mk -+++ b/makefiles/libpng16.mk -@@ -3,12 +3,13 @@ $(error Use the main Makefile) - endif - - SUBPROJECTS += libpng16 --LIBPNG16_VERSION := 1.6.37 --DEB_LIBPNG16_V ?= $(LIBPNG16_VERSION)-2 -+LIBPNG16_VERSION := $(shell cat build_tools/versions.json | jq -r '.versions.libpng16.version2' | tr -d '\n') -+LIBPNG16_COMMIT := $(shell cat build_tools/versions.json | jq -r '.versions.libpng16.commit' | tr -d '\n') -+DEB_LIBPNG16_V ?= $(LIBPNG16_VERSION) - - libpng16-setup: setup -- wget -q -nc -P $(BUILD_SOURCE) https://sourceforge.net/projects/libpng/files/libpng16/$(LIBPNG16_VERSION)/libpng-$(LIBPNG16_VERSION).tar.xz -- $(call EXTRACT_TAR,libpng-$(LIBPNG16_VERSION).tar.xz,libpng-$(LIBPNG16_VERSION),libpng16) -+ $(call GITHUB_ARCHIVE,glennrp,libpng,$(LIBPNG16_COMMIT),$(LIBPNG16_COMMIT)) -+ $(call EXTRACT_TAR,libpng-$(LIBPNG16_COMMIT).tar.gz,libpng-$(LIBPNG16_COMMIT),libpng16) - # Fix the .pc file to use Apple's zlib - sed -i 's/Requires: zlib/Requires: /;s/\(Libs:.*\)/\1 -lz/' $(BUILD_WORK)/libpng16/libpng.pc.in - $(call DO_PATCH,libpng16,libpng16,-p1) -@@ -20,7 +21,6 @@ else - libpng16: libpng16-setup - cd $(BUILD_WORK)/libpng16 && ./configure -C \ - $(DEFAULT_CONFIGURE_FLAGS) -- +$(MAKE) -C $(BUILD_WORK)/libpng16 - +$(MAKE) -C $(BUILD_WORK)/libpng16 install \ - DESTDIR=$(BUILD_STAGE)/libpng16 - $(call AFTER_BUILD,copy) -@@ -28,33 +28,21 @@ endif - - libpng16-package: libpng16-stage - # libpng16.mk Package Structure -- rm -rf $(BUILD_DIST)/libpng16-{16,dev,tools} -- mkdir -p $(BUILD_DIST)/libpng16-16/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib \ -- $(BUILD_DIST)/libpng16-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/{bin,lib} \ -- $(BUILD_DIST)/libpng16-tools/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin -+ rm -rf $(BUILD_DIST)/libpng16-proc -+ mkdir -p $(BUILD_DIST)/libpng16-proc/{Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX),Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libpng16} - -- # libpng16.mk Prep libpng16-16 -- cp -a $(BUILD_STAGE)/libpng16/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/libpng16.16.dylib $(BUILD_DIST)/libpng16-16/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- -- # libpng16.mk Prep libpng16-dev -- cp -a $(BUILD_STAGE)/libpng16/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin/*-config $(BUILD_DIST)/libpng16-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin -- cp -a $(BUILD_STAGE)/libpng16/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/!(libpng16.16.dylib) $(BUILD_DIST)/libpng16-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- cp -a $(BUILD_STAGE)/libpng16/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libpng16-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -- cp -a $(BUILD_STAGE)/libpng16/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/share $(BUILD_DIST)/libpng16-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -- -- # libpng16.mk Prep libpng16-tools -- cp -a $(BUILD_STAGE)/libpng16/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin/!(*-config) $(BUILD_DIST)/libpng16-tools/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin -+ # libpng16.mk Prep libpng16-proc -+ cp -a $(BUILD_STAGE)/libpng16/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib $(BUILD_DIST)/libpng16-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ cp -a $(BUILD_STAGE)/libpng16/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libpng16-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ touch $(BUILD_DIST)/libpng16-proc/Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libpng16/.build_complete - - # libpng16.mk Sign -- $(call SIGN,libpng16-16,general.xml) -- $(call SIGN,libpng16-tools,general.xml) -+ $(call SIGN,libpng16-proc,general.xml) - - # libpng16.mk Make .debs -- $(call PACK,libpng16-16,DEB_LIBPNG16_V) -- $(call PACK,libpng16-dev,DEB_LIBPNG16_V) -- $(call PACK,libpng16-tools,DEB_LIBPNG16_V) -+ $(call PACK,libpng16-proc,DEB_LIBPNG16_V) - - # libpng16.mk Build cleanup -- rm -rf $(BUILD_DIST)/libpng16-{16,dev,tools} -+ rm -rf $(BUILD_DIST)/libpng16-proc - - .PHONY: libpng16 libpng16-package -diff --git a/makefiles/libusbmuxd.mk b/makefiles/libusbmuxd.mk -index 80d1dfd0..9b2959f0 100644 ---- a/makefiles/libusbmuxd.mk -+++ b/makefiles/libusbmuxd.mk -@@ -3,21 +3,21 @@ $(error Use the main Makefile) - endif - - SUBPROJECTS += libusbmuxd --LIBUSBMUXD_VERSION := 2.0.2 -+LIBUSBMUXD_COMMIT := $(shell cat build_tools/versions.json | jq -r '.versions.libusbmuxd.commit' | tr -d '\n') -+LIBUSBMUXD_VERSION := $(shell cat build_tools/versions.json | jq -r '.versions.libusbmuxd.version2' | tr -d '\n').$(shell echo $(LIBUSBMUXD_COMMIT) | cut -c -7) - DEB_LIBUSBMUXD_V ?= $(LIBUSBMUXD_VERSION) - - libusbmuxd-setup: setup -- $(call GITHUB_ARCHIVE,libimobiledevice,libusbmuxd,$(LIBUSBMUXD_VERSION),$(LIBUSBMUXD_VERSION)) -- $(call EXTRACT_TAR,libusbmuxd-$(LIBUSBMUXD_VERSION).tar.gz,libusbmuxd-$(LIBUSBMUXD_VERSION),libusbmuxd) -+ $(call GITHUB_ARCHIVE,libimobiledevice,libusbmuxd,$(LIBUSBMUXD_COMMIT),$(LIBUSBMUXD_COMMIT)) -+ $(call EXTRACT_TAR,libusbmuxd-$(LIBUSBMUXD_COMMIT).tar.gz,libusbmuxd-$(LIBUSBMUXD_COMMIT),libusbmuxd) - - ifneq ($(wildcard $(BUILD_WORK)/libusbmuxd/.build_complete),) - libusbmuxd: - @echo "Using previously built libusbmuxd." - else --libusbmuxd: libusbmuxd-setup libplist -+libusbmuxd: libusbmuxd-setup libplist libimobiledevice-glue - cd $(BUILD_WORK)/libusbmuxd && ./autogen.sh \ - $(DEFAULT_CONFIGURE_FLAGS) -- +$(MAKE) -C $(BUILD_WORK)/libusbmuxd - +$(MAKE) -C $(BUILD_WORK)/libusbmuxd install \ - DESTDIR="$(BUILD_STAGE)/libusbmuxd" - $(call AFTER_BUILD,copy) -@@ -25,31 +25,21 @@ endif - - libusbmuxd-package: libusbmuxd-stage - # libusbmuxd.mk Package Structure -- rm -rf $(BUILD_DIST)/libusbmuxd{6,-dev,-tools} -- mkdir -p $(BUILD_DIST)/libusbmuxd6/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib \ -- $(BUILD_DIST)/libusbmuxd-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib \ -- $(BUILD_DIST)/libusbmuxd-tools/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ rm -rf $(BUILD_DIST)/libusbmuxd-proc -+ mkdir -p $(BUILD_DIST)/libusbmuxd-proc/{Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX),Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libusbmuxd} - -- # libusbmuxd.mk Prep libusbmuxd6 -- cp -a $(BUILD_STAGE)/libusbmuxd/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/libusbmuxd-2.0.6.dylib $(BUILD_DIST)/libusbmuxd6/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/ -- -- # libusbmuxd.mk Prep libusbmuxd-dev -- cp -a $(BUILD_STAGE)/libusbmuxd/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/{pkgconfig,libusbmuxd-2.0.{a,dylib}} $(BUILD_DIST)/libusbmuxd-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- cp -a $(BUILD_STAGE)/libusbmuxd/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libusbmuxd-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -- -- # libusbmuxd.mk Prep libusbmuxd-tools -- cp -a $(BUILD_STAGE)/libusbmuxd/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/{bin,share} $(BUILD_DIST)/libusbmuxd-tools/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ # libusbmuxd.mk Prep libusbmuxd-proc -+ cp -a $(BUILD_STAGE)/libusbmuxd/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib $(BUILD_DIST)/libusbmuxd-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ cp -a $(BUILD_STAGE)/libusbmuxd/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libusbmuxd-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ touch $(BUILD_DIST)/libusbmuxd-proc/Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libusbmuxd/.build_complete - - # libusbmuxd.mk Sign -- $(call SIGN,libusbmuxd6,general.xml) -- $(call SIGN,libusbmuxd-tools,general.xml) -+ $(call SIGN,libusbmuxd-proc,general.xml) - - # libusbmuxd.mk Make .debs -- $(call PACK,libusbmuxd6,DEB_LIBUSBMUXD_V) -- $(call PACK,libusbmuxd-dev,DEB_LIBUSBMUXD_V) -- $(call PACK,libusbmuxd-tools,DEB_LIBUSBMUXD_V) -+ $(call PACK,libusbmuxd-proc,DEB_LIBUSBMUXD_V) - - # libusbmuxd.mk Build cleanup -- rm -rf $(BUILD_DIST)/libusbmuxd{6,-dev,-tools} -+ rm -rf $(BUILD_DIST)/libusbmuxd-proc - - .PHONY: libusbmuxd libusbmuxd-package -diff --git a/makefiles/libzip.mk b/makefiles/libzip.mk -index f6599696..8aa12ab6 100644 ---- a/makefiles/libzip.mk -+++ b/makefiles/libzip.mk -@@ -3,67 +3,55 @@ $(error Use the main Makefile) - endif - - SUBPROJECTS += libzip --LIBZIP_VERSION := 1.7.3 --DEB_LIBZIP_V ?= $(LIBZIP_VERSION)-1 -+LIBZIP_VERSION := $(shell cat build_tools/versions.json | jq -r '.versions.libzip.version2' | tr -d '\n') -+LIBZIP_COMMIT := $(shell cat build_tools/versions.json | jq -r '.versions.libzip.commit' | tr -d '\n') -+DEB_LIBZIP_V ?= $(LIBZIP_VERSION) - - libzip-setup: setup -- wget -q -nc -P $(BUILD_SOURCE) https://libzip.org/download/libzip-$(LIBZIP_VERSION).tar.gz -- $(call EXTRACT_TAR,libzip-$(LIBZIP_VERSION).tar.gz,libzip-$(LIBZIP_VERSION),libzip) -+ $(call GITHUB_ARCHIVE,nih-at,libzip,$(LIBZIP_COMMIT),$(LIBZIP_COMMIT)) -+ $(call EXTRACT_TAR,libzip-$(LIBZIP_COMMIT).tar.gz,libzip-$(LIBZIP_COMMIT),libzip) - - ifneq ($(wildcard $(BUILD_WORK)/libzip/.build_complete),) - libzip: - @echo "Using previously built libzip." - else --libzip: libzip-setup xz openssl -+libzip: libzip-setup openssl - cd $(BUILD_WORK)/libzip && cmake . \ - $(DEFAULT_CMAKE_FLAGS) \ -+ -DBUILD_SHARED_LIBS=0 \ -+ -DENABLE_LZMA=OFF \ -+ -DENABLE_BZIP2=OFF \ - -DCOMMON_ARCH=$(DEB_ARCH) \ - -DENABLE_COMMONCRYPTO=OFF \ - -DENABLE_GNUTLS=OFF \ - -DENABLE_MBEDTLS=OFF \ - -DENABLE_WINDOWS_CRYPTO=OFF \ - -DENABLE_OPENSSL=ON -- +$(MAKE) -C $(BUILD_WORK)/libzip -- +$(MAKE) -C $(BUILD_WORK)/libzip install \ -+ sed -i '77,80d' $(BUILD_WORK)/libzip/cmake_install.cmake -+ +$(MAKE) zip/fast -C $(BUILD_WORK)/libzip -+ +$(MAKE) -C $(BUILD_WORK)/libzip install/strip/fast \ - DESTDIR="$(BUILD_STAGE)/libzip" - $(call AFTER_BUILD,copy) - endif - - libzip-package: libzip-stage - # libzip.mk Package Structure -- rm -rf $(BUILD_DIST)/libzip{5,-dev} $(BUILD_DIST)/zip{cmp,merge,tool} -- mkdir -p $(BUILD_DIST)/libzip5/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib \ -- $(BUILD_DIST)/libzip-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/{lib,share/man} \ -- $(BUILD_DIST)/zip{cmp,merge,tool}/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/{bin,share/man/man1} -+ rm -rf $(BUILD_DIST)/libzip-proc -+ mkdir -p $(BUILD_DIST)/libzip-proc/{Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX),Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libzip} - -- # libzip.mk Prep libzip5 -- cp -a $(BUILD_STAGE)/libzip/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/libzip.5*.dylib $(BUILD_DIST)/libzip5/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- -- # libzip.mk Prep libzip-dev -- cp -a $(BUILD_STAGE)/libzip/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/!(libzip.5*.dylib) $(BUILD_DIST)/libzip-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- cp -a $(BUILD_STAGE)/libzip/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/share/man/man3 $(BUILD_DIST)/libzip-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/share/man -- cp -a $(BUILD_STAGE)/libzip/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libzip-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -- -- # libzip.mk Prep zip{cmp,merge,tool} -- for bin in zip{cmp,merge,tool}; do \ -- cp -a $(BUILD_STAGE)/libzip/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin/$$bin $(BUILD_DIST)/$$bin/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin; \ -- cp -a $(BUILD_STAGE)/libzip/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/share/man/man1/$$bin.1 $(BUILD_DIST)/$$bin/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/share/man/man1; \ -- done -+ # libzip.mk Prep libzip-proc -+ cp -a $(BUILD_STAGE)/libzip/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib $(BUILD_DIST)/libzip-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ rm -rf $(BUILD_DIST)/libzip-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/cmake -+ cp -a $(BUILD_STAGE)/libzip/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libzip-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ touch $(BUILD_DIST)/libzip-proc/Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/libzip/.build_complete - - # libzip.mk Sign -- $(call SIGN,libzip5,general.xml) -- $(call SIGN,zipcmp,general.xml) -- $(call SIGN,zipmerge,general.xml) -- $(call SIGN,ziptool,general.xml) -+ $(call SIGN,libzip-proc,general.xml) - - # libzip.mk Make .debs -- $(call PACK,libzip5,DEB_LIBZIP_V) -- $(call PACK,libzip-dev,DEB_LIBZIP_V) -- $(call PACK,zipcmp,DEB_LIBZIP_V) -- $(call PACK,zipmerge,DEB_LIBZIP_V) -- $(call PACK,ziptool,DEB_LIBZIP_V) -+ $(call PACK,libzip-proc,DEB_LIBZIP_V) - - # libzip.mk Build cleanup -- rm -rf $(BUILD_DIST)/libzip{5,-dev} $(BUILD_DIST)/zip{cmp,merge,tool} -+ rm -rf $(BUILD_DIST)/libzip-proc - - .PHONY: libzip libzip-package -diff --git a/makefiles/openssl.mk b/makefiles/openssl.mk -index c65be423..462b35d0 100644 ---- a/makefiles/openssl.mk -+++ b/makefiles/openssl.mk -@@ -2,15 +2,24 @@ ifneq ($(PROCURSUS),1) - $(error Use the main Makefile) - endif - -+ifneq (,$(findstring aarch64,$(GNU_HOST_TRIPLE))) -+ SSL_SCHEME := darwin64-arm64-cc -+else ifneq (,$(findstring arm,$(GNU_HOST_TRIPLE))) -+ SSL_SCHEME := arm-apple-darwin -+else ifneq (,$(findstring x86_64,$(GNU_HOST_TRIPLE))) -+ SSL_SCHEME := darwin64-x86_64-cc -+else -+ $(error Host triple $(GNU_HOST_TRIPLE) isn't supported) -+endif -+ - STRAPPROJECTS += openssl --OPENSSL_VERSION := 3.0.0 -+OPENSSL_VERSION := $(shell cat build_tools/versions.json | jq -r '.versions.openssl.version2' | tr -d '\n') -+OPENSSL_COMMIT := $(shell cat build_tools/versions.json | jq -r '.versions.openssl.commit' | tr -d '\n') - DEB_OPENSSL_V ?= $(OPENSSL_VERSION) - - openssl-setup: setup -- wget -q -nc -P $(BUILD_SOURCE) https://www.openssl.org/source/openssl-$(OPENSSL_VERSION).tar.gz{,.asc} -- $(call PGP_VERIFY,openssl-$(OPENSSL_VERSION).tar.gz,asc) -- $(call EXTRACT_TAR,openssl-$(OPENSSL_VERSION).tar.gz,openssl-$(OPENSSL_VERSION),openssl) -- $(call DO_PATCH,openssl,openssl,-p1) -+ $(call GITHUB_ARCHIVE,openssl,openssl,$(OPENSSL_COMMIT),$(OPENSSL_COMMIT)) -+ $(call EXTRACT_TAR,openssl-$(OPENSSL_COMMIT).tar.gz,openssl-$(OPENSSL_COMMIT),openssl) - - ifneq ($(wildcard $(BUILD_WORK)/openssl/.build_complete),) - openssl: -@@ -22,44 +31,29 @@ openssl: openssl-setup - --openssldir=$(MEMO_PREFIX)/etc/ssl \ - shared \ - no-tests \ -- darwin64-$$(echo $(LLVM_TARGET) | cut -f1 -d-) -- +$(MAKE) -C $(BUILD_WORK)/openssl -- +$(MAKE) -C $(BUILD_WORK)/openssl install install_ssldirs \ -+ $(SSL_SCHEME) -+ +$(MAKE) -C $(BUILD_WORK)/openssl install_dev \ - DESTDIR=$(BUILD_STAGE)/openssl - $(call AFTER_BUILD,copy) - endif - - openssl-package: openssl-stage - # openssl.mk Package Structure -- rm -rf $(BUILD_DIST)/{openssl,libssl{3,-dev,-doc}} -- mkdir -p $(BUILD_DIST)/{openssl/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin,libssl{3,-dev}/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib} \ -- $(BUILD_DIST)/libssl-doc/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/share/ -- -- # openssl.mk Prep libssl3 -- cp -a $(BUILD_STAGE)/openssl/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/{*.3.dylib,engines-3,ossl-modules} $(BUILD_DIST)/libssl3/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- -- # openssl.mk Prep libssl-dev -- cp -a $(BUILD_STAGE)/openssl/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/{lib{ssl,crypto}.{a,dylib},pkgconfig} $(BUILD_DIST)/libssl-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -- cp -a $(BUILD_STAGE)/openssl/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libssl-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -- -- # openssl.mk Prep libssl-doc -- cp -a $(BUILD_STAGE)/openssl/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/share/man $(BUILD_DIST)/libssl-doc/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/share/ -- -- # openssl.mk Prep openssl -- cp -a $(BUILD_STAGE)/openssl/$(MEMO_PREFIX)/etc $(BUILD_DIST)/openssl/$(MEMO_PREFIX) -- cp -a $(BUILD_STAGE)/openssl/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin/* $(BUILD_DIST)/openssl/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin -- -+ rm -rf $(BUILD_DIST)/libssl-proc -+ mkdir -p $(BUILD_DIST)/libssl-proc/{Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX),Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/openssl} -+ -+ # openssl.mk Prep libssl-proc -+ cp -a $(BUILD_STAGE)/openssl/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib $(BUILD_DIST)/libssl-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ cp -a $(BUILD_STAGE)/openssl/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include $(BUILD_DIST)/libssl-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ touch $(BUILD_DIST)/libssl-proc/Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/openssl/.build_complete -+ - # openssl.mk Sign -- $(call SIGN,libssl3,general.xml) -- $(call SIGN,openssl,general.xml) -- -+ $(call SIGN,libssl-proc,general.xml) -+ - # openssl.mk Make .debs -- $(call PACK,libssl3,DEB_OPENSSL_V) -- $(call PACK,libssl-dev,DEB_OPENSSL_V) -- $(call PACK,libssl-doc,DEB_OPENSSL_V) -- $(call PACK,openssl,DEB_OPENSSL_V) -- -+ $(call PACK,libssl-proc,DEB_OPENSSL_V) -+ - # openssl.mk Build cleanup -- rm -rf $(BUILD_DIST)/{openssl,libssl{3,-dev,-doc}} -+ rm -rf $(BUILD_DIST)/libssl-proc - - .PHONY: openssl openssl-package -diff --git a/makefiles/tsschecker.mk b/makefiles/tsschecker.mk -index e23b84a0..83faf477 100644 ---- a/makefiles/tsschecker.mk -+++ b/makefiles/tsschecker.mk -@@ -3,30 +3,27 @@ $(error Use the main Makefile) - endif - - SUBPROJECTS += tsschecker --TSSCHECKER_VERSION := 334 --TSSCHECKER_COMMIT := 1b5e82e3c8275874a3595c2c57cd5ea9921dc2e2 -+#TSSCHECKER_VERSION := $(shell cat build_tools/versions.json | jq -r '.versions.tsschecker.version' | tr -d '\n') -+#TSSCHECKER_COMMIT := $(shell cat build_tools/versions.json | jq -r '.versions.tsschecker.commit' | tr -d '\n') - DEB_TSSCHECKER_V ?= $(TSSCHECKER_VERSION) - - tsschecker-setup: setup -- $(call GITHUB_ARCHIVE,1Conan,tsschecker,$(TSSCHECKER_COMMIT),$(TSSCHECKER_COMMIT)) -- $(call GITHUB_ARCHIVE,tihmstar,jssy,master,master) -- $(call EXTRACT_TAR,tsschecker-$(TSSCHECKER_COMMIT).tar.gz,tsschecker-$(TSSCHECKER_COMMIT),tsschecker) -- # so EXTRACT_TAR wont fail -- -rmdir $(BUILD_WORK)/tsschecker/external/jssy -- $(call EXTRACT_TAR,jssy-master.tar.gz,jssy-master,tsschecker/external/jssy) -- -- sed -i 's/git rev\-list \-\-count HEAD/printf ${TSSCHECKER_VERSION}/g' $(BUILD_WORK)/tsschecker/configure.ac -- sed -i 's/git rev\-parse HEAD/printf ${TSSCHECKER_COMMIT}/g' $(BUILD_WORK)/tsschecker/configure.ac -+ ln -sf ~/source/tsschecker $(BUILD_WORK)/ - - - ifneq ($(wildcard $(BUILD_WORK)/tsschecker/.build_complete),) - tsschecker: - @echo "Using previously built tsschecker." - else --tsschecker: tsschecker-setup libfragmentzip libplist curl libirecovery -+tsschecker: tsschecker-setup libfragmentzip libplist libirecovery -+ fd -pe dylib -X rm \; '.*' build_* - cd $(BUILD_WORK)/tsschecker && ./autogen.sh \ -- $(DEFAULT_CONFIGURE_FLAGS) -- +$(MAKE) -C $(BUILD_WORK)/tsschecker -+ $(DEFAULT_CONFIGURE_FLAGS) \ -+ libfragmentzip_LIBS="-L$(TARGET_SYSROOT)/usr/lib -lcurl" \ -+ libfragmentzip_CFLAGS="-I$(TARGET_SYSROOT)/usr/include" \ -+ libcurl_LIBS="-L$(TARGET_SYSROOT)/usr/lib -lcurl" \ -+ libcurl_CFLAGS="-I$(TARGET_SYSROOT)/usr/include" \ -+ LDFLAGS="$(LDFLAGS) -L$(TARGET_SYSROOT)/usr/lib -lz -framework CoreFoundation -framework IOKit -L$(BUILD_BASE)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib -lfragmentzip -limobiledevice-glue-1.0" - +$(MAKE) -C $(BUILD_WORK)/tsschecker install \ - DESTDIR="$(BUILD_STAGE)/tsschecker" - $(call AFTER_BUILD) -diff --git a/makefiles/xpwn.mk b/makefiles/xpwn.mk -index 47e3d374..10b13dc5 100644 ---- a/makefiles/xpwn.mk -+++ b/makefiles/xpwn.mk -@@ -3,14 +3,13 @@ $(error Use the main Makefile) - endif - - SUBPROJECTS += xpwn --XPWN_COMMIT := def39d6e0ed0fdec0a0ff526bd11bec15d8de4e7 --XPWN_VERSION := 0.5.8+git20201206.$(shell echo $(XPWN_COMMIT) | cut -c -7) -+XPWN_COMMIT := $(shell cat build_tools/versions.json | jq -r '.versions.xpwn.commit' | tr -d '\n') -+XPWN_VERSION := $(shell cat build_tools/versions.json | jq -r '.versions.xpwn.version2' | tr -d '\n').$(shell echo $(XPWN_COMMIT) | cut -c -7) - DEB_XPWN_V ?= $(XPWN_VERSION) - - xpwn-setup: setup -- $(call GITHUB_ARCHIVE,OothecaPickle,xpwn,$(XPWN_COMMIT),$(XPWN_COMMIT)) -+ $(call GITHUB_ARCHIVE,nyuszika7h,xpwn,$(XPWN_COMMIT),$(XPWN_COMMIT)) - $(call EXTRACT_TAR,xpwn-$(XPWN_COMMIT).tar.gz,xpwn-$(XPWN_COMMIT),xpwn) -- $(call DO_PATCH,xpwn,xpwn,-p1) - - sed -i 's/powerpc-apple-darwin8-libtool/libtool/' $(BUILD_WORK)/xpwn/ipsw-patch/CMakeLists.txt - -@@ -21,36 +20,29 @@ else - xpwn: xpwn-setup libpng16 openssl - cd $(BUILD_WORK)/xpwn && cmake . \ - $(DEFAULT_CMAKE_FLAGS) \ -+ -DBUILD_SHARED_LIBS=0 \ - -DBZIP2_LIBRARIES="-L$(TARGET_SYSROOT)/usr/lib -lbz2" \ - -DZLIB_LIBRARY="-L$(TARGET_SYSROOT)/usr/lib -lz" -- +$(MAKE) -C $(BUILD_WORK)/xpwn -- +$(MAKE) -C $(BUILD_WORK)/xpwn install \ -- DESTDIR=$(BUILD_STAGE)/xpwn -+ +$(MAKE) common/fast xpwn/fast -C $(BUILD_WORK)/xpwn - mkdir -p {$(BUILD_BASE),$(BUILD_STAGE)/xpwn}/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/{include/xpwn,lib/xpwn} - cp -a $(BUILD_WORK)/xpwn/includes/* $(BUILD_STAGE)/xpwn/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/include/xpwn -- cp -a $(BUILD_WORK)/xpwn/{ipsw-patch/libxpwn,minizip/libminizip,common/libcommon,hfs/libhfs,dmg/libdmg}.a $(BUILD_STAGE)/xpwn/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/xpwn -+ cp -a $(BUILD_WORK)/xpwn/{ipsw-patch/libxpwn,common/libcommon}.a $(BUILD_STAGE)/xpwn/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/lib/xpwn - $(call AFTER_BUILD,copy) - endif - - xpwn-package: xpwn-stage - # xpwn.mk Package Structure -- rm -rf $(BUILD_DIST)/{libxpwn-dev,xpwn} -- mkdir -p $(BUILD_DIST)/{libxpwn-dev,xpwn}/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ rm -rf $(BUILD_DIST)/libxpwn-proc -+ mkdir -p $(BUILD_DIST)/libxpwn-proc/{Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX),Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/xpwn} - -- # xpwn.mk Prep xpwn -- cp -a $(BUILD_STAGE)/xpwn/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/{bin,share} $(BUILD_DIST)/xpwn/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -- -- # xpwn.mk Prep libxpwn-dev -- cp -a $(BUILD_STAGE)/xpwn/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/{include,lib} $(BUILD_DIST)/libxpwn-dev/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -- -- # xpwn.mk Sign -- $(call SIGN,xpwn,general.xml) -+ # xpwn.mk Prep libxpwn-proc -+ cp -a $(BUILD_STAGE)/xpwn/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/{include,lib} $(BUILD_DIST)/libxpwn-proc/Users/runner/Procursus/build_base/$(MEMO_TARGET)/$(MEMO_CFVER)$(MEMO_PREFIX)$(MEMO_SUB_PREFIX) -+ touch $(BUILD_DIST)/libxpwn-proc/Users/runner/Procursus/build_work/$(MEMO_TARGET)/$(MEMO_CFVER)/xpwn/.build_complete - - # xpwn.mk Make .debs -- $(call PACK,xpwn,DEB_XPWN_V) -- $(call PACK,libxpwn-dev,DEB_XPWN_V) -+ $(call PACK,libxpwn-proc,DEB_XPWN_V) - - # xpwn.mk Build cleanup -- rm -rf $(BUILD_DIST)/{libxpwn-dev,xpwn} -+ rm -rf $(BUILD_DIST)/libxpwn-proc - - .PHONY: xpwn xpwn-package diff --git a/.gitignore b/.gitignore index 027c87fd..457a8c39 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ aclocal.m4 autom4te.cache compile +!.github/workflows/config.guess config.* configure depcomp diff --git a/README.md b/README.md index 24abdb62..14c551dd 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,8 @@ Usage: `futurerestore [OPTIONS] iPSW` | | ` --set-nonce=0xNONCE ` | Set custom nonce then exit recovery(requires use-pwndfu) | | | ` --serial ` | Enable serial during boot(requires serial cable and use-pwndfu) | | | ` --boot-args "BOOTARGS" ` | Set custom restore boot-args(PROCEED WITH CAUTION)(requires use-pwndfu) | +| | ` --no-cache ` | Disable cached patched iBSS/iBEC(requires use-pwndfu) | +| | ` --skip-blob ` | Skip SHSH blob validation(PROCEED WITH CAUTION)(requires use-pwndfu) | | | ` --latest-sep ` | Use latest signed SEP instead of manually specifying one | | ` -s ` | ` --sep PATH ` | Manually specify SEP to be flashed | | ` -m ` | ` --sep-manifest PATH ` | BuildManifest for requesting SEP ticket | diff --git a/futurerestore/futurerestore.cpp b/futurerestore/futurerestore.cpp index 88cde429..508757c2 100644 --- a/futurerestore/futurerestore.cpp +++ b/futurerestore/futurerestore.cpp @@ -509,28 +509,31 @@ void futurerestore::enterPwnRecovery(plist_t build_identity, std::string bootarg ibss_name.append(img3_end); ibec_name.append(img3_end); } - - ibss = fopen(ibss_name.c_str(), "rb"); - if(ibss) { - fseek(ibss, 0, SEEK_END); - iBSS.second = ftell(ibss); - fseek(ibss, 0, SEEK_SET); - retassure(iBSS.first = (char*)malloc(iBSS.second), "failed to malloc memory for Rose\n"); - size_t freadRet=0; - retassure((freadRet = fread((char*)iBSS.first, 1, iBSS.second, ibss)) == iBSS.second, "failed to load iBSS. size=%zu but fread returned %zu\n",iBSS.second,freadRet); - fclose(ibss); - cache1 = true; - } - ibec = fopen(ibec_name.c_str(), "rb"); - if(ibec) { - fseek(ibec, 0, SEEK_END); - iBEC.second = ftell(ibec); - fseek(ibec, 0, SEEK_SET); - retassure(iBEC.first = (char*)malloc(iBEC.second), "failed to malloc memory for Rose\n"); - size_t freadRet=0; - retassure((freadRet = fread((char*)iBEC.first, 1, iBEC.second, ibec)) == iBEC.second, "failed to load iBEC. size=%zu but fread returned %zu\n",iBEC.second,freadRet); - fclose(ibec); - cache2 = true; + if(!_noCache) { + ibss = fopen(ibss_name.c_str(), "rb"); + if (ibss) { + fseek(ibss, 0, SEEK_END); + iBSS.second = ftell(ibss); + fseek(ibss, 0, SEEK_SET); + retassure(iBSS.first = (char *) malloc(iBSS.second), "failed to malloc memory for Rose\n"); + size_t freadRet = 0; + retassure((freadRet = fread((char *) iBSS.first, 1, iBSS.second, ibss)) == iBSS.second, + "failed to load iBSS. size=%zu but fread returned %zu\n", iBSS.second, freadRet); + fclose(ibss); + cache1 = true; + } + ibec = fopen(ibec_name.c_str(), "rb"); + if (ibec) { + fseek(ibec, 0, SEEK_END); + iBEC.second = ftell(ibec); + fseek(ibec, 0, SEEK_SET); + retassure(iBEC.first = (char *) malloc(iBEC.second), "failed to malloc memory for Rose\n"); + size_t freadRet = 0; + retassure((freadRet = fread((char *) iBEC.first, 1, iBEC.second, ibec)) == iBEC.second, + "failed to load iBEC. size=%zu but fread returned %zu\n", iBEC.second, freadRet); + fclose(ibec); + cache2 = true; + } } /* Patch bootloaders */ @@ -1311,22 +1314,25 @@ void futurerestore::doRestore(const char *ipsw){ for now a simple pointercompare should be fine, because both plist_t should point into the same buildidentity inside the buildmanifest */ if (ticketIdentity != build_identity ){ error("BuildIdentity selected for restore does not match APTicket\n\n"); - printf("BuildIdentity selected for restore:\n"); + info("BuildIdentity selected for restore:\n"); img4tool::printGeneralBuildIdentityInformation(build_identity); - printf("\nBuildIdentity is valid for the APTicket:\n"); + info("\nBuildIdentity is valid for the APTicket:\n"); if (ticketIdentity) img4tool::printGeneralBuildIdentityInformation(ticketIdentity),putchar('\n'); else{ - printf("IM4M is not valid for any restore within the Buildmanifest\n"); - printf("This APTicket can't be used for restoring this firmware\n"); + info("IM4M is not valid for any restore within the Buildmanifest\n"); + info("This APTicket can't be used for restoring this firmware\n"); } - reterror("APTicket can't be used for this restore\n"); - }else{ - if (!img4tool::isIM4MSignatureValid({im4m.first,im4m.second})){ - printf("IM4M signature is not valid!\n"); + if(_skipBlob) { + info("[WARNING] NOT VALIDATING SHSH BLOBS!\n"); + } else { reterror("APTicket can't be used for this restore\n"); } - printf("Verified APTicket to be valid for this restore\n"); + }else{ + if (!img4tool::isIM4MSignatureValid({im4m.first,im4m.second})){ + info("IM4M signature is not valid!\n"); + } + info("Verified APTicket to be valid for this restore\n"); } }else if (_enterPwnRecoveryRequested){ info("[WARNING] skipping ramdisk hash check, since device is in pwnDFU according to user\n"); diff --git a/futurerestore/futurerestore.hpp b/futurerestore/futurerestore.hpp index 7ed9f616..3df193cb 100644 --- a/futurerestore/futurerestore.hpp +++ b/futurerestore/futurerestore.hpp @@ -84,7 +84,10 @@ class futurerestore { const char *_custom_nonce = NULL; const char *_boot_args = NULL; - + + bool _noCache = false; + bool _skipBlob = false; + bool _enterPwnRecoveryRequested = false; bool _rerestoreiOS9 = false; //methods @@ -134,6 +137,8 @@ public: void setKernelPath(const char *kernelPath); void setNonce(const char *custom_nonce){_custom_nonce = custom_nonce;}; void setBootArgs(const char *boot_args){_boot_args = boot_args;}; + void disableCache(){_noCache = true;}; + void skipBlobValidation(){_skipBlob = true;}; bool isUpdateInstall(){return _isUpdateInstall;}; plist_t sepManifest(){return _sepbuildmanifest;}; diff --git a/futurerestore/main.cpp b/futurerestore/main.cpp index ec760c20..c56ad993 100644 --- a/futurerestore/main.cpp +++ b/futurerestore/main.cpp @@ -55,6 +55,8 @@ static struct option longopts[] = { { "set-nonce", optional_argument, NULL, '7' }, { "serial", no_argument, NULL, '8' }, { "boot-args", required_argument, NULL, '9' }, + { "no-cache", no_argument, NULL, 'a' }, + { "skip-blob", no_argument, NULL, 'c' }, #endif { NULL, 0, NULL, 0 } }; @@ -71,7 +73,9 @@ static struct option longopts[] = { #define FLAG_SET_NONCE 1 << 9 #define FLAG_SERIAL 1 << 10 #define FLAG_BOOT_ARGS 1 << 11 -#define FLAG_NO_RESTORE_FR 1 << 12 +#define FLAG_NO_CACHE 1 << 12 +#define FLAG_SKIP_BLOB 1 << 13 +#define FLAG_NO_RESTORE_FR 1 << 14 void cmd_help(){ printf("Usage: futurerestore [OPTIONS] iPSW\n"); printf("Allows restoring to non-matching firmware with custom SEP+baseband\n"); @@ -94,6 +98,8 @@ void cmd_help(){ printf(" --set-nonce=0xNONCE\tSet custom nonce then exit recovery(requires use-pwndfu)\n"); printf(" --serial\t\t\tEnable serial during boot(requires serial cable and use-pwndfu)\n"); printf(" --boot-args\t\tSet custom restore boot-args(PROCEED WITH CAUTION)(requires use-pwndfu)\n"); + printf(" --no-cache\t\tDisable cached patched iBSS/iBEC(requires use-pwndfu)\n"); + printf(" --skip-blob\t\tSkip SHSH blob validation(PROCEED WITH CAUTION)(requires use-pwndfu)\n"); #endif printf("\nOptions for SEP:\n"); @@ -158,7 +164,7 @@ int main_r(int argc, const char * argv[]) { return -1; } - while ((opt = getopt_long(argc, (char* const *)argv, "ht:b:p:s:m:wudez0123456789", longopts, &optindex)) > 0) { + while ((opt = getopt_long(argc, (char* const *)argv, "ht:b:p:s:m:wudez0123456789ac", longopts, &optindex)) > 0) { switch (opt) { case 't': // long option: "apticket"; can be called as short option apticketPaths.push_back(optarg); @@ -222,6 +228,12 @@ int main_r(int argc, const char * argv[]) { flags |= FLAG_BOOT_ARGS; bootargs = (optarg) ? optarg : NULL; break; + case 'a': // long option: "no-cache"; + flags |= FLAG_NO_CACHE; + break; + case 'c': // long option: "skip-blob"; + flags |= FLAG_SKIP_BLOB; + break; #endif case 'e': // long option: "exit-recovery"; can be called as short option exitRecovery = true; @@ -279,6 +291,10 @@ int main_r(int argc, const char * argv[]) { } if(flags & FLAG_BOOT_ARGS) retassure((flags & FLAG_IS_PWN_DFU),"--boot-args requires --use-pwndfu\n"); + if(flags & FLAG_NO_CACHE) + retassure((flags & FLAG_IS_PWN_DFU),"--no-cache requires --use-pwndfu\n"); + if(flags & FLAG_SKIP_BLOB) + retassure((flags & FLAG_IS_PWN_DFU),"--skip-blob requires --use-pwndfu\n"); if (exitRecovery) { client.exitRecovery(); @@ -329,6 +345,14 @@ int main_r(int argc, const char * argv[]) { client.setBootArgs(bootargs); } + if(flags & FLAG_NO_CACHE) { + client.disableCache(); + } + + if(flags & FLAG_SKIP_BLOB) { + client.skipBlobValidation(); + } + if (flags & FLAG_LATEST_SEP){ info("user specified to use latest signed SEP\n"); client.loadLatestSep();