]> git.sesse.net Git - vlc/commitdiff
contrib/sparkle: use version 1.6.1 since this is the last to support OS X 10.6
authorFelix Paul Kühne <fkuehne@videolan.org>
Mon, 18 Aug 2014 18:22:32 +0000 (20:22 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Mon, 18 Aug 2014 18:26:12 +0000 (20:26 +0200)
Additionally, patch the sources slightly to support Xcode 4.2

contrib/src/sparkle/rules.mak
contrib/src/sparkle/sparkle-fix-compilation-on-snowleopard.patch

index 56efd1d3f117269e757533334b8d4c8d02b190e5..bbda6a57c21a6e8b19191ca17003ead69db71a92 100644 (file)
@@ -1,21 +1,20 @@
 # sparkle
 
-#SPARKLE_VERSION := 1.5b6
-#SPARKLE_URL := http://sparkle.andymatuschak.org/files/Sparkle%20$(SPARKLE_VERSION).zip
-SPARKLE_GITURL := git://github.com/andymatuschak/Sparkle.git
+SPARKLE_VERSION := 1.6.1
+SPARKLE_URL := https://github.com/sparkle-project/Sparkle/archive/$(SPARKLE_VERSION).zip
 
 ifdef HAVE_MACOSX
 PKGS += sparkle
 endif
 
-$(TARBALLS)/sparkle-git.tar.xz:
-       $(call download_git,$(SPARKLE_GITURL),,HEAD)
+$(TARBALLS)/Sparkle-$(SPARKLE_VERSION).zip:
+       $(call download,$(SPARKLE_URL))
 
-.sum-sparkle: sparkle-git.tar.xz
+.sum-sparkle: Sparkle-$(SPARKLE_VERSION).zip
        $(warning $@ not implemented)
        touch $@
 
-sparkle: sparkle-git.tar.xz .sum-sparkle
+sparkle: Sparkle-$(SPARKLE_VERSION).zip .sum-sparkle
        $(UNPACK)
        $(APPLY) $(SRC)/sparkle/sparkle-fix-compilation-on-snowleopard.patch
        $(MOVE)
index efe1e6b1df9f58c19e6f5f191da88115ee41a5a5..828c3e96b2e239d87a3c345da9d7c9b064bcae8a 100644 (file)
-diff -ru sparkle/Sparkle/SUAppcast.m sparkle-fixed/Sparkle/SUAppcast.m
---- sparkle/Sparkle/SUAppcast.m        2013-12-09 15:23:42.000000000 +0100
-+++ sparkle-fixed/Sparkle/SUAppcast.m  2014-01-31 13:23:11.000000000 +0100
-@@ -15,6 +15,12 @@
- #import "SUConstants.h"
- #import "SULog.h"
-+#ifndef MAC_OS_X_VERSION_10_7
-+enum {
-+    NSXMLNodeLoadExternalEntitiesSameOriginOnly = 1UL << 15
-+};
-+#endif
-+
- @interface NSXMLElement (SUAppcastExtensions)
- @property (readonly, copy) NSDictionary *attributesAsDictionary;
- @end
-@@ -32,7 +38,7 @@
+diff -ru sparkle/SUAppcast.h sparkle-fixed/SUAppcast.h
+--- sparkle/SUAppcast.h        2014-04-26 00:22:59.000000000 +0200
++++ sparkle-fixed/SUAppcast.h  2014-08-18 20:18:30.000000000 +0200
+@@ -12,7 +12,7 @@
+ @protocol SUAppcastDelegate;
+ @class SUAppcastItem;
+-@interface SUAppcast : NSObject<NSURLDownloadDelegate>
++@interface SUAppcast : NSObject
+ {
+ @private
+       NSArray *items;
+diff -ru sparkle/SUAppcast.m sparkle-fixed/SUAppcast.m
+--- sparkle/SUAppcast.m        2014-04-26 00:22:59.000000000 +0200
++++ sparkle-fixed/SUAppcast.m  2014-08-18 20:18:36.000000000 +0200
+@@ -32,7 +32,7 @@
  }
  @end
  
 -@interface SUAppcast () <NSURLDownloadDelegate>
-+@interface SUAppcast () // implicit NSURLDownloadDelegate
++@interface SUAppcast ()
  @property (copy) NSString *downloadFilename;
- @property (strong) NSURLDownload *download;
+ @property (retain) NSURLDownload *download;
  @property (copy) NSArray *items;
-diff -ru sparkle/Sparkle/SUDiskImageUnarchiver.m sparkle-fixed/Sparkle/SUDiskImageUnarchiver.m
---- sparkle/Sparkle/SUDiskImageUnarchiver.m    2013-12-09 15:23:42.000000000 +0100
-+++ sparkle-fixed/Sparkle/SUDiskImageUnarchiver.m      2014-01-31 13:25:58.000000000 +0100
-@@ -12,6 +12,13 @@
- #import "SULog.h"
- #import <CoreServices/CoreServices.h>
-+@interface SUDiskImageUnarchiver ()
-+- (void)extractDMGWithPassword:(NSString *)password;
-+- (BOOL)isEncrypted:(NSData*)resultData;
-+- (void)continueWithPassword:(NSString *)password;
-+- (void)requestPasswordFromDelegate;
-+@end
-+
- @implementation SUDiskImageUnarchiver
- + (BOOL)canUnarchivePath:(NSString *)path
+@@ -92,14 +92,7 @@
+       
+       if (downloadFilename)
+       {
+-        NSUInteger options = 0;
+-        if (NSAppKitVersionNumber < NSAppKitVersionNumber10_7) {
+-            // In order to avoid including external entities when parsing the appcast (a potential security vulnerability; see https://github.com/andymatuschak/Sparkle/issues/169), we ask NSXMLDocument to "tidy" the XML first. This happens to remove these external entities; it wouldn't be a future-proof approach, but it worked in these historical versions of OS X, and we have a more rigorous approach for 10.7+.
+-            options = NSXMLDocumentTidyXML;
+-        } else {
+-            // In 10.7 and later, there's a real option for the behavior we desire.
+-            options = NSXMLNodeLoadExternalEntitiesSameOriginOnly;
+-        }
++        NSUInteger options = NSXMLDocumentTidyXML;
+               document = [[[NSXMLDocument alloc] initWithContentsOfURL:[NSURL fileURLWithPath:downloadFilename] options:options error:&error] autorelease];
+       
+               [[NSFileManager defaultManager] removeItemAtPath:downloadFilename error:nil];
+diff -ru sparkle/SUAppcastItem.h sparkle-fixed/SUAppcastItem.h
+--- sparkle/SUAppcastItem.h    2014-04-26 00:22:59.000000000 +0200
++++ sparkle-fixed/SUAppcastItem.h      2014-08-18 20:14:01.000000000 +0200
+@@ -46,8 +46,8 @@
+ @property (retain, readonly) NSURL *infoURL;
+ // Initializes with data from a dictionary provided by the RSS class.
+-- (instancetype)initWithDictionary:(NSDictionary *)dict;
+-- (instancetype)initWithDictionary:(NSDictionary *)dict failureReason:(NSString**)error;
++- (id)initWithDictionary:(NSDictionary *)dict;
++- (id)initWithDictionary:(NSDictionary *)dict failureReason:(NSString**)error;
+ - (BOOL)isDeltaUpdate;
+ - (BOOL)isCriticalUpdate;
+diff -ru sparkle/SUBasicUpdateDriver.h sparkle-fixed/SUBasicUpdateDriver.h
+--- sparkle/SUBasicUpdateDriver.h      2014-04-26 00:22:59.000000000 +0200
++++ sparkle-fixed/SUBasicUpdateDriver.h        2014-08-18 20:18:41.000000000 +0200
+@@ -15,7 +15,7 @@
+ #import "SUAppcast.h"
+ @class SUAppcastItem, SUHost;
+-@interface SUBasicUpdateDriver : SUUpdateDriver<NSURLDownloadDelegate, SUUnarchiverDelegate, SUAppcastDelegate> {
++@interface SUBasicUpdateDriver : SUUpdateDriver<SUUnarchiverDelegate, SUAppcastDelegate> {
+       SUAppcastItem *updateItem;
+       SUAppcastItem *nonDeltaUpdateItem;
+       
+diff -ru sparkle/SUBasicUpdateDriver.m sparkle-fixed/SUBasicUpdateDriver.m
+--- sparkle/SUBasicUpdateDriver.m      2014-04-26 00:22:59.000000000 +0200
++++ sparkle-fixed/SUBasicUpdateDriver.m        2014-08-18 20:16:53.000000000 +0200
+@@ -106,7 +106,7 @@
+       if ([[updater delegate] respondsToSelector:@selector(updater:didFinishLoadingAppcast:)])
+               [[updater delegate] updater:updater didFinishLoadingAppcast:ac];
+       
+-      NSDictionary *userInfo = (ac != nil) ? @{SUUpdaterAppcastNotificationKey : ac} : nil;
++      NSDictionary *userInfo = (ac != nil) ? [NSDictionary dictionaryWithObject:SUUpdaterAppcastNotificationKey forKey:ac] : nil;
+       [[NSNotificationCenter defaultCenter] postNotificationName:SUUpdaterDidFinishLoadingAppCastNotification object:updater userInfo:userInfo];
+     
+     SUAppcastItem *item = nil;
+@@ -153,7 +153,7 @@
+ {
+       if ([[updater delegate] respondsToSelector:@selector(updater:didFindValidUpdate:)])
+               [[updater delegate] updater:updater didFindValidUpdate:updateItem];
+-      NSDictionary *userInfo = (updateItem != nil) ? @{SUUpdaterAppcastItemNotificationKey : updateItem} : nil;
++      NSDictionary *userInfo = (updateItem != nil) ? [NSDictionary dictionaryWithObject:SUUpdaterAppcastItemNotificationKey forKey:updateItem] : nil;
+       [[NSNotificationCenter defaultCenter] postNotificationName:SUUpdaterDidFinishLoadingAppCastNotification object:updater userInfo:userInfo];
+       [self downloadUpdate];
+ }
+diff -ru sparkle/SUProbingUpdateDriver.m sparkle-fixed/SUProbingUpdateDriver.m
+--- sparkle/SUProbingUpdateDriver.m    2014-04-26 00:22:59.000000000 +0200
++++ sparkle-fixed/SUProbingUpdateDriver.m      2014-08-18 20:17:38.000000000 +0200
+@@ -17,7 +17,7 @@
+ {
+       if ([[updater delegate] respondsToSelector:@selector(updater:didFindValidUpdate:)])
+               [[updater delegate] updater:updater didFindValidUpdate:updateItem];
+-      NSDictionary *userInfo = (updateItem != nil) ? @{SUUpdaterAppcastItemNotificationKey : updateItem} : nil;
++      NSDictionary *userInfo = (updateItem != nil) ? [NSDictionary dictionaryWithObject:SUUpdaterAppcastItemNotificationKey forKey:updateItem] : nil;
+       [[NSNotificationCenter defaultCenter] postNotificationName:SUUpdaterDidFindValidUpdateNotification object:updater userInfo:userInfo];
+       [self abortUpdate];
+ }
+diff -ru sparkle/SUUpdateDriver.h sparkle-fixed/SUUpdateDriver.h
+--- sparkle/SUUpdateDriver.h   2014-04-26 00:22:59.000000000 +0200
++++ sparkle-fixed/SUUpdateDriver.h     2014-08-18 20:15:46.000000000 +0200
+@@ -14,7 +14,7 @@
+ extern NSString * const SUUpdateDriverFinishedNotification;
+ @class SUHost, SUUpdater;
+-@interface SUUpdateDriver : NSObject<NSURLDownloadDelegate>
++@interface SUUpdateDriver : NSObject
+ {
+       SUHost *host;
+       SUUpdater *updater;
+diff -ru sparkle/SUUpdater.h sparkle-fixed/SUUpdater.h
+--- sparkle/SUUpdater.h        2014-04-26 00:22:59.000000000 +0200
++++ sparkle-fixed/SUUpdater.h  2014-08-18 20:14:31.000000000 +0200
+@@ -28,7 +28,7 @@
+ + (SUUpdater *)sharedUpdater;
+ + (SUUpdater *)updaterForBundle:(NSBundle *)bundle;
+-- (instancetype)initForBundle:(NSBundle *)bundle;
++- (id)initForBundle:(NSBundle *)bundle;
+ - (NSBundle *)hostBundle;