Skip to content

Commit

Permalink
Build uuid before fontconfig as fontconfig wants to link to uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
kintel committed Nov 10, 2021
1 parent 0ce40a4 commit 0f4d754
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
9 changes: 5 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ jobs:
brew install automake libtool cmake pkg-config
- restore_cache:
keys:
- macos-libraries-{{ checksum "scripts/macosx-build-dependencies.sh" }}-{{ checksum ".circleci/config.yml" }}
- macos-libraries-
- macos-libraries2-{{ checksum "scripts/macosx-build-dependencies.sh" }}-{{ checksum ".circleci/config.yml" }}
- macos-libraries2-
- run:
name: Build Dependencies
command: |
Expand All @@ -132,7 +132,8 @@ jobs:
echo "DYLD_LIBRARY_PATH: $DYLD_LIBRARY_PATH"
# Pick up our own Qt
export PATH=$OPENSCAD_LIBRARIES/bin:$PATH
./scripts/macosx-build-dependencies.sh -d double_conversion eigen gmp mpfr glew gettext libffi freetype ragel harfbuzz libzip libxml2 fontconfig hidapi libuuid lib3mf pixman cairo glib2 boost cgal qt5 opencsg qscintilla sparkle
./scripts/macosx-build-dependencies.sh -d double_conversion eigen gmp mpfr glew gettext libffi freetype ragel harfbuzz
# libzip libxml2 libuuid fontconfig hidapi lib3mf pixman cairo glib2 boost cgal qt5 opencsg qscintilla sparkle
- run:
name: Package Dependencies as an artifact
command: |
Expand All @@ -142,7 +143,7 @@ jobs:
tar cz -C "$OPENSCAD_LIBRARIES" -f /tmp/out/"$LIBRARIES_CACHE" .
shasum -a 512 /tmp/out/"$LIBRARIES_CACHE" > /tmp/out/"$LIBRARIES_CACHE".sha512
- save_cache:
key: macos-libraries-{{ checksum "scripts/macosx-build-dependencies.sh" }}-{{ checksum ".circleci/config.yml" }}
key: macos-libraries2-{{ checksum "scripts/macosx-build-dependencies.sh" }}-{{ checksum ".circleci/config.yml" }}
paths:
- /Users/distiller/libraries/install
- run:
Expand Down
38 changes: 19 additions & 19 deletions scripts/macosx-build-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ PACKAGES=(
"libz 1.2.11"
"libzip 1.5.1"
"libxml2 2.9.9"
"libuuid 1.6.2"
"fontconfig 2.13.1"
"hidapi 0.11.0"
"libuuid 1.6.2"
"lib3mf 1.8.1"
"glib2 2.56.3"
"boost 1.74.0"
Expand Down Expand Up @@ -484,6 +484,24 @@ build_libxml2()
echo $version > $DEPLOYDIR/share/macosx-build-dependencies/libxml2.version
}

build_libuuid()
{
version=$1
cd $BASEDIR/src
rm -rf uuid-$version
if [ ! -f uuid-$version.tar.gz ]; then
curl -L https://mirrors.ocf.berkeley.edu/debian/pool/main/o/ossp-uuid/ossp-uuid_$version.orig.tar.gz -o uuid-$version.tar.gz
fi
tar xzf uuid-$version.tar.gz
cd uuid-$version
patch -p1 < $OPENSCADDIR/patches/uuid-1.6.2.patch
./configure -prefix $DEPLOYDIR CFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN" LDFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN" --without-perl --without-php --without-pgsql
make -j"$NUMCPU"
make install
install_name_tool -id @rpath/libuuid.dylib $DEPLOYDIR/lib/libuuid.dylib
echo $version > $DEPLOYDIR/share/macosx-build-dependencies/libuuid.version
}

build_fontconfig()
{
version=$1
Expand Down Expand Up @@ -632,24 +650,6 @@ build_hidapi()
echo $version > $DEPLOYDIR/share/macosx-build-dependencies/hidapi.version
}

build_libuuid()
{
version=$1
cd $BASEDIR/src
rm -rf uuid-$version
if [ ! -f uuid-$version.tar.gz ]; then
curl -L https://mirrors.ocf.berkeley.edu/debian/pool/main/o/ossp-uuid/ossp-uuid_$version.orig.tar.gz -o uuid-$version.tar.gz
fi
tar xzf uuid-$version.tar.gz
cd uuid-$version
patch -p1 < $OPENSCADDIR/patches/uuid-1.6.2.patch
./configure -prefix $DEPLOYDIR CFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN" LDFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN" --without-perl --without-php --without-pgsql
make -j"$NUMCPU"
make install
install_name_tool -id @rpath/libuuid.dylib $DEPLOYDIR/lib/libuuid.dylib
echo $version > $DEPLOYDIR/share/macosx-build-dependencies/libuuid.version
}

build_lib3mf()
{
version=$1
Expand Down

0 comments on commit 0f4d754

Please sign in to comment.