Skip to content

Commit

Permalink
Update dependencies to the latest stable versions
Browse files Browse the repository at this point in the history
* libusb 1.0.21
* curl 7.57.0
* jansson 2.10
* libmicrohttpd 0.9.58
* libevent 2.1.8
* uthash 2.0.2
  • Loading branch information
nwoolls committed Jan 14, 2018
1 parent d7b672e commit 541b120
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 52 deletions.
12 changes: 6 additions & 6 deletions EDITME_versions.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
LIBUSB_VERSION=1.0.18
LIBCURL_VERSION=7.37.0
LIBJANSSON_VERSION=2.6
LIBMICROHTTPD_VERSION=0.9.38
LIBEVENT_VERSION=2.0.21
LIBUTHASH_VERSION=1.9.9
LIBUSB_VERSION=1.0.21
LIBCURL_VERSION=7.57.0
LIBJANSSON_VERSION=2.10
LIBMICROHTTPD_VERSION=0.9.58
LIBEVENT_VERSION=2.1.8
LIBUTHASH_VERSION=2.0.2

BFGMINER_VERSION=5.5.0
CGMINER_VERSION=4.10.0
Expand Down
2 changes: 1 addition & 1 deletion build_libevent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ set -e

. ./EDITME_versions.sh

LIB_URL=https://github.com/downloads/libevent/libevent/libevent-$LIBEVENT_VERSION-stable.tar.gz
LIB_URL=https://github.com/libevent/libevent/releases/download/release-$LIBEVENT_VERSION-stable/libevent-$LIBEVENT_VERSION-stable.tar.gz

. ./subs/build_library.sh
62 changes: 17 additions & 45 deletions subs/build_miner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ function patch_undefined_inline() {
}

function init_update_external_modules() {
set -v

git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
while read path_key path
do
Expand Down Expand Up @@ -75,47 +73,21 @@ cd $BUILD_DIR

rm -rf working

if [ -f output/bin/$MINER_EXE ]
then
install_name_tool \
-change $BUILD_DIR/output/lib/libcurl.4.dylib @executable_path/../lib/libcurl.4.dylib \
-change $BUILD_DIR/output/lib/libjansson.4.dylib @executable_path/../lib/libjansson.4.dylib \
-change $BUILD_DIR/output/lib/libusb-1.0.0.dylib @executable_path/../lib/libusb-1.0.0.dylib \
-change $BUILD_DIR/output/lib/libusb-1.0.2.dylib @executable_path/../lib/libusb-1.0.2.dylib \
-change $BUILD_DIR/output/lib/libbase58.0.dylib @executable_path/../lib/libbase58.0.dylib \
-change /usr/local/lib/libbase58.0.dylib @executable_path/../lib/libbase58.0.dylib \
-change $BUILD_DIR/output/lib/libblkmaker_jansson-0.1.dylib @executable_path/../lib/libblkmaker_jansson-0.1.dylib \
-change $BUILD_DIR/output/lib/libblkmaker_jansson-0.1.6.dylib @executable_path/../lib/libblkmaker_jansson-0.1.6.dylib \
-change $BUILD_DIR/output/lib/libblkmaker-0.1.dylib @executable_path/../lib/libblkmaker-0.1.dylib \
-change $BUILD_DIR/output/lib/libblkmaker-0.1.6.dylib @executable_path/../lib/libblkmaker-0.1.6.dylib \
-change $BUILD_DIR/output/lib/libmicrohttpd.10.dylib @executable_path/../lib/libmicrohttpd.10.dylib \
-change $BUILD_DIR/output/lib/libevent-2.0.5.dylib @executable_path/../lib/libevent-2.0.5.dylib \
output/bin/$MINER_EXE
fi

if [ -f output/lib/libblkmaker_jansson-0.1.6.dylib ]
then
install_name_tool \
-change $BUILD_DIR/output/lib/libblkmaker-0.1.6.dylib @executable_path/../lib/libblkmaker-0.1.6.dylib \
-change $BUILD_DIR/output/lib/libjansson.4.dylib @executable_path/../lib/libjansson.4.dylib \
-change $BUILD_DIR/output/lib/libbase58.0.dylib @executable_path/../lib/libbase58.0.dylib \
output/lib/libblkmaker_jansson-0.1.6.dylib
fi

if [ -f output/lib/libblkmaker-0.1.6.dylib ]
then
install_name_tool \
-change $BUILD_DIR/output/lib/libbase58.0.dylib @executable_path/../lib/libbase58.0.dylib \
-change /usr/local/lib/libbase58.0.dylib @executable_path/../lib/libbase58.0.dylib \
output/lib/libblkmaker-0.1.6.dylib
fi

# for older builds of BFGMiner
function relink_bins() {
local bin_path=$1
for file_path in $bin_path ; do
local otool_output=$(otool -LX $file_path | grep $BUILD_DIR/output/)
if [[ -n "$otool_output" && "$otool_output" != *"not an object file"* ]]; then
while read -r lib_line; do
local lib_path=$(echo $lib_line | cut -f 1 -d " ")
local lib_name=$(basename "$lib_path")
install_name_tool \
-change "$lib_path" "@executable_path/../lib/$lib_name" \
"$file_path"
done <<< "$otool_output"
fi
done
}

if [ -f output/lib/libblkmaker_jansson-0.1.dylib ]
then
install_name_tool \
-change $BUILD_DIR/output/lib/libblkmaker-0.1.dylib @executable_path/../lib/libblkmaker-0.1.dylib \
-change $BUILD_DIR/output/lib/libjansson.4.dylib @executable_path/../lib/libjansson.4.dylib \
output/lib/libblkmaker_jansson-0.1.dylib
fi
relink_bins "$BUILD_DIR"/output/lib/\*.dylib
relink_bins "$BUILD_DIR"/output/bin/\*

0 comments on commit 541b120

Please sign in to comment.