summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2008-03-17 07:00:47 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2008-03-17 07:00:47 +0000
commit9743c0151780da71d82a33fd28ed72b75750072d (patch)
treedfe8e46d806cd6060af0abccf2af39cf44480d27
parent723a007210a43e3a2320bdd5862828c64577c5fb (diff)
Ghost packages suck.
-rw-r--r--Cydia.mm14
-rw-r--r--makefile2
2 files changed, 11 insertions, 5 deletions
diff --git a/Cydia.mm b/Cydia.mm
index 174fdfd..8702e29 100644
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -1,7 +1,9 @@
/* #include Directives {{{ */
#include <Foundation/NSURL.h>
#include <UIKit/UIKit.h>
-#import <GraphicsServices/GraphicsServices.h>
+#include <GraphicsServices/GraphicsServices.h>
+
+#include <objc/objc.h>
#include <sstream>
#include <ext/stdio_filebuf.h>
@@ -25,7 +27,8 @@ extern "C" {
#include <mach-o/nlist.h>
}
-#include <objc/objc-class.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <errno.h>
#include <pcre.h>
@@ -60,6 +63,8 @@ while (false)
#define UITable UITableView
#endif
+OBJC_EXPORT const char *class_getName(Class cls);
+
/* Reset View (UIView) {{{ */
@interface UIView (CYResetView)
- (void) resetViewAnimated:(BOOL)animated;
@@ -68,7 +73,7 @@ while (false)
@implementation UIView (CYResetView)
- (void) resetViewAnimated:(BOOL)animated {
- fprintf(stderr, "%s\n", self->isa->name);
+ fprintf(stderr, "%s\n", class_getName(self->isa));
_assert(false);
}
@@ -2011,7 +2016,8 @@ NSString *Scour(const char *field, const char *begin, const char *end) {
[packages_ removeAllObjects];
for (pkgCache::PkgIterator iterator = cache_->PkgBegin(); !iterator.end(); ++iterator)
if (Package *package = [Package packageWithIterator:iterator database:self])
- [packages_ addObject:package];
+ if ([package source] != nil || [package installed] != nil)
+ [packages_ addObject:package];
}
- (void) prepare {
diff --git a/makefile b/makefile
index 365ced3..88785d3 100644
--- a/makefile
+++ b/makefile
@@ -10,7 +10,7 @@ exec: exec.mm makefile
arm-apple-darwin-g++ -Wall -Werror -o $@ $< -framework Foundation -framework CoreFoundation -lobjc
Cydia-1.2: Cydia.mm *.h makefile
- arm-apple-darwin-g++ -fobjc-abi-version=2 -fobjc-call-cxx-cdtors -g3 -O2 -Wall -o $@ $< -framework UIKit -framework IOKit -framework Foundation -framework CoreFoundation -framework CoreGraphics -framework GraphicsServices -lobjc -lapt-pkg -lpcre -fobjc-exceptions -save-temps -F $(Aspen)/System/Library/Frameworks -I $(Aspen)/usr/include -DTARGET_OS_EMBEDDED -DSRK_ASPEN
+ arm-apple-darwin9-g++ -fobjc-abi-version=2 -fobjc-call-cxx-cdtors -g3 -O2 -Wall -o $@ $< -framework UIKit -framework IOKit -framework Foundation -framework CoreFoundation -framework CoreGraphics -framework GraphicsServices -lobjc -lapt-pkg -lpcre -fobjc-exceptions -save-temps -DTARGET_OS_EMBEDDED -DSRK_ASPEN
Cydia: Cydia.mm *.h makefile
arm-apple-darwin-g++ -fobjc-call-cxx-cdtors -g3 -O2 -Wall -Werror -o $@ $< -framework UIKit -framework IOKit -framework Foundation -framework CoreFoundation -framework CoreGraphics -framework GraphicsServices -lobjc -lapt-pkg -lpcre -fobjc-exceptions