Skip to content

Commit

Permalink
Merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
Silviu Caragea committed Sep 22, 2015
2 parents 187ddb3 + 19a139b commit 7797847
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 42 deletions.
20 changes: 11 additions & 9 deletions build_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ KERNEL=$(echo $(lsb_release -ds 2>/dev/null || cat /etc/*release 2>/dev/null | h
case $OS in
Linux)
case $KERNEL in
CentOS)
CentOS)
echo "Linux, CentOS"
sudo yum install automake cmake gcc-c++ git libtool openssl-devel wget
if echo "$(ldconfig -p | grep libuv)"
sudo yum -y install automake cmake gcc-c++ git libtool openssl-devel wget
OUTPUT=`ldconfig -p | grep libuv`
if [[ $(echo $OUTPUT) != "" ]]
then echo "libuv has already been installed"
else
pushd /tmp
wget http://libuv.org/dist/v1.4.2/libuv-v1.4.2.tar.gz
wget http://dist.libuv.org/dist/v1.4.2/libuv-v1.4.2.tar.gz
tar xzf libuv-v1.4.2.tar.gz
pushd libuv-v1.4.2
sh autogen.sh
Expand All @@ -24,11 +25,12 @@ case $OS in
popd
popd
sudo grep -q -F '/usr/local/lib' /etc/ld.so.conf.d/usrlocal.conf || echo '/usr/local/lib' | sudo tee --append /etc/ld.so.conf.d/usrlocal.conf > /dev/null
fi
ldconfig -v
fi
;;
Ubuntu)
echo "Linux, Ubuntu"

sudo apt-add-repository -y ppa:linuxjedi/ppa
sudo apt-get -y update
sudo apt-get -y install g++ make cmake libuv-dev libssl-dev
Expand All @@ -37,12 +39,12 @@ case $OS in
esac
;;
Darwin)
sudo brew install libuv cmake
brew install libuv cmake
;;
*) echo "Your system $OS is not supported"
esac

mkdir -p deps/cpp-driver/build
cd deps/cpp-driver/build
mkdir -p ../cpp-driver/build
cd ../cpp-driver/build
cmake ..
make
52 changes: 19 additions & 33 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,35 +1,21 @@
{
deps,
[
{'cpp-driver', ".*", {git, "https://github.com/datastax/cpp-driver", "c9427764cf062cfb49d0a769450f0fee5cac9f71"}, [raw]}
]
{deps, [
{'cpp-driver', ".*",
{git, "https://github.com/datastax/cpp-driver", "40221db6be9103cc21f169e70b55e440000624e7"}, [raw]}]
}.
{deps_dir, "../"}.
{post_hooks,[{'get-deps',"sh -c './build_deps.sh'"}]}.

{post_hooks,[{'get-deps',"sh -c './build_deps.sh'"}
]}.

{port_specs,
[
{"darwin","priv/erlcass.so", ["c_src/*.cc"],
[
{env,
[
{".*", "CXXFLAGS", "$CXXFLAGS -g -Wall -fno-exceptions -fno-rtti -Os -Ideps/cpp-driver/include -Ideps/cpp-driver/src -I/usr/local/include/"},
{".*", "LDFLAGS", "$LDFLAGS -L/usr/local/lib/ -Ldeps/cpp-driver/build -lcassandra_static -luv -lssl -lcrypto"}
]
}
]
},

{"linux","priv/erlcass.so", ["c_src/*.cc"],
[
{env,
[
{".*", "CXXFLAGS", "$CXXFLAGS -g -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-local-typedefs -fno-exceptions -fno-rtti -Os -Ideps/cpp-driver/include -Ideps/cpp-driver/src"},
{".*", "LDFLAGS", "$LDFLAGS -L/usr/local/lib/ -Ldeps/cpp-driver/build -lcassandra_static -luv -lstdc++ -lssl -lcrypto"}
]
}
]
}
]
}.
{port_specs, [
{"darwin","priv/erlcass.so", ["c_src/*.cc"],[
{env, [
{".*", "CXXFLAGS", "$CXXFLAGS -g -Wall -fno-exceptions -fno-rtti -Os -I../cpp-driver/include -I../cpp-driver/src -I/usr/local/include/"},
{".*", "LDFLAGS", "$LDFLAGS -L/usr/local/lib/ -L../cpp-driver/build -lcassandra_static -luv -lssl -lcrypto"}
]}
]},
{"linux","priv/erlcass.so", ["c_src/*.cc"],[
{env, [
{".*", "CXXFLAGS", "$CXXFLAGS -g -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-local-typedefs -fno-exceptions -fno-rtti -Os -I../cpp-driver/include -I../cpp-driver/src"},
{".*", "LDFLAGS", "$LDFLAGS -L/usr/local/lib/ -L../cpp-driver/build -lcassandra_static -luv -lstdc++ -lssl -lcrypto"}
]}
]}
]}.

0 comments on commit 7797847

Please sign in to comment.