From ae2e967c43880fbd1b7e7f130541e9dbbca0debf Mon Sep 17 00:00:00 2001 From: Sam Bingner Date: Sun, 30 Sep 2018 22:50:49 -1000 Subject: 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 --- Sources.mm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Sources.mm') diff --git a/Sources.mm b/Sources.mm index 0e48168..9957123 100644 --- a/Sources.mm +++ b/Sources.mm @@ -35,13 +35,21 @@ void CydiaWriteSources() { FILE *file(fopen(SOURCES_LIST, "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]); -- cgit v1.2.3