From 3e6a35b6dfec2af8700711ac78960f2ec3c94c8a Mon Sep 17 00:00:00 2001 From: Keiran Raine Date: Fri, 16 Sep 2016 09:04:26 +0100 Subject: [PATCH 1/3] Makes cpu check work on osx, next try to get homebrew gnutil to link --- setup.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/setup.sh b/setup.sh index bd83b23..7c2b989 100755 --- a/setup.sh +++ b/setup.sh @@ -65,23 +65,29 @@ get_file () { fi } -set -e - if [ "$#" -ne "1" ] ; then echo "Please provide an installation path such as /opt/ICGC" exit 0 fi -CPU=`grep -c ^processor /proc/cpuinfo` +CPU=1 +ls /proc/cpuinfo >& /dev/null # very noddy attempt to figure out thread count if [ $? -eq 0 ]; then - if [ "$CPU" -gt "6" ]; then - CPU=6 - fi + CPU=`grep -c ^processor /proc/cpuinfo` else - CPU=1 + CPU=`sysctl -a | grep machdep.cpu | grep thread_count | awk '{print $2}'` + if [ $? -ne 0 ]; then + # fall back to unthreaded core test + CPU=`sysctl -a | grep machdep.cpu | grep core_count | awk '{print $2}'` + fi +fi +if [ "$CPU" -gt "6" ]; then + CPU=6 fi echo "Max compilation CPUs set to $CPU" +set -e + INST_PATH=$1 # get current directory From 3ba80051627181444092d092294257f93c60e4ab Mon Sep 17 00:00:00 2001 From: David Jones Date: Tue, 27 Sep 2016 09:38:24 +0100 Subject: [PATCH 2/3] Changes to setup.sh to allow CPU checking in OSX --- CHANGES.md | 9 ++++++--- VERSION.txt | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9168c29..01900ed 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,11 @@ -###0.2.1 +### 0.3.0 +* Changes to setup.sh to permit OSX installation + +### 0.2.1 * Corrections to logic -###0.2.0 +### 0.2.0 * Added bedgraph to bw functionality via bg2bw -###0.1.0 +### 0.1.0 * First release \ No newline at end of file diff --git a/VERSION.txt b/VERSION.txt index 0c62199..0d91a54 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -0.2.1 +0.3.0 From 1fbc9d38b17b60924e37c890ba94d742e6758cbc Mon Sep 17 00:00:00 2001 From: David Jones Date: Tue, 27 Sep 2016 09:40:34 +0100 Subject: [PATCH 3/3] Added information on OSX installation --- INSTALL.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 27cfcd8..0bce608 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -12,8 +12,6 @@ setup.sh will install #Other Software For installation to proceed you require the following packages: - - ##For Ubuntu (tested with 14.04) ``` apt-get update && \ @@ -46,3 +44,20 @@ sudo make install && \ cd .. && \ rm -rf nettle nettle.tar.gz ``` + +##OSX + In order for cgpBigWig to install you may need the following packages installed +``` +brew install gnutls +# fixes gnutls include +export LIBRARY_PATH="$HOME/homebrew/lib" +export LDFLAGS="-L$HOME/homebrew/opt/libffi/lib" +export PKG_CONFIG_PATH="$HOME/homebrew/opt/libffi/lib/pkgconfig" +brew install libffi +# from https://p11-glue.freedesktop.org/doc/p11-kit/devel-building.html +wget https://p11-glue.freedesktop.org/releases/p11-kit-0.23.2.tar.gz +tar zxf p11-kit-0.23.2.tar.gz +cd p11-kit-0.23.2 +./configure --prefix=$HOME/local --without-trust-paths +make +``` \ No newline at end of file