From: Jay Freeman (saurik) Date: Tue, 19 Feb 2019 05:12:35 +0000 (-0800) Subject: Update build environment to support sbigner's era. X-Git-Tag: v2.1.0~3 X-Git-Url: https://git.saurik.com/ldid.git/commitdiff_plain/6b3aca98060261601319f503b7c73fdfc6f46913 Update build environment to support sbigner's era. --- diff --git a/.gitignore b/.gitignore index 178d6ef..edf9bc5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ ldid.deb debs *.o _ +sysroot32 +sysroot64 diff --git a/control b/control index 9accbb8..5ef6018 100644 --- a/control +++ b/control @@ -8,4 +8,5 @@ Description: pseudo-codesign Mach-O files Name: Link Identity Editor Author: Jay Freeman (saurik) Depiction: http://cydia.saurik.com/info/ldid/ +Depends: libplist Tag: purpose::console, role::developer diff --git a/ios.sh b/ios.sh index fb7c409..f4c112c 100755 --- a/ios.sh +++ b/ios.sh @@ -1,2 +1,2 @@ #!/bin/bash -./make.sh true -Lsysroot/usr/lib +./make.sh true diff --git a/make.sh b/make.sh index d88a8b0..9c5361b 100755 --- a/make.sh +++ b/make.sh @@ -12,11 +12,25 @@ fi export DEVELOPER_DIR=/Applications/Xcode-5.1.1.app +os=() + if "${ios}"; then out=ios flags=(cycc -- -miphoneos-version-min=2.0 -arch armv6 -arch arm64) +flags+=(-Xarch_armv6 -Isysroot32/usr/include) +flags+=(-Xarch_arm64 -Isysroot64/usr/include) + +flags+=(-Xarch_armv6 -Lsysroot32/usr/lib) +flags+=(-Xarch_arm64 -Lsysroot64/usr/lib) + +static=false +flags+=(-framework CoreFoundation) + +flags+=(-lplist) +flags+=(-lcrypto) + else out=out @@ -32,20 +46,26 @@ else flags=(g++) fi +#flags+=(-L../../lib-osx/openssl) + +# XXX: cannot redistribute +static=true +flags+=(-Isysroot64/usr/include) +flags+=(-lcrypto) +#flags+=(-Wl,/usr/lib/libcrypto.42.dylib) + fi sdk=$(xcodebuild -sdk iphoneos -version Path) flags+=(-I.) + +if ${static}; then + flags+=(-I"${sdk}"/usr/include/libxml2) flags+=(-Ilibplist/include) flags+=(-Ilibplist/libcnary/include) -flags+=("$@") - -mkdir -p "${out}" -os=() - for c in libplist/libcnary/!(cnary).c libplist/src/*.c; do o=${c%.c}.o o="${out}"/${o##*/} @@ -55,10 +75,15 @@ for c in libplist/libcnary/!(cnary).c libplist/src/*.c; do fi done +fi + +flags+=("$@") + +mkdir -p "${out}" set -x -"${flags[@]}" -c -std=c++11 -o "${out}"/ldid.o ldid.cpp -"${flags[@]}" -o "${out}"/ldid "${out}"/ldid.o "${os[@]}" -x c lookup2.c -lxml2 -framework Security -lcrypto +"${flags[@]}" -O3 -g0 -c -std=c++11 -o "${out}"/ldid.o ldid.cpp +"${flags[@]}" -O3 -g0 -o "${out}"/ldid "${out}"/ldid.o "${os[@]}" -x c lookup2.c -lxml2 -framework Security if ! "${ios}"; then ln -sf out/ldid . diff --git a/sysroot.sh b/sysroot.sh new file mode 100755 index 0000000..5991701 --- /dev/null +++ b/sysroot.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -e + +rm -rf sysroot32 sysroot64 +mkdir -p sysroot32 sysroot64 + +function merge() { + wget --no-check-certificate "${apt}/$1" + dpkg-deb -x "$1" . +} + +pushd sysroot32 +apt=http://apt.saurik.com/debs +merge openssl_0.9.8zg-13_iphoneos-arm.deb +merge libplist_2.0.0-1_iphoneos-arm.deb +popd + +pushd sysroot64 +apt=https://apt.bingner.com/debs/1443.00 +merge libssl1.0_1.0.2q-1_iphoneos-arm.deb +merge libssl-dev_1.0.2q-1_iphoneos-arm.deb +merge libplist_2.0.0-1_iphoneos-arm.deb +popd diff --git a/version.sh b/version.sh index 6e484ed..19212f3 100755 --- a/version.sh +++ b/version.sh @@ -1,2 +1,2 @@ #!/bin/bash -echo "$(git describe --tags --dirty="+" --match="v*" | sed -e 's@-\([^-]*\)-\([^-]*\)$@+\1.\2@;s@^v@1:@')" +echo "$(git describe --tags --dirty="+" --match="v*" | sed -e 's@-\([^-]*\)-\([^-]*\)$@+\1.\2@;s@^v@2:@')"