Skip to content

Commit

Permalink
Add public visiblity for ImathConfig.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Vertexwahn committed May 6, 2024
1 parent 0864be7 commit 09c60ea
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/imath/3.1.11.bcr.1/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module(
name = "imath",
version = "3.1.11.bcr.1",
compatibility_level = 1,
)

bazel_dep(name = "bazel_skylib", version = "1.6.1")
86 changes: 86 additions & 0 deletions modules/imath/3.1.11.bcr.1/patches/add_build_file.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
--- /dev/null
+++ BUILD.bazel
@@ -0,0 +1,83 @@
+# 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.11",
+ "@IMATH_NAMESPACE_CUSTOM@": "0",
+ "@IMATH_NAMESPACE@": "Imath",
+ "@IMATH_PACKAGE_NAME@": "Imath 3.1.11",
+ "@Imath_VERSION_MAJOR@": "3",
+ "@Imath_VERSION_MINOR@": "1",
+ "@Imath_VERSION_PATCH@": "11",
+ "@IMATH_VERSION@": "3.1.11",
+ "#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",
+ visibility = ["//visibility:public"],
+)
+
+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"],
+)
+
+alias(
+ name = "imath",
+ actual = ":Imath",
+ visibility = ["//visibility:public"],
+)
10 changes: 10 additions & 0 deletions modules/imath/3.1.11.bcr.1/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- MODULE.bazel
+++ MODULE.bazel
@@ -0,0 +1,7 @@
+module(
+ name = "imath",
+ version = "3.1.11.bcr.1",
+ compatibility_level = 1,
+)
+
+bazel_dep(name = "bazel_skylib", version = "1.6.1")
17 changes: 17 additions & 0 deletions modules/imath/3.1.11.bcr.1/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
matrix:
bazel: [6.x, 7.x]
platform:
- debian10
- debian11
- macos
- macos_arm64
- ubuntu2004
- ubuntu2204
- windows
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- '@imath//:Imath'
10 changes: 10 additions & 0 deletions modules/imath/3.1.11.bcr.1/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"integrity": "sha256-kFeElYXkm4uFq+fMHnbiKWOwG/3Dttg+rJDEmc12AGM=",
"patch_strip": 0,
"patches": {
"add_build_file.patch": "sha256-8ofeytDvdjCQxeF1vL53CUUNCvHLr/n9bbs3SeO2pgc=",
"module_dot_bazel.patch": "sha256-s548ZU95xPm7xhwAIf2/4oYwdS19ihrj3Oc+T0zignY="
},
"strip_prefix": "Imath-3.1.11",
"url": "https://github.com/AcademySoftwareFoundation/Imath/releases/download/v3.1.11/Imath-3.1.11.tar.gz"
}

0 comments on commit 09c60ea

Please sign in to comment.