summaryrefslogtreecommitdiff
path: root/Sources.mm
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2018-09-30 22:50:49 -1000
committerSam Bingner <sam@bingner.com>2019-05-27 14:24:09 -1000
commit014888d50dcedd8f2a7bcac53bc0ffc1fbb6555f (patch)
tree9078a1592efb2b78c6da195d1ba12bf6717d8809 /Sources.mm
parent6f6bdfbcbb3b5dc0a67e28cfe36523e0433ecbeb (diff)
Make Cydia compatible back to iOS5 - unable to support older with this apt version due to newer apt requiring functions provided via libc++ on iOS
Diffstat (limited to 'Sources.mm')
-rw-r--r--Sources.mm10
1 files changed, 9 insertions, 1 deletions
diff --git a/Sources.mm b/Sources.mm
index 4a8e3a8..2580893 100644
--- a/Sources.mm
+++ b/Sources.mm
@@ -42,13 +42,21 @@ void CydiaWriteSources() {
FILE *file(fopen(sources, "w"));
_assert(file != NULL);
- fprintf(file, "deb http://apt.bingner.com/ ios/%.2f main\n", kCFCoreFoundationVersionNumber);
+ if (kCFCoreFoundationVersionNumber >= 1443) {
+ fprintf(file, "deb https://apt.bingner.com/ ios/%.2f main\n", kCFCoreFoundationVersionNumber);
+ } else {
+ fprintf(file, "deb http://apt.saurik.com/ ios/%.2f main\n", kCFCoreFoundationVersionNumber);
+ fprintf(file, "deb https://apt.bingner.com/ ./\n");
+ }
for (NSString *key in [Sources_ allKeys]) {
if ([key hasPrefix:@"deb:http:"] && [Sources_ objectForKey:[NSString stringWithFormat:@"deb:https:%s", [key UTF8String] + 9]])
continue;
NSDictionary *source([Sources_ objectForKey:key]);
+ // Ignore it if main source is added again
+ if ([[source objectForKey:@"URI"] hasPrefix:@"http://apt.bingner.com"] || [[source objectForKey:@"URI"] hasPrefix:@"https://apt.bingner.com"])
+ continue;
NSArray *sections([source objectForKey:@"Sections"] ?: [NSArray array]);