Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adsk contrib - Fix issue with minizip build #1725

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/analysis_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,15 @@ jobs:
run: |
share/ci/scripts/multi/install_pugixml.sh latest
- name: Install fixed ext package versions
# Minizip-ng depends on ZLIB. ZLIB must be installed first.
run: |
share/ci/scripts/multi/install_expat.sh 2.4.1 $EXT_PATH
share/ci/scripts/multi/install_lcms2.sh 2.2 $EXT_PATH
share/ci/scripts/multi/install_yaml-cpp.sh 0.7.0 $EXT_PATH
share/ci/scripts/multi/install_pystring.sh 1.1.3 $EXT_PATH
share/ci/scripts/multi/install_pybind11.sh 2.9.2 $EXT_PATH
share/ci/scripts/multi/install_zlib.sh 1.2.12 $EXT_PATH
share/ci/scripts/multi/install_minizip-ng.sh 3.0.6 $EXT_PATH
- name: Install latest ext package versions
run: |
share/ci/scripts/multi/install_imath.sh latest $EXT_PATH
Expand Down Expand Up @@ -206,12 +209,15 @@ jobs:
share/ci/scripts/macos/install_boost.sh latest
share/ci/scripts/multi/install_pugixml.sh latest $EXT_PATH
- name: Install fixed ext package versions
# Minizip-ng depends on ZLIB. ZLIB must be installed first.
run: |
share/ci/scripts/multi/install_expat.sh 2.4.1 $EXT_PATH
share/ci/scripts/multi/install_lcms2.sh 2.2 $EXT_PATH
share/ci/scripts/multi/install_yaml-cpp.sh 0.7.0 $EXT_PATH
share/ci/scripts/multi/install_pystring.sh 1.1.3 $EXT_PATH
share/ci/scripts/multi/install_pybind11.sh 2.9.2 $EXT_PATH
share/ci/scripts/multi/install_zlib.sh 1.2.12 $EXT_PATH
share/ci/scripts/multi/install_minizip-ng.sh 3.0.6 $EXT_PATH
- name: Install latest ext package versions
run: |
share/ci/scripts/multi/install_imath.sh latest $EXT_PATH
Expand Down Expand Up @@ -325,12 +331,15 @@ jobs:
share/ci/scripts/multi/install_pugixml.sh latest $EXT_PATH
shell: bash
- name: Install fixed ext package versions
# Minizip-ng depends on ZLIB. ZLIB must be installed first.
run: |
share/ci/scripts/multi/install_lcms2.sh 2.2 $EXT_PATH
share/ci/scripts/multi/install_yaml-cpp.sh 0.7.0 $EXT_PATH
share/ci/scripts/multi/install_pystring.sh 1.1.3 $EXT_PATH
share/ci/scripts/multi/install_pybind11.sh 2.9.2 $EXT_PATH
share/ci/scripts/multi/install_expat.sh 2.4.1 $EXT_PATH
share/ci/scripts/multi/install_zlib.sh 1.2.12 $EXT_PATH
share/ci/scripts/multi/install_minizip-ng.sh 3.0.6 $EXT_PATH
shell: bash
# OSL not installed due to LLVM compilation time.
- name: Install latest ext package versions
Expand Down
57 changes: 57 additions & 0 deletions share/ci/scripts/multi/install_minizip-ng.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenColorIO Project.

set -ex

MINIZIPNG_VERSION="$1"
INSTALL_TARGET="$2"

MINIZIPNG_MAJOR_MINOR=$(echo "${MINIZIPNG_VERSION}" | cut -d. -f-2)
MINIZIPNG_MAJOR=$(echo "${MINIZIPNG_VERSION}" | cut -d. -f-1)
MINIZIPNG_MINOR=$(echo "${MINIZIPNG_MAJOR_MINOR}" | cut -d. -f2-)
MINIZIPNG_PATCH=$(echo "${MINIZIPNG_VERSION}" | cut -d. -f3-)
MINIZIPNG_VERSION_U="${MINIZIPNG_MAJOR}.${MINIZIPNG_MINOR}.${MINIZIPNG_PATCH}"

git clone https://github.com/zlib-ng/minizip-ng
cd minizip-ng

if [ "$MINIZIPNG_VERSION" == "latest" ]; then
LATEST_TAG=$(git describe --abbrev=0 --tags)
git checkout tags/${LATEST_TAG} -b ${LATEST_TAG}
else
git checkout tags/${MINIZIPNG_VERSION_U} -b ${MINIZIPNG_VERSION_U}
fi

mkdir build
cd build

cmake -DCMAKE_BUILD_TYPE=Release \
${INSTALL_TARGET:+"-DCMAKE_INSTALL_PREFIX="${INSTALL_TARGET}""} \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_SHARED_LIBS=OFF \
-DMZ_OPENSSL=OFF \
-DMZ_LIBBSD=OFF \
-DMZ_BUILD_TESTS=OFF \
-DMZ_COMPAT=OFF \
-DMZ_BZIP2=OFF \
-DMZ_LZMA=OFF \
-DMZ_LIBCOMP=OFF \
-DMZ_ZSTD=OFF \
-DMZ_PKCRYPT=OFF \
-DMZ_WZAES=OFF \
-DMZ_SIGNING=OFF \
-DMZ_ZLIB=ON \
-DMZ_ICONV=OFF \
-DMZ_FETCH_LIBS=OFF \
-DMZ_FORCE_FETCH_LIBS=OFF \
-DZLIB_LIBRARY=${INSTALL_TARGET}/${CMAKE_INSTALL_LIBDIR} \
-DZLIB_INCLUDE_DIR=${INSTALL_TARGET}/include \
../.
cmake --build . \
--target install \
--config Release \
--parallel 2

cd ../..
rm -rf minizip-ng
40 changes: 40 additions & 0 deletions share/ci/scripts/multi/install_zlib.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenColorIO Project.

set -ex

ZLIB_VERSION="$1"
INSTALL_TARGET="$2"

ZLIB_MAJOR_MINOR=$(echo "${ZLIB_VERSION}" | cut -d. -f-2)
ZLIB_MAJOR=$(echo "${ZLIB_VERSION}" | cut -d. -f-1)
ZLIB_MINOR=$(echo "${ZLIB_MAJOR_MINOR}" | cut -d. -f2-)
ZLIB_PATCH=$(echo "${ZLIB_VERSION}" | cut -d. -f3-)
ZLIB_VERSION_U="${ZLIB_MAJOR}.${ZLIB_MINOR}.${ZLIB_PATCH}"

git clone https://github.com/madler/zlib
cd zlib

if [ "$ZLIB_VERSION" == "latest" ]; then
LATEST_TAG=$(git describe --abbrev=0 --tags)
git checkout tags/${LATEST_TAG} -b ${LATEST_TAG}
else
git checkout tags/v${ZLIB_VERSION_U} -b v${ZLIB_VERSION_U}
fi

mkdir build
cd build

cmake -DCMAKE_BUILD_TYPE=Release \
${INSTALL_TARGET:+"-DCMAKE_INSTALL_PREFIX="${INSTALL_TARGET}""} \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_SHARED_LIBS=OFF \
../.
cmake --build . \
--target install \
--config Release \
--parallel 2

cd ../..
rm -rf zlib
Loading