-
Notifications
You must be signed in to change notification settings - Fork 8
/
copy_patch_simple_OSX.sh
executable file
·426 lines (317 loc) · 19.8 KB
/
copy_patch_simple_OSX.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
#! /bin/sh
#
# This script is the first of a triology:
# copy_patch_simple_OSX.sh, copy_patch_with_hide_OSX.sh, patch_mexs_OSX.sh
# Run them in that order from a sub-directory of the mirone root dir
#
# However, don't forget to first: update GMT, rebuild gmtmex, build the mexs in the mex dir
#
# What they do is to copy several dylibs from /usr/local/lib (built with Homebrew) and strip the
# hard-coded paths. Besides that, several of those shared libs are assigned a different name
# (by appending a '_hide') so that Matlab does not managed to f. in the middle with its own outdated
# versions. For example libhdf5.dylib will become libhdf5_hide.dylib
# Copy and patch the dylibs that don't need the replaced names. Those are dealt by "copy_patch_with_hide_OSX.sh"
# $Id :
lib_loc=/usr/local/lib
# ------------------------- OpenCV libs -------------------------
cp -f ${lib_loc}/libopencv_core.2.4.dylib .
ln -s -f libopencv_core.2.4.dylib libopencv_core.dylib
cp -f ${lib_loc}/libopencv_imgproc.2.4.dylib .
ln -s -f libopencv_imgproc.2.4.dylib libopencv_imgproc.dylib
cp -f ${lib_loc}/libopencv_calib3d.2.4.dylib .
ln -s -f libopencv_calib3d.2.4.dylib libopencv_calib3d.dylib
cp -f ${lib_loc}/libopencv_objdetect.2.4.dylib .
ln -s -f libopencv_objdetect.2.4.dylib libopencv_objdetect.dylib
cp -f ${lib_loc}/libopencv_video.2.4.dylib .
ln -s -f libopencv_video.2.4.dylib libopencv_video.dylib
cp -f ${lib_loc}/libopencv_photo.2.4.dylib .
ln -s -f libopencv_photo.2.4.dylib libopencv_photo.dylib
cp -f ${lib_loc}/libopencv_highgui.2.4.dylib .
ln -s -f libopencv_highgui.2.4.dylib libopencv_highgui.dylib
cp -f ${lib_loc}/libopencv_features2d.2.4.dylib .
ln -s -f libopencv_features2d.2.4.dylib libopencv_features2d.dylib
cp -f ${lib_loc}/libopencv_flann.2.4.dylib .
ln -s -f libopencv_flann.2.4.dylib libopencv_flann.dylib
# ------------------------- GDAL libs ---------------------------
# WE don't copy those that are dealt by "copy_patch_with_hide.sh"
cp -f ${lib_loc}/libjson-c.2.dylib .
ln -s -f libjson-c.2.dylib libjson-c.dylib
cp -f ${lib_loc}/libfreexl.1.dylib .
ln -s -f libfreexl.1.dylib libfreexl.dylib
cp -f ${lib_loc}/libwebp.7.dylib .
ln -s -f libwebp.7.dylib libwebp.dylib
cp -f ${lib_loc}/libodbc.2.dylib .
ln -s -f libodbc.2.dylib libodbc.dylib
cp -f ${lib_loc}/libodbcinst.2.dylib .
ln -s -f libodbcinst.2.dylib libodbcinst.dylib
cp -f ${lib_loc}/libgif.4.dylib .
ln -s -f libgif.4.dylib libgif.dylib
cp -f ${lib_loc}/libjpeg.8.dylib .
ln -s -f libjpeg.8.dylib libjpeg.dylib
cp -f ${lib_loc}/libpng16.16.dylib .
ln -s -f libpng16.16.dylib libpng16.dylib
cp -f ${lib_loc}/liblzma.5.dylib .
ln -s -f liblzma.5.dylib liblzma.dylib
cp -f /usr/local/opt/libxml2/lib/libxml2.2.dylib .
ln -s -f libxml2.2.dylib libxml2.dylib
cp -f /usr/local/opt/sqlite/lib/libsqlite3.0.dylib .
ln -s -f libsqlite3.0.dylib libsqlite3.dylib
cp -f ${lib_loc}/libsz.2.dylib .
ln -s -f libsz.2.dylib libsz.dylib
cp /usr/local/opt/geos/lib/libgeos-3.6.1.dylib .
ln -s -f libgeos-3.6.1.dylib libgeos-3.dylib
cp /usr/local/lib/libpopt.0.dylib .
ln -s -f libpopt.0.dylib libpopt.dylib
cp -f ${lib_loc}/libpcre.1.dylib .
ln -s -f libpcre.1.dylib libpcre.dylib
cp -f ${lib_loc}/libfftw3f.3.dylib .
ln -s -f libfftw3f.3.dylib libfftw3f.dylib
cp /usr/local/lib/libImath-2_2.12.dylib .
ln -s -f libImath-2_2.12.dylib libImath-2_2.dylib
cp /usr/local/lib/libIlmImf-2_2.22.dylib .
ln -s -f libIlmImf-2_2.22.dylib libIlmImf-2_2.dylib
cp /usr/local/lib/libIex-2_2.12.dylib .
ln -s -f libIex-2_2.12.dylib libIex-2_2.dylib
cp /usr/local/lib/libHalf.12.dylib .
ln -s -f libHalf.12.dylib libHalf.dylib
cp /usr/local/lib/libIlmThread-2_2.12.dylib .
ln -s -f libIlmThread-2_2.12.dylib libIlmThread-2_2.dylib
chmod +w *.dylib
# GDAL exes (Shit, these carry again the whole trunk of dependencies to patch)
#cp -f /usr/local/bin/gdalinfo .
#cp -f /usr/local/bin/gdal_translate .
# ------------------------------------------------------------------
# NOW THE PATCHING PART
# ------------------------------------------------------------------
install_name_tool -id libjpeg.dylib libjpeg.8.dylib
install_name_tool -id libpng16.dylib libpng16.16.dylib
install_name_tool -id libjson-c.dylib libjson-c.2.dylib
install_name_tool -id libfreexl.dylib libfreexl.1.dylib
install_name_tool -id libwebp.dylib libwebp.7.dylib
install_name_tool -id liblzma.dylib liblzma.5.dylib
install_name_tool -id libsqlite3.dylib libsqlite3.0.dylib
install_name_tool -id libpcre.dylib libpcre.1.dylib
install_name_tool -id libxml2.dylib libxml2.2.dylib
install_name_tool -id libgeos-3.dylib libgeos-3.6.1.dylib
install_name_tool -id libfftw3f.dylib libfftw3f.3.dylib
install_name_tool -id libpopt.dylib libpopt.0.dylib
install_name_tool -id libsz.dylib libsz.2.dylib
install_name_tool -id libgif.dylib libgif.4.dylib
install_name_tool -id libodbc.dylib libodbc.2.dylib
install_name_tool -id libodbcinst.dylib libodbcinst.2.dylib
install_name_tool -id libImath-2_2.dylib libImath-2_2.12.dylib
install_name_tool -id libIlmImf-2_2.dylib libIlmImf-2_2.22.dylib
install_name_tool -id libIex-2_2.dylib libIex-2_2.12.dylib
install_name_tool -id libHalf.dylib libHalf.12.dylib
install_name_tool -id libIlmThread-2_2.dylib libIlmThread-2_2.12.dylib
cp -f ${lib_loc}/libjasper.4.dylib .
chmod +w libjasper.4.dylib
install_name_tool -id libjasper.dylib libjasper.4.dylib
var_shit=`otool -L libjasper.4.dylib | tail -n +3 | awk '{print $1}' | grep libjasper`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libjpeg.dylib libjasper.4.dylib
fi
mv libjasper.4.dylib libjasper.dylib
cp -f ${lib_loc}/libdap.23.dylib .
chmod +w libdap.23.dylib
install_name_tool -id libdap.dylib libdap.23.dylib
var_shit=`otool -L libdap.23.dylib | tail -n +3 | awk '{print $1}' | grep libxml2`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libxml2.dylib libdap.23.dylib
fi
var_shit=`otool -L libdap.23.dylib | tail -n +3 | awk '{print $1}' | grep libcrypto`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libcrypto.dylib libdap.23.dylib
fi
mv libdap.23.dylib libdap.dylib
cp -f ${lib_loc}/libdapserver.7.dylib .
chmod +w libdapserver.7.dylib
install_name_tool -id libdapserver.dylib libdapserver.7.dylib
var_shit=`otool -L libdapserver.7.dylib | tail -n +3 | awk '{print $1}' | grep libdap`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libdap.dylib libdapserver.7.dylib
fi
var_shit=`otool -L libdapserver.7.dylib | tail -n +3 | awk '{print $1}' | grep libxml2`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libxml2.dylib libdapserver.7.dylib
fi
var_shit=`otool -L libdapserver.7.dylib | tail -n +3 | awk '{print $1}' | grep libcrypto`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libcrypto.dylib libdapserver.7.dylib
fi
mv libdapserver.7.dylib libdapserver.dylib
cp -f ${lib_loc}/libdapclient.6.dylib .
chmod +w libdapclient.6.dylib
install_name_tool -id libdapclient.dylib libdapclient.6.dylib
var_shit=`otool -L libdapclient.6.dylib | tail -n +3 | awk '{print $1}' | grep libdap`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libdap.dylib libdapclient.6.dylib
fi
var_shit=`otool -L libdapclient.6.dylib | tail -n +3 | awk '{print $1}' | grep libxml2`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libxml2.dylib libdapclient.6.dylib
fi
var_shit=`otool -L libdapclient.6.dylib | tail -n +3 | awk '{print $1}' | grep libcrypto`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libcrypto.dylib libdapclient.6.dylib
fi
mv libdapclient.6.dylib libdapclient.dylib
cp -f ${lib_loc}/libspatialite.7.dylib .
chmod +w libspatialite.7.dylib
install_name_tool -id libspatialite.dylib libspatialite.7.dylib
var_shit=`otool -L libspatialite.7.dylib | tail -n +3 | awk '{print $1}' | grep libxml2`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libxml2.dylib libspatialite.7.dylib
fi
var_shit=`otool -L libspatialite.7.dylib | tail -n +3 | awk '{print $1}' | grep libfreexl`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libfreexl.dylib libspatialite.7.dylib
fi
var_shit=`otool -L libspatialite.7.dylib | tail -n +3 | awk '{print $1}' | grep libproj`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libproj_hide.dylib libspatialite.7.dylib
fi
var_shit=`otool -L libspatialite.7.dylib | tail -n +3 | awk '{print $1}' | grep libsqlite3`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libsqlite3.dylib libspatialite.7.dylib
fi
var_shit=`otool -L libspatialite.7.dylib | tail -n +3 | awk '{print $1}' | grep liblwgeom`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} liblwgeom-2.dylib libspatialite.7.dylib
fi
var_shit=`otool -L libspatialite.7.dylib | tail -n +3 | awk '{print $1}' | grep libgeos_c`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libgeos_c_hide.dylib libspatialite.7.dylib
fi
var_shit=`otool -L libspatialite.7.dylib | tail -n +3 | awk '{print $1}' | grep libproj`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libproj_hide.dylib libspatialite.7.dylib
fi
mv libspatialite.7.dylib libspatialite.dylib
cp /usr/local/opt/liblwgeom/lib/liblwgeom-2.1.5.dylib .
chmod +w liblwgeom-2.1.5.dylib
install_name_tool -id liblwgeom-2.dylib liblwgeom-2.1.5.dylib
var_shit=`otool -L liblwgeom-2.1.5.dylib | tail -n +3 | awk '{print $1}' | grep libgeos_c`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libgeos_c_hide.dylib liblwgeom-2.1.5.dylib
fi
var_shit=`otool -L liblwgeom-2.1.5.dylib | tail -n +3 | awk '{print $1}' | grep libproj`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libproj_hide.dylib liblwgeom-2.1.5.dylib
fi
var_shit=`otool -L liblwgeom-2.1.5.dylib | tail -n +3 | awk '{print $1}' | grep libjson-c`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libjson-c.dylib liblwgeom-2.1.5.dylib
fi
var_shit=`otool -L liblwgeom-2.1.5.dylib | tail -n +3 | awk '{print $1}' | grep libproj`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libproj_hide.dylib liblwgeom-2.1.5.dylib
fi
mv liblwgeom-2.1.5.dylib liblwgeom-2.dylib
cp -f ${lib_loc}/libfftw3f_threads.3.dylib .
chmod +w libfftw3f_threads.3.dylib
install_name_tool -id libfftw3f_threads.dylib libfftw3f_threads.3.dylib
var_shit=`otool -L libfftw3f_threads.3.dylib | tail -n +3 | awk '{print $1}' | grep libfftw3f.3`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libfftw3f.dylib libfftw3f_threads.3.dylib
fi
mv libfftw3f_threads.3.dylib libfftw3f_threads.dylib
cp -f ${lib_loc}/libepsilon.1.dylib .
chmod +w libepsilon.1.dylib
install_name_tool -id libepsilon.dylib libepsilon.1.dylib
var_shit=`otool -L libepsilon.1.dylib | tail -n +3 | awk '{print $1}' | grep libpopt`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libpopt.dylib libepsilon.1.dylib
fi
mv libepsilon.1.dylib libepsilon.dylib
cp /usr/local/lib/libxerces-c-3.1.dylib .
chmod +w libxerces-c-3.1.dylib
install_name_tool -id libxerces-c.dylib libxerces-c-3.1.dylib
var_shit=`otool -L libxerces-c-3.1.dylib | tail -n +3 | awk '{print $1}' | grep libxerces-c-3`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libxerces-c.dylib libxerces-c-3.1.dylib
fi
mv libxerces-c-3.1.dylib libxerces-c.dylib
cp -f /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib .
chmod +w libcrypto.1.0.0.dylib
install_name_tool -id libcrypto.dylib libcrypto.1.0.0.dylib
var_shit=`otool -L libcrypto.1.0.0.dylib | tail -n +3 | awk '{print $1}' | grep libcrypto`
if [[ ${var_shit:0:1} == *"/"* ]]; then
install_name_tool -change ${var_shit} libcrypto.dylib libcrypto.1.0.0.dylib
fi
mv libcrypto.1.0.0.dylib libcrypto.dylib
# ------------------ OpenCVs
patoCV=/usr/local/Cellar/opencv/2.4.12_2/lib
install_name_tool -id libopencv_core.dylib libopencv_core.2.4.dylib
install_name_tool -change /usr/local/lib/libopencv_core.2.4.dylib libopencv_core.dylib libopencv_core.dylib
install_name_tool -id libopencv_imgproc.dylib libopencv_imgproc.2.4.dylib
install_name_tool -change ${patoCV}/libopencv_imgproc.2.4.dylib ibopencv_imgproc.dylib libopencv_imgproc.dylib
install_name_tool -change ${patoCV}/libopencv_core.2.4.dylib libopencv_core.dylib libopencv_imgproc.dylib
install_name_tool -id libopencv_objdetect.dylib libopencv_objdetect.2.4.dylib
install_name_tool -change ${patoCV}/libopencv_objdetect.2.4.dylib libopencv_objdetect.dylib libopencv_objdetect.dylib
install_name_tool -change ${patoCV}/libopencv_core.2.4.dylib libopencv_core.dylib libopencv_objdetect.dylib
install_name_tool -change ${patoCV}/libopencv_imgproc.2.4.dylib libopencv_imgproc.dylib libopencv_objdetect.dylib
install_name_tool -change ${patoCV}/libopencv_highgui.2.4.dylib libopencv_highgui.dylib libopencv_objdetect.dylib
install_name_tool -change ${patoCV}/libopencv_features2d.2.4.dylib libopencv_features2d.dylib libopencv_objdetect.dylib
install_name_tool -change ${patoCV}/libopencv_calib3d.2.4.dylib libopencv_calib3d.dylib libopencv_objdetect.dylib
install_name_tool -change ${patoCV}/libopencv_flann.2.4.dylib libopencv_flann.dylib libopencv_objdetect.dylib
install_name_tool -id libopencv_calib3d.dylib libopencv_calib3d.2.4.dylib
install_name_tool -change ${patoCV}/libopencv_calib3d.2.4.dylib libopencv_calib3d.dylib libopencv_calib3d.dylib
install_name_tool -change ${patoCV}/libopencv_core.2.4.dylib libopencv_core.dylib libopencv_calib3d.dylib
install_name_tool -change ${patoCV}/libopencv_imgproc.2.4.dylib libopencv_imgproc.dylib libopencv_calib3d.dylib
install_name_tool -change ${patoCV}/libopencv_highgui.2.4.dylib libopencv_highgui.dylib libopencv_calib3d.dylib
install_name_tool -change ${patoCV}/libopencv_features2d.2.4.dylib libopencv_features2d.dylib libopencv_calib3d.dylib
install_name_tool -change ${patoCV}/libopencv_flann.2.4.dylib libopencv_flann.dylib libopencv_calib3d.dylib
install_name_tool -id libopencv_video.dylib libopencv_video.2.4.dylib
install_name_tool -change ${patoCV}/libopencv_video.2.4.dylib libopencv_video.dylib libopencv_video.dylib
install_name_tool -change ${patoCV}/libopencv_core.2.4.dylib libopencv_core.dylib libopencv_video.dylib
install_name_tool -change ${patoCV}/libopencv_imgproc.2.4.dylib libopencv_imgproc.dylib libopencv_video.dylib
install_name_tool -id libopencv_highgui.dylib libopencv_highgui.2.4.dylib
install_name_tool -change ${patoCV}/libopencv_highgui.2.4.dylib libopencv_highgui.dylib libopencv_highgui.dylib
install_name_tool -change ${patoCV}/libopencv_core.2.4.dylib libopencv_core.dylib libopencv_highgui.dylib
install_name_tool -change ${patoCV}/libopencv_imgproc.2.4.dylib libopencv_imgproc.dylib libopencv_highgui.dylib
install_name_tool -change /usr/local/opt/ilmbase/lib/libImath-2_2.12.dylib libImath-2_2.dylib libopencv_highgui.dylib
install_name_tool -change /usr/local/opt/openexr/lib/libIlmImf-2_2.22.dylib libIlmImf-2_2.dylib libopencv_highgui.dylib
install_name_tool -change /usr/local/opt/ilmbase/lib/libIex-2_2.12.dylib libIex-2_2.dylib libopencv_highgui.dylib
install_name_tool -change /usr/local/opt/ilmbase/lib/libHalf.12.dylib libHalf-2_2.dylib libopencv_highgui.dylib
install_name_tool -change /usr/local/opt/ilmbase/lib/libIlmThread-2_2.12.dylib libIlmThread-2_2.dylib libopencv_highgui.dylib
install_name_tool -id libopencv_features2d.dylib libopencv_features2d.2.4.dylib
install_name_tool -change ${patoCV}/libopencv_features2d.2.4.dylib libopencv_features2d.dylib libopencv_features2d.dylib
install_name_tool -change ${patoCV}/libopencv_core.2.4.dylib libopencv_core.dylib libopencv_features2d.dylib
install_name_tool -change ${patoCV}/libopencv_imgproc.2.4.dylib libopencv_imgproc.dylib libopencv_features2d.dylib
install_name_tool -change ${patoCV}/libopencv_highgui.2.4.dylib libopencv_highgui.dylib libopencv_features2d.dylib
install_name_tool -change ${patoCV}/libopencv_flann.2.4.dylib libopencv_flann.dylib libopencv_features2d.dylib
install_name_tool -id libopencv_flann.dylib libopencv_flann.2.4.dylib
install_name_tool -change ${patoCV}/libopencv_flann.2.4.dylib libopencv_flann.dylib libopencv_flann.dylib
install_name_tool -change ${patoCV}/libopencv_core.2.4.dylib libopencv_core.dylib libopencv_flann.dylib
install_name_tool -id libopencv_photo.dylib libopencv_photo.2.4.dylib
install_name_tool -change ${patoCV}/libopencv_imgproc.2.4.dylib libopencv_imgproc.dylib libopencv_highgui.dylib
install_name_tool -change /usr/local/opt/jpeg/lib/libjpeg.8.dylib libjpeg.dylib libopencv_highgui.dylib
install_name_tool -change /usr/local/opt/libpng/lib/libpng16.16.dylib libpng16.16.dylib libopencv_highgui.dylib
install_name_tool -change /usr/local/opt/libtiff/lib/libtiff.5.dylib libtiff.5.dylib libopencv_highgui.dylib
install_name_tool -change ${patoCV}/libopencv_core.2.4.dylib libopencv_core.dylib libopencv_highgui.dylib
install_name_tool -change ${patoCV}/libopencv_features2d.2.4.dylib libopencv_features2d.dylib libopencv_calib3d.dylib
install_name_tool -change ${patoCV}/libopencv_flann.2.4.dylib libopencv_flann.dylib libopencv_calib3d.dylib
install_name_tool -change ${patoCV}/libopencv_highgui.2.4.dylib libopencv_highgui.dylib libopencv_calib3d.dylib
install_name_tool -change ${patoCV}/libopencv_imgproc.2.4.dylib libopencv_imgproc.dylib libopencv_calib3d.dylib
install_name_tool -change ${patoCV}/libopencv_core.2.4.dylib libopencv_core.dylib libopencv_calib3d.dylib
install_name_tool -change ${patoCV}/libopencv_flann.2.4.dylib libopencv_flann.dylib libopencv_features2d.dylib
install_name_tool -change ${patoCV}/libopencv_highgui.2.4.dylib libopencv_highgui.dylib libopencv_features2d.dylib
install_name_tool -change ${patoCV}/libopencv_imgproc.2.4.dylib libopencv_imgproc.dylib libopencv_features2d.dylib
install_name_tool -change ${patoCV}/libopencv_core.2.4.dylib libopencv_core.dylib libopencv_features2d.dylib
install_name_tool -change ${patoCV}/libopencv_core.2.4.dylib libopencv_core.dylib libopencv_flann.dylib
install_name_tool -change ${patoCV}/libopencv_core.2.4.dylib libopencv_core.dylib libopencv_imgproc.dylib
install_name_tool -change ${patoCV}/libopencv_highgui.2.4.dylib libopencv_highgui.dylib libopencv_objdetect.dylib
install_name_tool -change ${patoCV}/libopencv_imgproc.2.4.dylib libopencv_imgproc.dylib libopencv_objdetect.dylib
install_name_tool -change ${patoCV}/libopencv_core.2.4.dylib libopencv_core.dylib libopencv_objdetect.dylib
install_name_tool -change ${patoCV}/libopencv_imgproc.2.4.dylib libopencv_imgproc.dylib libopencv_photo.dylib
install_name_tool -change ${patoCV}/libopencv_core.2.4.dylib libopencv_core.dylib libopencv_photo.dylib
install_name_tool -change ${patoCV}/libopencv_imgproc.2.4.dylib libopencv_imgproc.dylib libopencv_video.dylib
install_name_tool -change ${patoCV}/libopencv_core.2.4.dylib libopencv_core.dylib libopencv_video.dylib
install_name_tool -change /usr/local/Cellar/ilmbase/2.2.0/lib/libIex-2_2.12.dylib libIex-2_2.dylib libImath-2_2.dylib
install_name_tool -change /usr/local/lib/libImath-2_2.12.dylib libImath-2_2.dylib libIlmImf-2_2.dylib
install_name_tool -change /usr/local/lib/libHalf.12.dylib libHalf.dylib libIlmImf-2_2.dylib
install_name_tool -change /usr/local/lib/libIex-2_2.12.dylib libIex-2_2.dylib libIlmImf-2_2.dylib
install_name_tool -change /usr/local/lib/libIexMath-2_2.12.dylib libIexMath-2_2.dylib libIlmImf-2_2.dylib
install_name_tool -change /usr/local/lib/libIlmThread-2_2.12.dylib libIlmThread-2_2.dylib libIlmImf-2_2.dylib
install_name_tool -change /usr/local/Cellar/ilmbase/2.2.0/lib/libIex-2_2.12.dylib libIex-2_2.dylib libIlmThread-2_2.dylib