Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2013-05-15 12:14:53 +0400
committernulltoken <emeric.fermas@gmail.com>2013-05-26 21:06:44 +0400
commit96df5f8d6d3e35f8aadafdc25a95ede3eb9e86b5 (patch)
treef3c09871aca1947ec920cfd470480b792c3a2346 /build.libgit2sharp.sh
parent96553dffb2204c3debe2a8cc9e3bb6abe6e3e38e (diff)
Update libgit2 binaries to 5aee963
https://github.com/libgit2/libgit2/compare/b641c00...5aee963 This also change naming convention of libgit2 binaries. Each LibGit2Sharp version works against a specific version of libgit2. LibGit2Sharp managed code relies on the dynamic loader to find the proper libgit2 binary. This binary is located in a directory structure next to the managed assembly, and the loader is instructed to search within this directory structure. Up until now, the binary being searched for was bearing a generic name: [lib]git2.(dll|so|dylib). However, on Windows, if one older version of the native binary, with the same name, is already loaded in the memory, the loader will reuse this one, no matter what directory it's been loaded from. Chances are great that this old libgit2 version is incompatible with what the newer version of LibGit2Sharp expects from its API or behavior. In order to mitigate this, libgit2 binaries are now suffixed with the libgit2 commit sha they've been build from and LibGit2Sharp will bind to a specifically named binary: - git2-{short_sha}.dll on Windows - libgit2-{short_sha}.so on Linux - libgit2-{short_sha}.dylib on Mac OS X. This should allow one to run two different future version of LibGit2Sharp, side by side, without any name clash.
Diffstat (limited to 'build.libgit2sharp.sh')
-rw-r--r--build.libgit2sharp.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/build.libgit2sharp.sh b/build.libgit2sharp.sh
index c5f1948f..c1b151ed 100644
--- a/build.libgit2sharp.sh
+++ b/build.libgit2sharp.sh
@@ -1,11 +1,14 @@
-#!/bin/sh
+#!/bin/bash
PREVIOUS_LD=$LD_LIBRARY_PATH
+LIBGIT2SHA=`cat ./LibGit2Sharp/libgit2_hash.txt`
+SHORTSHA=${LIBGIT2SHA:0:7}
+
rm -rf cmake-build
mkdir cmake-build && cd cmake-build
-cmake -DBUILD_SHARED_LIBS:BOOL=ON -DTHREADSAFE:BOOL=ON -DBUILD_CLAR:BOOL=OFF -DCMAKE_INSTALL_PREFIX=./libgit2-bin ../libgit2
+cmake -DBUILD_SHARED_LIBS:BOOL=ON -DTHREADSAFE:BOOL=ON -DBUILD_CLAR:BOOL=OFF -DCMAKE_INSTALL_PREFIX=./libgit2-bin -DSONAME_APPEND=$SHORTSHA ../libgit2
cmake --build . --target install
LD_LIBRARY_PATH=$PWD/libgit2-bin/lib:$LD_LIBRARY_PATH