Name: Link Identity Editor
Author: Jay Freeman (saurik) <saurik@saurik.com>
Depiction: http://cydia.saurik.com/info/ldid/
+Depends: libplist
Tag: purpose::console, role::developer
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
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##*/}
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 .
--- /dev/null
+#!/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