A few fixes and started working on docs.

This commit is contained in:
Stephan Menzel
2025-07-21 11:44:07 +02:00
parent 2b12ddd653
commit 4f88221983
13 changed files with 203 additions and 63 deletions
+3 -3
View File
@@ -13,7 +13,7 @@ from common.git_helpers import clone_git_tag
from package.package_info import get_package_info
def build_abseil(prefix: Path | str, sbom: dict):
def build_abseil_cpp(prefix: Path | str, sbom: dict) -> Path:
print_banner("Building Abseil")
@@ -33,8 +33,8 @@ def build_abseil(prefix: Path | str, sbom: dict):
# Abseil LTS doesn't build with CMake>=3.30 due to some imported GTest target.
# Gotta patch that shit until this situation is resolved. https://github.com/abseil/abseil-cpp/issues/690
with pushd(abseil_dir):
subprocess.run(["git", "apply", "..\\..\\gtest_fix.patch"])
# with pushd(abseil_dir):
# subprocess.run(["git", "apply", "..\\..\\gtest_fix.patch"])
install_dir = cmake_build_install(abseil_dir, package_info, cmake_args=abseil_cmake_args)
write_package_version_batch(package_info.version)
+1 -1
View File
@@ -11,7 +11,7 @@ from common.git_helpers import clone_git_tag
from package.package_info import get_package_info
def build_cares(prefix: Path | str, sbom: dict):
def build_c_ares(prefix: Path, sbom: dict) -> Path:
print_banner("Building C-Ares (gRPC Dependency)")
+18 -18
View File
@@ -6,13 +6,13 @@ from pathlib import Path
from build_functions.build_utils import print_banner
from common.azure import write_package_version_batch
from common.cmake import cmake_build_install
from common.cmake import cmake_build_install, assemble_prefix_path
from common.git_helpers import clone_git_tag
import common.settings
from package.package_info import get_package_info
def build_grpc(prefix: Path | str, sbom: dict):
def build_grpc(prefix: Path, sbom: dict) -> Path:
print_banner("Building gRPC")
@@ -24,12 +24,16 @@ def build_grpc(prefix: Path | str, sbom: dict):
package_info.add_to_sbom(sbom)
deps = [
package_info.dependency("zlib"),
package_info.dependency("re2"),
package_info.dependency("openssl"),
package_info.dependency("abseil-cpp"),
package_info.dependency("c-ares"),
package_info.dependency("protobuf")
]
zlib_install_path = package_info.dependency_path("zlib")
re2_install_path = package_info.dependency_path("re2")
openssl_install_path = package_info.dependency_path("openssl")
abseil_install_path = package_info.dependency_path("abseil-cpp")
cares_install_path = package_info.dependency_path("c-ares")
protobuf_install_path = package_info.dependency_path("protobuf")
grpc_cmake_args = [
("BUILD_SHARED_LIBS:BOOL", "OFF"),
@@ -45,27 +49,23 @@ def build_grpc(prefix: Path | str, sbom: dict):
# ("gRPC_BUILD_MSVC_MP_COUNT:STRING", "1"),
# ("gRPC_DOWNLOAD_ARCHIVES:BOOL", "ON"),
("gRPC_ABSL_PROVIDER:STRING", "package"),
("absl_DIR:PATH", str(abseil_install_path / "lib" / "cmake" / "absl")),
("gRPC_CARES_PROVIDER:STRING", "package"),
("c-ares_DIR:PATH", str(cares_install_path / "lib" / "cmake" / "c-ares")),
("gRPC_PROTOBUF_PROVIDER:STRING", "package"),
("Protobuf_DIR:PATH", str(protobuf_install_path / "cmake")),
("utf8_range_DIR:PATH", str(protobuf_install_path / "lib" / "cmake" / "utf8_range")),
("gRPC_SSL_PROVIDER", "package"),
("OPENSSL_ROOT_DIR:PATH", openssl_install_path),
("gRPC_RE2_PROVIDER", "package"),
("gRPC_ZLIB_PROVIDER:STRING", "package"),
("CMAKE_PREFIX_PATH:STRING", assemble_prefix_path(deps)),
# ("OPENSSL_ROOT_DIR:PATH", openssl_install_path),
("OPENSSL_USE_STATIC_LIBS:BOOL", "ON"),
("gRPC_RE2_PROVIDER", "package"),
("re2_DIR:PATH", str(re2_install_path / "lib" / "cmake" / "re2")),
("gRPC_ZLIB_PROVIDER:STRING", "package"),
("ZLIB_ROOT:PATH", str(zlib_install_path)),
("ZLIB_USE_STATIC_LIBS:BOOL", "ON"), # doesn't appear to do its job
("ZLIB_LIBRARY_RELEASE:FILEPATH", str(zlib_install_path / "lib" / common.settings.zlib_static_lib_name)),
("ZLIB_LIBRARY_DEBUG:FILEPATH", str(zlib_install_path / "lib" / common.settings.zlib_static_lib_name))
]
grpc_dir = clone_git_tag(package_info, recursive=True)
grpc_dir = clone_git_tag(package_info, recursive=False)
install_dir = cmake_build_install(grpc_dir, package_info, cmake_args=grpc_cmake_args)
write_package_version_batch(package_info.version)
return install_dir
+2 -2
View File
@@ -14,7 +14,7 @@ import common.settings
from package.package_info import get_package_info
def build_openssl(prefix: Path | str, sbom: dict):
def build_openssl(prefix: Path, sbom: dict):
print_banner("Building OpenSSL")
@@ -30,7 +30,7 @@ def build_openssl(prefix: Path | str, sbom: dict):
with pushd(openssl_dir):
install_prefix = get_local_prefix(prefix)
install_prefix = package_info.install_location()
if not common.settings.rebuild and Path("built_and_installed.txt").exists():
file_and_console_log("already built, exiting")
+4 -3
View File
@@ -6,12 +6,13 @@ from pathlib import Path
from build_functions.build_utils import print_banner
from common.azure import write_package_version_batch
from common.cmake import cmake_build_install, assemble_prefix_path
from common.cmake import cmake_build_install, assemble_prefix_path, CMakeBuildType
import common.settings
from common.git_helpers import clone_git_tag
from common.settings import temporarily_set_shared
from package.package_info import get_package_info
def build_openusd(prefix: Path | str, sbom: dict):
print_banner("Building OpenUSD")
@@ -47,11 +48,11 @@ def build_openusd(prefix: Path | str, sbom: dict):
("CMAKE_PREFIX_PATH:STRING", assemble_prefix_path(deps)),
("ZLIB_ROOT:PATH", str(zlib_install_path.as_posix())),
("ZLIB_USE_STATIC_LIBS:BOOL", "ON"), # doesn't appear to do its job
("ZLIB_USE_STATIC_LIBS:BOOL", "ON"),
("ZLIB_LIBRARY_RELEASE:FILEPATH", str(zlib_install_path / "lib" / common.settings.zlib_static_lib_name)),
("ZLIB_LIBRARY_DEBUG:FILEPATH", str(zlib_install_path / "lib" / common.settings.zlib_static_lib_name))
]
src_dir = clone_git_tag(package_info, recursive=False)
install_dir = cmake_build_install(src_dir, package_info, cmake_args=cmake_args)
install_dir = cmake_build_install(src_dir, package_info, cmake_args=cmake_args, build_type=CMakeBuildType.RELWITHDEBINFO)
write_package_version_batch(package_info.version)
return install_dir
+1 -1
View File
@@ -11,7 +11,7 @@ from common.git_helpers import clone_git_tag
from package.package_info import get_package_info
def build_re2(prefix: Path | str, sbom: dict):
def build_re2(prefix: Path | str, sbom: dict) -> None:
print_banner("Building re2")