Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
executable file
·
27 lines (23 loc) · 1.2 KB

File metadata and controls

executable file
·
27 lines (23 loc) · 1.2 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# NOTE for macos, we additionally fix the install names. For linux we don't need to, since the rpath is already pointing
# to the current directory and there is no strict install name check. The libs were copied already in the precompile
# step
set -euo pipefail
if [ "$(uname)" = "Darwin" ] ; then
BASE="/tmp/eccodes/target/eccodes/lib"
for e in $(ls $BASE/*dylib) ; do
echo "Fixing deps of $e"
for p in libopenjp libaec libpng ; do
# check that the lib $e has $p as a dependency, but also that $e is *not* $p itself
# we are being careful, even though currently only libeckit.dylib seems to be relevant
if (otool -l $e | grep "name.*$p.*offset" >/dev/null 2>/dev/null) && (echo $e | grep -v $p >/dev/null 2>/dev/null) ; then
ORIG_NAME=$(otool -l $e | grep "name.*$p.*" | sed 's/.*name \(.*\) (offset.*)/\1/')
ORIG_BASE=$(basename $ORIG_NAME)
echo "Fixing $p as a dependency of $e: $ORIG_NAME => @rpath/$ORIG_BASE"
install_name_tool -change $ORIG_NAME '@rpath/'$ORIG_BASE $e
else
echo "$e does not have $p as dependency"
fi
done
done
fi
Morty Proxy This is a proxified and sanitized view of the page, visit original site.