Compare commits

...

29 Commits

Author SHA1 Message Date
Andrej730 a8ba1d1361 build_osx - separate arm64 ccache to avoid override 2025-09-26 19:36:12 +05:00
Andrej730 618e5e60d9 build_osx - fix issue building arm64 2025-09-26 19:34:32 +05:00
Andrej730 efa881faa0 build-all - bump Python version to fix issue cross compiling
Not sure which patch version exactly fixed it, but 3.13.6 works.
2025-09-26 19:31:49 +05:00
Andrej730 18a26672e9 cmake - temporarily pin git_sha to reuse ccache for debugging 2025-09-26 19:31:48 +05:00
Andrej730 49e9aa1652 build_osx - add deps for cross compilation 2025-09-26 19:31:48 +05:00
Andrej730 07758c29ad build_osx - exclude arm64 gmp dependency to avoid cross compilation issues 2025-09-26 19:31:48 +05:00
Andrej730 0be6f897b8 build-all - cross compile dependencies 2025-09-26 19:31:48 +05:00
Andrej730 6db3728f0e build-all.py - provide with-openssl for python on Mac 2025-09-26 19:31:48 +05:00
Andrej730 879dc52865 build_osx - note on preinstalled dependencies 2025-09-26 19:31:48 +05:00
Andrej730 640deb0188 build-all.py - document ADD_COMMIT_SHA env var 2025-09-26 19:31:47 +05:00
Andrej730 6989e509ce cmake - don't fail silently with ADD_COMMIT_SHA and missing git 2025-09-26 19:31:47 +05:00
Andrej730 efd79ef079 build_osx - attempt to cross-compile intel binaries 2025-09-26 19:31:47 +05:00
Andrej730 356d2bb753 build-all.py - override minimum cmake version for OpenCOLLADA 2025-09-26 19:31:47 +05:00
Andrej730 51b76237fe build-all.py - bump eigen package to avoid issues on cmake 4 2025-09-26 19:31:47 +05:00
Andrej730 58db9dba0a workflows - unify ccache names 2025-09-26 19:31:47 +05:00
Andrej730 5e460898f8 build-all.py - bump json package to avoid issues on cmake 4 2025-09-26 19:31:46 +05:00
Andrej730 c86b5bc773 build_osx - upload logs artifacts to help debugging 2025-09-26 19:31:46 +05:00
Andrej730 a55b5ba21f build-rocky - upload logs artifacts to help debugging 2025-09-26 19:31:46 +05:00
Andrej730 bb4b7dae52 build-all.py - opencollada patch to support config package on Unix 2025-09-26 19:31:46 +05:00
Andrej730 2f4f7d6374 build-all.py - add OpenCOLLADA to IfcGeom dependencies
Otherwise it can be overlooked if you build IfcOpenShell-Python or any other target specifically, it was only built if you run build-all.py without any target arguments.
2025-09-26 19:31:46 +05:00
Andrej730 cbb5211888 build-all.py - CGAL to use v5.6.3
5.6.x-branch was removed
2025-09-26 19:31:46 +05:00
Andrej730 a65a50d5d6 build-all.py - alter rocksdb's deps search only on Windows (da4508e) 2025-09-26 19:31:46 +05:00
Andrej730 9d0d51337b build-all.py - add a note about xz requirement 2025-09-26 19:31:46 +05:00
Andrej730 e9cdd55c96 build-all.py - fix Python 3.6 support for rocky (566c9af) 2025-09-26 19:31:45 +05:00
Andrej730 0ca3c0c806 ruff ci - check python 3.7 compatibility for build-all.py 2025-09-26 19:31:45 +05:00
Andrej730 ef05f2b3f6 build-all.py - print all missing commands simultaneoously 2025-09-26 19:31:45 +05:00
Andrej730 11f0a8d434 Fix missing yacc in linux builds 2025-09-26 19:31:45 +05:00
Andrej730 3f316a99f1 black . 2025-09-26 19:31:45 +05:00
Andrej730 59b5e200a5 typing 2025-09-26 19:31:44 +05:00
10 changed files with 202 additions and 31 deletions
+28 -3
View File
@@ -11,7 +11,7 @@ jobs:
matrix:
include:
- os: macos
runner: macos-13
runner: macos-14
arch: x64
oldarch:
- os: macos
@@ -42,6 +42,7 @@ jobs:
- name: Install Dependencies
run: |
brew update
# preinstalled: xz, cmake
brew install git bison autoconf automake libffi findutils
echo "$(brew --prefix findutils)/libexec/gnubin" >> $GITHUB_PATH
@@ -57,14 +58,38 @@ jobs:
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${GITHUB_WORKFLOW}-${{ matrix.os }}
key: mac-${{ matrix.arch }}
- name: Run Build Script
shell: bash
run: |
if [ "${{ matrix.os }}" == "macos" ]; then
DARWIN_C_SOURCE=-D_DARWIN_C_SOURCE
fi
CXXFLAGS="-O3" CFLAGS="-O3 ${DARWIN_C_SOURCE}" ADD_COMMIT_SHA=1 BUILD_CFG=Release python3 ./nix/build-all.py --diskcleanup
if [ "${{ matrix.arch }}" == "x64" ]; then
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
MAC_INTEL=-mac-cross-compile-intel
# We don't use gmpcxx, but it comes preinstalled on macos runner as arm64 bottle
# and CGAL detects it and breaks cross compilation.
brew uninstall --ignore-dependencies gmp
# Required by Python.
/usr/local/bin/brew install gettext openssl
fi
set -o pipefail
CXXFLAGS="-O3" CFLAGS="-O3 ${DARWIN_C_SOURCE}" ADD_COMMIT_SHA=1 BUILD_CFG=Release \
python3 ./nix/build-all.py -v --diskcleanup ${MAC_INTEL} \
| tee build.log
- name: Upload Build Logs
if: always()
uses: actions/upload-artifact@v4
with:
name: build-logs-osx-${{ matrix.arch }}
path: |
build.log
build/*/*/*/logs/*.log
build/*/*/*/build/ifcopenshell/**/CMakeCache.txt
retention-days: 30
- name: Pack Dependencies
run: |
+15 -3
View File
@@ -16,7 +16,7 @@ jobs:
bzip2 patch mesa-libGL-devel libffi-devel fontconfig-devel \
sqlite-devel bzip2-devel zlib-devel openssl-devel xz-devel \
readline-devel ncurses-devel libffi-devel libuuid-devel git-lfs \
findutils xz
findutils xz byacc
python3 -m pip install typing_extensions
git config --global --add safe.directory '*'
@@ -51,11 +51,23 @@ jobs:
# - name: ccache
# uses: hendrikmuhs/ccache-action@v1
# with:
# key: ${GITHUB_WORKFLOW}-rockylinux8-x64
# key: ubuntu-22.04-${{ runner.arch }}-rockylinux8
- name: Run Build Script
shell: bash
run: |
CXXFLAGS="-O3" CFLAGS="-O3 ${DARWIN_C_SOURCE}" ADD_COMMIT_SHA=1 BUILD_CFG=Release python3 ./nix/build-all.py --diskcleanup
set -o pipefail
CXXFLAGS="-O3" CFLAGS="-O3 ${DARWIN_C_SOURCE}" ADD_COMMIT_SHA=1 BUILD_CFG=Release python3 ./nix/build-all.py -v --diskcleanup 2>&1 | tee build.log
- name: Upload Build Logs
if: always()
uses: actions/upload-artifact@v4
with:
name: build-logs-rocky
path: |
build.log
build/*/*/logs/*.log
retention-days: 30
- name: Pack Dependencies
run: |
+15 -3
View File
@@ -16,7 +16,7 @@ jobs:
bzip2 patch mesa-libGL-devel libffi-devel fontconfig-devel \
sqlite-devel bzip2-devel zlib-devel openssl-devel xz-devel \
readline-devel ncurses-devel libffi-devel libuuid-devel git-lfs \
findutils xz
findutils xz byacc
python3 -m pip install typing_extensions
git config --global --add safe.directory '*'
@@ -51,11 +51,23 @@ jobs:
# - name: ccache
# uses: hendrikmuhs/ccache-action@v1
# with:
# key: ${GITHUB_WORKFLOW}-rockylinux8-x64
# key: ubuntu-22.04-${{ runner.arch }}-rockylinux8
- name: Run Build Script
shell: bash
run: |
CXXFLAGS="-O3" CFLAGS="-O3 ${DARWIN_C_SOURCE}" ADD_COMMIT_SHA=1 BUILD_CFG=Release python3 ./nix/build-all.py --diskcleanup
set -o pipefail
CXXFLAGS="-O3" CFLAGS="-O3 ${DARWIN_C_SOURCE}" ADD_COMMIT_SHA=1 BUILD_CFG=Release python3 ./nix/build-all.py -v --diskcleanup 2>&1 | tee build.log
- name: Upload Build Logs
if: always()
uses: actions/upload-artifact@v4
with:
name: build-logs-rocky-arm64
path: |
build.log
build/*/*/logs/*.log
retention-days: 30
- name: Pack Dependencies
run: |
@@ -47,6 +47,8 @@ jobs:
id: ruff
run: |
uvx ruff check
# It's actually Python 3.6, but ruff only supports 3.7+, but it should do.
uvx ruff check nix/build-all.py --target-version py37
continue-on-error: true
- name: Final check
+1 -1
View File
@@ -71,7 +71,7 @@ jobs:
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${GITHUB_WORKFLOW}
key: ubuntu-22.04-${{ runner.arch }}
# rocksdb on debian distros misses RTTI?
- name: build rocksdb
+14 -3
View File
@@ -335,10 +335,16 @@ endif(USD_SUPPORT)
if (WITH_ROCKSDB)
# Temporaily mess with CMAKE_FIND_PACKAGE_PREFER_CONFIG to help RocksDB
# find it's zstd dependency on Windows.
set(TEMP CMAKE_FIND_PACKAGE_PREFER_CONFIG)
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
# Only do it on Windows, otherwise it might create problems as
# findzstd and zstd-config target names do not match.
if(WIN32)
set(TEMP CMAKE_FIND_PACKAGE_PREFER_CONFIG)
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
endif()
find_package(RocksDB CONFIG REQUIRED)
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ${TEMP})
if(WIN32)
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ${TEMP})
endif()
message(STATUS "RocksDB: found at '${RocksDB_DIR}'.")
add_definitions(-DIFOPSH_WITH_ROCKSDB)
@@ -1296,6 +1302,10 @@ endif(BUILD_GEOMSERVER)
if(ADD_COMMIT_SHA)
find_package(Git)
if(NOT GIT_FOUND)
message(FATAL_ERROR "Failed to find Git for ADD_COMMIT_SHA option.")
endif()
if(GIT_FOUND)
if (VERSION_OVERRIDE)
set (git_branch ${RELEASE_VERSION})
@@ -1326,6 +1336,7 @@ if(ADD_COMMIT_SHA)
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(git_sha "418eb277d")
message(STATUS "IfcOpenShell branch: \"${git_branch}\"")
message(STATUS "IfcOpenShell commit: \"${git_sha}\"")
+113 -17
View File
@@ -31,6 +31,7 @@ Available arguments:
``-py-313`` - build for specific Python version
(building for all supported Python version by default).
``-wasm`` - compile for wasm
``-mac-cross-compile-intel`` - cross compile for Intel Mac on Apple Silicon host
``-shared`` - build shared libraries. By default will build static.
``-diskcleanup`` - clean up build directories after finishing building dependencies
``-v`` - enable verbose logs
@@ -49,6 +50,8 @@ Used environment variables:
- ``IFCOS_SCHEMAS`` - schemas to be built; defaults to cmake default (IFC2X3; IFC4; IFC4X3_ADD2) - to be supplied as `2x3;4`
- ``USE_OCCT`` - whether to use official Open CASCADE instead of Community Edition
(`true` by default, any other value is considered `false`)
- ``ADD_COMMIT_SHA`` - if defined with any non-empty value then
`ADD_COMMIT_SHA` and `VERSION_OVERRIDE` will be set to `ON` while configuring IfcOpenShell
# This script builds IfcOpenShell and its dependencies #
# #
@@ -73,12 +76,12 @@ Used environment variables:
# on debian 7.8 these can be obtained with: #
# $ apt-get install git gcc g++ autoconf bison bzip2 cmake #
# mesa-common-dev libffi-dev libfontconfig1-dev #
# libssl-dev #
# libssl-dev xz #
# #
# on ubuntu 14.04: #
# $ apt-get install git gcc g++ autoconf bison make cmake #
# mesa-common-dev libffi-dev libfontconfig1-dev #
# libssl-dev #
# libssl-dev xz-utils #
# #
# on OS X El Capitan with homebrew: #
# $ brew install git bison autoconf automake libffi cmake #
@@ -86,7 +89,7 @@ Used environment variables:
# on RHEL-related distros: #
# $ yum install git gcc gcc-c++ autoconf bison make cmake #
# mesa-libGL-devel libffi-devel fontconfig-devel bzip2 #
# automake patch #
# automake patch byacc xz #
"""
@@ -130,12 +133,12 @@ PROJECT_NAME = "IfcOpenShell"
USE_CURRENT_PYTHON_VERSION = os.getenv("USE_CURRENT_PYTHON_VERSION")
ADD_COMMIT_SHA = os.getenv("ADD_COMMIT_SHA")
PYTHON_VERSIONS = ["3.9.11", "3.10.3", "3.11.8", "3.12.1", "3.13.0"]
JSON_VERSION = "3.10.0"
PYTHON_VERSIONS = ["3.9.11", "3.10.3", "3.11.8", "3.12.1", "3.13.6"]
JSON_VERSION = "3.11.3"
OCE_VERSION = "0.18.3"
OCCT_VERSION = "7.8.1"
BOOST_VERSION = "1.86.0"
EIGEN_VERSION = "3.3.9"
EIGEN_VERSION = "3.4.0"
PCRE_VERSION = "8.41"
PCRE2_VERSION = "10.32"
LIBXML2_VERSION = "2.13.8"
@@ -145,7 +148,7 @@ HDF5_VERSION = "1.13.1"
GMP_VERSION = "6.2.1"
MPFR_VERSION = "3.1.6" # latest is 4.1.0
CGAL_VERSION = "5.6.x-branch"
CGAL_VERSION = "v5.6.3"
USD_VERSION = "23.05"
TBB_VERSION = "2021.9.0"
ROCKSDB_VERSION = "9.11.2"
@@ -165,6 +168,8 @@ date = "date"
curl = "curl"
wget = "wget"
strip = "strip"
xz = "xz" # Used implicitly for `tar -xf *.tar.xz`.
brew = "brew"
explicit_targets = [s for s in sys.argv[1:] if not s.startswith("-")]
"""Targets provided by CLI."""
@@ -188,13 +193,20 @@ def cecho(message, color=NO_COLOR):
logger.info(f"{color}{message}\033[0m")
def which(cmd):
for path in os.getenv("PATH").split(":"):
def which(cmd: str) -> Union[str, None]:
PATH = os.getenv("PATH")
assert PATH
for path in PATH.split(":"):
if os.path.exists(path) and cmd in os.listdir(path):
return cmd
return None
# Flags.
MAC_CROSS_COMPILE_INTEL = "mac-cross-compile-intel" in flags
assert platform.system() == "Darwin" or not MAC_CROSS_COMPILE_INTEL
WASM = "wasm" in flags
# Set defaults for missing empty environment variables
USE_OCCT = os.environ.get("USE_OCCT", "true").lower() == "true"
@@ -213,7 +225,15 @@ CMAKE_DIR = os.path.realpath(os.path.join(os.path.dirname(__file__), "..", "cmak
build_dir = os.environ.get("BUILD_DIR", os.path.join(os.path.dirname(__file__), "..", "build"))
DEFAULT_DEPS_DIR = Path(build_dir) / platform.system() / ("wasm" if "wasm" in flags else platform.machine())
if WASM:
arch = "wasm"
elif MAC_CROSS_COMPILE_INTEL:
arch = "x86_64"
else:
arch = platform.machine()
DEFAULT_DEPS_DIR = Path(build_dir) / platform.system() / arch
if TOOLSET:
DEFAULT_DEPS_DIR = DEFAULT_DEPS_DIR / TOOLSET
DEFAULT_DEPS_DIR = os.path.realpath(DEFAULT_DEPS_DIR)
@@ -263,7 +283,7 @@ cecho(
dependency_tree: "dict[str, tuple[str, ...]]" = {
"IfcParse": ("boost", "libxml2", "hdf5", "rocksdb"),
"IfcGeom": ("IfcParse", "occ", "json", "cgal", "eigen"),
"IfcGeom": ("IfcParse", "occ", "json", "cgal", "eigen", "OpenCOLLADA"),
"IfcConvert": ("IfcGeom",),
"OpenCOLLADA": ("libxml2", "pcre"),
"IfcGeomServer": ("IfcGeom",),
@@ -301,6 +321,17 @@ if "v" in flags:
else:
logger.setLevel(logging.INFO)
if MAC_CROSS_COMPILE_INTEL:
MAC_CROSS_COMPILE_INTEL_ARGS = ["-DCMAKE_OSX_ARCHITECTURES=x86_64"]
MAC_CROSS_COMPILE_INTEL_BJAM_ARGS = ["architecture=x86"]
MAC_CROSS_COMPILE_INTEL_CXX = "clang++ -arch x86_64"
MAC_CROSS_COMPILE_INTEL_CC = "clang -arch x86_64"
else:
MAC_CROSS_COMPILE_INTEL_ARGS = []
MAC_CROSS_COMPILE_INTEL_BJAM_ARGS = []
MAC_CROSS_COMPILE_INTEL_CXX = ""
MAC_CROSS_COMPILE_INTEL_CC = ""
OFF_ON = ["OFF", "ON"]
BUILD_STATIC = "shared" not in flags
ENABLE_FLAG = "--enable-static" if BUILD_STATIC else "--enable-shared"
@@ -323,10 +354,18 @@ targets = set(t for t in targets if "without-%s" % t.lower() not in flags)
print("Building:", *sorted(targets, key=lambda t: len(list(gather_dependencies(t)))))
# Check that required tools are in PATH
yacc = "yacc" # Used during swig building process, installed with `bison`.
for cmd in [git, bunzip2, tar, cc, cplusplus, autoconf, automake, make, "patch", "cmake", yacc]:
yacc = "yacc" # Used during swig building process, installed with `bison` on Debian / `byacc` on Red Hat.
missing_commands: "list[str]" = []
for cmd in [git, bunzip2, tar, cc, cplusplus, autoconf, automake, make, "patch", "cmake", yacc, xz]:
if which(cmd) is None:
raise ValueError(f"Required tool '{cmd}' not installed or not added to PATH")
missing_commands.append(cmd)
if missing_commands:
raise ValueError(f"Required tools not installed or not added to PATH: {', '.join(missing_commands)}")
if MAC_CROSS_COMPILE_INTEL:
brew = "/usr/local/bin/brew"
assert os.path.exists(brew), f"For intel cross compilation the brew path is expected to be '{brew}'."
# identifiers for the download tool (could be less memory consuming as ints, but are more verbose as strings)
download_tool_default = download_tool_py = "py"
@@ -359,7 +398,7 @@ def run(cmds: "Sequence[str]", cwd: "Union[str, None]" = None, can_fail: bool =
def timestamp() -> str:
return datetime.now().strftime("%Y-%m-%d %H:%M:%S,%f")[:-3] # same format as logging
def stream_reader(pipe, collector: list[str], log_file) -> None:
def stream_reader(pipe, collector: "list[str]", log_file) -> None:
for line in iter(pipe.readline, ""):
log_file.write(f"{timestamp()} {line}")
log_file.flush()
@@ -733,6 +772,7 @@ if "hdf5" in targets:
"-DBUILD_SHARED_LIBS=OFF",
"-DHDF5_BUILD_UTILS=OFF",
"-DHDF5_BUILD_CPP_LIB=ON",
*MAC_CROSS_COMPILE_INTEL_ARGS,
],
download_url=f"https://github.com/HDFGroup/hdf5/archive/refs/tags/",
download_name=f"hdf5-{HDF5_UNDERSCORE}.tar.gz",
@@ -769,6 +809,13 @@ if "eigen" in targets:
)
if "pcre" in targets:
OLD_CC, OLD_CCXX = None, None
if MAC_CROSS_COMPILE_INTEL:
OLD_CC, OLD_CCXX = os.environ.get("CC"), os.environ.get("CXX")
os.environ["CC"] = MAC_CROSS_COMPILE_INTEL_CC
os.environ["CXX"] = MAC_CROSS_COMPILE_INTEL_CXX
# Keep it autoconf as OpenCOLLADA is pretty old and might break
# if we update it's dependencies for mmore modern cmake.
build_dependency(
name=f"pcre-{PCRE_VERSION}",
mode="autoconf",
@@ -776,6 +823,15 @@ if "pcre" in targets:
download_url=f"https://downloads.sourceforge.net/project/pcre/pcre/{PCRE_VERSION}/",
download_name=f"pcre-{PCRE_VERSION}.tar.bz2",
)
if MAC_CROSS_COMPILE_INTEL:
if OLD_CC is None:
del os.environ["CC"]
else:
os.environ["CC"] = OLD_CC
if OLD_CCXX is None:
del os.environ["CXX"]
else:
os.environ["CXX"] = OLD_CCXX
if "pcre2" in targets:
build_dependency(
@@ -842,6 +898,8 @@ if USE_OCCT and "occ" in targets:
f"-DUSE_OPENGL=OFF",
f"-DUSE_GLES2=OFF",
f"-D3RDPARTY_FREETYPE_DIR={DEPS_DIR}/install/freetype",
f"-DCMAKE_POLICY_VERSION_MINIMUM=3.5",
*MAC_CROSS_COMPILE_INTEL_ARGS,
],
download_url="https://github.com/Open-Cascade-SAS/OCCT",
download_name="occt",
@@ -867,6 +925,10 @@ elif "occ" in targets:
)
if "libxml2" in targets:
OLD_CC = ""
if MAC_CROSS_COMPILE_INTEL:
OLD_CC = os.environ.get("CC")
os.environ["CC"] = MAC_CROSS_COMPILE_INTEL_CC
build_dependency(
f"libxml2-{LIBXML2_VERSION}",
"autoconf",
@@ -881,10 +943,19 @@ if "libxml2" in targets:
download_url=f"https://download.gnome.org/sources/libxml2/{'.'.join(LIBXML2_VERSION.split('.')[0:2])}/",
download_name=f"libxml2-{LIBXML2_VERSION}.tar.xz",
)
if MAC_CROSS_COMPILE_INTEL:
if OLD_CC is None:
del os.environ["CC"]
else:
os.environ["CC"] = OLD_CC
if "OpenCOLLADA" in targets:
patches = ["./patches/opencollada/pr622_and_disable_subdirs.patch"]
# This patch allows static libraries config on Unix,
# because the config is weird and doesn't allow non-shared libraries on Unix.
patches.append("./patches/opencollada/allow_static_libraries_config_on_unix.patch")
if "wasm" in flags:
# This is necessary for the WASM build, because recent versions of
# clang don't have the tr1:: namespace anymore. However, it breaks
@@ -902,6 +973,9 @@ if "OpenCOLLADA" in targets:
f"-DPCRE_PCREPOSIX_LIBRARY={DEPS_DIR}/install/pcre-{PCRE_VERSION}/lib/libpcreposix.{LIBRARY_EXT}",
f"-DPCRE_PCRE_LIBRARY={DEPS_DIR}/install/pcre-{PCRE_VERSION}/lib/libpcre.{LIBRARY_EXT}",
f"-DCMAKE_INSTALL_PREFIX={DEPS_DIR}/install/OpenCOLLADA/",
# OpenCOLLADA is ancient at this point and allows cmake 2.6+, which results in error in cmake 4.
f"-DCMAKE_POLICY_VERSION_MINIMUM=3.5",
*MAC_CROSS_COMPILE_INTEL_ARGS,
],
download_url="https://github.com/KhronosGroup/OpenCOLLADA.git",
download_name="OpenCOLLADA",
@@ -924,6 +998,13 @@ if "python" in targets and not USE_CURRENT_PYTHON_VERSION and "wasm" not in flag
PYTHON_CONFIGURE_ARGS: "list[str]" = []
if platform.system() == "Darwin":
PYTHON_CONFIGURE_ARGS = ["--enable-shared"]
open_ssl_prefix = run([brew, "--prefix", "openssl@3"]).strip()
# I'm not sure why, but if I do `"{open_ssl_prefix}"` (keep the quotes),
# autconf fails to find ssl.
PYTHON_CONFIGURE_ARGS.append(f"--with-openssl={open_ssl_prefix}")
if MAC_CROSS_COMPILE_INTEL:
PYTHON_CONFIGURE_ARGS.extend(["--with-universal-archs=intel-64", "--enable-universalsdk"])
for PYTHON_VERSION in PYTHON_VERSIONS:
try:
@@ -972,6 +1053,7 @@ if "boost" in targets:
"stage",
"-s",
"NO_BZIP2=1",
*MAC_CROSS_COMPILE_INTEL_BJAM_ARGS,
],
download_url=BOOST_LOCATION,
# don't remember what this is, but fail on 1.86
@@ -992,6 +1074,11 @@ if "cgal" in targets:
gmp_args.extend(("--disable-assembly", "--host", "none", "--enable-cxx"))
mpfr_args.extend(("--host", "none"))
OLD_CC = None
if MAC_CROSS_COMPILE_INTEL:
OLD_CC = os.environ.get("CC")
os.environ["CC"] = MAC_CROSS_COMPILE_INTEL_CC
build_dependency(
name=f"gmp-{GMP_VERSION}",
mode="autoconf",
@@ -1011,6 +1098,12 @@ if "cgal" in targets:
download_name=f"mpfr-{MPFR_VERSION}.tar.bz2",
)
if MAC_CROSS_COMPILE_INTEL:
if OLD_CC is None:
del os.environ["CC"]
else:
os.environ["CC"] = OLD_CC
build_dependency(
name=f"cgal-{CGAL_VERSION}",
mode="cmake",
@@ -1071,6 +1164,7 @@ if "zstd" in targets:
f"-DZSTD_BUILD_STATIC=ON",
f"-DZSTD_BUILD_SHARED=OFF",
f"-DCMAKE_INSTALL_LIBDIR=lib",
*MAC_CROSS_COMPILE_INTEL_ARGS,
],
cmake_dir="build/cmake/",
download_url="https://github.com/facebook/zstd",
@@ -1097,6 +1191,7 @@ if "rocksdb" in targets:
f"-DWITH_ZSTD=On",
f"-DPORTABLE=1",
f"-DCMAKE_PREFIX_PATH={DEPS_DIR}/install/zstd-{ZSTD_VERSION}",
*MAC_CROSS_COMPILE_INTEL_ARGS,
],
download_url="https://github.com/facebook/rocksdb",
download_name="rocksdb",
@@ -1124,16 +1219,17 @@ cmake_args = [
"-DBoost_NO_BOOST_CMAKE=On",
"-DADD_COMMIT_SHA=" + ("On" if ADD_COMMIT_SHA else "Off"),
"-DVERSION_OVERRIDE=" + ("On" if ADD_COMMIT_SHA else "Off"),
*MAC_CROSS_COMPILE_INTEL_ARGS,
]
"""Default CMake args to use for all CMake configs."""
cmake_args_prefix_path: list[str] = [
cmake_args_prefix_path: "list[str]" = [
f"{DEPS_DIR}/install/boost-{BOOST_VERSION}",
f"{DEPS_DIR}/install/eigen-install-{EIGEN_VERSION}",
f"{DEPS_DIR}/install/json-{JSON_VERSION}",
]
def get_cmake_args_prefix_path(additional_paths: Sequence[str] = ()) -> list[str]:
def get_cmake_args_prefix_path(additional_paths: "Sequence[str]" = ()) -> "list[str]":
args_prefix_path = cmake_args_prefix_path.copy()
args_prefix_path.extend(additional_paths)
prefix_path = ";".join(args_prefix_path)
@@ -0,0 +1,13 @@
diff --git a/OpenCOLLADAConfig.cmake.in b/OpenCOLLADAConfig.cmake.in
index d765b108..6800c2a7 100644
--- a/OpenCOLLADAConfig.cmake.in
+++ b/OpenCOLLADAConfig.cmake.in
@@ -31,7 +31,7 @@ set(OPENCOLLADA_INCLUDE_DIRS
include("@PACKAGE_OPENCOLLADA_INST_CMAKECONFIG@/OpenCOLLADATargets.cmake")
# Set the library variable
-if(UNIX)
+if(0)
set(OPENCOLLADA_LIBRARIES
ftoa_shared
buffer_shared
@@ -1210,6 +1210,7 @@ class PlanLevelDecorator(BaseDecorator):
rl = self.format_value(context, z)
text = "{}{}".format("" if z < 0 else "+", rl)
return text
self.draw_dimension_text(
context,
get_text,
@@ -411,7 +411,6 @@ class BIM_PT_object_material(Panel):
row.enabled = self.props.use_custom_offset
class BIM_UL_materials(UIList):
def draw_item(
self,