From f889faf3721c61a21b3036b4be30d44868123b86 Mon Sep 17 00:00:00 2001 From: Alan Rogers Date: Tue, 28 Oct 2014 12:39:28 +1100 Subject: [PATCH 01/13] OpenSSL -> 1.0.1j --- External/openssl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/External/openssl b/External/openssl index 46ebd9e3b..872e681c0 160000 --- a/External/openssl +++ b/External/openssl @@ -1 +1 @@ -Subproject commit 46ebd9e3bb623d3c15ef2203038956f3f7213620 +Subproject commit 872e681c00a713e840ebed77a4e05fa0e181f16f From c32fe343651aacf91cbe3cf7d513c612f62b235e Mon Sep 17 00:00:00 2001 From: Alan Rogers Date: Tue, 28 Oct 2014 14:41:47 +1100 Subject: [PATCH 02/13] Skip installing man pages to avoid too many symlink errors. --- script/update_libssl_ios | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/update_libssl_ios b/script/update_libssl_ios index cf8eaff36..e6d3b56f9 100755 --- a/script/update_libssl_ios +++ b/script/update_libssl_ios @@ -49,7 +49,7 @@ function build_ssl () perl -i -pe "s|^CFLAG= (.*)|CFLAG= -isysroot ${SDKROOT} \$1|g" Makefile >> "${LOG}" 2>&1 make >> "${LOG}" 2>&1 - make install >> "${LOG}" 2>&1 + make install_sw >> "${LOG}" 2>&1 popd > /dev/null rm -rf "/tmp/openssl" From af576d47eca044913aa562637228b738c46f93ba Mon Sep 17 00:00:00 2001 From: Alan Rogers Date: Tue, 28 Oct 2014 15:09:04 +1100 Subject: [PATCH 03/13] Compile EXTScope. --- ObjectiveGitFramework.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ObjectiveGitFramework.xcodeproj/project.pbxproj b/ObjectiveGitFramework.xcodeproj/project.pbxproj index 821bc6171..8b57c398f 100644 --- a/ObjectiveGitFramework.xcodeproj/project.pbxproj +++ b/ObjectiveGitFramework.xcodeproj/project.pbxproj @@ -116,6 +116,7 @@ 88328128173D8A64006D7DCF /* GTTreeSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88328127173D8A64006D7DCF /* GTTreeSpec.m */; }; 883CD6AB1600EBC600F57354 /* GTRemote.h in Headers */ = {isa = PBXBuildFile; fileRef = 883CD6A91600EBC600F57354 /* GTRemote.h */; settings = {ATTRIBUTES = (Public, ); }; }; 883CD6AC1600EBC600F57354 /* GTRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = 883CD6AA1600EBC600F57354 /* GTRemote.m */; }; + 884C8A3A19FF4B890017E98D /* EXTScope.m in Sources */ = {isa = PBXBuildFile; fileRef = 306123AA17EA5261006591D4 /* EXTScope.m */; }; 886E622A18AEBF75000611A0 /* GTFilterSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 886E622818AEBF75000611A0 /* GTFilterSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; 886E622C18AEBF75000611A0 /* GTFilterSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 886E622918AEBF75000611A0 /* GTFilterSource.m */; }; 886E623718AECD86000611A0 /* GTFilterSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 886E623618AECD86000611A0 /* GTFilterSpec.m */; }; @@ -1415,6 +1416,7 @@ D01B6F3219F82F8700D411BC /* GTCommit.m in Sources */, D01B6F3819F82F8700D411BC /* GTTree.m in Sources */, D01B6F6C19F82FB300D411BC /* GTDiff.m in Sources */, + 884C8A3A19FF4B890017E98D /* EXTScope.m in Sources */, D01B6F4E19F82F8700D411BC /* GTRemote.m in Sources */, D01B6F3019F82F8700D411BC /* GTObject.m in Sources */, D01B6F4619F82F8700D411BC /* GTBranch.m in Sources */, From 82fc85cccbc1e65677f0506c3a007829108f1fe8 Mon Sep 17 00:00:00 2001 From: Alan Rogers Date: Tue, 28 Oct 2014 15:09:33 +1100 Subject: [PATCH 04/13] Link lib and libiconv. --- ObjectiveGitFramework.xcodeproj/project.pbxproj | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ObjectiveGitFramework.xcodeproj/project.pbxproj b/ObjectiveGitFramework.xcodeproj/project.pbxproj index 8b57c398f..dbafd5b10 100644 --- a/ObjectiveGitFramework.xcodeproj/project.pbxproj +++ b/ObjectiveGitFramework.xcodeproj/project.pbxproj @@ -116,6 +116,8 @@ 88328128173D8A64006D7DCF /* GTTreeSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88328127173D8A64006D7DCF /* GTTreeSpec.m */; }; 883CD6AB1600EBC600F57354 /* GTRemote.h in Headers */ = {isa = PBXBuildFile; fileRef = 883CD6A91600EBC600F57354 /* GTRemote.h */; settings = {ATTRIBUTES = (Public, ); }; }; 883CD6AC1600EBC600F57354 /* GTRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = 883CD6AA1600EBC600F57354 /* GTRemote.m */; }; + 884C8A3719FF4B4D0017E98D /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 884C8A3619FF4B4D0017E98D /* libz.dylib */; }; + 884C8A3919FF4B6D0017E98D /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 884C8A3819FF4B6D0017E98D /* libiconv.dylib */; }; 884C8A3A19FF4B890017E98D /* EXTScope.m in Sources */ = {isa = PBXBuildFile; fileRef = 306123AA17EA5261006591D4 /* EXTScope.m */; }; 886E622A18AEBF75000611A0 /* GTFilterSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 886E622818AEBF75000611A0 /* GTFilterSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; 886E622C18AEBF75000611A0 /* GTFilterSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 886E622918AEBF75000611A0 /* GTFilterSource.m */; }; @@ -486,6 +488,8 @@ 883CD6A91600EBC600F57354 /* GTRemote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTRemote.h; sourceTree = ""; }; 883CD6AA1600EBC600F57354 /* GTRemote.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTRemote.m; sourceTree = ""; }; 883CD6AE1600F01000F57354 /* GTConfiguration+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GTConfiguration+Private.h"; sourceTree = ""; }; + 884C8A3619FF4B4D0017E98D /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/lib/libz.dylib; sourceTree = DEVELOPER_DIR; }; + 884C8A3819FF4B6D0017E98D /* libiconv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libiconv.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/lib/libiconv.dylib; sourceTree = DEVELOPER_DIR; }; 886E622818AEBF75000611A0 /* GTFilterSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTFilterSource.h; sourceTree = ""; }; 886E622918AEBF75000611A0 /* GTFilterSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTFilterSource.m; sourceTree = ""; }; 886E623618AECD86000611A0 /* GTFilterSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTFilterSpec.m; sourceTree = ""; }; @@ -622,6 +626,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 884C8A3919FF4B6D0017E98D /* libiconv.dylib in Frameworks */, + 884C8A3719FF4B4D0017E98D /* libz.dylib in Frameworks */, D05FC5E319FAD03C008C9348 /* libssl.a in Frameworks */, D05FC5E219FAD039008C9348 /* libcrypto.a in Frameworks */, D05FC5E419FAD040008C9348 /* libssh2-ios.a in Frameworks */, @@ -655,6 +661,8 @@ 0867D691FE84028FC02AAC07 /* ObjectiveGitFramework */ = { isa = PBXGroup; children = ( + 884C8A3819FF4B6D0017E98D /* libiconv.dylib */, + 884C8A3619FF4B4D0017E98D /* libz.dylib */, BDD8AB01130F01AB00CB5D40 /* README.md */, BDE4C05E130EFE2C00851650 /* ObjectiveGit */, 88F05A7516011E5400B7AD1D /* ObjectiveGitTests */, From 1e02f02ddcaf946f153449d604a0d60e2197aab8 Mon Sep 17 00:00:00 2001 From: Alan Rogers Date: Tue, 28 Oct 2014 15:51:15 +1100 Subject: [PATCH 05/13] Remove set -e because lol. --- script/update_libssl_ios | 2 -- 1 file changed, 2 deletions(-) diff --git a/script/update_libssl_ios b/script/update_libssl_ios index e6d3b56f9..3d3a209dc 100755 --- a/script/update_libssl_ios +++ b/script/update_libssl_ios @@ -1,7 +1,5 @@ #!/bin/bash -set -e - # source the common build functions SCRIPT_DIR=$(dirname "$0") source "${SCRIPT_DIR}/ios_build_functions.sh" From f8ff8a60bd0ca6dbfa7b170658c0be8f5f589cd6 Mon Sep 17 00:00:00 2001 From: Alan Rogers Date: Tue, 28 Oct 2014 15:51:29 +1100 Subject: [PATCH 06/13] Don't try and link .a's in the External folder. --- ObjectiveGitFramework.xcodeproj/project.pbxproj | 8 ++++---- script/update_libgit2_ios | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ObjectiveGitFramework.xcodeproj/project.pbxproj b/ObjectiveGitFramework.xcodeproj/project.pbxproj index dbafd5b10..ecffbd8ff 100644 --- a/ObjectiveGitFramework.xcodeproj/project.pbxproj +++ b/ObjectiveGitFramework.xcodeproj/project.pbxproj @@ -1820,9 +1820,9 @@ ); INFOPLIST_FILE = Info.plist; LIBRARY_SEARCH_PATHS = ( - "$(inherited)", "External/ios-openssl/lib", "External/libssh2-ios/lib", + "External/libgit2-ios", ); OTHER_LDFLAGS = ( "-lgit2-ios", @@ -1897,9 +1897,9 @@ ); INFOPLIST_FILE = Info.plist; LIBRARY_SEARCH_PATHS = ( - "$(inherited)", "External/ios-openssl/lib", "External/libssh2-ios/lib", + "External/libgit2-ios", ); OTHER_LDFLAGS = ( "-lgit2-ios", @@ -1926,9 +1926,9 @@ ); INFOPLIST_FILE = Info.plist; LIBRARY_SEARCH_PATHS = ( - "$(inherited)", "External/ios-openssl/lib", "External/libssh2-ios/lib", + "External/libgit2-ios", ); OTHER_LDFLAGS = ( "-lgit2-ios", @@ -1955,9 +1955,9 @@ ); INFOPLIST_FILE = Info.plist; LIBRARY_SEARCH_PATHS = ( - "$(inherited)", "External/ios-openssl/lib", "External/libssh2-ios/lib", + "External/libgit2-ios", ); OTHER_LDFLAGS = ( "-lgit2-ios", diff --git a/script/update_libgit2_ios b/script/update_libgit2_ios index 2721a0b17..dfebd3bbd 100755 --- a/script/update_libgit2_ios +++ b/script/update_libgit2_ios @@ -8,7 +8,7 @@ source "${SCRIPT_DIR}/ios_build_functions.sh" function setup () { - if [ "${ROOT_PATH}/External/libgit2-ios.a" -nt "${ROOT_PATH}/External/libgit2" ] + if [ "${ROOT_PATH}/External/libgit2-ios/libgit2-ios.a" -nt "${ROOT_PATH}/External/libgit2" ] then echo "No update needed." exit 0 @@ -68,7 +68,7 @@ function fat_binary () { echo "Building fat binary..." - lipo -create "${BUILT_LIB_PATHS[@]}" -output "${ROOT_PATH}/External/libgit2-ios.a" + lipo -create "${BUILT_LIB_PATHS[@]}" -output "${ROOT_PATH}/External/libgit2-ios/libgit2-ios.a" echo "Building done." From e9d250014272e7fa94f49de5a528b95e6ae154b5 Mon Sep 17 00:00:00 2001 From: Alan Rogers Date: Tue, 28 Oct 2014 16:14:04 +1100 Subject: [PATCH 07/13] Don't copy this in resources. --- ObjectiveGitFramework.xcodeproj/project.pbxproj | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ObjectiveGitFramework.xcodeproj/project.pbxproj b/ObjectiveGitFramework.xcodeproj/project.pbxproj index ecffbd8ff..0ac6f5742 100644 --- a/ObjectiveGitFramework.xcodeproj/project.pbxproj +++ b/ObjectiveGitFramework.xcodeproj/project.pbxproj @@ -214,7 +214,6 @@ D01B6F0D19F82F2600D411BC /* GTRepositoryAttributesSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88E353051982EA6B0051001F /* GTRepositoryAttributesSpec.m */; }; D01B6F0E19F82F2B00D411BC /* QuickSpec+GTFixtures.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A994CA16FCED1D00402C7B /* QuickSpec+GTFixtures.m */; }; D01B6F1219F82F3F00D411BC /* fixtures.zip in Resources */ = {isa = PBXBuildFile; fileRef = D09C2E50175602A500065E36 /* fixtures.zip */; }; - D01B6F1319F82F5D00D411BC /* git2 in Resources */ = {isa = PBXBuildFile; fileRef = 79262F0E13C697BE00A4B1EA /* git2 */; }; D01B6F1419F82F6000D411BC /* git2.h in Headers */ = {isa = PBXBuildFile; fileRef = 79262F8A13C69B1600A4B1EA /* git2.h */; settings = {ATTRIBUTES = (Public, ); }; }; D01B6F1519F82F7B00D411BC /* NSData+Git.h in Headers */ = {isa = PBXBuildFile; fileRef = BD6C2266131459E700992935 /* NSData+Git.h */; settings = {ATTRIBUTES = (Public, ); }; }; D01B6F1619F82F7B00D411BC /* NSData+Git.m in Sources */ = {isa = PBXBuildFile; fileRef = BD6C2267131459E700992935 /* NSData+Git.m */; }; @@ -1145,7 +1144,6 @@ D01B6ECE19F82E2000D411BC /* Sources */, D01B6ECF19F82E2000D411BC /* Frameworks */, D01B6ED019F82E2000D411BC /* Headers */, - D01B6ED119F82E2000D411BC /* Resources */, ); buildRules = ( ); @@ -1238,14 +1236,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - D01B6ED119F82E2000D411BC /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D01B6F1319F82F5D00D411BC /* git2 in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; D01B6EDB19F82E2000D411BC /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; From 1c83da1b36562be2db92c0fda4d30a2b6246581d Mon Sep 17 00:00:00 2001 From: Alan Rogers Date: Tue, 28 Oct 2014 16:17:01 +1100 Subject: [PATCH 08/13] Add git2 folder and git2.h to public headers. --- ObjectiveGitFramework.xcodeproj/project.pbxproj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ObjectiveGitFramework.xcodeproj/project.pbxproj b/ObjectiveGitFramework.xcodeproj/project.pbxproj index 0ac6f5742..00620e2ea 100644 --- a/ObjectiveGitFramework.xcodeproj/project.pbxproj +++ b/ObjectiveGitFramework.xcodeproj/project.pbxproj @@ -126,6 +126,7 @@ 88746CC417FA1C950005888A /* GTRepository+Committing.h in Headers */ = {isa = PBXBuildFile; fileRef = 88746CC217FA1C950005888A /* GTRepository+Committing.h */; settings = {ATTRIBUTES = (Public, ); }; }; 88746CC617FA1C950005888A /* GTRepository+Committing.m in Sources */ = {isa = PBXBuildFile; fileRef = 88746CC317FA1C950005888A /* GTRepository+Committing.m */; }; 88948AC91779243600809CDA /* GTObjectDatabaseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88948AC81779243600809CDA /* GTObjectDatabaseSpec.m */; }; + 889923FB19FF5DD40092A9A6 /* git2 in Headers */ = {isa = PBXBuildFile; fileRef = 889923F919FF5DD40092A9A6 /* git2 */; settings = {ATTRIBUTES = (Public, ); }; }; 88A994BA16FCE7D400402C7B /* GTBranchSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A994B916FCE7D400402C7B /* GTBranchSpec.m */; }; 88A994CB16FCED1D00402C7B /* QuickSpec+GTFixtures.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A994CA16FCED1D00402C7B /* QuickSpec+GTFixtures.m */; }; 88BC0E5018EF4F3600C7D0E6 /* GTRepository+Reset.h in Headers */ = {isa = PBXBuildFile; fileRef = 88BC0E4E18EF4F3600C7D0E6 /* GTRepository+Reset.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -497,6 +498,8 @@ 88746CC317FA1C950005888A /* GTRepository+Committing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTRepository+Committing.m"; sourceTree = ""; }; 887DAFF615CB1C8000F30D0D /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 88948AC81779243600809CDA /* GTObjectDatabaseSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTObjectDatabaseSpec.m; sourceTree = ""; }; + 889923F919FF5DD40092A9A6 /* git2 */ = {isa = PBXFileReference; lastKnownFileType = folder; name = git2; path = External/libgit2/include/git2; sourceTree = ""; }; + 889923FA19FF5DD40092A9A6 /* git2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = git2.h; path = External/libgit2/include/git2.h; sourceTree = ""; }; 88A994B916FCE7D400402C7B /* GTBranchSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTBranchSpec.m; sourceTree = ""; }; 88A994C916FCED1D00402C7B /* QuickSpec+GTFixtures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "QuickSpec+GTFixtures.h"; sourceTree = ""; }; 88A994CA16FCED1D00402C7B /* QuickSpec+GTFixtures.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "QuickSpec+GTFixtures.m"; sourceTree = ""; }; @@ -1062,7 +1065,6 @@ D01B6F3119F82F8700D411BC /* GTCommit.h in Headers */, D01B6F2519F82F8700D411BC /* GTStatusDelta.h in Headers */, D01B6F6519F82FA600D411BC /* GTRepository+Attributes.h in Headers */, - D01B6F1419F82F6000D411BC /* git2.h in Headers */, D01B6F2919F82F8700D411BC /* GTRepository+Committing.h in Headers */, D01B6F4F19F82FA600D411BC /* GTRepository+Blame.h in Headers */, D01B6F1719F82F7B00D411BC /* NSError+Git.h in Headers */, @@ -1092,6 +1094,8 @@ D01B6F3B19F82F8700D411BC /* GTTreeBuilder.h in Headers */, D01B6F1B19F82F7B00D411BC /* NSDate+GTTimeAdditions.h in Headers */, D01B6F6319F82FA600D411BC /* GTFilterList.h in Headers */, + 889923FB19FF5DD40092A9A6 /* git2 in Headers */, + D01B6F1419F82F6000D411BC /* git2.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; From af254dfae6c49289133b8607b590f2ac2d35577a Mon Sep 17 00:00:00 2001 From: Alan Rogers Date: Tue, 28 Oct 2014 16:17:29 +1100 Subject: [PATCH 09/13] Move libiconv and libz iOS references. --- ObjectiveGitFramework.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ObjectiveGitFramework.xcodeproj/project.pbxproj b/ObjectiveGitFramework.xcodeproj/project.pbxproj index 00620e2ea..5c829254e 100644 --- a/ObjectiveGitFramework.xcodeproj/project.pbxproj +++ b/ObjectiveGitFramework.xcodeproj/project.pbxproj @@ -663,8 +663,6 @@ 0867D691FE84028FC02AAC07 /* ObjectiveGitFramework */ = { isa = PBXGroup; children = ( - 884C8A3819FF4B6D0017E98D /* libiconv.dylib */, - 884C8A3619FF4B4D0017E98D /* libz.dylib */, BDD8AB01130F01AB00CB5D40 /* README.md */, BDE4C05E130EFE2C00851650 /* ObjectiveGit */, 88F05A7516011E5400B7AD1D /* ObjectiveGitTests */, @@ -686,6 +684,8 @@ 306123A817EA5261006591D4 /* extobjc */, 4D103ADC1819CFAA0029DB24 /* libiconv.dylib */, 8803DA861313145700E6E818 /* libz.dylib */, + 884C8A3619FF4B4D0017E98D /* libz.dylib */, + 884C8A3819FF4B6D0017E98D /* libiconv.dylib */, 6A1F2FD317C6A8F3003DFADE /* libcrypto.a */, 6A1F2FD417C6A8F3003DFADE /* libssl.a */, 6A502B8617D6892D00BAF4A5 /* libssh2-ios.a */, From c989dae8fc231bff8729547c096e8db0e74d2c8a Mon Sep 17 00:00:00 2001 From: Alan Rogers Date: Tue, 28 Oct 2014 16:22:36 +1100 Subject: [PATCH 10/13] Xcode seems to need this duplicate reference. :rage: --- ObjectiveGitFramework.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ObjectiveGitFramework.xcodeproj/project.pbxproj b/ObjectiveGitFramework.xcodeproj/project.pbxproj index 5c829254e..70bc92041 100644 --- a/ObjectiveGitFramework.xcodeproj/project.pbxproj +++ b/ObjectiveGitFramework.xcodeproj/project.pbxproj @@ -693,6 +693,8 @@ 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */, D0A0128819F98475007F1914 /* Quick.framework */, D0A0128B19F9853D007F1914 /* Nimble.framework */, + 889923F919FF5DD40092A9A6 /* git2 */, + 889923FA19FF5DD40092A9A6 /* git2.h */, ); name = "External Frameworks and Libraries"; sourceTree = ""; From 8274e206c56ac3358aefbb813f84b4eddda06657 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Mon, 27 Oct 2014 22:23:16 -0700 Subject: [PATCH 11/13] Make sure libgit2 is in the header paths for iOS --- .../project.pbxproj | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/ObjectiveGitFramework.xcodeproj/project.pbxproj b/ObjectiveGitFramework.xcodeproj/project.pbxproj index 70bc92041..b394e0fc8 100644 --- a/ObjectiveGitFramework.xcodeproj/project.pbxproj +++ b/ObjectiveGitFramework.xcodeproj/project.pbxproj @@ -499,7 +499,6 @@ 887DAFF615CB1C8000F30D0D /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 88948AC81779243600809CDA /* GTObjectDatabaseSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTObjectDatabaseSpec.m; sourceTree = ""; }; 889923F919FF5DD40092A9A6 /* git2 */ = {isa = PBXFileReference; lastKnownFileType = folder; name = git2; path = External/libgit2/include/git2; sourceTree = ""; }; - 889923FA19FF5DD40092A9A6 /* git2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = git2.h; path = External/libgit2/include/git2.h; sourceTree = ""; }; 88A994B916FCE7D400402C7B /* GTBranchSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTBranchSpec.m; sourceTree = ""; }; 88A994C916FCED1D00402C7B /* QuickSpec+GTFixtures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "QuickSpec+GTFixtures.h"; sourceTree = ""; }; 88A994CA16FCED1D00402C7B /* QuickSpec+GTFixtures.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "QuickSpec+GTFixtures.m"; sourceTree = ""; }; @@ -1813,6 +1812,7 @@ HEADER_SEARCH_PATHS = ( "$(inherited)", "External/libssh2-ios/include/libssh2", + External/libgit2/include, ); INFOPLIST_FILE = Info.plist; LIBRARY_SEARCH_PATHS = ( @@ -1839,6 +1839,10 @@ "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", ); + HEADER_SEARCH_PATHS = ( + "$(OBJROOT)/UninstalledProducts/include", + External/libgit2/include, + ); INFOPLIST_FILE = ObjectiveGitTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1890,6 +1894,7 @@ HEADER_SEARCH_PATHS = ( "$(inherited)", "External/libssh2-ios/include/libssh2", + External/libgit2/include, ); INFOPLIST_FILE = Info.plist; LIBRARY_SEARCH_PATHS = ( @@ -1919,6 +1924,7 @@ HEADER_SEARCH_PATHS = ( "$(inherited)", "External/libssh2-ios/include/libssh2", + External/libgit2/include, ); INFOPLIST_FILE = Info.plist; LIBRARY_SEARCH_PATHS = ( @@ -1948,6 +1954,7 @@ HEADER_SEARCH_PATHS = ( "$(inherited)", "External/libssh2-ios/include/libssh2", + External/libgit2/include, ); INFOPLIST_FILE = Info.plist; LIBRARY_SEARCH_PATHS = ( @@ -1974,6 +1981,10 @@ "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", ); + HEADER_SEARCH_PATHS = ( + "$(OBJROOT)/UninstalledProducts/include", + External/libgit2/include, + ); INFOPLIST_FILE = ObjectiveGitTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1990,6 +2001,10 @@ "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", ); + HEADER_SEARCH_PATHS = ( + "$(OBJROOT)/UninstalledProducts/include", + External/libgit2/include, + ); INFOPLIST_FILE = ObjectiveGitTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -2005,6 +2020,10 @@ "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", ); + HEADER_SEARCH_PATHS = ( + "$(OBJROOT)/UninstalledProducts/include", + External/libgit2/include, + ); INFOPLIST_FILE = ObjectiveGitTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; From 25421f789959b49a33cf52246beaa4e742fc0790 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Mon, 27 Oct 2014 22:40:55 -0700 Subject: [PATCH 12/13] Fix some warnings in specs --- ObjectiveGitTests/GTObjectSpec.m | 1 - ObjectiveGitTests/GTTimeAdditionsSpec.m | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ObjectiveGitTests/GTObjectSpec.m b/ObjectiveGitTests/GTObjectSpec.m index 408fabcf9..c8e89ea0a 100644 --- a/ObjectiveGitTests/GTObjectSpec.m +++ b/ObjectiveGitTests/GTObjectSpec.m @@ -87,7 +87,6 @@ GTOdbObject *rawObj = [obj odbObjectWithError:&error]; XCTAssertNotNil(rawObj); XCTAssertNil(error, @"%@", error.localizedDescription); - NSLog(@"rawObj len = %ld", [rawObj.data length]); }); QuickSpecEnd diff --git a/ObjectiveGitTests/GTTimeAdditionsSpec.m b/ObjectiveGitTests/GTTimeAdditionsSpec.m index 00b4b2283..67f1ef22a 100644 --- a/ObjectiveGitTests/GTTimeAdditionsSpec.m +++ b/ObjectiveGitTests/GTTimeAdditionsSpec.m @@ -22,9 +22,9 @@ NSDate *date = [NSDate gt_dateFromGitTime:time]; expect(date).notTo(beNil()); - NSCalendar *gregorianCalendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; + NSCalendar *gregorianCalendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; gregorianCalendar.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0]; - NSDateComponents *components = [gregorianCalendar components:NSDayCalendarUnit | NSMonthCalendarUnit | NSYearCalendarUnit | NSHourCalendarUnit fromDate:date]; + NSDateComponents *components = [gregorianCalendar components:NSCalendarUnitDay | NSCalendarUnitMonth | NSCalendarUnitYear | NSCalendarUnitHour fromDate:date]; expect(components).notTo(beNil()); expect(@(components.day)).to(equal(@5)); From 3de64128bb6b230a33f9029cd86605913dc69605 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Mon, 27 Oct 2014 22:46:47 -0700 Subject: [PATCH 13/13] I have had it with these motherfucking deprecations in this motherfucking project --- ObjectiveGitTests/GTTimeAdditionsSpec.m | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ObjectiveGitTests/GTTimeAdditionsSpec.m b/ObjectiveGitTests/GTTimeAdditionsSpec.m index 67f1ef22a..c63cb9dbf 100644 --- a/ObjectiveGitTests/GTTimeAdditionsSpec.m +++ b/ObjectiveGitTests/GTTimeAdditionsSpec.m @@ -43,16 +43,6 @@ expect(timeZone).notTo(beNil()); expect(@(timeZone.gt_gitTimeOffset)).to(equal(@180)); }); - - it(@"should return a correct git_time for an NSDate", ^{ - NSDate *date = [NSDate dateWithString:@"2010-05-12 18:29:13 +0000"]; - expect(date).notTo(beNil()); - - NSTimeZone *twoHoursAheadOfGMT = [NSTimeZone timeZoneForSecondsFromGMT:120 * 60]; - git_time time = [date gt_gitTimeUsingTimeZone:twoHoursAheadOfGMT]; - expect(@(time.time)).to(equal(@1273688953)); - expect(@(time.offset)).to(equal(@120)); - }); }); afterEach(^{