[vlc-commits] contrib/sparkle: use version 1.6.1 since this is the last to support OS X 10.6

Felix Paul Kühne git at videolan.org
Mon Aug 18 20:38:15 CEST 2014


vlc/vlc-2.2 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Aug 18 20:22:32 2014 +0200| [ad0b48fe03c5833550c8414337b8f8d89b118e29] | committer: Felix Paul Kühne

contrib/sparkle: use version 1.6.1 since this is the last to support OS X 10.6

Additionally, patch the sources slightly to support Xcode 4.2

(cherry picked from commit 2e2ffef83be499a1920c179080d0fc8508def85d)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=ad0b48fe03c5833550c8414337b8f8d89b118e29
---

 contrib/src/sparkle/rules.mak                      |   13 +-
 .../sparkle-fix-compilation-on-snowleopard.patch   |  153 +++++++++++++++-----
 2 files changed, 123 insertions(+), 43 deletions(-)

diff --git a/contrib/src/sparkle/rules.mak b/contrib/src/sparkle/rules.mak
index 56efd1d..bbda6a5 100644
--- a/contrib/src/sparkle/rules.mak
+++ b/contrib/src/sparkle/rules.mak
@@ -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)
diff --git a/contrib/src/sparkle/sparkle-fix-compilation-on-snowleopard.patch b/contrib/src/sparkle/sparkle-fix-compilation-on-snowleopard.patch
index efe1e6b..828c3e9 100644
--- a/contrib/src/sparkle/sparkle-fix-compilation-on-snowleopard.patch
+++ b/contrib/src/sparkle/sparkle-fix-compilation-on-snowleopard.patch
@@ -1,42 +1,123 @@
-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;
+- at interface SUAppcast : NSObject<NSURLDownloadDelegate>
++ at 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
  
 - at interface SUAppcast () <NSURLDownloadDelegate>
-+ at interface SUAppcast () // implicit NSURLDownloadDelegate
++ at 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>
- 
-+ at interface SUDiskImageUnarchiver ()
-+- (void)extractDMGWithPassword:(NSString *)password;
-+- (BOOL)isEncrypted:(NSData*)resultData;
-+- (void)continueWithPassword:(NSString *)password;
-+- (void)requestPasswordFromDelegate;
-+ at 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;
+- at interface SUBasicUpdateDriver : SUUpdateDriver<NSURLDownloadDelegate, SUUnarchiverDelegate, SUAppcastDelegate> {
++ at 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;
+- at interface SUUpdateDriver : NSObject<NSURLDownloadDelegate>
++ at 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;
+ 



More information about the vlc-commits mailing list