-
Notifications
You must be signed in to change notification settings - Fork 22
/
copy_dylibs.sh
executable file
·41 lines (34 loc) · 1.27 KB
/
copy_dylibs.sh
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /bin/sh
# Copies the Homebrew .dylibs required to run the ferret executable to a
# dylibs subdirectory (creating it if not present) of the current directory.
if [ ! -d dylibs ]; then
if [ -e dylibs ]; then
echo "dylibs exists but is not a directory"
exit 1
fi
mkdir dylibs
fi
cd dylibs
brewprefix=`brew config | awk '/HOMEBREW_PREFIX/ {print $2}'`
if [ -n "$brewprefix" ]; then
libdir="${brewprefix}/lib"
echo "Copying dylib libraries from ${libdir}"
for name in cairo fontconfig freetype fribidi glib-2.0 gobject-2.0 graphite2 \
gthread-2.0 harfbuzz hdf5 hdf5_hl netcdf netcdff pango-1.0 \
pangocairo-1.0 pangoft2-1.0 pcre pixman-1 png16 sz ; do
echo " ${name}"
cp -f ${libdir}/lib${name}.*.dylib .
done
libdir="${brewprefix}/Cellar/libffi/*/lib"
echo "Copying ffi library from ${libdir}"
cp -f ${libdir}/libffi.*.dylib .
libdir="${brewprefix}/Cellar/gettext/*/lib"
echo "Copying intl library from ${libdir}"
cp -f ${libdir}/libintl.*.dylib .
libdir=`echo ${brewprefix}/opt/gcc/lib/gcc/*`
echo "Copying dylib libraries from ${libdir}"
for name in gfortran quadmath gcc_s ; do
echo " ${name}"
cp -f ${libdir}/lib${name}.*.dylib .
done
fi