]> git.saurik.com Git - ldid.git/commitdiff
Update build environment to support sbigner's era.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 19 Feb 2019 05:12:35 +0000 (21:12 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 19 Feb 2019 05:12:35 +0000 (21:12 -0800)
.gitignore
control
ios.sh
make.sh
sysroot.sh [new file with mode: 0755]
version.sh

index 178d6efbfd12270d386fdedf138a2ec7e1b86d9e..edf9bc582bf0f47412f9c05a47f9b4294a2128fe 100644 (file)
@@ -5,3 +5,5 @@ ldid.deb
 debs
 *.o
 _
+sysroot32
+sysroot64
diff --git a/control b/control
index 9accbb845d5cb69cfb206a94db24d6a27a926b9a..5ef6018786481278ca4aa3b677ac2a14b26243d3 100644 (file)
--- a/control
+++ b/control
@@ -8,4 +8,5 @@ Description: pseudo-codesign Mach-O files
 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
diff --git a/ios.sh b/ios.sh
index fb7c40949a963d348ea7a634d33328e5bf2d54f5..f4c112c6ef3dd81d846c5f93dfe2bfe698f0f70b 100755 (executable)
--- 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 d88a8b0555e45216454c69aa5d79a119019594ab..9c5361b087a310b3421fa95f86422814570faffa 100755 (executable)
--- 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 (executable)
index 0000000..5991701
--- /dev/null
@@ -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
index 6e484edbb597db24237fef61d3ae4084eb2d1978..19212f3b9582d5edd17b3e73469a3831d79b1dfb 100755 (executable)
@@ -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:@')"