summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/libgit2')
-rw-r--r--dev-libs/libgit2/Manifest12
-rw-r--r--dev-libs/libgit2/files/libgit2-0.17.0-cflags.patch12
-rw-r--r--dev-libs/libgit2/files/libgit2-0.19.0-automagic-libssh2.patch23
-rw-r--r--dev-libs/libgit2/files/libgit2-0.20.0-skip-blame-test.patch147
-rw-r--r--dev-libs/libgit2/libgit2-0.16.0.ebuild39
-rw-r--r--dev-libs/libgit2/libgit2-0.17.0.ebuild41
-rw-r--r--dev-libs/libgit2/libgit2-0.18.0.ebuild39
-rw-r--r--dev-libs/libgit2/libgit2-0.19.0-r1.ebuild44
-rw-r--r--dev-libs/libgit2/libgit2-0.20.0-r1.ebuild65
-rw-r--r--dev-libs/libgit2/libgit2-0.21.3.ebuild63
-rw-r--r--dev-libs/libgit2/libgit2-0.21.5.ebuild63
-rw-r--r--dev-libs/libgit2/libgit2-0.22.0.ebuild66
-rw-r--r--dev-libs/libgit2/libgit2-0.22.1.ebuild66
-rw-r--r--dev-libs/libgit2/libgit2-0.22.2.ebuild69
-rw-r--r--dev-libs/libgit2/libgit2-0.22.3.ebuild75
-rw-r--r--dev-libs/libgit2/libgit2-0.23.0.ebuild75
-rw-r--r--dev-libs/libgit2/libgit2-9999.ebuild75
-rw-r--r--dev-libs/libgit2/metadata.xml21
18 files changed, 995 insertions, 0 deletions
diff --git a/dev-libs/libgit2/Manifest b/dev-libs/libgit2/Manifest
new file mode 100644
index 000000000000..daa1f51e6bd2
--- /dev/null
+++ b/dev-libs/libgit2/Manifest
@@ -0,0 +1,12 @@
+DIST libgit2-0.16.0.tar.gz 1042613 SHA256 b84e5353ebc41e785f777a4977da9fa3eaf19f71c07eb2a2c23c2ceafb811597 SHA512 cc12ce986ee9d179a7e5b01607d69ee212a4885b0487a06d5cfaba3ecb538932fc9baec86dcb44936e47ab8eb43838b9b4108541c07833d9d688e36cd03ab8c6 WHIRLPOOL 5f557998f3be9e984c78c89fd5a6036f1b44100bcf1c6c12c9dd8a59193dea827498a3ba5e1fc822eb537880607f152ddc9daa1693c972a62098947196d78dd1
+DIST libgit2-0.17.0.tar.gz 2096159 SHA256 068eed0b8fe852a7cc55aae46d2299e9c9e3e00badc1c293d72a9dd122226018 SHA512 a51420ae78be1f81104afdb58fdb9d7681a1a3ec3ee907b04bc2f2c5a8629a331b34d0fc67fa8e98d809a4352971149307553bbfec6799d919e84d292456a764 WHIRLPOOL c37f0301487375b47b77f4f7869830e2dc9d0c4227c36e3a7e8e72b7f27794be321dd047f13394f2828016bcbeb1375784ad873743b2c0e45bfb85b2c8a463cb
+DIST libgit2-0.18.0.tar.gz 2958095 SHA256 88a6ef6f87905e0b574123b85c5746025a408c6169e754906e939acbca75ac5f SHA512 3fc1610667a4a0bb9d7ace11e65d590178bcd8687a2866fa7687123468bad7dcaf6365b3e593b686e727bc62746e655eb4a08d5ddb7d69e65c5bad1b1e6fc2be WHIRLPOOL 9ffa51954b893bb0ef5ac6a1866282e11ffbd6e9277e20222ddb34e45af16df8a0ab1014425ae956baf0ab905cc0875a67ad9c7c86e02ac700b43940a1be301a
+DIST libgit2-0.19.0.tar.gz 3122978 SHA256 f526f8cf5547c70fe00169d587ca18367541a95fad5849352c3e2ffc94d583bf SHA512 e14b71e5e9b0c97255b47d35dd216ad24aeba04050a3407a90ac422b27df87cc0ad97b538230d07b7299863c7d1c3919dc2912713add31b7c585949cd4b436be WHIRLPOOL 0e551738f1dedf13a103a71f8e4149620e341a36da2f737c5fb10cd461ba77e1367f8bdff9304142b72919c6940db9d7afc40cfd5ab7e661fe6c4b60b36d54a2
+DIST libgit2-0.20.0.tar.gz 3255478 SHA256 509ab8091623df5b745cd13682539ca2dc2372051d3418355a7acc5b4a20c2f1 SHA512 0512a2d6daa149f6c6bada3b9ea8b228d6ba9180d7030cf41f3e9888fb15f068ef7c7722f636f8750c4643b58453299179d73e0b71e08ae79439060a27efe9d6 WHIRLPOOL 996a3639bd8f598b07f12115a2af0b5d28de51163338c34b39872046776a0144e57a0598ab493dcf717fa16ed093d9b00546009d2a4426a27a0451e97759783b
+DIST libgit2-0.21.3.tar.gz 3454810 SHA256 7c40cb783e5b7bcae46986e35e531794d378872574237f4b5f34e3a7d2a25c32 SHA512 399e16c9ca9d5a9e95ac929d7bd327038ba0e590e37ceee2aab062472f28a32905e90b5ee59990dad428d04c1c0d3f388381e3e44f775dfaafe37b21dbd7c892 WHIRLPOOL 4facdc843c3f8d66fe1290708a402476263484fd1a1365ced406a0e21515d4d65f1da2e73615fdfb241fc33bdb575a9f688140e17a82ec2e5002648e46c975cc
+DIST libgit2-0.21.5.tar.gz 3460366 SHA256 46ca07becbdcda0da96a553d9f45e64ead29276ba14049e4bc8e2730ed1aa494 SHA512 080624aa1479b9b393d4b3341b2dd5640e7d61f21c44b04c54bdd6be589fcdfc628219046f3dfda48f563560a1db1f9ddf0626d2802a1f60122b9609d0412dce WHIRLPOOL 6bdc7d40afb9bf427ffe96d87a920b4421f902f0548018477324d69a563751696a1288c5564d87efbabac779273f1992f6d79f9ac101814cfbcbcdc11584dba3
+DIST libgit2-0.22.0.tar.gz 3586058 SHA256 b70965b35e6d0adc891ba2edb28d982cb27729a3f2bb02186084f692e94922b2 SHA512 08d939f9fe6000587ce3695e215e92fba77de32c7b4e898d8ceeacd8e6f6151dd69bd160ef9e38a0e073a970712d61d34955320847d51e3c67910a413e909d42 WHIRLPOOL a167e1957cbe6c0ad5b46daed379fe92178848e517ab90d41d2281ff285775eb2a61ed231149cee40699d1919153cdf38bf9bcce1bbbb0892f66bc5b16dc7e0f
+DIST libgit2-0.22.1.tar.gz 3590204 SHA256 c7f1bf99ed8aeba65a485489869e2a50f022f3cd847df85e192fc99fdd6c8b5e SHA512 0fae8562c9b2f5575f908f23773da36d29554cdafb71e551abb68dc18e6cee36e5b96d3a7e585a235e520acc49983caf7a78d8f0b6dd43b378dc6cdf0cef42c9 WHIRLPOOL 933f9b574ff77ef298eb21fca4696d7910d4cd49738f0b6cd8f8a64dd75b21423168cc0ef7cdbd1e08dd53b5f2647c5c5b614767ba6b8a3b385001ac6d5cb39d
+DIST libgit2-0.22.2.tar.gz 3591643 SHA256 3109f2579180d561fc736bad8bd917d7241477aab11633755c8a273beac53cdc SHA512 ab97a2a548fa0e9be113bfe58f6d4e97dda9d7b10b4979b5736c6d410a8f1f3fb6801d691aad246481567eecc99b6f658f7bab639076ffdf21d30561243c8eb9 WHIRLPOOL 39a55c3a76f7c9f24efb8c72d5322afd35ee4880a06be2e22106690da8321b9d0a685128657c08d332c6c154e0dab6148cf740e676b6b16e9731eb9d99bb49d8
+DIST libgit2-0.22.3.tar.gz 3594098 SHA256 511fe60e7c12c3525b4e0489861e5c1fe0e331d604bee9a3dfb8420c2f288f60 SHA512 2bbb04789702d206e65b18d96752113d2c1b0af7b7779cf7c90c326ec47f535b36327b0171ae1f614179c24275e2c04c51d62e44eedba87530509a29c15ab25c WHIRLPOOL 2fbb2739856e6cef3ae1a103e1b999b3362c79536423e5cd6d46d60276a14e87298ec36e2e03e8ea0fa8ebe28a140ba20ce077fb30ab3fc0d1337ec3b04fde87
+DIST libgit2-0.23.0.tar.gz 3714985 SHA256 49d75c601eb619481ecc0a79f3356cc26b89dfa646f2268e434d7b4c8d90c8a1 SHA512 e0f414529ba6faf877b1848101fda3f5dc4b84e75c56996378c098d1bdc5f03e60c22a1ee5768a8a9a5d5aab313f52ce8df5b1bd3f9bfb2c36aae7117a368f22 WHIRLPOOL 9716f3ac340bd28d151814488898a09df8f867b7a40b59e71c12b6d7d8af3c7ac41ac0ae8de239be0743db03b4451ca87462835faac7f6938d5a82564a7b1f13
diff --git a/dev-libs/libgit2/files/libgit2-0.17.0-cflags.patch b/dev-libs/libgit2/files/libgit2-0.17.0-cflags.patch
new file mode 100644
index 000000000000..fbf760038de1
--- /dev/null
+++ b/dev-libs/libgit2/files/libgit2-0.17.0-cflags.patch
@@ -0,0 +1,12 @@
+--- libgit2-0.17.0/CMakeLists.txt
++++ libgit2-0.17.0/CMakeLists.txt
+@@ -70,8 +70,7 @@
+
+ # Precompiled headers
+ ELSE ()
+- SET(CMAKE_C_FLAGS "-O2 -g -D_GNU_SOURCE -fvisibility=hidden -Wall -Wextra -Wno-missing-field-initializers -Wstrict-aliasing=2 -Wstrict-prototypes -Wmissing-prototypes ${CMAKE_C_FLAGS}")
+- SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
++ SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -fvisibility=hidden -Wall -Wextra -Wno-missing-field-initializers -Wstrict-aliasing=2 -Wstrict-prototypes -Wmissing-prototypes ${CMAKE_C_FLAGS}")
+ IF (NOT MINGW) # MinGW always does PIC and complains if we tell it to
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+ ENDIF ()
diff --git a/dev-libs/libgit2/files/libgit2-0.19.0-automagic-libssh2.patch b/dev-libs/libgit2/files/libgit2-0.19.0-automagic-libssh2.patch
new file mode 100644
index 000000000000..afd8935dc893
--- /dev/null
+++ b/dev-libs/libgit2/files/libgit2-0.19.0-automagic-libssh2.patch
@@ -0,0 +1,23 @@
+--- libgit2-0.19.0/CMakeLists.txt
++++ libgit2-0.19.0/CMakeLists.txt
+@@ -20,6 +20,7 @@
+ # Build options
+ #
+ OPTION( SONAME "Set the (SO)VERSION of the target" ON )
++OPTION( ENABLE_SSH "Enable SSH transport support" OFF )
+ OPTION( BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON )
+ OPTION( THREADSAFE "Build libgit2 as threadsafe" OFF )
+ OPTION( BUILD_CLAR "Build Tests using the Clar suite" ON )
+@@ -151,10 +152,8 @@
+ FILE(GLOB SRC_ZLIB deps/zlib/*.c)
+ ENDIF()
+
+-IF(NOT LIBSSH2_LIBRARY)
+- FIND_PACKAGE(LIBSSH2 QUIET)
+-ENDIF()
+-IF (LIBSSH2_FOUND)
++IF(ENABLE_SSH)
++ FIND_PACKAGE(LIBSSH2 REQUIRED)
+ ADD_DEFINITIONS(-DGIT_SSH)
+ INCLUDE_DIRECTORIES(${LIBSSH2_INCLUDE_DIR})
+ SET(SSH_LIBRARIES ${LIBSSH2_LIBRARIES})
diff --git a/dev-libs/libgit2/files/libgit2-0.20.0-skip-blame-test.patch b/dev-libs/libgit2/files/libgit2-0.20.0-skip-blame-test.patch
new file mode 100644
index 000000000000..de70672cd169
--- /dev/null
+++ b/dev-libs/libgit2/files/libgit2-0.20.0-skip-blame-test.patch
@@ -0,0 +1,147 @@
+Skip test that requires the libgit2 git repo.
+
+--- libgit2-0.20.0/tests/blame/simple.c
++++ libgit2-0.20.0/tests/blame/simple.c
+@@ -130,74 +130,74 @@
+ * bf477ed4 include/git2.h 45 (Michael Schubert 2012-02-15 00:33:38 +0100 59
+ * d12299fe src/git.h 49 (Vicent Martí 2010-12-03 22:22:10 +0200 60
+ */
+-void test_blame_simple__trivial_libgit2(void)
+-{
+- git_blame_options opts = GIT_BLAME_OPTIONS_INIT;
+- git_object *obj;
+-
+- cl_git_pass(git_repository_open(&g_repo, cl_fixture("../..")));
+-
+- /* This test can't work on a shallow clone */
+- if (git_repository_is_shallow(g_repo))
+- return;
+-
+- cl_git_pass(git_revparse_single(&obj, g_repo, "359fc2d"));
+- git_oid_cpy(&opts.newest_commit, git_object_id(obj));
+- git_object_free(obj);
+-
+- cl_git_pass(git_blame_file(&g_blame, g_repo, "include/git2.h", &opts));
+-
+- check_blame_hunk_index(g_repo, g_blame, 0, 1, 1, 0, "d12299fe", "src/git.h");
+- check_blame_hunk_index(g_repo, g_blame, 1, 2, 1, 0, "359fc2d2", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 2, 3, 1, 0, "d12299fe", "src/git.h");
+- check_blame_hunk_index(g_repo, g_blame, 3, 4, 2, 0, "bb742ede", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 4, 6, 5, 0, "d12299fe", "src/git.h");
+- check_blame_hunk_index(g_repo, g_blame, 5, 11, 1, 0, "96fab093", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 6, 12, 1, 0, "9d1dcca2", "src/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 7, 13, 1, 0, "44908fe7", "src/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 8, 14, 1, 0, "a15c550d", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 9, 15, 1, 0, "44908fe7", "src/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 10, 16, 1, 0, "d12299fe", "src/git.h");
+- check_blame_hunk_index(g_repo, g_blame, 11, 17, 1, 0, "44908fe7", "src/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 12, 18, 1, 0, "d12299fe", "src/git.h");
+- check_blame_hunk_index(g_repo, g_blame, 13, 19, 1, 0, "44908fe7", "src/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 14, 20, 1, 0, "638c2ca4", "src/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 15, 21, 1, 0, "44908fe7", "src/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 16, 22, 1, 0, "d12299fe", "src/git.h");
+- check_blame_hunk_index(g_repo, g_blame, 17, 23, 2, 0, "44908fe7", "src/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 18, 25, 1, 0, "bf787bd8", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 19, 26, 1, 0, "0984c876", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 20, 27, 1, 0, "2f8a8ab2", "src/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 21, 28, 1, 0, "27df4275", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 22, 29, 1, 0, "a346992f", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 23, 30, 1, 0, "d12299fe", "src/git.h");
+- check_blame_hunk_index(g_repo, g_blame, 24, 31, 5, 0, "44908fe7", "src/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 25, 36, 1, 0, "65b09b1d", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 26, 37, 1, 0, "d12299fe", "src/git.h");
+- check_blame_hunk_index(g_repo, g_blame, 27, 38, 1, 0, "44908fe7", "src/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 28, 39, 1, 0, "5d4cd003", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 29, 40, 1, 0, "41fb1ca0", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 30, 41, 1, 0, "2dc31040", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 31, 42, 1, 0, "764df57e", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 32, 43, 1, 0, "5280f4e6", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 33, 44, 1, 0, "613d5eb9", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 34, 45, 1, 0, "d12299fe", "src/git.h");
+- check_blame_hunk_index(g_repo, g_blame, 35, 46, 1, 0, "111ee3fe", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 36, 47, 1, 0, "f004c4a8", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 37, 48, 1, 0, "111ee3fe", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 38, 49, 1, 0, "9c82357b", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 39, 50, 1, 0, "d6258deb", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 40, 51, 1, 0, "b311e313", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 41, 52, 1, 0, "3412391d", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 42, 53, 1, 0, "bfc9ca59", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 43, 54, 1, 0, "bf477ed4", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 44, 55, 1, 0, "edebceff", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 45, 56, 1, 0, "743a4b3b", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 46, 57, 1, 0, "0a32dca5", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 47, 58, 1, 0, "590fb68b", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 48, 59, 1, 0, "bf477ed4", "include/git2.h");
+- check_blame_hunk_index(g_repo, g_blame, 49, 60, 1, 0, "d12299fe", "src/git.h");
+-}
++//void test_blame_simple__trivial_libgit2(void)
++//{
++// git_blame_options opts = GIT_BLAME_OPTIONS_INIT;
++// git_object *obj;
++//
++// cl_git_pass(git_repository_open(&g_repo, cl_fixture("../..")));
++//
++// /* This test can't work on a shallow clone */
++// if (git_repository_is_shallow(g_repo))
++// return;
++//
++// cl_git_pass(git_revparse_single(&obj, g_repo, "359fc2d"));
++// git_oid_cpy(&opts.newest_commit, git_object_id(obj));
++// git_object_free(obj);
++//
++// cl_git_pass(git_blame_file(&g_blame, g_repo, "include/git2.h", &opts));
++//
++// check_blame_hunk_index(g_repo, g_blame, 0, 1, 1, 0, "d12299fe", "src/git.h");
++// check_blame_hunk_index(g_repo, g_blame, 1, 2, 1, 0, "359fc2d2", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 2, 3, 1, 0, "d12299fe", "src/git.h");
++// check_blame_hunk_index(g_repo, g_blame, 3, 4, 2, 0, "bb742ede", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 4, 6, 5, 0, "d12299fe", "src/git.h");
++// check_blame_hunk_index(g_repo, g_blame, 5, 11, 1, 0, "96fab093", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 6, 12, 1, 0, "9d1dcca2", "src/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 7, 13, 1, 0, "44908fe7", "src/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 8, 14, 1, 0, "a15c550d", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 9, 15, 1, 0, "44908fe7", "src/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 10, 16, 1, 0, "d12299fe", "src/git.h");
++// check_blame_hunk_index(g_repo, g_blame, 11, 17, 1, 0, "44908fe7", "src/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 12, 18, 1, 0, "d12299fe", "src/git.h");
++// check_blame_hunk_index(g_repo, g_blame, 13, 19, 1, 0, "44908fe7", "src/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 14, 20, 1, 0, "638c2ca4", "src/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 15, 21, 1, 0, "44908fe7", "src/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 16, 22, 1, 0, "d12299fe", "src/git.h");
++// check_blame_hunk_index(g_repo, g_blame, 17, 23, 2, 0, "44908fe7", "src/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 18, 25, 1, 0, "bf787bd8", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 19, 26, 1, 0, "0984c876", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 20, 27, 1, 0, "2f8a8ab2", "src/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 21, 28, 1, 0, "27df4275", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 22, 29, 1, 0, "a346992f", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 23, 30, 1, 0, "d12299fe", "src/git.h");
++// check_blame_hunk_index(g_repo, g_blame, 24, 31, 5, 0, "44908fe7", "src/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 25, 36, 1, 0, "65b09b1d", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 26, 37, 1, 0, "d12299fe", "src/git.h");
++// check_blame_hunk_index(g_repo, g_blame, 27, 38, 1, 0, "44908fe7", "src/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 28, 39, 1, 0, "5d4cd003", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 29, 40, 1, 0, "41fb1ca0", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 30, 41, 1, 0, "2dc31040", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 31, 42, 1, 0, "764df57e", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 32, 43, 1, 0, "5280f4e6", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 33, 44, 1, 0, "613d5eb9", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 34, 45, 1, 0, "d12299fe", "src/git.h");
++// check_blame_hunk_index(g_repo, g_blame, 35, 46, 1, 0, "111ee3fe", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 36, 47, 1, 0, "f004c4a8", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 37, 48, 1, 0, "111ee3fe", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 38, 49, 1, 0, "9c82357b", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 39, 50, 1, 0, "d6258deb", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 40, 51, 1, 0, "b311e313", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 41, 52, 1, 0, "3412391d", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 42, 53, 1, 0, "bfc9ca59", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 43, 54, 1, 0, "bf477ed4", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 44, 55, 1, 0, "edebceff", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 45, 56, 1, 0, "743a4b3b", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 46, 57, 1, 0, "0a32dca5", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 47, 58, 1, 0, "590fb68b", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 48, 59, 1, 0, "bf477ed4", "include/git2.h");
++// check_blame_hunk_index(g_repo, g_blame, 49, 60, 1, 0, "d12299fe", "src/git.h");
++//}
+
+
+ /*
diff --git a/dev-libs/libgit2/libgit2-0.16.0.ebuild b/dev-libs/libgit2/libgit2-0.16.0.ebuild
new file mode 100644
index 000000000000..e44d14fd521d
--- /dev/null
+++ b/dev-libs/libgit2/libgit2-0.16.0.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit cmake-utils multilib
+
+DESCRIPTION="A linkable library for Git"
+HOMEPAGE="http://libgit2.github.com/"
+SRC_URI="mirror://github/${PN}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2-with-linking-exception"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~ppc-macos"
+IUSE="examples test"
+
+RDEPEND="sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+DOCS=( README.md )
+
+src_configure() {
+ local mycmakeargs=(
+ -DINSTALL_LIB="${EPREFIX}/usr/$(get_libdir)"
+ $(cmake-utils_use_build test TESTS)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples ; then
+ find examples -name .gitignore -delete
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/dev-libs/libgit2/libgit2-0.17.0.ebuild b/dev-libs/libgit2/libgit2-0.17.0.ebuild
new file mode 100644
index 000000000000..53c1b12df70b
--- /dev/null
+++ b/dev-libs/libgit2/libgit2-0.17.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit cmake-utils multilib
+
+DESCRIPTION="A linkable library for Git"
+HOMEPAGE="http://libgit2.github.com/"
+SRC_URI="mirror://github/${PN}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2-with-linking-exception"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~ppc-macos"
+IUSE="examples test"
+
+RDEPEND="sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+DOCS=( README.md )
+
+PATCHES=( "${FILESDIR}"/${P}-cflags.patch )
+
+src_configure() {
+ local mycmakeargs=(
+ -DINSTALL_LIB="${EPREFIX}/usr/$(get_libdir)"
+ $(cmake-utils_use_build test CLAR)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples ; then
+ find examples -name .gitignore -delete
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/dev-libs/libgit2/libgit2-0.18.0.ebuild b/dev-libs/libgit2/libgit2-0.18.0.ebuild
new file mode 100644
index 000000000000..328c2f2b472e
--- /dev/null
+++ b/dev-libs/libgit2/libgit2-0.18.0.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+DESCRIPTION="A linkable library for Git"
+HOMEPAGE="http://libgit2.github.com/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2-with-linking-exception"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~ppc-macos"
+IUSE="examples test"
+
+RDEPEND="sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+DOCS=( README.md )
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
+ $(cmake-utils_use_build test CLAR)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples ; then
+ find examples -name .gitignore -delete
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/dev-libs/libgit2/libgit2-0.19.0-r1.ebuild b/dev-libs/libgit2/libgit2-0.19.0-r1.ebuild
new file mode 100644
index 000000000000..36dcf264ee08
--- /dev/null
+++ b/dev-libs/libgit2/libgit2-0.19.0-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+DESCRIPTION="A linkable library for Git"
+HOMEPAGE="http://libgit2.github.com/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2-with-linking-exception"
+SLOT="0"
+KEYWORDS="amd64 x86 ~ppc-macos"
+IUSE="examples ssh test"
+
+RDEPEND="sys-libs/zlib
+ net-libs/http-parser
+ ssh? ( net-libs/libssh2 )"
+DEPEND="${RDEPEND}"
+
+DOCS=( README.md )
+
+PATCHES=( "${FILESDIR}"/${P}-automagic-libssh2.patch )
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
+ $(cmake-utils_use_enable ssh SSH)
+ $(cmake-utils_use_build test CLAR)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples ; then
+ find examples -name .gitignore -delete
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/dev-libs/libgit2/libgit2-0.20.0-r1.ebuild b/dev-libs/libgit2/libgit2-0.20.0-r1.ebuild
new file mode 100644
index 000000000000..b6c502a003a5
--- /dev/null
+++ b/dev-libs/libgit2/libgit2-0.20.0-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+DESCRIPTION="A linkable library for Git"
+HOMEPAGE="http://libgit2.github.com/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2-with-linking-exception"
+SLOT="0"
+KEYWORDS="amd64 x86 ~ppc-macos"
+IUSE="examples ssh test threads trace"
+
+RDEPEND="
+ sys-libs/zlib
+ net-libs/http-parser
+ ssh? ( net-libs/libssh2 )"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS CONTRIBUTING.md CONVENTIONS.md README.md )
+
+PATCHES=( "${FILESDIR}"/${P}-skip-blame-test.patch )
+
+src_prepare() {
+ # skip online tests
+ sed -i '/libgit2_clar/s/-ionline/-xonline/' CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
+ $(cmake-utils_use_build test CLAR)
+ $(cmake-utils_use_enable trace TRACE)
+ $(cmake-utils_use_use ssh SSH)
+ $(cmake-utils_use threads THREADSAFE)
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ if [[ ${EUID} -eq 0 ]] ; then
+ # repo::iterator::fs_preserves_error fails if run as root
+ # since root can still access dirs with 0000 perms
+ ewarn "Skipping tests: non-root privileges are required for all tests to pass"
+ else
+ local TEST_VERBOSE=1
+ cmake-utils_src_test
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples ; then
+ find examples -name .gitignore -delete || die
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/dev-libs/libgit2/libgit2-0.21.3.ebuild b/dev-libs/libgit2/libgit2-0.21.3.ebuild
new file mode 100644
index 000000000000..1ab0541953e4
--- /dev/null
+++ b/dev-libs/libgit2/libgit2-0.21.3.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+DESCRIPTION="A linkable library for Git"
+HOMEPAGE="http://libgit2.github.com/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2-with-linking-exception"
+SLOT="0/21"
+KEYWORDS="~amd64 ~x86 ~ppc-macos"
+IUSE="examples ssh test threads trace"
+
+RDEPEND="
+ sys-libs/zlib
+ net-libs/http-parser
+ ssh? ( net-libs/libssh2 )"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS CONTRIBUTING.md CONVENTIONS.md README.md )
+
+src_prepare() {
+ # skip online tests
+ sed -i '/libgit2_clar/s/-ionline/-xonline/' CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
+ $(cmake-utils_use_build test CLAR)
+ $(cmake-utils_use_enable trace TRACE)
+ $(cmake-utils_use_use ssh SSH)
+ $(cmake-utils_use threads THREADSAFE)
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ if [[ ${EUID} -eq 0 ]] ; then
+ # repo::iterator::fs_preserves_error fails if run as root
+ # since root can still access dirs with 0000 perms
+ ewarn "Skipping tests: non-root privileges are required for all tests to pass"
+ else
+ local TEST_VERBOSE=1
+ cmake-utils_src_test
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples ; then
+ find examples -name .gitignore -delete || die
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/dev-libs/libgit2/libgit2-0.21.5.ebuild b/dev-libs/libgit2/libgit2-0.21.5.ebuild
new file mode 100644
index 000000000000..608bab4390a5
--- /dev/null
+++ b/dev-libs/libgit2/libgit2-0.21.5.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+DESCRIPTION="A linkable library for Git"
+HOMEPAGE="http://libgit2.github.com/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2-with-linking-exception"
+SLOT="0/21"
+KEYWORDS="amd64 x86 ~ppc-macos"
+IUSE="examples ssh test threads trace"
+
+RDEPEND="
+ sys-libs/zlib
+ net-libs/http-parser
+ ssh? ( net-libs/libssh2 )"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS CONTRIBUTING.md CONVENTIONS.md README.md )
+
+src_prepare() {
+ # skip online tests
+ sed -i '/libgit2_clar/s/-ionline/-xonline/' CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
+ $(cmake-utils_use_build test CLAR)
+ $(cmake-utils_use_enable trace TRACE)
+ $(cmake-utils_use_use ssh SSH)
+ $(cmake-utils_use threads THREADSAFE)
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ if [[ ${EUID} -eq 0 ]] ; then
+ # repo::iterator::fs_preserves_error fails if run as root
+ # since root can still access dirs with 0000 perms
+ ewarn "Skipping tests: non-root privileges are required for all tests to pass"
+ else
+ local TEST_VERBOSE=1
+ cmake-utils_src_test
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples ; then
+ find examples -name .gitignore -delete || die
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/dev-libs/libgit2/libgit2-0.22.0.ebuild b/dev-libs/libgit2/libgit2-0.22.0.ebuild
new file mode 100644
index 000000000000..d3b222302c08
--- /dev/null
+++ b/dev-libs/libgit2/libgit2-0.22.0.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+DESCRIPTION="A linkable library for Git"
+HOMEPAGE="http://libgit2.github.com/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2-with-linking-exception"
+SLOT="0/22"
+KEYWORDS="~amd64 ~x86 ~ppc-macos"
+IUSE="examples gssapi ssh test threads trace"
+
+RDEPEND="
+ sys-libs/zlib
+ net-libs/http-parser
+ gssapi? ( virtual/krb5 )
+ ssh? ( net-libs/libssh2 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS CONTRIBUTING.md CONVENTIONS.md README.md )
+
+src_prepare() {
+ # skip online tests
+ sed -i '/libgit2_clar/s/-ionline/-xonline/' CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
+ $(cmake-utils_use_build test CLAR)
+ $(cmake-utils_use_enable trace TRACE)
+ $(cmake-utils_use_use gssapi GSSAPI)
+ $(cmake-utils_use_use ssh SSH)
+ $(cmake-utils_use threads THREADSAFE)
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ if [[ ${EUID} -eq 0 ]] ; then
+ # repo::iterator::fs_preserves_error fails if run as root
+ # since root can still access dirs with 0000 perms
+ ewarn "Skipping tests: non-root privileges are required for all tests to pass"
+ else
+ local TEST_VERBOSE=1
+ cmake-utils_src_test
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples ; then
+ find examples -name .gitignore -delete || die
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/dev-libs/libgit2/libgit2-0.22.1.ebuild b/dev-libs/libgit2/libgit2-0.22.1.ebuild
new file mode 100644
index 000000000000..d3b222302c08
--- /dev/null
+++ b/dev-libs/libgit2/libgit2-0.22.1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+DESCRIPTION="A linkable library for Git"
+HOMEPAGE="http://libgit2.github.com/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2-with-linking-exception"
+SLOT="0/22"
+KEYWORDS="~amd64 ~x86 ~ppc-macos"
+IUSE="examples gssapi ssh test threads trace"
+
+RDEPEND="
+ sys-libs/zlib
+ net-libs/http-parser
+ gssapi? ( virtual/krb5 )
+ ssh? ( net-libs/libssh2 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS CONTRIBUTING.md CONVENTIONS.md README.md )
+
+src_prepare() {
+ # skip online tests
+ sed -i '/libgit2_clar/s/-ionline/-xonline/' CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
+ $(cmake-utils_use_build test CLAR)
+ $(cmake-utils_use_enable trace TRACE)
+ $(cmake-utils_use_use gssapi GSSAPI)
+ $(cmake-utils_use_use ssh SSH)
+ $(cmake-utils_use threads THREADSAFE)
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ if [[ ${EUID} -eq 0 ]] ; then
+ # repo::iterator::fs_preserves_error fails if run as root
+ # since root can still access dirs with 0000 perms
+ ewarn "Skipping tests: non-root privileges are required for all tests to pass"
+ else
+ local TEST_VERBOSE=1
+ cmake-utils_src_test
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples ; then
+ find examples -name .gitignore -delete || die
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/dev-libs/libgit2/libgit2-0.22.2.ebuild b/dev-libs/libgit2/libgit2-0.22.2.ebuild
new file mode 100644
index 000000000000..a441cc2a64e3
--- /dev/null
+++ b/dev-libs/libgit2/libgit2-0.22.2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+DESCRIPTION="A linkable library for Git"
+HOMEPAGE="http://libgit2.github.com/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2-with-linking-exception"
+SLOT="0/22"
+KEYWORDS="~amd64 ~x86 ~ppc-macos"
+IUSE="examples gssapi ssh test threads trace"
+
+RDEPEND="
+ dev-libs/openssl:0
+ sys-libs/zlib
+ net-libs/http-parser
+ gssapi? ( virtual/krb5 )
+ ssh? ( net-libs/libssh2 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+DOCS=( AUTHORS CONTRIBUTING.md CONVENTIONS.md README.md )
+
+src_prepare() {
+ # skip online tests
+ sed -i '/libgit2_clar/s/-ionline/-xonline/' CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
+ $(cmake-utils_use_build test CLAR)
+ $(cmake-utils_use_enable trace TRACE)
+ $(cmake-utils_use_use gssapi GSSAPI)
+ $(cmake-utils_use_use ssh SSH)
+ $(cmake-utils_use threads THREADSAFE)
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ if [[ ${EUID} -eq 0 ]] ; then
+ # repo::iterator::fs_preserves_error fails if run as root
+ # since root can still access dirs with 0000 perms
+ ewarn "Skipping tests: non-root privileges are required for all tests to pass"
+ else
+ local TEST_VERBOSE=1
+ cmake-utils_src_test
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples ; then
+ find examples -name .gitignore -delete || die
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/dev-libs/libgit2/libgit2-0.22.3.ebuild b/dev-libs/libgit2/libgit2-0.22.3.ebuild
new file mode 100644
index 000000000000..f111675f545c
--- /dev/null
+++ b/dev-libs/libgit2/libgit2-0.22.3.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86 ~ppc-macos"
+fi
+
+DESCRIPTION="A linkable library for Git"
+HOMEPAGE="http://libgit2.github.com/"
+
+LICENSE="GPL-2-with-linking-exception"
+SLOT="0/22"
+IUSE="examples gssapi ssh test threads trace"
+
+RDEPEND="
+ dev-libs/openssl:0
+ sys-libs/zlib
+ net-libs/http-parser
+ gssapi? ( virtual/krb5 )
+ ssh? ( net-libs/libssh2 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+DOCS=( AUTHORS CONTRIBUTING.md CONVENTIONS.md README.md )
+
+src_prepare() {
+ # skip online tests
+ sed -i '/libgit2_clar/s/-ionline/-xonline/' CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
+ $(cmake-utils_use_build test CLAR)
+ $(cmake-utils_use_enable trace TRACE)
+ $(cmake-utils_use_use gssapi GSSAPI)
+ $(cmake-utils_use_use ssh SSH)
+ $(cmake-utils_use threads THREADSAFE)
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ if [[ ${EUID} -eq 0 ]] ; then
+ # repo::iterator::fs_preserves_error fails if run as root
+ # since root can still access dirs with 0000 perms
+ ewarn "Skipping tests: non-root privileges are required for all tests to pass"
+ else
+ local TEST_VERBOSE=1
+ cmake-utils_src_test
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples ; then
+ find examples -name .gitignore -delete || die
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/dev-libs/libgit2/libgit2-0.23.0.ebuild b/dev-libs/libgit2/libgit2-0.23.0.ebuild
new file mode 100644
index 000000000000..a72ecc24e6b9
--- /dev/null
+++ b/dev-libs/libgit2/libgit2-0.23.0.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86 ~ppc-macos"
+fi
+
+DESCRIPTION="A linkable library for Git"
+HOMEPAGE="http://libgit2.github.com/"
+
+LICENSE="GPL-2-with-linking-exception"
+SLOT="0/23"
+IUSE="examples gssapi ssh test threads trace"
+
+RDEPEND="
+ dev-libs/openssl:0
+ sys-libs/zlib
+ net-libs/http-parser
+ gssapi? ( virtual/krb5 )
+ ssh? ( net-libs/libssh2 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+DOCS=( AUTHORS CONTRIBUTING.md CONVENTIONS.md README.md )
+
+src_prepare() {
+ # skip online tests
+ sed -i '/libgit2_clar/s/-ionline/-xonline/' CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
+ $(cmake-utils_use_build test CLAR)
+ $(cmake-utils_use_enable trace TRACE)
+ $(cmake-utils_use_use gssapi GSSAPI)
+ $(cmake-utils_use_use ssh SSH)
+ $(cmake-utils_use threads THREADSAFE)
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ if [[ ${EUID} -eq 0 ]] ; then
+ # repo::iterator::fs_preserves_error fails if run as root
+ # since root can still access dirs with 0000 perms
+ ewarn "Skipping tests: non-root privileges are required for all tests to pass"
+ else
+ local TEST_VERBOSE=1
+ cmake-utils_src_test
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples ; then
+ find examples -name .gitignore -delete || die
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/dev-libs/libgit2/libgit2-9999.ebuild b/dev-libs/libgit2/libgit2-9999.ebuild
new file mode 100644
index 000000000000..a72ecc24e6b9
--- /dev/null
+++ b/dev-libs/libgit2/libgit2-9999.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86 ~ppc-macos"
+fi
+
+DESCRIPTION="A linkable library for Git"
+HOMEPAGE="http://libgit2.github.com/"
+
+LICENSE="GPL-2-with-linking-exception"
+SLOT="0/23"
+IUSE="examples gssapi ssh test threads trace"
+
+RDEPEND="
+ dev-libs/openssl:0
+ sys-libs/zlib
+ net-libs/http-parser
+ gssapi? ( virtual/krb5 )
+ ssh? ( net-libs/libssh2 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+DOCS=( AUTHORS CONTRIBUTING.md CONVENTIONS.md README.md )
+
+src_prepare() {
+ # skip online tests
+ sed -i '/libgit2_clar/s/-ionline/-xonline/' CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
+ $(cmake-utils_use_build test CLAR)
+ $(cmake-utils_use_enable trace TRACE)
+ $(cmake-utils_use_use gssapi GSSAPI)
+ $(cmake-utils_use_use ssh SSH)
+ $(cmake-utils_use threads THREADSAFE)
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ if [[ ${EUID} -eq 0 ]] ; then
+ # repo::iterator::fs_preserves_error fails if run as root
+ # since root can still access dirs with 0000 perms
+ ewarn "Skipping tests: non-root privileges are required for all tests to pass"
+ else
+ local TEST_VERBOSE=1
+ cmake-utils_src_test
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples ; then
+ find examples -name .gitignore -delete || die
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/dev-libs/libgit2/metadata.xml b/dev-libs/libgit2/metadata.xml
new file mode 100644
index 000000000000..f7c153d62e0a
--- /dev/null
+++ b/dev-libs/libgit2/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <longdescription lang="en">
+ libgit2 is a portable, pure C implementation of the Git core methods provided
+ as a re-entrant linkable library with a solid API, allowing you to write native
+ speed custom Git applications in any language which supports C bindings.
+ </longdescription>
+ <use>
+ <flag name="gssapi">Enable GSSAPI support for SPNEGO auth</flag>
+ <flag name="ssh">Enable SSH transport support</flag>
+ <flag name="trace">Enable tracing support</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">libgit2/libgit2</remote-id>
+ </upstream>
+</pkgmetadata>