-
-
Save wolstena/6777c80c3c3dd18d1654 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pfexec /opt/local/bin/pkgin -y in libtool-base autoconf \ | |
automake scmgit-base gcc47 \ | |
gnupg gmake libevent icu \ | |
py27-expat snappy erlang-15.1.3.1 \ | |
subversion-base | |
pfexec wget -O /opt/local/bin/repo http://commondatastorage.googleapis.com/git-repo-downloads/repo | |
pfexec chmod a+x /opt/local/bin/repo | |
pfexec mkdir /opt/couchbase | |
pfexec chown trond /opt/couchbase | |
wget --no-check-certificate \ | |
https://gperftools.googlecode.com/files/gperftools-2.1.tar.gz | |
gtar xfz gperftools-2.1.tar.gz | |
cd gperftools-2.1 | |
./configure --enable-minimal \ | |
--enable-shared \ | |
--disable-static \ | |
--prefix=/opt/couchbase | |
gmake install | |
cd .. | |
wget --no-check-certificate -Ov8.tar.gz \ | |
https://github.com/v8/v8/archive/3.19.0.tar.gz | |
gtar xfz v8.tar.gz | |
cd v8-3.19.0 | |
gmake dependencies | |
gmake x64 library=shared -j 4 | |
cp out/x64.release/lib.target/libv8.so \ | |
/opt/couchbase/lib | |
cp include/* /opt/couchbase/include/ | |
cd | |
mkdir -p ~/.couchbase/build | |
cat > ~/.couchbase/build/Makefile.extra <<!END! | |
OPTIONS += CPPFLAGS="-I$(PREFIX)/include -m64" | |
OPTIONS += LDFLAGS="-R/opt/local/lib -L$(PREFIX)/lib -R$(PREFIX)/lib -m64" | |
OPTIONS += CXX="g++ -m64 -L/opt/local/lib -I/opt/local/include" | |
OPTIONS += CC="gcc -m64 -I/opt/local/include -L/opt/local/lib" | |
memcached_EXTRA_OPTIONS += --enable-tcmalloc-minimal | |
!END! | |
git config --global user.email "trond.norbye@localhost" | |
git config --global user.name "Trond Norbye" | |
git config --global color.ui auto | |
mkdir compile | |
cd compile | |
repo init -u git://github.com/membase/manifest.git -m released/2.1.1.xml | |
repo sync | |
cat > "couch-kvstore.cc.patch" <<!END! | |
--- ep-engine/src/couch-kvstore/couch-kvstore.cc 2013-08-08 08:14:46.840382399 +0000 | |
+++ ep-engine/src/couch-kvstore/couch-kvstore.cc.new 2013-08-08 08:12:56.808402325 +0000 | |
@@ -515,6 +515,9 @@ | |
{ | |
char *buffer = NULL; | |
std::string fname = dbname + "/stats.json"; | |
+ if (access(fname.c_str(), F_OK) == -1) { | |
+ return; | |
+ } | |
std::ifstream session_stats; | |
session_stats.exceptions (session_stats.failbit | session_stats.badbit); | |
try { | |
!END! | |
cd ep-engine/src/couch-kvstore/ | |
patch < ~/compile/couch-kvstore.cc.patch | |
cd - | |
rm /opt/local/lib/libsnappy.la /opt/local/lib/libevent.la | |
gmake PREFIX=/opt/couchbase |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment