Skip to content

Commit

Permalink
First pass on getting build working on FreeBSD.
Browse files Browse the repository at this point in the history
  • Loading branch information
cpuserf authored and tarruda committed Feb 22, 2014
1 parent eaf942c commit 87fdb40
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -178,6 +178,10 @@ For Ubuntu 12.04:

sudo apt-get install build-essential cmake libncurses5-dev

For FreeBSD 10:

sudo pkg install cmake libtool sha

For OsX:

* Install [Xcode](https://developer.apple.com/)
Expand Down
15 changes: 14 additions & 1 deletion scripts/common.sh
@@ -1,3 +1,16 @@
platform='unknown'
unameval=`uname`
if [ "$unameval" == 'Linux' ]; then
platform='linux'
elif [ "$unameval" == 'FreeBSD' ]; then
platform='freebsd'
fi

sha1sumcmd='sha1sum'
if [ "$platform" == 'freebsd' ]; then
sha1sumcmd='shasum'
fi

pkgroot="$(pwd)"
deps="$pkgroot/.deps"
prefix="$deps/usr"
Expand All @@ -17,7 +30,7 @@ download() {
# download, untar and calculate sha1 sum in one pass
(wget "$url" -O - | tee "$fifo" | \
(cd "$tgt"; tar --strip-components=1 -xvzf -)) &
sum=$(sha1sum < "$fifo" | cut -d ' ' -f1)
sum=$("$sha1sumcmd" < "$fifo" | cut -d ' ' -f1)
rm -rf "$tmp_dir"
if [ "$sum" != "$sha1" ]; then
echo "SHA1 sum doesn't match, expected '$sha1' got '$sum'"
Expand Down

0 comments on commit 87fdb40

Please sign in to comment.