diff --git a/README.md b/README.md index 9a79bc48c..f9c9a619e 100644 --- a/README.md +++ b/README.md @@ -5,39 +5,10 @@ Core We use v0.23.4 because v0.24 sucks ```shell -$ wget https://github.com/libgit2/libgit2/archive/v0.23.4.zip -$ unzip v0.23.4.zip -``` -Install dependencies: `libssh2`, `http-parser`, `cmake`, `libcurl`. - -```shell -On Mac OSX: -$ brew install libssh2 http-parser cmake libcurl - -On CentOS: -$ yum install libssh2-devel http-parser cmake libcurl-devel -``` -Then install libgit2. - -```shell -$ cmake . -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DUSE_SSH=YES -$ make && make install -``` -Note on Mac OSX may need to set CFLAGS="-std=c99". -Now libgit2 is installed under `/usr/local/lib` as default. We still need to set pkg-config and link dynamic libraries. - -```shell -On Mac OSX: -$ cd /usr/local/lib/pkgconfig -$ ln -s /path/to/libgit2/pkgconfig/libgit2.pc libgit2.pc -$ cd /usr/local/lib -$ ln -s /path/to/libgit2/libgit2.23.dylib libgit2.23.dylib - -On CentOS: -$ cd /usr/lib64/pkgconfig/ -$ ln -s /usr/local/lib/pkgconfig/libgit2.pc libgit2.pc -$ cd /usr/lib64 -$ ln -s /usr/local/lib/libgit2.so.23 libgit2.so.23 +cp devtools/libgit2.rb.patch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula +cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula +git apply libgit2.rb.patch && git add libgit2.rb && git commit -m "patch libgit2 version for eru-core" && rm libgit2.rb.patch +cd - ``` ## setup dev environment diff --git a/devtools/libgit2.rb.patch b/devtools/libgit2.rb.patch new file mode 100644 index 000000000..b0bd1a261 --- /dev/null +++ b/devtools/libgit2.rb.patch @@ -0,0 +1,15 @@ +diff --git a/Formula/libgit2.rb b/Formula/libgit2.rb +index b91f4ff..45205f1 100644 +--- a/Formula/libgit2.rb ++++ b/Formula/libgit2.rb +@@ -1,8 +1,8 @@ + class Libgit2 < Formula + desc "C library of Git core methods that is re-entrant and linkable" + homepage "https://libgit2.github.com/" +- url "https://github.com/libgit2/libgit2/archive/v0.24.2.tar.gz" +- sha256 "00f0a7403143fba69601accc80cacf49becc568b890ba232f300c1b2a37475e6" ++ url "https://github.com/libgit2/libgit2/archive/v0.23.4.tar.gz" ++ sha256 "c7f5e2d7381dbc4d7e878013d14f9993ae8a41bd23f032718e39ffba57894029" + head "https://github.com/libgit2/libgit2.git" + + bottle do