diff --git a/.github/workflows/bazel_build.yml b/.github/workflows/bazel_build.yml index 6db8eb5c11..023dcfece6 100644 --- a/.github/workflows/bazel_build.yml +++ b/.github/workflows/bazel_build.yml @@ -57,9 +57,6 @@ jobs: run: | bazelisk build //... bazelisk test //... - # Test without bzlmod - bazelisk build --noenable_bzlmod -- //... - bazelisk test --noenable_bzlmod -- //... build_and_test_windows: name: Windows Server 2022 build @@ -78,9 +75,6 @@ jobs: run: | bazelisk build //... bazelisk test //... - # Test without bzlmod - bazelisk build --noenable_bzlmod -- //... - bazelisk test --noenable_bzlmod -- //... build_and_test_macos: name: macOS 13 Bazel build @@ -99,9 +93,6 @@ jobs: run: | bazelisk build //... bazelisk test //... - # Test without bzlmod - bazelisk build --noenable_bzlmod -- //... - bazelisk test --noenable_bzlmod -- //... build_and_test_macos_M1: name: macOS 14 Bazel build @@ -120,6 +111,3 @@ jobs: run: | bazelisk build //... bazelisk test //... - # Test without bzlmod - bazelisk build --noenable_bzlmod -- //... - bazelisk test --noenable_bzlmod -- //... diff --git a/BUILD.bazel b/BUILD.bazel index 57699748cb..e233492d4b 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -257,7 +257,7 @@ cc_library( }), visibility = ["//visibility:public"], deps = [ - "@Imath", + "@imath//:Imath", "@libdeflate//:deflate", ], ) @@ -501,7 +501,7 @@ cc_library( deps = [ ":IlmThread", ":OpenEXRCore", - "@Imath", + "@imath//:Imath", ], ) diff --git a/MODULE.bazel b/MODULE.bazel index 7de42d5e64..8742e50fd6 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -7,6 +7,6 @@ module( ) bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "imath", version = "3.1.10", repo_name = "Imath") +bazel_dep(name = "imath", version = "3.1.11") bazel_dep(name = "libdeflate", version = "1.19") bazel_dep(name = "platforms", version = "0.0.8") diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 4c12980daf..b62f912e42 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -1,12 +1,4 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright Contributors to the OpenEXR Project. -workspace(name = "com_openexr") - -load("//:bazel/third_party/openexr_deps.bzl", "openexr_deps") - -openexr_deps() - -load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") - -bazel_skylib_workspace() +# WORKSPACE marker file needed by Bazel diff --git a/bazel/third_party/Imath.BUILD b/bazel/third_party/Imath.BUILD deleted file mode 100644 index 52b1853b82..0000000000 --- a/bazel/third_party/Imath.BUILD +++ /dev/null @@ -1,76 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright (c) Contributors to the OpenEXR Project. - -load("@bazel_skylib//rules:expand_template.bzl", "expand_template") - -expand_template( - name = "ImathConfig", - out = "src/Imath/ImathConfig.h", - substitutions = { - "@IMATH_INTERNAL_NAMESPACE@": "Imath_3_1", - "@IMATH_LIB_VERSION@": "3.1.9", - "@IMATH_NAMESPACE_CUSTOM@": "0", - "@IMATH_NAMESPACE@": "Imath", - "@IMATH_PACKAGE_NAME@": "Imath 3.1.9", - "@Imath_VERSION_MAJOR@": "3", - "@Imath_VERSION_MINOR@": "1", - "@Imath_VERSION_PATCH@": "9", - "@IMATH_VERSION@": "3.1.9", - "#cmakedefine IMATH_HALF_USE_LOOKUP_TABLE": "#define IMATH_HALF_USE_LOOKUP_TABLE", - "#cmakedefine IMATH_ENABLE_API_VISIBILITY": "#define IMATH_ENABLE_API_VISIBILITY", - "#cmakedefine IMATH_HAVE_LARGE_STACK": "/* #undef IMATH_HAVE_LARGE_STACK */", - "#cmakedefine01 IMATH_USE_NOEXCEPT": "#define IMATH_USE_NOEXCEPT 1", - }, - template = "config/ImathConfig.h.in", -) - -cc_library( - name = "Imath", - srcs = [ - "src/Imath/ImathColorAlgo.cpp", - "src/Imath/ImathFun.cpp", - "src/Imath/ImathMatrixAlgo.cpp", - "src/Imath/ImathRandom.cpp", - "src/Imath/half.cpp", - "src/Imath/toFloat.h", - ], - hdrs = [ - "src/Imath/ImathBox.h", - "src/Imath/ImathBoxAlgo.h", - "src/Imath/ImathColor.h", - "src/Imath/ImathColorAlgo.h", - "src/Imath/ImathConfig.h", - "src/Imath/ImathEuler.h", - "src/Imath/ImathExport.h", - "src/Imath/ImathForward.h", - "src/Imath/ImathFrame.h", - "src/Imath/ImathFrustum.h", - "src/Imath/ImathFrustumTest.h", - "src/Imath/ImathFun.h", - "src/Imath/ImathGL.h", - "src/Imath/ImathGLU.h", - "src/Imath/ImathInt64.h", - "src/Imath/ImathInterval.h", - "src/Imath/ImathLine.h", - "src/Imath/ImathLineAlgo.h", - "src/Imath/ImathMath.h", - "src/Imath/ImathMatrix.h", - "src/Imath/ImathMatrixAlgo.h", - "src/Imath/ImathNamespace.h", - "src/Imath/ImathPlane.h", - "src/Imath/ImathPlatform.h", - "src/Imath/ImathQuat.h", - "src/Imath/ImathRandom.h", - "src/Imath/ImathRoots.h", - "src/Imath/ImathShear.h", - "src/Imath/ImathSphere.h", - "src/Imath/ImathTypeTraits.h", - "src/Imath/ImathVec.h", - "src/Imath/ImathVecAlgo.h", - "src/Imath/half.h", - "src/Imath/halfFunction.h", - "src/Imath/halfLimits.h", - ], - includes = ["src/Imath"], - visibility = ["//visibility:public"], -) diff --git a/bazel/third_party/libdeflate.BUILD b/bazel/third_party/libdeflate.BUILD deleted file mode 100644 index 0159b57d9b..0000000000 --- a/bazel/third_party/libdeflate.BUILD +++ /dev/null @@ -1,55 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright (c) Contributors to the OpenEXR Project. - -cc_library( - name = "deflate", - srcs = [ - "common_defs.h", - "lib/adler32.c", - "lib/adler32_vec_template.h", - "lib/arm/adler32_impl.h", - "lib/arm/cpu_features.c", - "lib/arm/cpu_features.h", - "lib/arm/crc32_impl.h", - "lib/arm/crc32_pmull_helpers.h", - "lib/arm/crc32_pmull_wide.h", - "lib/arm/matchfinder_impl.h", - "lib/bt_matchfinder.h", - "lib/cpu_features_common.h", - "lib/crc32.c", - "lib/crc32_multipliers.h", - "lib/crc32_tables.h", - "lib/decompress_template.h", - "lib/deflate_compress.c", - "lib/deflate_compress.h", - "lib/deflate_constants.h", - "lib/deflate_decompress.c", - "lib/gzip_compress.c", - "lib/gzip_constants.h", - "lib/gzip_decompress.c", - "lib/hc_matchfinder.h", - "lib/ht_matchfinder.h", - "lib/lib_common.h", - "lib/matchfinder_common.h", - "lib/utils.c", - "lib/x86/adler32_impl.h", - "lib/x86/cpu_features.c", - "lib/x86/cpu_features.h", - "lib/x86/crc32_impl.h", - "lib/x86/crc32_pclmul_template.h", - "lib/x86/decompress_impl.h", - "lib/x86/matchfinder_impl.h", - "lib/zlib_compress.c", - "lib/zlib_constants.h", - "lib/zlib_decompress.c", - ], - hdrs = ["libdeflate.h"], - includes = ["."], - visibility = ["//visibility:public"], -) - -alias( - name = "libdeflate", - actual = ":deflate", - visibility = ["//visibility:public"], -) diff --git a/bazel/third_party/openexr_deps.bzl b/bazel/third_party/openexr_deps.bzl deleted file mode 100644 index 4b8d99e4e3..0000000000 --- a/bazel/third_party/openexr_deps.bzl +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright (c) Contributors to the OpenEXR Project. - -"""External dependencies for openexr.""" - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") - -def openexr_deps(): - """Fetches dependencies (libdeflate and Imath) of OpenEXR and Skylib for header generation.""" - - maybe( - http_archive, - name = "libdeflate", - build_file = "@com_openexr//:bazel/third_party/libdeflate.BUILD", - sha256 = "27bf62d71cd64728ff43a9feb92f2ac2f2bf748986d856133cc1e51992428c25", - strip_prefix = "libdeflate-1.19", - urls = ["https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.19.tar.gz"], - ) - - maybe( - http_archive, - name = "Imath", - build_file = "@com_openexr//:bazel/third_party/Imath.BUILD", - strip_prefix = "Imath-3.1.10", - sha256 = "f2943e86bfb694e216c60b9a169e5356f8a90f18fbd34d7b6e3450be14f60b10", - urls = ["https://github.com/AcademySoftwareFoundation/Imath/archive/refs/tags/v3.1.10.tar.gz"], - ) - - maybe( - http_archive, - name = "bazel_skylib", - sha256 = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz", - "https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz", - ], - )