Skip to content

Commit 3c8b8cd

Browse files
committed
Merge branch 'release-1.21-branch' of github.com:Macaulay2/M2 into release-1.21-branch
2 parents 9c00054 + d0dbf3f commit 3c8b8cd

File tree

1 file changed

+33
-24
lines changed

1 file changed

+33
-24
lines changed

M2/distributions/dmg/Makefile.in

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -42,43 +42,52 @@ file_preparation: always
4242
# /usr/local/opt/icu4c/lib/libicudata.69.dylib (compatibility version 69.0.0, current version 69.1.0)
4343
# $ otool -L M2-binary | grep libicudata
4444
# $
45-
# I've install the "library $f not copied" error below to catch this.
45+
# I've installed the "library $f not copied" error below to catch this.
4646
# I'm working around this temporarily by renaming some dylib files to disable linking with them:
4747
# $ find /usr/local -name \*dylib---- -ls
4848
# 2071418 0 lrwxrwxr-x 1 brew admin 50 Jul 31 12:49 /usr/local/lib/libboost_regex-mt.dylib---- -> ../Cellar/boost/1.76.0/lib/libboost_regex-mt.dylib
4949
# 6329913 0 lrwxrwxr-x 1 brew admin 19 Jul 28 03:12 /usr/local/Cellar/gcc/11.2.0/lib/gcc/11/libgfortran.dylib---- -> libgfortran.5.dylib
5050
# 6331397 0 lrwxrwxr-x 1 brew admin 19 Jul 28 03:12 /usr/local/Cellar/gcc/11.2.0/lib/gcc/11/libquadmath.dylib---- -> libquadmath.0.dylib
51+
# Now I'm not doing that any longer, but have descended one level further with "otool -L".
5152

5253

5354
library_preparation: file_preparation
5455

5556
$(MKDIR_P) files/@package@/@tail_libdir@
5657

57-
( \
58-
for i in files/@package@/@tail_bindir@/* ; \
59-
do if [ -f $$i -a -x $$i -a ! -h $$i ] ; \
60-
then otool -L $$i | grep '^\t' | grep -v '^[[:space:]]*\(/usr/lib/\|/System/Library/\)' \
61-
| sed 's/^[[:space:]]*\(.*\) (compatibility version .*/\1/' \
62-
| while read f; \
63-
do (b=`basename $$f` ; set -xe ; install_name_tool -change $$f @executable_path/../lib/$$b $$i ) || exit 1 ; \
64-
echo $$f ; \
65-
done ; \
66-
fi ; \
67-
done ; \
68-
for i in files/@package@/@tail_programsdir@/* ; \
69-
do if [ -f $$i -a -x $$i -a ! -h $$i ] ; \
70-
then otool -L $$i | grep '^\t' | grep -v '^[[:space:]]*\(/usr/lib/\|/System/Library/\)' \
71-
| sed 's/^[[:space:]]*\(.*\) (compatibility version .*/\1/' \
72-
| while read f; \
73-
do (b=`basename $$f` ; set -xe ; install_name_tool -change $$f @executable_path/../../../lib/$$b $$i ) || exit 1 ; \
74-
echo $$f ; \
75-
done ; \
76-
fi ; \
77-
done \
78-
) | sort \
79-
| uniq \
58+
( \
59+
for i in files/@package@/@tail_bindir@/* files/@package@/@tail_programsdir@/* ; \
60+
do if [ -f $$i -a -x $$i -a ! -h $$i ] ; \
61+
then otool -L $$i | grep '^\t' | grep -v '^[[:space:]]*\(/usr/lib/\|/System/Library/\)' \
62+
| sed 's/^[[:space:]]*\(.*\) (compatibility version .*/\1/' \
63+
| while read f; \
64+
do (b=`basename $$f` ; set -xe ; install_name_tool -change $$f @executable_path/../lib/$$b $$i ) || exit 1 ; \
65+
echo $$f ; \
66+
@INSTALL_PROGRAM@ $$f files/@package@/@tail_libdir@ ; \
67+
if echo $$f | grep '^[^@].*\.dylib$$' ; \
68+
then otool -L $$f \
69+
| grep '^\t' \
70+
| grep -v '^[[:space:]]*\(@\|/usr/lib/\|/System/Library/\)' \
71+
| sed 's/^[[:space:]]*\(.*\) (compatibility version .*/\1/' \
72+
| while read ff; \
73+
do (bb=`basename $$ff` ; \
74+
set -xe ; \
75+
install_name_tool -change $$ff @executable_path/../lib/$$bb files/@package@/@tail_libdir@/`basename $$f` \
76+
) || exit 1 ; \
77+
echo $$ff ; \
78+
done ; \
79+
fi ; \
80+
done ; \
81+
fi ; \
82+
done \
83+
) | sort \
84+
| uniq \
8085
| while read f; do ls -l $$f ; (set -x ; @INSTALL_PROGRAM@ $$f files/@package@/@tail_libdir@ ) ; done
8186

87+
# yes, the next two lines are a hack.
88+
@INSTALL_PROGRAM@ /usr/local/Cellar/gcc/12.2.0/lib/gcc/12/libquadmath.0.dylib files/@package@/@tail_libdir@
89+
@INSTALL_PROGRAM@ /usr/local/Cellar/gcc/12.2.0/lib/gcc/12/libgcc_s.1.1.dylib files/@package@/@tail_libdir@
90+
8291
for i in files/@package@/@tail_libdir@/* ; \
8392
do if [ -f $$i -a -x $$i -a ! -h $$i ] ; \
8493
then otool -L $$i | grep '^\t' | grep -v '^[[:space:]]*\(/usr/lib/\|/System/Library/\)' \

0 commit comments

Comments
 (0)