Browse Source

Fix dylib linking on Mojave

pull/226/head
Asher 5 years ago
parent
commit
398d339564
  1. 19
      makeReleaseMac.sh

19
makeReleaseMac.sh

@ -3,7 +3,7 @@
KMD_DIR=verus-cli
mkdir ${KMD_DIR}
cp src/verus \
cp src/fiat/verus \
src/verusd \
doc/man/verus-cli/mac/README.txt \
zcutil/fetch-params.sh \
@ -12,26 +12,26 @@ mv verus-cli/fetch-params.sh verus-cli/fetch-params
chmod +x ${KMD_DIR}/fetch-params
chmod +x ${KMD_DIR}/verus
chmod +x ${KMD_DIR}/verusd
chmod +x ${KMD_DIR}/upgrade-agama.sh
binaries=("verus" "verusd")
binaries=("komodo-cli" "komodod")
alllibs=()
for binary in "${binaries[@]}";
do
# do the work in the destination directory
cp src/${binary} ${KMD_DIR}
# find the dylibs to copy for verusd
# find the dylibs to copy for komodod
DYLIBS=`otool -L ${KMD_DIR}/${binary} | grep "/usr/local" | awk -F' ' '{ print $1 }'`
DYLIBS+=" /usr/local/opt/libidn2/lib/libidn2.0.dylib"
echo "copying ${DYLIBS} to ${KMD_DIR}"
# copy the dylibs to the srcdir
for dylib in ${DYLIBS}; do cp -rf ${dylib} ${KMD_DIR}; done
done
libraries=("libgcc_s.1.dylib" "libgomp.1.dylib" "libidn2.4.dylib" "libstdc++.6.dylib")
libraries=("libgcc_s.1.dylib" "libgomp.1.dylib" "libidn2.0.dylib" "libstdc++.6.dylib")
for binary in "${libraries[@]}";
do
# find the dylibs to copy for verusd
# find the dylibs to copy for komodod
DYLIBS=`otool -L ${KMD_DIR}/${binary} | grep "/usr/local" | awk -F' ' '{ print $1 }'`
echo "copying ${DYLIBS} to ${KMD_DIR}"
# copy the dylibs to the srcdir
@ -43,8 +43,8 @@ indirectlibraries=("libintl.8.dylib" "libunistring.2.dylib")
for binary in "${indirectlibraries[@]}";
do
# Need to undo this for the dylibs when we are done
chmod 755 src/${binary}
# find the dylibs to copy for verusd
chmod 755 ${KMD_DIR}/${binary}
# find the dylibs to copy for komodod
DYLIBS=`otool -L ${KMD_DIR}/${binary} | grep "/usr/local" | awk -F' ' '{ print $1 }'`
echo "copying indirect ${DYLIBS} to ${KMD_DIR}"
# copy the dylibs to the dest dir
@ -53,7 +53,7 @@ done
for binary in "${binaries[@]}";
do
# modify verusd to point to dylibs
# modify komodod to point to dylibs
echo "modifying ${binary} to use local libraries"
for dylib in "${alllibs[@]}"
do
@ -74,4 +74,3 @@ do
done
done

Loading…
Cancel
Save