Skip to content

Commit f673855

Browse files
committed
Fix freetype circular dylib include
1 parent 892d603 commit f673855

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

buildconfig/manylinux-build/docker_base/freetype/build-freetype.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ make install
4747
if [[ "$OSTYPE" == "darwin"* ]]; then
4848
# Install to mac deps cache dir as well
4949
make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH}
50+
51+
# We do a little hack...
52+
# When freetype finds harfbuzz with pkg-config, we tell freetype a little
53+
# lie that harfbuzz doesn't depend on freetype (even though it does).
54+
# This ensures no direct circular dylib link happen.
55+
# This is a bit of a brittle hack: This command removes the entire line that
56+
# contains "freetype". This is fine for now when the harfbuzz we are
57+
# building has no other dependencies
58+
sed -i '' '/freetype/d' /usr/local/lib/pkgconfig/harfbuzz.pc
59+
sed -i '' 's/ \/usr\/local\/lib\/libfreetype.la//g' /usr/local/lib/libharfbuzz.la
5060
fi
5161

5262
cd ..
@@ -56,6 +66,9 @@ cd $FREETYPE
5666

5767
# fully clean previous install
5868
make clean
69+
if [[ "$OSTYPE" == "darwin"* ]]; then
70+
make uninstall
71+
fi
5972

6073
./configure $ARCHS_CONFIG_FLAG --with-harfbuzz=yes
6174
make

0 commit comments

Comments
 (0)