-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrap libgit2 in a framework #542
Comments
I started work on this a while ago, keeping some notes in phatblat/pull/1 and overall the experiment was successful. I had a secondary goal of enabling Bitcode #529, but gave up as that is too much work with our current libssh2 and OpenSSL dependencies. Perhaps once libssh2 drops OpenSSL as a dependency. I will start on some cleanup and move this into a branch here on the main repo where everyone can see and edit. I'd like to collapse the separate https://github.com/phatblat/git2 Xcode project into this one because it's not very big and that will make for less moving parts. |
I have a OpenSSL framework laying around if that is of any help? https://github.com/nerdishbynature/OpenSSL |
❤️ |
Interesting. I haven't seen a tool like gyp before. Looks like the manual work is in creating the I'm not too concerned about maintaining an Xcode project for libgit2 as its contents are very likely to be understood by contributors to this project. I'm more concerned about maintaining a parallel build system for our other dependencies, but that's outside the scope of this PR. |
I don't know about the Makefile but it seems more maintainable than an own Xcode project. |
I can try and get something working with libgit2. |
I've got a working project which is in a separate repo: https://github.com/phatblat/git2. I created it separate from ObjectiveGit thinking both it and SwiftGit2 could consume it. Since SwiftGit2 has stalled, it would be simpler if the project were here in the same repo as ObjectiveGit. Open to other opinions. |
It would be good to know if gym would make the project maintenance easier. |
Yep using that, just with gyp so we can keep the submodules? |
Do you mean keep git2 as a submodule? |
What the framework target should do is just take the source files and compile them into a dynamic framework right? Gyp takes all the files in a directory, takes the files from the include directory and makes a project out of it. Not sure if it supports framework targets yet so have to find out but maintaining a directory is easier than maintaining an Xcode project. |
yep. There a little bit more to it. The git2.modulemap and the git2.h umbrella headers need to include all the appropriate files (and not the ones for other platforms like windows and amiga). These could be static as they are in my example repo, but it would be ideal if they could be generated from the cmake build. They would only break if the files in the libgit2 build changed, so probably not a big deal to manage by hand. |
I might obviously be missing the whole picture, but IIRC CMake supports generating Xcode projects already ? |
Ha, I somehow completely missed @tiennou comment. The thing with |
I tried with the framework project but it has the same issue, the only thing I could come up with is fixing the root cause in libgit2/libgit2#3636 and not include the header in the first place. Git2Go now happily compiles under Xcode 7.3. |
As dynamic frameworks are now supported across all platforms and issues are popping up in every other Xcode version regarding modular framework inclusion @phatblat had the idea to wrap
libgit2
in a dynamic framework.This issue is to discuss is as Twitter is not the right place to include everyone.
The text was updated successfully, but these errors were encountered: