3 if [[ ${BASH_VERSION} != 4* ]]; then
4 echo "bash 4.0 required" 1>&2
11 PATH
=/Library
/Cydia
/bin
:$PATH
17 repository
=http
://apt.saurik.com
/
20 architecture
=iphoneos
-arm
22 wget
-qO- "${repository}dists/${distribution}/${component}/binary-${architecture}/Packages.bz2" | bzcat
| {
23 regex
='^([^ \t]*): *(.*)'
26 while IFS
= read -r line
; do
27 if [[ ${line} == '' ]]; then
28 package
=${fields[package]}
29 if [[ ${package} == *(apr
|apr
-lib|apt7
|apt7
-lib|coreutils
|mobilesubstrate
|pcre
) ]]; then
30 filename
=${fields[filename]}
31 wget
-O "${package}.deb" "${repository}${filename}"
32 dpkg
-deb -x "${package}.deb" .
37 elif [[ ${line} =~
${regex} ]]; then
38 name
=${BASH_REMATCH[1],,}
39 value
=${BASH_REMATCH[2]}
40 fields
[${name}]=${value}
51 wget
-O CoreFoundation
/CFBundlePriv.h
"http://www.opensource.apple.com/source/CF/CF-550/CFBundlePriv.h?txt"
52 wget
-O CoreFoundation
/CFPriv.h
"http://www.opensource.apple.com/source/CF/CF-550/CFPriv.h?txt"
53 wget
-O CoreFoundation
/CFUniChar.h
"http://www.opensource.apple.com/source/CF/CF-550/CFUniChar.h?txt"
57 wget
-O WebCore
/WebCoreThread.h
'http://www.opensource.apple.com/source/WebCore/WebCore-658.28/wak/WebCoreThread.h?txt'
59 wget
-O WebCore.tgz http
://www.opensource.apple.com
/tarballs
/WebCore
/WebCore
-658.28.
tar.gz
60 tar -zx --transform 's@^[^/]*/@WebCore.d/@' -f WebCore.tgz
63 cp -a WebCore.d
/{*,rendering
/style
,platform
/graphics
/transforms
}/*.h WebCore
64 cp -a WebCore.d
/platform
/{animation
,graphics
,network
,text
}/*.h WebCore
65 cp -a WebCore.d
/{accessibility
,platform
{,/{graphics
,network
,text
}}}/{cf
,mac
,iphone
}/*.h WebCore
66 cp -a WebCore.d
/bridge
/objc
/*.h WebCore
68 wget
-O JavaScriptCore.tgz http
://www.opensource.apple.com
/tarballs
/JavaScriptCore
/JavaScriptCore
-554.1.
tar.gz
69 #tar -zx --transform 's@^[^/]*/API/@JavaScriptCore/@' -f JavaScriptCore.tgz $(tar -ztf JavaScriptCore.tgz | grep '/API/[^/]*.h$')
71 --transform 's@^[^/]*/@@' \
72 --transform 's@^icu/@@' \
73 -f JavaScriptCore.tgz $
(tar -ztf JavaScriptCore.tgz
| sed -e '
74 /\/icu\/unicode\/.*\.h$/ p;
75 /\/profiler\/.*\.h$/ p;
76 /\/runtime\/.*\.h$/ p;
82 for framework
in ApplicationServices CoreServices IOKit IOSurface JavaScriptCore QuartzCore WebKit
; do
83 ln -s /System
/Library
/Frameworks
/"${framework}".framework
/Headers
"${framework}"
86 for framework
in /System
/Library
/Frameworks
/CoreServices.framework
/Frameworks
/*.framework
; do
88 name
=${name%.framework}
90 ln -s "${framework}/Headers" "${name}"
94 cat >Cocoa
/Cocoa.h
<<EOF
95 #define NSImage UIImage
97 #define NSWindow UIWindow
99 #define NSPoint CGPoint
100 #define NSRect CGRect
102 #define NSPasteboard UIPasteboard
103 #define NSSelectionAffinity int
104 @protocol NSUserInterfaceValidations;
107 mkdir -p GraphicsServices
108 cat >GraphicsServices
/GraphicsServices.h
<<EOF
109 typedef struct __GSEvent *GSEventRef;
110 typedef struct __GSFont *GSFontRef;