]> git.saurik.com Git - cydia.git/blobdiff - Library/firmware.sh
Update version dependency for apt7 in sysroot.sh.
[cydia.git] / Library / firmware.sh
index 4f41bfdce5abd882cdda2a24576bb4deb1217e07..afaae9a01d23c40380e4161dcb05b3bed2fe98ef 100755 (executable)
@@ -8,7 +8,7 @@ shopt -s nullglob
 version=$(sw_vers -productVersion)
 cpu=$(uname -p)
 
-if [[ ${cpu} == arm ]]; then
+if [[ ${cpu} == arm || ${cpu} == arm64 ]]; then
     data=/var/lib/dpkg
     model=hw.machine
     arch=iphoneos-arm
@@ -87,7 +87,7 @@ EOF
     fi
 # }}}
 
-    if [[ ${cpu} == arm ]]; then
+    if [[ ${cpu} == arm || ${cpu} == arm64 ]]; then
         pseudo "firmware" "${version}" "almost impressive Apple frameworks" "iOS Firmware"
 
         while [[ 1 ]]; do
@@ -101,19 +101,22 @@ EOF
         echo "${gssc}" | sed -re '
             /^    [^ ]* = [0-9.]*;$/ ! d;
             s/^    ([^ ]*) = ([0-9.]*);$/\1 \2/;
-            s/([A-Z])/-\L\1/g; s/^"([^ ]*)"/\1/;
+            s/([A-Z])/-\L\1/g;
+            s/^"([^ ]*)"/\1/;
             s/^-//;
             / 0$/ d;
-        ' | while read -r name value; do
-            pseudo "gsc.${name}" "${value}" "virtual GraphicsServices dependency"
-
-            if [[ ${name} == ipad ]]; then
-                pseudo "gsc.wildcat" "${value}" "virtual virtual GraphicsServices dependency"
-            fi
-        done
+        ' | while read -r name value; do case "${name}" in
+            (ipad) for name in ipad wildcat; do
+                pseudo "gsc.${name}" "${value}" "this device has a very large screen" "iPad"
+            done;;
+
+            (*)
+                pseudo "gsc.${name}" "${value}" "virtual GraphicsServices dependency"
+            ;;
+        esac; done
     fi
 
-    if [[ ${cpu} == arm ]]; then
+    if [[ ${cpu} == arm || ${cpu} == arm64 ]]; then
         os=ios
     else
         os=macosx
@@ -130,14 +133,16 @@ EOF
 
     pseudo "cy+kernel.$(lower <<<$(sysctl -n kern.ostype))" "$(sysctl -n kern.osrelease)" "virtual kernel dependency"
 
+    pseudo "cy+lib.corefoundation" "$(/usr/libexec/cydia/cfversion)" "virtual corefoundation dependency"
+
 } >"${status}"_
 
 mv -f "${status}"{_,}
 
-if [[ ${cpu} == arm ]]; then
+if [[ ${cpu} == arm || ${cpu} == arm64 ]]; then
     if [[ ! -h /User && -d /User ]]; then
         cp -afT /User /var/mobile
     fi && rm -rf /User && ln -s "/var/mobile" /User
 
-    echo 4 >/var/lib/cydia/firmware.ver
+    echo 6 >/var/lib/cydia/firmware.ver
 fi