diff --git a/.github/workflows/docker-builds.yml b/.github/workflows/docker-builds.yml index 1af25dff..bc882709 100644 --- a/.github/workflows/docker-builds.yml +++ b/.github/workflows/docker-builds.yml @@ -14,7 +14,7 @@ on: jobs: build: - runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }} + runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }} env: DOCKER_CLI_EXPERIMENTAL: enabled DOCKER_BUILDKIT: '1' @@ -24,22 +24,24 @@ jobs: fail-fast: false matrix: include: - - group: vfx-2024 - name: vfx-2024 - common_version: 4-clang16 - common_version_noclang: 4 - version: 2024-clang16 - version_noclang: 2024 + - group: vfx-2025 + name: vfx-2025 + common_version: 5-clang18 + common_version_noclang: 5 + version: 2025-clang18 + version_noclang: 2025 test: "" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Activate Docker buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 + with: + driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=10485760 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 with: python-version: 3.9 cache: 'pipenv' @@ -50,19 +52,29 @@ jobs: - name: Free up disk space run: | - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get remove -y '^cpp.*' - sudo apt-get remove -y '^g\+\+.*' - sudo apt-get remove -y '^clang.*' - sudo apt-get remove -y '^gfortran.*' - sudo apt-get remove -y google-chrome-stable firefox powershell mono-devel monodoc-http + df -h + sudo apt-get remove -y '^llvm-.*' 'php.*' '^cpp.*' '^g\+\+.*' '^clang.*' '^gfortran.*' \ + '^dotnet-.*' '^libmono-.*' '^mono-.*' monodoc-http '^r-.*' '^ruby.*' \ + ant ant-optional aria2 azure-cli firefox google-chrome-stable microsoft-edge-stable powershell \ + imagemagick '^imagemagick-.*' '^libmagickcore-.*' '^libmagickwand-.*' kubectl mercurial mercurial-common subversion sudo apt-get autoremove -y sudo apt-get clean - rm -rf /usr/share/dotnet/ + sudo rm -rf \ + /usr/share/dotnet/ \ + /usr/local/lib/android \ + /opt/ghc \ + /usr/local/share/powershell \ + /usr/share/swift \ + /usr/local/.ghcup \ + /usr/local/aws-cli \ + /usr/local/aws-sam-cli \ + /usr/local/julia* \ + /usr/lib/jvm || true + sudo docker system prune -a df -h + dpkg -l - - name: Build Ninja (Conan) + - name: Build Ninja and CMake (Conan) run: | set -ex pipenv run aswfdocker \ @@ -76,7 +88,8 @@ jobs: --version ${{ matrix.common_version }} \ --use-conan \ --build-missing \ - --target ninja + --target ninja \ + --target cmake - name: Build Clang (Conan) run: | @@ -94,7 +107,7 @@ jobs: --build-missing \ --target clang - - name: build ci-common Docker Image for downstream images + - name: Build ci-common Docker Image for downstream images run: | pipenv run aswfdocker \ --repo-uri $GITHUB_REPOSITORY \ @@ -106,7 +119,50 @@ jobs: --version ${{ matrix.common_version }}\ --push NO - - name: Build base1 Conan packages for base image + - name: Build base1 system wrapper and level 1 Conan packages + run: | + set -ex + pipenv run aswfdocker \ + --repo-uri $GITHUB_REPOSITORY \ + --source-branch $GITHUB_REF \ + --verbose \ + build \ + --ci-image-type PACKAGE \ + --group base1-wrappers \ + --group base1-1 \ + --version ${{ matrix.version_noclang }} \ + --use-conan \ + --build-missing + + - name: Build base1 level 2 Conan packages + run: | + set -ex + pipenv run aswfdocker \ + --repo-uri $GITHUB_REPOSITORY \ + --source-branch $GITHUB_REF \ + --verbose \ + build \ + --ci-image-type PACKAGE \ + --group base1-2 \ + --version ${{ matrix.version_noclang }} \ + --use-conan \ + --build-missing + + - name: Build base1 level 3 Conan packages + run: | + set -ex + pipenv run aswfdocker \ + --repo-uri $GITHUB_REPOSITORY \ + --source-branch $GITHUB_REF \ + --verbose \ + build \ + --ci-image-type PACKAGE \ + --group base1-3 \ + --version ${{ matrix.version_noclang }} \ + --use-conan \ + --build-missing + + - name: Build base2 system wrapper and dependency Conan packages for ci-baseqt image run: | set -ex pipenv run aswfdocker \ @@ -115,12 +171,13 @@ jobs: --verbose \ build \ --ci-image-type PACKAGE \ - --group base1 \ + --group base2-wrappers \ + --group base2-1 --version ${{ matrix.version_noclang }} \ --use-conan \ --build-missing - - name: Build base2 Conan packages (Qt) for base image + - name: Build base2 level 2 Conan packages (Qt) for ci-baseqt image run: | set -ex pipenv run aswfdocker \ @@ -129,7 +186,7 @@ jobs: --verbose \ build \ --ci-image-type PACKAGE \ - --group base2 \ + --group base2-2 \ --version ${{ matrix.version_noclang }} \ --use-conan \ --build-missing @@ -148,7 +205,7 @@ jobs: --use-conan \ --build-missing - - name: Build base image + - name: Build base and baseqt images run: | set -ex pipenv run aswfdocker \ @@ -161,7 +218,8 @@ jobs: --version ${{ matrix.version }} \ --push NO - - run: | + - name: Build vfx1 system wrapper and level 1 Conan packages + run: | set -ex pipenv run aswfdocker \ --repo-uri $GITHUB_REPOSITORY \ @@ -169,36 +227,61 @@ jobs: --verbose \ build \ --ci-image-type PACKAGE \ - --group vfx1 \ - --target imath \ + --group vfx1-wrappers \ + --group vfx1-1 \ --version ${{ matrix.version_noclang }} \ --use-conan \ --build-missing \ --push NO + + - name: Build vfx1 level 2 Conan packages + run: | + set -ex pipenv run aswfdocker \ --repo-uri $GITHUB_REPOSITORY \ --source-branch $GITHUB_REF \ --verbose \ build \ --ci-image-type PACKAGE \ - --group vfx1 \ - --target openexr \ + --group vfx1-2 \ --version ${{ matrix.version_noclang }} \ --use-conan \ --build-missing \ --push NO + + - name: Build vfx1 level 3 Conan packages + run: | + set -ex pipenv run aswfdocker \ --repo-uri $GITHUB_REPOSITORY \ --source-branch $GITHUB_REF \ --verbose \ build \ --ci-image-type PACKAGE \ - --group vfx1 \ - --group vfx2 \ + --group vfx1-3 \ + --version ${{ matrix.version_noclang }} \ + --use-conan \ + --build-missing \ + --push NO + + - name: Build vfx1 level 4 Conan packages + run: | + set -ex + pipenv run aswfdocker \ + --repo-uri $GITHUB_REPOSITORY \ + --source-branch $GITHUB_REF \ + --verbose \ + build \ + --ci-image-type PACKAGE \ + --group vfx1-4 \ --version ${{ matrix.version_noclang }} \ --use-conan \ --build-missing \ --push NO + + - name: Build vfx1 level 5 non-Conan packages + run: | + set -ex pipenv run aswfdocker \ --repo-uri $GITHUB_REPOSITORY \ --source-branch $GITHUB_REF \ @@ -206,12 +289,41 @@ jobs: build \ --ci-image-type PACKAGE \ --group vfx1 \ + --version ${{ matrix.version_noclang }} \ + --build-missing \ + --push NO + + - name: Build vfx2 level 1 Conan packages + run: | + set -ex + pipenv run aswfdocker \ + --repo-uri $GITHUB_REPOSITORY \ + --source-branch $GITHUB_REF \ + --verbose \ + build \ + --ci-image-type PACKAGE \ + --group vfx2-1 \ + --version ${{ matrix.version_noclang }} \ + --use-conan \ + --build-missing \ + --push NO + + - name: Build vfx2 level 2 non-Conan packages + run: | + set -ex + pipenv run aswfdocker \ + --repo-uri $GITHUB_REPOSITORY \ + --source-branch $GITHUB_REF \ + --verbose \ + build \ + --ci-image-type PACKAGE \ --group vfx2 \ --version ${{ matrix.version_noclang }} \ + --build-missing \ --push NO - name: Build vfx1/vfx2 packages - - run: | + - name: Build vfx1 / vfx2 images + run: | set -ex pipenv run aswfdocker \ --repo-uri $GITHUB_REPOSITORY \ @@ -223,9 +335,9 @@ jobs: --group vfx2 \ --version ${{ matrix.version_noclang }} \ --push NO - name: Build vfx1/vfx2 images - - run: | + - name: Build vfx images + run: | set -ex pipenv run aswfdocker \ --repo-uri $GITHUB_REPOSITORY \ @@ -236,7 +348,6 @@ jobs: --group vfx3 \ --version ${{ matrix.version }} \ --push NO - name: Build vfx3 image - run: | set -ex diff --git a/.github/workflows/python-sonar.yml b/.github/workflows/python-sonar.yml index 58c6faca..b0df1b71 100644 --- a/.github/workflows/python-sonar.yml +++ b/.github/workflows/python-sonar.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.9 cache: 'pipenv' diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 0f4186ad..df5395a4 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.9 cache: 'pipenv' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ebef02d0..a796a084 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: jobs: release: - runs-on: ubuntu-20.04-8c-32g-300h + runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }} env: DOCKER_CLI_EXPERIMENTAL: enabled DOCKER_BUILDKIT: '1' @@ -31,9 +31,11 @@ jobs: - name: Activate Docker buildx uses: docker/setup-buildx-action@v3 + with: + driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=10485760 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.9 cache: 'pipenv' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f868453e..f03ea7df 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,8 +2,10 @@ repos: - repo: https://github.com/ambv/black rev: 22.12.0 hooks: + # Don't reformat vendored Conan recipes - id: black language_version: python3.9 + exclude: packages/conan/recipes/ - repo: local hooks: - id: pytest diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f86b6c8..bd2d6e76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,79 @@ All notable changes to this project will be documented in this file. +# 2025-04-08 + +- 2025.0 images + - TBB transition to OneAPI remains to be done +- ASWF project versions + - Imath: 3.1.2 + - MaterialX: 1.39.3 + - OCIO: 2.4.2 + - OIIO: 3.0.5.0 + - OpenEXR: 3.3.3 + - OpenVDB: 12.0.0 + - OSL: 1.14.5.0 + - OTIO: 0.17.0 +- VFX Platform component versions + - Boost: 1.85.0 + - Python: 3.11.11 + - Numpy: 1.26.4 + - PySide: 6.5.4 + - Qt: 6.5.4 + - TBB: 2020_u3 +- "ASWF adjacent" component versions + - Alembic: 1.8.8 + - OpenSubDiv: 3.6.0 + - Partio: 1.17.3 + - Ptex: 2.4.3 + - USD: 25.02a + commit eae7e67 for MaterialX 1.39.3 compatibility +- Generic components + - b2: 5.2.1 + - blosc: 1.21.6 + - bzip2: 1.0.8 + - cppunit: 1.15.1 + - expat: 2.6.4 + - fmt: 11.1.4 + - freetype: 2.13.2 + - glew: 2.2.0 + - glfw: 3.4 + - gtest: 1.15.2 + - hdf5: 1.8.23 + - highway: 1.2.0 + - lcms: 2.16 + - libbacktrace: cci.20210118 + - libdeflate: 1.23 + - libiconv: 1.17 + - libjpeg_turbo: 3.0.4 + - libjxl: 0.11.1 + - libuhdr: 1.4.0 + - libwebp: 1.5.0 + - libxcrypt: 4.4.36 + - log4cplus: 2.1.2 + - lz4: 1.10.0 + - md4c: 0.4.8 + - minizip_ng: 4.0.8 + - pugixml: 1.14 + - pybind11: 2.13.6 + - pystring: 1.1.4 + - snappy: 1.1.10 + - tsl-robin-map: 1.3.0 + - yaml-cpp: 0.8.0 + - zlib: 1.3.1 + - zstd: 1.5.6 +- common image components + - Rocky Linux 8.10 + - CUDA 12.6.1 + - OptiX 7.3 to 8.1 + - Conan 2.14.0 + - CMake 3.31.6 + - Ninja 1.12.1 + - LLVM 18.1.8 and 19.1.1 +- transition to Conan 2 + - update most Conan recipes from Conan Center Index, minimize differences from upstream + - create empty wrapper packages to satisfy recipe requires() from OS image packages + - build replacment packages to satisfy newer requires() than what Rocky 8 has (mostly compression and media libraries) + # 2024-10-05 - 2024.2 images diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6cca7055..160f104d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -272,7 +272,7 @@ Any non-trivial change to the Docker images should be followed by incrementing the corresponding image version. We use MAJOR.MINOR versioning for all images. Versioning is further explained in the [README](README.md#version) file. -### Building Conan Packages +## Building Conan Packages This repository contains 2 ways of building packages, Docker packages (`aswf/ci-package-*` images) and Conan packages. @@ -283,7 +283,7 @@ The [Conan](https://conan.io) [Reference Documentation](https://docs.conan.io/en The AcademySoftwareFoundation has an [Artifactory](https://linuxfoundation.jfrog.io/ui/packages) server which hosts all `aswf` Conan packages. Credentials of the artifactory server are maintained by the Linux Foundation and are not known by the ASWF crew, new packages get uploaded via GitHub organisation secrets. -#### Getting started +### Getting started Use the existing recipes as an example, and borrow from the MIT-licensed [Conan Center Index](https://github.com/conan-io/conan-center-index/tree/master/recipes). @@ -293,22 +293,174 @@ Follow the great instructions there: but ignore the `config.yml` instructions as the aswfdocker `versions.yaml` already takes care of listing all the maintained package versions. -Then ensure the ASWF-specific settings are added in the `conanfile.py` such as `python`. +Then ensure the ASWF-specific settings are added in the `conanfile.py` such as `python`. This project attempts to minimize local changes to the recipes which originate in the Conan Center Index. Local changes may be marked with a `# ASWF` comment. For simple recipes, the required changes may be as minimal as: + +- adding a line to the `layout()` method to adhere to the Enterprise Linux convention of storing 64 bit libraries in the `lib64` directory rather than Conan's default `lib`: +``` + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: we want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] +``` + +- adding a `self.name` level to the `copy()` in the `package()` method: when Conan packages are "installed" in the CI build images, they are all flattened together into `/usr/local/` and without this change the license files for all the packages end up in the same directory and can overwrite each other: +``` + def package(self): + # ASWF: separate licenses from multiple package installs + copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) +``` + +- update the calls to `rmdir()` in the `package()` method to point to `lib64`, and +comment out the call that removes the `cmake` directory: we want to be able to use +these Conan packages outside the context of Conan, and thus want to retain the +generated `.cmake` files: +``` + # ASWF: keep cmake files, delete pkgconfig files in lib64 + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) +``` + +To help minimize changes to the standard Conan recipes, Conan `profiles` are used to +override specific package versions in the recipes. For instance in +[packages/conan/settings/profiles_aswf/vfx2025](https://github.com/AcademySoftwareFoundation/aswf-docker/blob/main/packages/conan/settings/profiles_aswf/vfx2025): + +``` +include(ci_common5) + +[settings] +[options] +# Build everything as shared libs by default +*:shared=True +[tool_requires] +[replace_requires] +b2/*: b2/5.2.1@aswf/vfx2025 +boost/*: boost/1.85.0@aswf/vfx2025 +brotli/*: brotli/system@aswf/vfx2025 +bzip2/*: bzip2/1.0.8@aswf/vfx2025 +dbus/*: dbus/system@aswf/vfx2025 +... +``` + +Unfortunately there is duplication between the version information in + [`versions.yaml`](https://github.com/AcademySoftwareFoundation/aswf-docker/blob/main/python/aswfdocker/data/versions.yaml) and the Conan profiles: a future update + will auto generate the Conan profiles from `versions.yaml` which should be the + source of truth. + +When a sufficiently recent package is provided by the underlying OS distribution, packages labeled as version `system` are created which are thin wrappers around system installed components, and the Conan profile is used to remap `requires()` +call to specific versions to these wrapper packages. Confusingly some will have an actual version number since some dependent packages check for acceptable version ranges. A better versioning scheme would be desirable for these wrapper packages. To test locally, use the `aswfdocker build` command with the `--use-conan` argument. The `--keep-source` and `--keep-build` can help when iterating on the build recipe to avoid re-downloading the source, and even keep the previous build artifact. All regular aswfdocker commands and options work the same with conan or docker packages. -#### Docker-only Packages +### Docker-only Packages If a package has no Conan recipe folder its conan package will be skipped at release time. -#### Conan-only Packages +### Conan-only Packages If a package can only be built using Conan its name must be added to the `conan_only` list at the end of the `versions.yaml` file, see `gtest` as an example. +### Peeking into the Conan cache + +When building a Conan package, `aswfdocker build --use-conan` uses [common/packages/Dockerfile](https://github.com/AcademySoftwareFoundation/aswf-docker/blob/main/packages/common/Dockerfile) which uses a +[Docker Cache Mount](https://docs.docker.com/build/cache/optimize/#use-cache-mounts) to store the persistent +cache of local Conan package builds (similarly for the [ccache](https://ccache.dev/) persistent cache): + +``` +RUN --mount=type=cache,target=${CONAN_USER_HOME}/d \ + --mount=type=cache,target=${CCACHE_DIR} \ + --mount=type=bind,rw,target=${CONAN_USER_HOME}/.conan2,source=packages/conan/settings \ + --mount=type=bind,rw,target=${CONAN_USER_HOME}/recipes,source=packages/conan/recipes \ + conan create \ + ... +``` + +During development it can be convenient to peek into the results of a Conan package build. You can use: + +``` +$ docker buildx du --verbose --filter Type=exec.cachemount +ID: ltu9ddgwws6cblhemncn9uzaj +Created at: 2025-03-31 03:09:21.67231777 +0000 UTC +Mutable: true +Reclaimable: true +Shared: false +Size: 93.56GB +Description: cached mount /opt/conan_home/d from exec /bin/sh -c conan create ${ASWF_CONAN_KEEP_SOURCE} ${ASWF_CONAN_KEEP_BUILD} ${ASWF_CONAN_BUILD_MISSING} --profile:all ${CONAN_USER_HOME}/.conan2/profiles_${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} --name ${ASWF_PKG_NAME} --version ${ASWF_PKG_VERSION} --user ${ASWF_PKG_ORG} --channel ${ASWF_CONAN_CHANNEL} ${CONAN_USER_HOME}/recipes/${ASWF_PKG_NAME} with id "//opt/conan_home/d" +Usage count: 159 +Last used: 14 minutes ago +Type: exec.cachemount +``` + +to retrieve the volume ID for the cache mount, which is then accessible at a path similar to: + +``` +/var/lib/docker/overlay2/ltu9ddgwws6cblhemncn9uzaj/diff +``` + +At this level you will find hashed directories for each build of each Conan package (the first 5 letters of the package named are used for those hashed directory names, +not great when so many package names start with "open"...) which contain unpacked source for the package. One level deeper in: + +``` +/var/lib/docker/overlay2/ltu9ddgwws6cblhemncn9uzaj/diff/b +``` + +you will find the build and packaging directories, and in particular for an Qt build (say): + +``` +$ ls /var/lib/docker/overlay2/ltu9ddgwws6cblhemncn9uzaj/diff/b/qted742db53b77e +b d p +``` + +where the `b` directory contains the output of the build and the `p` directory will contain the installable Conan package: + +``` +$ ls /var/lib/docker/overlay2/ltu9ddgwws6cblhemncn9uzaj/diff/b/qted742db53b77e/p +bin conaninfo.txt conanmanifest.txt doc include lib64 libexec licenses metatypes mkspecs modules phrasebooks plugins qml resources translations +``` + +Be careful when trying to modify this cache directory directly, as it is managed by +Conan and tracked in a [SQLite](https://www.sqlite.org/) database. +The [`conan cache`](https://docs.conan.io/2/reference/commands/cache.html) command +should be used to explicitly manipulate the cache. + +### Debugging CMake in Conan issues + +Most of the Conan packages use CMake to configure and build: debugging "CMake in Conan" can sometimes be tricky, one approach is to +look for the `build()` method in the package's `conanfile.py` which minimally looks like: + +``` + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() +``` + +and enable tracing / verbose in the `configure()` and `build()` calls: + +``` + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure(cli_args=["--trace"]) + cmake.build(cli_args=["--verbose"]) +``` + +To specifically look at how `CMake` is trying to find a package, in the `generate()` method you can add: + +``` + def generate(self): + tc = CMakeToolchain(self) + ... + tc.cache_variables["CMAKE_FIND_DEBUG_MODE"] = "ON" # enable find debug + tc.generate() + cd = CMakeDeps(self) + cd.generate() +``` + ## Releasing new Docker Images The [CHANGELOG.md](CHANGELOG.md) file needs to be updated with the date of the change @@ -424,36 +576,46 @@ Check [#66](https://github.com/AcademySoftwareFoundation/aswf-docker/pull/66) fo ```bash # Common packages -aswfdocker release -t PACKAGE -g common -v 1 -v 2 -v 3 -v 4 --target ninja --docker-org aswf -m "RELEASE_NOTES!" -aswfdocker release -t PACKAGE -g common -v 1-clang6 -v 1-clang7 -v 1-clang8 -v 1-clang9 -v 1-clang10 -v 2-clang10 -v 2-clang11 -v 3-clang14 -v 3-clang15 -v 4-clang16 -v 4-clang17 --target clang --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t PACKAGE -g common -v 1 -v 2 -v 3 -v 4 -v 5 --target ninja -target cmake --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t PACKAGE -g common -v 1-clang6 -v 1-clang7 -v 1-clang8 -v 1-clang9 -v 1-clang10 -v 2-clang10 -v 2-clang11 -v 3-clang14 -v 3-clang15 -v 4-clang16 -v 4-clang17 -v 5-clang18 -v 5-clang19 --target clang --docker-org aswf -m "RELEASE_NOTES!" # Wait for clang builds to finish (from 2 to 3 hours!) # ci-common needs to be built before base packages can be built -aswfdocker release -t IMAGE -g common -v 1-clang6 -v 1-clang7 -v 1-clang8 -v 1-clang9 -v 1-clang10 -v 2-clang10 -v 2-clang11 -v 2-clang12 -v 2-clang13-v 2-clang14 -v 3-clang14 -v 3-clang15 -v 4-clang16 -v 4-clang17 --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t IMAGE -g common -v 1-clang6 -v 1-clang7 -v 1-clang8 -v 1-clang9 -v 1-clang10 -v 2-clang10 -v 2-clang11 -v 2-clang12 -v 2-clang13-v 2-clang14 -v 3-clang14 -v 3-clang15 -v 4-clang16 -v 4-clang17 -v 5-clang18 -v 5-clang19 --docker-org aswf -m "RELEASE_NOTES!" # Base packages -aswfdocker release -t PACKAGE -g base1 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 --docker-org aswf -m "RELEASE_NOTES!" -aswfdocker release -t PACKAGE -g base2 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t PACKAGE -g base1-wrappers -g base1-1 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 -v 2025 --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t PACKAGE -g base1-2 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 -v 2025 --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t PACKAGE -g base1-3 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 -v 2025 --docker-org aswf -m "RELEASE_NOTES!" + +aswfdocker release -t PACKAGE -g base2-wrappers -g base2-1 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 -v 2025 --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t PACKAGE -g base2-2 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 -v 2025 --docker-org aswf -m "RELEASE_NOTES!" # Wait for Qt builds to finish (2-6 hours!) # Usually some Qt build will fail as too big and too slow for free GitHub actions... So here's how to build qt locally: -aswfdocker --repo-uri https://github.com/AcademySoftwareFoundation/aswf-docker --source-branch refs/heads/main --verbose build -n aswf/ci-package-qt:2024 -docker push aswf/ci-package-qt:2024 -docker push aswf/ci-package-qt:2024-6.5.3 +# This is no longer valid, as Qt is now only build as a Conan package +aswfdocker --repo-uri https://github.com/AcademySoftwareFoundation/aswf-docker --source-branch refs/heads/main --verbose build -n aswf/ci-package-qt:2025 +docker push aswf/ci-package-qt:2025 +docker push aswf/ci-package-qt:2025-6.5.4 docker push aswf/ci-package-qt:preview -docker push aswf/ci-package-qt:2024.0 +docker push aswf/ci-package-qt:2025.0 # Once all Qt are out, release PySide packages -aswfdocker release -t PACKAGE -g base3 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t PACKAGE -g base3 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 -v 2025 --docker-org aswf -m "RELEASE_NOTES!" # Wait for all Qt and Pyside builds to finish, then build downstream packages: # VFX packages -aswfdocker release -t PACKAGE -g vfx1 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 --docker-org aswf -m "RELEASE_NOTES!" -aswfdocker release -t PACKAGE -g vfx2 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t PACKAGE -g vfx1-wrappers -g vfx1-1 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 -v 2025 --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t PACKAGE -g vfx1-2 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 -v 2025 --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t PACKAGE -g vfx1-3 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 -v 2025 --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t PACKAGE -g vfx1-4 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 -v 2025 --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t PACKAGE -g vfx1 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 -v 2025 --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t PACKAGE -g vfx2-1 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 -v 2025 --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t PACKAGE -g vfx2 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 -v 2025 --docker-org aswf -m "RELEASE_NOTES!" # Finally build the CI images -aswfdocker release -t IMAGE -g base -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 --docker-org aswf -m "RELEASE_NOTES!" -aswfdocker release -t IMAGE -g vfx1 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 --docker-org aswf -m "RELEASE_NOTES!" -aswfdocker release -t IMAGE -g vfx2 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 --docker-org aswf -m "RELEASE_NOTES!" -aswfdocker release -t IMAGE -g vfx3 -v 2018-clang7 -v 2019-clang6 -v 2019-clang7 -v 2019-clang8 -v 2019-clang9 -v 2020-clang7 -v 2021-clang10 -v 2021-clang11 -v 2022-clang10 -v 2022-clang11 -v 2022-clang12 -v 2022-clang13 -v 2022-clang14 -v 2023-clang14 -v 2023-clang15 -v 2024-clang16 -v 2024-clang17 --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t IMAGE -g base -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 -v 2025 --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t IMAGE -g vfx1 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 -v 2025 --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t IMAGE -g vfx2 -v 2018 -v 2019 -v 2020 -v 2021 -v 2022 -v 2023 -v 2024 -v 2025 --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t IMAGE -g vfx3 -v 2018-clang7 -v 2019-clang6 -v 2019-clang7 -v 2019-clang8 -v 2019-clang9 -v 2020-clang7 -v 2021-clang10 -v 2021-clang11 -v 2022-clang10 -v 2022-clang11 -v 2022-clang12 -v 2022-clang13 -v 2022-clang14 -v 2023-clang14 -v 2023-clang15 -v 2024-clang16 -v 2024-clang17 -v 2025-clang18 -v 2025-clang19 --docker-org aswf -m "RELEASE_NOTES!" ``` diff --git a/README.md b/README.md index a4cf62d9..aa83fab2 100644 --- a/README.md +++ b/README.md @@ -17,22 +17,35 @@ Each image (apart from `ci-common`) is available for multiple VFX Platform Years | Image | Stats | Description | | ------ | ----- | ----------- | -| [aswf/ci-common:1](https://hub.docker.com/r/aswf/ci-common/tags?name=1) ![Image Version](https://img.shields.io/docker/v/aswf/ci-common/latest) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-common/latest) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-common) | A base CentOS-7 image with devtoolset-6 (GCC-6.3.1), clang-6-10 and cuda-10.2. | -| [aswf/ci-common:2](https://hub.docker.com/r/aswf/ci-common/tags?name=2) ![Image Version](https://img.shields.io/docker/v/aswf/ci-common/preview) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-common/preview) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-common) | A base CentOS-7 image with devtoolset-9.1 (GCC-9.3.1), clang-10-14 and cuda-11.4. | -| [aswf/ci-common:3](https://hub.docker.com/r/aswf/ci-common/tags?name=3) ![Image Version](https://img.shields.io/docker/v/aswf/ci-common/preview) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-common/preview) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-common) | A base RockyLinux-8 image with gcc-toolset-11 (GCC-11.2.x), clang-14-15 and cuda-11.8. | -| [aswf/ci-common:4](https://hub.docker.com/r/aswf/ci-common/tags?name=4) ![Image Version](https://img.shields.io/docker/v/aswf/ci-common/preview) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-common/preview) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-common) | A base RockyLinux-8 image with gcc-toolset-11 (GCC-11.2.x), clang-16-17 and cuda-12.6.1. | +| [aswf/ci-common:1](https://hub.docker.com/r/aswf/ci-common/tags?name=1) ![Image Version](https://img.shields.io/docker/v/aswf/ci-common/1) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-common/1) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-common) | A base CentOS-7 image with devtoolset-6 (GCC-6.3.1), clang-6-10 and cuda-10.2. | +| [aswf/ci-common:2](https://hub.docker.com/r/aswf/ci-common/tags?name=2) ![Image Version](https://img.shields.io/docker/v/aswf/ci-common/2) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-common/2) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-common) | A base CentOS-7 image with devtoolset-9.1 (GCC-9.3.1), clang-10-14 and cuda-11.4. | +| [aswf/ci-common:3](https://hub.docker.com/r/aswf/ci-common/tags?name=3) ![Image Version](https://img.shields.io/docker/v/aswf/ci-common/3) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-common/3) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-common) | A base RockyLinux-8 image with gcc-toolset-11 (GCC-11.2.x), clang-14-15 and cuda-11.8. | +| [aswf/ci-common:4](https://hub.docker.com/r/aswf/ci-common/tags?name=4) ![Image Version](https://img.shields.io/docker/v/aswf/ci-common/4) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-common/4) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-common) | A base RockyLinux-8 image with gcc-toolset-11 (GCC-11.2.x), clang-16-17 and cuda-12.6.1. | +| [aswf/ci-common:5](https://hub.docker.com/r/aswf/ci-common/tags?name=5) ![Image Version](https://img.shields.io/docker/v/aswf/ci-common/5) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-common/5) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-common) | A base RockyLinux-8 image with gcc-toolset-11 (GCC-11.2.x), clang-18-19 and cuda-12.6.1. | | [aswf/ci-base:2018](https://hub.docker.com/r/aswf/ci-base/tags?name=2018) ![Image Version](https://img.shields.io/docker/v/aswf/ci-base/2018) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-base/2018) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-base) | Based on `aswf/ci-common:1` with most VFX Platform requirements pre-installed. | +| [aswf/ci-base:2019](https://hub.docker.com/r/aswf/ci-base/tags?name=2019) ![Image Version](https://img.shields.io/docker/v/aswf/ci-base/2019) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-base/2019) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-base) | Based on `aswf/ci-common:1: with most VFX Platform requirements pre-installed. | +| [aswf/ci-base:2020](https://hub.docker.com/r/aswf/ci-base/tags?name=2020) ![Image Version](https://img.shields.io/docker/v/aswf/ci-base/2020) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-base/2020) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-base) | Based on `aswf/ci-common:1: with most VFX Platform requirements pre-installed. | | [aswf/ci-base:2021](https://hub.docker.com/r/aswf/ci-base/tags?name=2021) ![Image Version](https://img.shields.io/docker/v/aswf/ci-base/2021) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-base/2021) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-base) | Based on `aswf/ci-common:2` with most VFX Platform requirements pre-installed. | | [aswf/ci-base:2022](https://hub.docker.com/r/aswf/ci-base/tags?name=2022) ![Image Version](https://img.shields.io/docker/v/aswf/ci-base/2022) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-base/2022) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-base) | Based on `aswf/ci-common:2` with most VFX Platform requirements pre-installed. | | [aswf/ci-base:2023](https://hub.docker.com/r/aswf/ci-base/tags?name=2023) ![Image Version](https://img.shields.io/docker/v/aswf/ci-base/2023) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-base/2023) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-base) | Based on `aswf/ci-common:3` with most VFX Platform requirements pre-installed. | | [aswf/ci-base:2024](https://hub.docker.com/r/aswf/ci-base/tags?name=2024) ![Image Version](https://img.shields.io/docker/v/aswf/ci-base/2024) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-base/2024) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-base) | Based on `aswf/ci-common:4` with most VFX Platform requirements pre-installed. | -| [aswf/ci-openexr:2018](https://hub.docker.com/r/aswf/ci-openexr/tags?name=2018) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openexr/2018) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openexr/2018) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openexr) | Based on `aswf/ci-common:1`, comes with all OpenEXR upstream dependencies pre-installed. | -| [aswf/ci-openexr:2019](https://hub.docker.com/r/aswf/ci-openexr/tags?name=2019) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openexr/2019) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openexr/2019) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openexr) | Based on `aswf/ci-common:1`, comes with all OpenEXR upstream dependencies pre-installed. | -| [aswf/ci-openexr:2020](https://hub.docker.com/r/aswf/ci-openexr/tags?name=2020) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openexr/2020) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openexr/2020) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openexr) | Based on `aswf/ci-common:1`, comes with all OpenEXR upstream dependencies pre-installed. | -| [aswf/ci-openexr:2021](https://hub.docker.com/r/aswf/ci-openexr/tags?name=2021) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openexr/2021) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openexr/2021) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openexr) | Based on `aswf/ci-common:2`, comes with all OpenEXR upstream dependencies pre-installed. | -| [aswf/ci-openexr:2022](https://hub.docker.com/r/aswf/ci-openexr/tags?name=2022) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openexr/2022) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openexr/2022) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openexr) | Based on `aswf/ci-common:2`, comes with all OpenEXR upstream dependencies pre-installed. | -| [aswf/ci-openexr:2023](https://hub.docker.com/r/aswf/ci-openexr/tags?name=2023) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openexr/2023) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openexr/2023) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openexr) | Based on `aswf/ci-common:3`, comes with all OpenEXR upstream dependencies pre-installed. | -| [aswf/ci-openexr:2024](https://hub.docker.com/r/aswf/ci-openexr/tags?name=2024) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openexr/2024) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openexr/2024) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openexr) | Based on `aswf/ci-common:4`, comes with all OpenEXR upstream dependencies pre-installed. | +| [aswf/ci-base:2025](https://hub.docker.com/r/aswf/ci-base/tags?name=2025) ![Image Version](https://img.shields.io/docker/v/aswf/ci-base/2025) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-base/2025) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-base) | Based on `aswf/ci-common:5` with most VFX Platform requirements pre-installed. | +| [aswf/ci-baseqt:2018](https://hub.docker.com/r/aswf/ci-baseqt/tags?name=2018) ![Image Version](https://img.shields.io/docker/v/aswf/ci-baseqt/2018) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-baseqt/2018) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-baseqt) | Based on `aswf/ci-common:1` with most VFX Platform requirements pre-installed with Qt and PySide. | +| [aswf/ci-baseqt:2019](https://hub.docker.com/r/aswf/ci-baseqt/tags?name=2019) ![Image Version](https://img.shields.io/docker/v/aswf/ci-baseqt/2019) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-baseqt/2019) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-baseqt) | Based on `aswf/ci-common:1: with most VFX Platform requirements pre-installed with Qt and PySide. | +| [aswf/ci-baseqt:2020](https://hub.docker.com/r/aswf/ci-baseqt/tags?name=2020) ![Image Version](https://img.shields.io/docker/v/aswf/ci-baseqt/2020) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-baseqt/2020) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-baseqt) | Based on `aswf/ci-common:1: with most VFX Platform requirements pre-installed with Qt and PySide. | +| [aswf/ci-baseqt:2021](https://hub.docker.com/r/aswf/ci-baseqt/tags?name=2021) ![Image Version](https://img.shields.io/docker/v/aswf/ci-baseqt/2021) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-baseqt/2021) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-baseqt) | Based on `aswf/ci-common:2` with most VFX Platform requirements pre-installed with Qt and PySide. | +| [aswf/ci-baseqt:2022](https://hub.docker.com/r/aswf/ci-baseqt/tags?name=2022) ![Image Version](https://img.shields.io/docker/v/aswf/ci-baseqt/2022) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-baseqt/2022) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-baseqt) | Based on `aswf/ci-common:2` with most VFX Platform requirements pre-installed with Qt and PySide. | +| [aswf/ci-baseqt:2023](https://hub.docker.com/r/aswf/ci-baseqt/tags?name=2023) ![Image Version](https://img.shields.io/docker/v/aswf/ci-baseqt/2023) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-baseqt/2023) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-baseqt) | Based on `aswf/ci-common:3` with most VFX Platform requirements pre-installed with Qt and PySide. | +| [aswf/ci-baseqt:2024](https://hub.docker.com/r/aswf/ci-baseqt/tags?name=2024) ![Image Version](https://img.shields.io/docker/v/aswf/ci-baseqt/2024) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-baseqt/2024) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-baseqt) | Based on `aswf/ci-common:4` with most VFX Platform requirements pre-installed with Qt and Pyside. | +| [aswf/ci-baseqt:2025](https://hub.docker.com/r/aswf/ci-baseqt/tags?name=2025) ![Image Version](https://img.shields.io/docker/v/aswf/ci-baseqt/2025) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-baseqt/2025) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-baseqt) | Based on `aswf/ci-common:5` with most VFX Platform requirements pre-installed with Qt and PySide. | +| [aswf/ci-openexr:2018](https://hub.docker.com/r/aswf/ci-openexr/tags?name=2018) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openexr/2018) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openexr/2018) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openexr) | Based on `aswf/ci-common:1`, comes with all Imath and OpenEXR upstream dependencies pre-installed. | +| [aswf/ci-openexr:2019](https://hub.docker.com/r/aswf/ci-openexr/tags?name=2019) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openexr/2019) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openexr/2019) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openexr) | Based on `aswf/ci-common:1`, comes with all Imath and OpenEXR upstream dependencies pre-installed. | +| [aswf/ci-openexr:2020](https://hub.docker.com/r/aswf/ci-openexr/tags?name=2020) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openexr/2020) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openexr/2020) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openexr) | Based on `aswf/ci-common:1`, comes with all Imath and OpenEXR upstream dependencies pre-installed. | +| [aswf/ci-openexr:2021](https://hub.docker.com/r/aswf/ci-openexr/tags?name=2021) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openexr/2021) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openexr/2021) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openexr) | Based on `aswf/ci-common:2`, comes with all Imath and OpenEXR upstream dependencies pre-installed. | +| [aswf/ci-openexr:2022](https://hub.docker.com/r/aswf/ci-openexr/tags?name=2022) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openexr/2022) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openexr/2022) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openexr) | Based on `aswf/ci-common:2`, comes with all Imath and OpenEXR upstream dependencies pre-installed. | +| [aswf/ci-openexr:2023](https://hub.docker.com/r/aswf/ci-openexr/tags?name=2023) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openexr/2023) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openexr/2023) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openexr) | Based on `aswf/ci-common:3`, comes with all Imath and OpenEXR upstream dependencies pre-installed. | +| [aswf/ci-openexr:2024](https://hub.docker.com/r/aswf/ci-openexr/tags?name=2024) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openexr/2024) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openexr/2024) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openexr) | Based on `aswf/ci-common:4`, comes with all Imath and OpenEXR upstream dependencies pre-installed. | +| [aswf/ci-openexr:2025](https://hub.docker.com/r/aswf/ci-openexr/tags?name=2025) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openexr/2025) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openexr/2025) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openexr) | Based on `aswf/ci-common:5`, comes with all Imath and OpenEXR upstream dependencies pre-installed. | | [aswf/ci-ocio:2018](https://hub.docker.com/r/aswf/ci-ocio/tags?name=2018) ![Image Version](https://img.shields.io/docker/v/aswf/ci-ocio/2018) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-ocio/2018) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-ocio) | Based on `aswf/ci-common:1`, comes with all OpenColorIO upstream dependencies pre-installed. | | [aswf/ci-ocio:2019](https://hub.docker.com/r/aswf/ci-ocio/tags?name=2019) ![Image Version](https://img.shields.io/docker/v/aswf/ci-ocio/2019) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-ocio/2019) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-ocio) | Based on `aswf/ci-common:1`, comes with all OpenColorIO upstream dependencies pre-installed. | | [aswf/ci-ocio:2020](https://hub.docker.com/r/aswf/ci-ocio/tags?name=2020) ![Image Version](https://img.shields.io/docker/v/aswf/ci-ocio/2020) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-ocio/2020) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-ocio) | Based on `aswf/ci-common:1`, comes with all OpenColorIO upstream dependencies pre-installed. | @@ -40,6 +53,7 @@ Each image (apart from `ci-common`) is available for multiple VFX Platform Years | [aswf/ci-ocio:2022](https://hub.docker.com/r/aswf/ci-ocio/tags?name=2022) ![Image Version](https://img.shields.io/docker/v/aswf/ci-ocio/2022) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-ocio/2022) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-ocio) | Based on `aswf/ci-common:2`, comes with all OpenColorIO upstream dependencies pre-installed. | | [aswf/ci-ocio:2023](https://hub.docker.com/r/aswf/ci-ocio/tags?name=2023) ![Image Version](https://img.shields.io/docker/v/aswf/ci-ocio/2023) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-ocio/2023) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-ocio) | Based on `aswf/ci-common:3`, comes with all OpenColorIO upstream dependencies pre-installed. | | [aswf/ci-ocio:2024](https://hub.docker.com/r/aswf/ci-ocio/tags?name=2024) ![Image Version](https://img.shields.io/docker/v/aswf/ci-ocio/2024) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-ocio/2024) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-ocio) | Based on `aswf/ci-common:4`, comes with all OpenColorIO upstream dependencies pre-installed. | +| [aswf/ci-ocio:2025](https://hub.docker.com/r/aswf/ci-ocio/tags?name=2025) ![Image Version](https://img.shields.io/docker/v/aswf/ci-ocio/2025) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-ocio/2025) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-ocio) | Based on `aswf/ci-common:5`, comes with all OpenColorIO upstream dependencies pre-installed. | | [aswf/ci-opencue:2018](https://hub.docker.com/r/aswf/ci-opencue/tags?name=2018) ![Image Version](https://img.shields.io/docker/v/aswf/ci-opencue/2018) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-opencue/2018) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-opencue) | Based on `aswf/ci-common:1`, comes with all OpenCue upstream dependencies pre-installed. | | [aswf/ci-opencue:2019](https://hub.docker.com/r/aswf/ci-opencue/tags?name=2019) ![Image Version](https://img.shields.io/docker/v/aswf/ci-opencue/2019) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-opencue/2019) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-opencue) | Based on `aswf/ci-common:1`, comes with all OpenCue upstream dependencies pre-installed. | | [aswf/ci-opencue:2020](https://hub.docker.com/r/aswf/ci-opencue/tags?name=2020) ![Image Version](https://img.shields.io/docker/v/aswf/ci-opencue/2020) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-opencue/2020) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-opencue) | Based on `aswf/ci-common:1`, comes with all OpenCue upstream dependencies pre-installed. | @@ -47,6 +61,7 @@ Each image (apart from `ci-common`) is available for multiple VFX Platform Years | [aswf/ci-opencue:2022](https://hub.docker.com/r/aswf/ci-opencue/tags?name=2022) ![Image Version](https://img.shields.io/docker/v/aswf/ci-opencue/2022) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-opencue/2022) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-opencue) | Based on `aswf/ci-common:2`, comes with all OpenCue upstream dependencies pre-installed. | | [aswf/ci-opencue:2023](https://hub.docker.com/r/aswf/ci-opencue/tags?name=2023) ![Image Version](https://img.shields.io/docker/v/aswf/ci-opencue/2023) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-opencue/2023) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-opencue) | Based on `aswf/ci-common:3`, comes with all OpenCue upstream dependencies pre-installed. | | [aswf/ci-opencue:2024](https://hub.docker.com/r/aswf/ci-opencue/tags?name=2024) ![Image Version](https://img.shields.io/docker/v/aswf/ci-opencue/2024) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-opencue/2024) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-opencue) | Based on `aswf/ci-common:4`, comes with all OpenCue upstream dependencies pre-installed. | +| [aswf/ci-opencue:2025](https://hub.docker.com/r/aswf/ci-opencue/tags?name=2025) ![Image Version](https://img.shields.io/docker/v/aswf/ci-opencue/2025) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-opencue/2025) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-opencue) | Based on `aswf/ci-common:5`, comes with all OpenCue upstream dependencies pre-installed. | | [aswf/ci-openvdb:2018](https://hub.docker.com/r/aswf/ci-openvdb/tags?name=2018) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openvdb/2018) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openvdb/2018) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openvdb) | Based on `aswf/ci-common:1`, comes with all OpenVDB upstream dependencies pre-installed. | | [aswf/ci-openvdb:2019](https://hub.docker.com/r/aswf/ci-openvdb/tags?name=2019) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openvdb/2019) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openvdb/2019) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openvdb) | Based on `aswf/ci-common:1`, comes with all OpenVDB upstream dependencies pre-installed. | | [aswf/ci-openvdb:2020](https://hub.docker.com/r/aswf/ci-openvdb/tags?name=2020) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openvdb/2020) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openvdb/2020) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openvdb) | Based on `aswf/ci-common:1`, comes with all OpenVDB upstream dependencies pre-installed. | @@ -54,12 +69,26 @@ Each image (apart from `ci-common`) is available for multiple VFX Platform Years | [aswf/ci-openvdb:2022](https://hub.docker.com/r/aswf/ci-openvdb/tags?name=2022) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openvdb/2022) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openvdb/2022) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openvdb) | Based on `aswf/ci-common:2`, comes with all OpenVDB upstream dependencies pre-installed. | | [aswf/ci-openvdb:2023](https://hub.docker.com/r/aswf/ci-openvdb/tags?name=2023) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openvdb/2023) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openvdb/2023) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openvdb) | Based on `aswf/ci-common:3`, comes with all OpenVDB upstream dependencies pre-installed. | | [aswf/ci-openvdb:2024](https://hub.docker.com/r/aswf/ci-openvdb/tags?name=2024) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openvdb/2024) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openvdb/2024) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openvdb) | Based on `aswf/ci-common:4`, comes with all OpenVDB upstream dependencies pre-installed. | +| [aswf/ci-openvdb:2025](https://hub.docker.com/r/aswf/ci-openvdb/tags?name=2025) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openvdb/2025) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openvdb/2025) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openvdb) | Based on `aswf/ci-common:5`, comes with all OpenVDB upstream dependencies pre-installed. | +| [aswf/ci-otio:2019](https://hub.docker.com/r/aswf/ci-otio/tags?name=2019) ![Image Version](https://img.shields.io/docker/v/aswf/ci-otio/2019) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-otio/2019) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-otio) | Based on `aswf/ci-common:1`, comes with all OpenTimelineIO upstream dependencies pre-installed. | +| [aswf/ci-otio:2020](https://hub.docker.com/r/aswf/ci-otio/tags?name=2020) ![Image Version](https://img.shields.io/docker/v/aswf/ci-otio/2020) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-otio/2020) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-otio) | Based on `aswf/ci-common:1`, comes with all OpenTimelineIO upstream dependencies pre-installed. | +| [aswf/ci-otio:2021](https://hub.docker.com/r/aswf/ci-otio/tags?name=2021) ![Image Version](https://img.shields.io/docker/v/aswf/ci-otio/2021) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-otio/2021) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-otio) | Based on `aswf/ci-common:2`, comes with all OpenTimelineIO upstream dependencies pre-installed. | +| [aswf/ci-otio:2022](https://hub.docker.com/r/aswf/ci-otio/tags?name=2022) ![Image Version](https://img.shields.io/docker/v/aswf/ci-otio/2022) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-otio/2022) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-otio) | Based on `aswf/ci-common:2`, comes with all OpenTimelineIO upstream dependencies pre-installed. | +| [aswf/ci-otio:2023](https://hub.docker.com/r/aswf/ci-otio/tags?name=2023) ![Image Version](https://img.shields.io/docker/v/aswf/ci-otio/2023) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-otio/2023) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-otio) | Based on `aswf/ci-common:3`, comes with all OpenTimelineIO upstream dependencies pre-installed. | +| [aswf/ci-otio:2024](https://hub.docker.com/r/aswf/ci-otio/tags?name=2024) ![Image Version](https://img.shields.io/docker/v/aswf/ci-otio/2024) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-otio/2024) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-otio) | Based on `aswf/ci-common:4`, comes with all OpenTimelineIO upstream dependencies pre-installed. | +| [aswf/ci-otio:2025](https://hub.docker.com/r/aswf/ci-otio/tags?name=2025) ![Image Version](https://img.shields.io/docker/v/aswf/ci-otio/2025) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-otio/2025) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-otio) | Based on `aswf/ci-common:5`, comes with all OpenTimelineIO upstream dependencies pre-installed. | +| [aswf/ci-oiio:2024](https://hub.docker.com/r/aswf/ci-oiio/tags?name=2024) ![Image Version](https://img.shields.io/docker/v/aswf/ci-oiio/2024) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-oiio/2024) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-oiio) | Based on `aswf/ci-common:4`, comes with all OpenImageIO upstream dependencies pre-installed. | +| [aswf/ci-oiio:2025](https://hub.docker.com/r/aswf/ci-oiio/tags?name=2025) ![Image Version](https://img.shields.io/docker/v/aswf/ci-oiio/2025) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-oiio/2025) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-oiio) | Based on `aswf/ci-common:5`, comes with all OpenImageIO upstream dependencies pre-installed. | +| [aswf/ci-materialx:2023](https://hub.docker.com/r/aswf/ci-materialx/tags?name=2023) ![Image Version](https://img.shields.io/docker/v/aswf/ci-materialx/2023) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-materialx/2023) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-materialx) | Based on `aswf/ci-common:3`, comes with all MaterialX upstream dependencies pre-installed. | +| [aswf/ci-materialx:2024](https://hub.docker.com/r/aswf/ci-materialx/tags?name=2024) ![Image Version](https://img.shields.io/docker/v/aswf/ci-materialx/2024) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-materialx/2024) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-materialx) | Based on `aswf/ci-common:4`, comes with all MaterialX upstream dependencies pre-installed. | +| [aswf/ci-materialx:2025](https://hub.docker.com/r/aswf/ci-materialx/tags?name=2025) ![Image Version](https://img.shields.io/docker/v/aswf/ci-materialx/2025) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-materialx/2025) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-materialx) | Based on `aswf/ci-common:5`, comes with all MaterialX upstream dependencies pre-installed. | | [aswf/ci-usd:2019](https://hub.docker.com/r/aswf/ci-usd/tags?name=2019) ![Image Version](https://img.shields.io/docker/v/aswf/ci-usd/2019) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-usd/2019) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-usd) | Based on `aswf/ci-common:1`, comes with all USD upstream dependencies pre-installed. | | [aswf/ci-usd:2020](https://hub.docker.com/r/aswf/ci-usd/tags?name=2020) ![Image Version](https://img.shields.io/docker/v/aswf/ci-usd/2020) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-usd/2020) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-usd) | Based on `aswf/ci-common:1`, comes with all USD upstream dependencies pre-installed. | | [aswf/ci-usd:2021](https://hub.docker.com/r/aswf/ci-usd/tags?name=2021) ![Image Version](https://img.shields.io/docker/v/aswf/ci-usd/2021) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-usd/2021) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-usd) | Based on `aswf/ci-common:2`, comes with all USD upstream dependencies pre-installed. | | [aswf/ci-usd:2022](https://hub.docker.com/r/aswf/ci-usd/tags?name=2022) ![Image Version](https://img.shields.io/docker/v/aswf/ci-usd/2022) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-usd/2022) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-usd) | Based on `aswf/ci-common:2`, comes with all USD upstream dependencies pre-installed. | | [aswf/ci-usd:2023](https://hub.docker.com/r/aswf/ci-usd/tags?name=2023) ![Image Version](https://img.shields.io/docker/v/aswf/ci-usd/2023) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-usd/2023) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-usd) | Based on `aswf/ci-common:3`, comes with all USD upstream dependencies pre-installed. | | [aswf/ci-usd:2024](https://hub.docker.com/r/aswf/ci-usd/tags?name=2024) ![Image Version](https://img.shields.io/docker/v/aswf/ci-usd/2024) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-usd/2024) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-usd) | Based on `aswf/ci-common:4`, comes with all USD upstream dependencies pre-installed. | +| [aswf/ci-usd:2025](https://hub.docker.com/r/aswf/ci-usd/tags?name=2025) ![Image Version](https://img.shields.io/docker/v/aswf/ci-usd/2025) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-usd/2025) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-usd) | Based on `aswf/ci-common:5`, comes with all USD upstream dependencies pre-installed. | | [aswf/ci-osl:2018](https://hub.docker.com/r/aswf/ci-osl/tags?name=2018) ![Image Version](https://img.shields.io/docker/v/aswf/ci-osl/2018) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-osl/2018) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-osl) | Based on `aswf/ci-common:1`, comes with all OpenShadingLanguage upstream dependencies pre-installed. | | [aswf/ci-osl:2019](https://hub.docker.com/r/aswf/ci-osl/tags?name=2019) ![Image Version](https://img.shields.io/docker/v/aswf/ci-osl/2019) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-osl/2019) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-osl) | Based on `aswf/ci-common:1`, comes with all OpenShadingLanguage upstream dependencies pre-installed. | | [aswf/ci-osl:2020](https://hub.docker.com/r/aswf/ci-osl/tags?name=2020) ![Image Version](https://img.shields.io/docker/v/aswf/ci-osl/2020) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-osl/2020) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-osl) | Based on `aswf/ci-common:1`, comes with all OpenShadingLanguage upstream dependencies pre-installed. | @@ -67,13 +96,17 @@ Each image (apart from `ci-common`) is available for multiple VFX Platform Years | [aswf/ci-osl:2022](https://hub.docker.com/r/aswf/ci-osl/tags?name=2022) ![Image Version](https://img.shields.io/docker/v/aswf/ci-osl/2022) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-osl/2022) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-osl) | Based on `aswf/ci-common:2`, comes with all OpenShadingLanguage upstream dependencies pre-installed. | | [aswf/ci-osl:2023](https://hub.docker.com/r/aswf/ci-osl/tags?name=2023) ![Image Version](https://img.shields.io/docker/v/aswf/ci-osl/2023) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-osl/2023) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-osl) | Based on `aswf/ci-common:3`, comes with all OpenShadingLanguage upstream dependencies pre-installed. | | [aswf/ci-osl:2024](https://hub.docker.com/r/aswf/ci-osl/tags?name=2024) ![Image Version](https://img.shields.io/docker/v/aswf/ci-osl/2024) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-osl/2024) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-osl) | Based on `aswf/ci-common:4`, comes with all OpenShadingLanguage upstream dependencies pre-installed. | +| [aswf/ci-osl:2025](https://hub.docker.com/r/aswf/ci-osl/tags?name=2025) ![Image Version](https://img.shields.io/docker/v/aswf/ci-osl/2025) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-osl/2025) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-osl) | Based on `aswf/ci-common:5`, comes with all OpenShadingLanguage upstream dependencies pre-installed. | | [aswf/ci-openrv:2024](https://hub.docker.com/r/aswf/ci-openrv/tags?name=2024) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openrv/2024) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openrv/2024) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openrv) | Based on `aswf/ci-common:4`, comes with all OpenRV upstream dependencies pre-installed. | +| [aswf/ci-openrv:2025](https://hub.docker.com/r/aswf/ci-openrv/tags?name=2025) ![Image Version](https://img.shields.io/docker/v/aswf/ci-openrv/2025) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-openrv/2025) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-openrv) | Based on `aswf/ci-common:5`, comes with all OpenRV upstream dependencies pre-installed. | | [aswf/ci-vfxall:2019](https://hub.docker.com/r/aswf/ci-vfxall/tags?name=2019) ![Image Version](https://img.shields.io/docker/v/aswf/ci-vfxall/2019) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-vfxall/2019) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-vfxall) | Based on `aswf/ci-common:1`, comes with most VFX packages pre-installed. | | [aswf/ci-vfxall:2020](https://hub.docker.com/r/aswf/ci-vfxall/tags?name=2020) ![Image Version](https://img.shields.io/docker/v/aswf/ci-vfxall/2020) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-vfxall/2020) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-vfxall) | Based on `aswf/ci-common:1`, comes with most VFX packages pre-installed. | | [aswf/ci-vfxall:2021](https://hub.docker.com/r/aswf/ci-vfxall/tags?name=2021) ![Image Version](https://img.shields.io/docker/v/aswf/ci-vfxall/2021) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-vfxall/2021) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-vfxall) | Based on `aswf/ci-common:2`, comes with most VFX packages pre-installed. | | [aswf/ci-vfxall:2022](https://hub.docker.com/r/aswf/ci-vfxall/tags?name=2022) ![Image Version](https://img.shields.io/docker/v/aswf/ci-vfxall/2022) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-vfxall/2022) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-vfxall) | Based on `aswf/ci-common:2`, comes with most VFX packages pre-installed. | | [aswf/ci-vfxall:2023](https://hub.docker.com/r/aswf/ci-vfxall/tags?name=2023) ![Image Version](https://img.shields.io/docker/v/aswf/ci-vfxall/2023) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-vfxall/2023) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-vfxall) | Based on `aswf/ci-common:3`, comes with most VFX packages pre-installed. | | [aswf/ci-vfxall:2024](https://hub.docker.com/r/aswf/ci-vfxall/tags?name=2024) ![Image Version](https://img.shields.io/docker/v/aswf/ci-vfxall/2024) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-vfxall/2024) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-vfxall) | Based on `aswf/ci-common:4`, comes with most VFX packages pre-installed. | +| [aswf/ci-vfxall:2025](https://hub.docker.com/r/aswf/ci-vfxall/tags?name=2025) ![Image Version](https://img.shields.io/docker/v/aswf/ci-vfxall/2025) | ![Image Size](https://img.shields.io/docker/image-size/aswf/ci-vfxall/2025) ![Pulls](https://img.shields.io/docker/pulls/aswf/ci-vfxall) | Based on `aswf/ci-common:5`, comes with most VFX packages pre-installed. | + ### Versions @@ -114,8 +147,8 @@ to first create a free [Linux Foundation account](https://sso.linuxfoundation.or ### Status -As of September 2024 there are full 2018, 2019, 2020, 2021, 2022, -2023 and 2024 [VFX Platform](https://vfxplatform.com) compliant images. N.B. that the +As of April 2025 there are full 2018, 2019, 2020, 2021, 2022, +2023, 2024 and 2025 [VFX Platform](https://vfxplatform.com) compliant images. N.B. that the pre-2024 versions of the images still exist but are not maintained/rebuilt anymore, which means they might be obsolete (especially the OS part). diff --git a/ci-base/Dockerfile b/ci-base/Dockerfile index dfa7f440..d6934caf 100644 --- a/ci-base/Dockerfile +++ b/ci-base/Dockerfile @@ -14,21 +14,37 @@ ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_BLOSC_VERSION -ARG ASWF_BOOST_VERSION -ARG ASWF_CMAKE_VERSION +ARG ASWF_B2_VERSION +ARG ASWF_BZIP2_VERSION ARG ASWF_CPPUNIT_VERSION ARG ASWF_EXPAT_VERSION +ARG ASWF_FMT_VERSION +ARG ASWF_GTEST_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBXCRYPT_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_PUGIXML_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_SNAPPY_VERSION +ARG ASWF_TBB_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION +ARG ASWF_BLOSC_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_FREETYPE_VERSION +ARG ASWF_GDBM_VERSION ARG ASWF_GLEW_VERSION ARG ASWF_GLFW_VERSION -ARG ASWF_GTEST_VERSION ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_MINIZIP_NG_VERSION +ARG ASWF_BOOST_VERSION ARG ASWF_PYBIND11_VERSION -ARG ASWF_PYTHON_VERSION -ARG ASWF_TBB_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION @@ -46,21 +62,37 @@ ARG ASWF_CONAN_CHANNEL -ARG ASWF_BLOSC_VERSION -ARG ASWF_BOOST_VERSION -ARG ASWF_CMAKE_VERSION +ARG ASWF_B2_VERSION +ARG ASWF_BZIP2_VERSION ARG ASWF_CPPUNIT_VERSION ARG ASWF_EXPAT_VERSION +ARG ASWF_FMT_VERSION +ARG ASWF_GTEST_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBXCRYPT_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_PUGIXML_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_SNAPPY_VERSION +ARG ASWF_TBB_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION +ARG ASWF_BLOSC_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_FREETYPE_VERSION +ARG ASWF_GDBM_VERSION ARG ASWF_GLEW_VERSION ARG ASWF_GLFW_VERSION -ARG ASWF_GTEST_VERSION ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_MINIZIP_NG_VERSION +ARG ASWF_BOOST_VERSION ARG ASWF_PYBIND11_VERSION -ARG ASWF_PYTHON_VERSION -ARG ASWF_TBB_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION LABEL org.opencontainers.image.name="$ASWF_ORG/ci-base" @@ -76,18 +108,35 @@ LABEL org.opencontainers.image.version="${ASWF_VERSION}" LABEL com.vfxplatform.version="${ASWF_VFXPLATFORM_VERSION}" -LABEL io.aswf.docker.versions.blosc="$ASWF_BLOSC_VERSION" -LABEL io.aswf.docker.versions.boost="$ASWF_BOOST_VERSION" -LABEL io.aswf.docker.versions.cmake="$ASWF_CMAKE_VERSION" +LABEL io.aswf.docker.versions.b2="$ASWF_B2_VERSION" +LABEL io.aswf.docker.versions.bzip2="$ASWF_BZIP2_VERSION" LABEL io.aswf.docker.versions.cppunit="$ASWF_CPPUNIT_VERSION" LABEL io.aswf.docker.versions.expat="$ASWF_EXPAT_VERSION" +LABEL io.aswf.docker.versions.fmt="$ASWF_FMT_VERSION" +LABEL io.aswf.docker.versions.gtest="$ASWF_GTEST_VERSION" +LABEL io.aswf.docker.versions.libbacktrace="$ASWF_LIBBACKTRACE_VERSION" +LABEL io.aswf.docker.versions.libdeflate="$ASWF_LIBDEFLATE_VERSION" +LABEL io.aswf.docker.versions.libiconv="$ASWF_LIBICONV_VERSION" +LABEL io.aswf.docker.versions.libxcrypt="$ASWF_LIBXCRYPT_VERSION" +LABEL io.aswf.docker.versions.lz4="$ASWF_LZ4_VERSION" +LABEL io.aswf.docker.versions.pugixml="$ASWF_PUGIXML_VERSION" +LABEL io.aswf.docker.versions.pystring="$ASWF_PYSTRING_VERSION" +LABEL io.aswf.docker.versions.snappy="$ASWF_SNAPPY_VERSION" +LABEL io.aswf.docker.versions.tbb="$ASWF_TBB_VERSION" +LABEL io.aswf.docker.versions.tsl-robin-map="$ASWF_TSL_ROBIN_MAP_VERSION" +LABEL io.aswf.docker.versions.yaml-cpp="$ASWF_YAML_CPP_VERSION" +LABEL io.aswf.docker.versions.zlib="$ASWF_ZLIB_VERSION" +LABEL io.aswf.docker.versions.zstd="$ASWF_ZSTD_VERSION" +LABEL io.aswf.docker.versions.blosc="$ASWF_BLOSC_VERSION" +LABEL io.aswf.docker.versions.cpython="$ASWF_CPYTHON_VERSION" +LABEL io.aswf.docker.versions.freetype="$ASWF_FREETYPE_VERSION" +LABEL io.aswf.docker.versions.gdbm="$ASWF_GDBM_VERSION" LABEL io.aswf.docker.versions.glew="$ASWF_GLEW_VERSION" LABEL io.aswf.docker.versions.glfw="$ASWF_GLFW_VERSION" -LABEL io.aswf.docker.versions.gtest="$ASWF_GTEST_VERSION" LABEL io.aswf.docker.versions.log4cplus="$ASWF_LOG4CPLUS_VERSION" +LABEL io.aswf.docker.versions.minizip-ng="$ASWF_MINIZIP_NG_VERSION" +LABEL io.aswf.docker.versions.boost="$ASWF_BOOST_VERSION" LABEL io.aswf.docker.versions.pybind11="$ASWF_PYBIND11_VERSION" -LABEL io.aswf.docker.versions.python="$ASWF_PYTHON_VERSION" -LABEL io.aswf.docker.versions.tbb="$ASWF_TBB_VERSION" LABEL io.aswf.docker.versions.numpy="$ASWF_NUMPY_VERSION" LABEL io.aswf.docker.versions.vfxplatform="$ASWF_VFXPLATFORM_VERSION" @@ -101,53 +150,90 @@ ENV ASWF_PYSIDE_CLANG_VERSION=${ASWF_PYSIDE_CLANG_VERSION} ENV ASWF_VFXPLATFORM_VERSION=${ASWF_VFXPLATFORM_VERSION} -ENV ASWF_BLOSC_VERSION=$ASWF_BLOSC_VERSION -ENV ASWF_BOOST_VERSION=$ASWF_BOOST_VERSION -ENV ASWF_CMAKE_VERSION=$ASWF_CMAKE_VERSION +ENV ASWF_B2_VERSION=$ASWF_B2_VERSION +ENV ASWF_BZIP2_VERSION=$ASWF_BZIP2_VERSION ENV ASWF_CPPUNIT_VERSION=$ASWF_CPPUNIT_VERSION ENV ASWF_EXPAT_VERSION=$ASWF_EXPAT_VERSION +ENV ASWF_FMT_VERSION=$ASWF_FMT_VERSION +ENV ASWF_GTEST_VERSION=$ASWF_GTEST_VERSION +ENV ASWF_LIBBACKTRACE_VERSION=$ASWF_LIBBACKTRACE_VERSION +ENV ASWF_LIBDEFLATE_VERSION=$ASWF_LIBDEFLATE_VERSION +ENV ASWF_LIBICONV_VERSION=$ASWF_LIBICONV_VERSION +ENV ASWF_LIBXCRYPT_VERSION=$ASWF_LIBXCRYPT_VERSION +ENV ASWF_LZ4_VERSION=$ASWF_LZ4_VERSION +ENV ASWF_PUGIXML_VERSION=$ASWF_PUGIXML_VERSION +ENV ASWF_PYSTRING_VERSION=$ASWF_PYSTRING_VERSION +ENV ASWF_SNAPPY_VERSION=$ASWF_SNAPPY_VERSION +ENV ASWF_TBB_VERSION=$ASWF_TBB_VERSION +ENV ASWF_TSL_ROBIN_MAP_VERSION=$ASWF_TSL_ROBIN_MAP_VERSION +ENV ASWF_YAML_CPP_VERSION=$ASWF_YAML_CPP_VERSION +ENV ASWF_ZLIB_VERSION=$ASWF_ZLIB_VERSION +ENV ASWF_ZSTD_VERSION=$ASWF_ZSTD_VERSION +ENV ASWF_BLOSC_VERSION=$ASWF_BLOSC_VERSION +ENV ASWF_CPYTHON_VERSION=$ASWF_CPYTHON_VERSION +ENV ASWF_FREETYPE_VERSION=$ASWF_FREETYPE_VERSION +ENV ASWF_GDBM_VERSION=$ASWF_GDBM_VERSION ENV ASWF_GLEW_VERSION=$ASWF_GLEW_VERSION ENV ASWF_GLFW_VERSION=$ASWF_GLFW_VERSION -ENV ASWF_GTEST_VERSION=$ASWF_GTEST_VERSION ENV ASWF_LOG4CPLUS_VERSION=$ASWF_LOG4CPLUS_VERSION +ENV ASWF_MINIZIP_NG_VERSION=$ASWF_MINIZIP_NG_VERSION +ENV ASWF_BOOST_VERSION=$ASWF_BOOST_VERSION ENV ASWF_PYBIND11_VERSION=$ASWF_PYBIND11_VERSION -ENV ASWF_PYTHON_VERSION=$ASWF_PYTHON_VERSION -ENV ASWF_TBB_VERSION=$ASWF_TBB_VERSION ENV ASWF_NUMPY_VERSION=$ASWF_NUMPY_VERSION ENV ASWF_VFXPLATFORM_VERSION=$ASWF_VFXPLATFORM_VERSION -ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=$ASWF_PYTHON_MAJOR_MINOR_VERSION COPY ci-base/README.md ci-base/image.yaml /usr/local/aswf/ -ENV PYTHONPATH=/usr/local/lib/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib64/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib/python:${PYTHONPATH} COPY scripts/common/install_conanpackages.sh /tmp/ +ARG ASWF_PYTHON_MAJOR_MINOR_VERSION +ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=${ASWF_PYTHON_MAJOR_MINOR_VERSION} + # conan-only packages COPY < . [requires] -blosc/${ASWF_BLOSC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +b2/${ASWF_B2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +bzip2/${ASWF_BZIP2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} cppunit/${ASWF_CPPUNIT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} expat/${ASWF_EXPAT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +fmt/${ASWF_FMT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +gtest/${ASWF_GTEST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libbacktrace/${ASWF_LIBBACKTRACE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libdeflate/${ASWF_LIBDEFLATE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libiconv/${ASWF_LIBICONV_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libxcrypt/${ASWF_LIBXCRYPT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +lz4/${ASWF_LZ4_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pugixml/${ASWF_PUGIXML_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pystring/${ASWF_PYSTRING_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +snappy/${ASWF_SNAPPY_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tsl-robin-map/${ASWF_TSL_ROBIN_MAP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +yaml-cpp/${ASWF_YAML_CPP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zlib/${ASWF_ZLIB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zstd/${ASWF_ZSTD_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +blosc/${ASWF_BLOSC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cpython/${ASWF_CPYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +freetype/${ASWF_FREETYPE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +gdbm/${ASWF_GDBM_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} glew/${ASWF_GLEW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} glfw/${ASWF_GLFW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -gtest/${ASWF_GTEST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} log4cplus/${ASWF_LOG4CPLUS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +minizip-ng/${ASWF_MINIZIP_NG_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} pybind11/${ASWF_PYBIND11_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -python/${ASWF_PYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF +ENV CONAN_HOME=${CONAN_USER_HOME}/.conan2 + RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} diff --git a/ci-base/README.md b/ci-base/README.md index 61adf628..e55bb4fd 100644 --- a/ci-base/README.md +++ b/ci-base/README.md @@ -20,103 +20,144 @@ Contains: Python, TBB, Boost and other base libraries ## [aswf/ci-base:2019.9](https://hub.docker.com/r/aswf/ci-base/tags?page=1&name=2019.9) Contains: -* blosc-1.5.0 -* boost-1.66.0 -* cmake-3.12.4 * cppunit-1.14.0 +* gtest-1.8.1 +* tbb-2018 +* blosc-1.5.0 +* cpython-2.7.15 * glew-2.1.0 * glfw-3.1.2 -* gtest-1.8.1 * log4cplus-1.1.2 +* boost-1.66.0 * pybind11-2.4.3 -* python-2.7.15 -* tbb-2018 * numpy-1.14 * vfxplatform-2019 ## [aswf/ci-base:2020.9](https://hub.docker.com/r/aswf/ci-base/tags?page=1&name=2020.9) Contains: -* blosc-1.5.0 -* boost-1.70.0 -* cmake-3.18.4 * cppunit-1.15.1 +* gtest-1.10.0 +* tbb-2019_u6 +* blosc-1.5.0 +* cpython-3.7.3 * glew-2.1.0 * glfw-3.1.2 -* gtest-1.10.0 * log4cplus-1.1.2 +* boost-1.70.0 * pybind11-2.4.3 -* python-3.7.3 -* tbb-2019_U6 * numpy-1.16 * vfxplatform-2020 ## [aswf/ci-base:2021.6](https://hub.docker.com/r/aswf/ci-base/tags?page=1&name=2021.6) Contains: -* blosc-1.5.0 -* boost-1.73.0 -* cmake-3.19.3 * cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u2 +* blosc-1.5.0 +* cpython-3.7.9 * glew-2.1.0 * glfw-3.1.2 -* gtest-1.11.0 * log4cplus-1.1.2 +* boost-1.73.0 * pybind11-2.6.2 -* python-3.7.9 -* tbb-2020_U2 * numpy-1.19 * vfxplatform-2021 ## [aswf/ci-base:2022.4](https://hub.docker.com/r/aswf/ci-base/tags?page=1&name=2022.4) Contains: -* blosc-1.17.0 -* boost-1.76.0 -* cmake-3.22.0 * cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.9.15 * glew-2.1.0 * glfw-3.1.2 -* gtest-1.11.0 * log4cplus-1.1.2 +* boost-1.76.0 * pybind11-2.8.1 -* python-3.9.15 -* tbb-2020_U3 * numpy-1.20 * vfxplatform-2022 ## [aswf/ci-base:2023.2](https://hub.docker.com/r/aswf/ci-base/tags?page=1&name=2023.2) Contains: -* blosc-1.17.0 -* boost-1.80.0 -* cmake-3.27.2 * cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.10.11 * glew-2.1.0 * glfw-3.1.2 -* gtest-1.11.0 * log4cplus-1.1.2 +* boost-1.80.0 * pybind11-2.9.2 -* python-3.10.11 -* tbb-2020_U3 * numpy-1.23.5 * vfxplatform-2023 ## [aswf/ci-base:2024.2](https://hub.docker.com/r/aswf/ci-base/tags?page=1&name=2024.2) Contains: -* blosc-1.21.5 -* boost-1.82.0 -* cmake-3.27.9 +* b2-5.2.1 +* bzip2-1.0.8 * cppunit-1.15.1 -* expat-2.6.3 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.14.0 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.5 +* cpython-3.11.11 +* freetype-2.13.2 +* gdbm-system * glew-2.1.0 * glfw-3.3.8 -* gtest-1.14.0 * log4cplus-2.1.1 +* boost-1.82.0 * pybind11-2.12.0 -* python-3.11.10 -* tbb-2020_U3 * numpy-1.24.3 * vfxplatform-2024 +## [aswf/ci-base:2025.0](https://hub.docker.com/r/aswf/ci-base/tags?page=1&name=2025.0) + +Contains: +* b2-5.2.1 +* bzip2-1.0.8 +* cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.15.2 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.6 +* cpython-3.11.11 +* freetype-2.13.2 +* gdbm-system +* glew-2.2.0 +* glfw-3.4 +* log4cplus-2.1.2 +* boost-1.85.0 +* pybind11-2.13.6 +* numpy-1.26.4 +* vfxplatform-2025 + diff --git a/ci-base/image.yaml b/ci-base/image.yaml index 7510348f..11432980 100644 --- a/ci-base/image.yaml +++ b/ci-base/image.yaml @@ -3,18 +3,35 @@ title: "Base CI Docker Image" description: | Contains: Python, TBB, Boost and other base libraries packages: - - blosc - - boost - - cmake + - b2 # base1-1 packages + - bzip2 - cppunit - expat + - fmt + - gtest + - libbacktrace + - libdeflate + - libiconv + - libxcrypt + - lz4 + - pugixml + - pystring + - snappy + - tbb + - tsl-robin-map + - yaml-cpp + - zlib + - zstd + - blosc # base1-2 packages + - cpython + - freetype + - gdbm - glew - glfw - - gtest - log4cplus + - minizip-ng + - boost # base1-3 packages - pybind11 - - python - - tbb implicit_packages: - numpy - vfxplatform diff --git a/ci-baseqt/Dockerfile b/ci-baseqt/Dockerfile index 9c0b3059..24e2d593 100644 --- a/ci-baseqt/Dockerfile +++ b/ci-baseqt/Dockerfile @@ -14,23 +14,42 @@ ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_BLOSC_VERSION -ARG ASWF_BOOST_VERSION -ARG ASWF_CMAKE_VERSION +ARG ASWF_B2_VERSION +ARG ASWF_BZIP2_VERSION ARG ASWF_CPPUNIT_VERSION ARG ASWF_EXPAT_VERSION +ARG ASWF_FMT_VERSION +ARG ASWF_GTEST_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBXCRYPT_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_PUGIXML_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_SNAPPY_VERSION +ARG ASWF_TBB_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION +ARG ASWF_BLOSC_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_FREETYPE_VERSION +ARG ASWF_GDBM_VERSION ARG ASWF_GLEW_VERSION ARG ASWF_GLFW_VERSION -ARG ASWF_GTEST_VERSION ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_MINIZIP_NG_VERSION +ARG ASWF_BOOST_VERSION ARG ASWF_PYBIND11_VERSION -ARG ASWF_PYTHON_VERSION -ARG ASWF_TBB_VERSION +ARG ASWF_LIBJPEG_TURBO_VERSION +ARG ASWF_LIBWEBP_VERSION +ARG ASWF_MD4C_VERSION ARG ASWF_QT_VERSION ARG ASWF_PYSIDE_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION @@ -48,23 +67,42 @@ ARG ASWF_CONAN_CHANNEL -ARG ASWF_BLOSC_VERSION -ARG ASWF_BOOST_VERSION -ARG ASWF_CMAKE_VERSION +ARG ASWF_B2_VERSION +ARG ASWF_BZIP2_VERSION ARG ASWF_CPPUNIT_VERSION ARG ASWF_EXPAT_VERSION +ARG ASWF_FMT_VERSION +ARG ASWF_GTEST_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBXCRYPT_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_PUGIXML_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_SNAPPY_VERSION +ARG ASWF_TBB_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION +ARG ASWF_BLOSC_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_FREETYPE_VERSION +ARG ASWF_GDBM_VERSION ARG ASWF_GLEW_VERSION ARG ASWF_GLFW_VERSION -ARG ASWF_GTEST_VERSION ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_MINIZIP_NG_VERSION +ARG ASWF_BOOST_VERSION ARG ASWF_PYBIND11_VERSION -ARG ASWF_PYTHON_VERSION -ARG ASWF_TBB_VERSION +ARG ASWF_LIBJPEG_TURBO_VERSION +ARG ASWF_LIBWEBP_VERSION +ARG ASWF_MD4C_VERSION ARG ASWF_QT_VERSION ARG ASWF_PYSIDE_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION LABEL org.opencontainers.image.name="$ASWF_ORG/ci-baseqt" @@ -80,18 +118,38 @@ LABEL org.opencontainers.image.version="${ASWF_VERSION}" LABEL com.vfxplatform.version="${ASWF_VFXPLATFORM_VERSION}" -LABEL io.aswf.docker.versions.blosc="$ASWF_BLOSC_VERSION" -LABEL io.aswf.docker.versions.boost="$ASWF_BOOST_VERSION" -LABEL io.aswf.docker.versions.cmake="$ASWF_CMAKE_VERSION" +LABEL io.aswf.docker.versions.b2="$ASWF_B2_VERSION" +LABEL io.aswf.docker.versions.bzip2="$ASWF_BZIP2_VERSION" LABEL io.aswf.docker.versions.cppunit="$ASWF_CPPUNIT_VERSION" LABEL io.aswf.docker.versions.expat="$ASWF_EXPAT_VERSION" +LABEL io.aswf.docker.versions.fmt="$ASWF_FMT_VERSION" +LABEL io.aswf.docker.versions.gtest="$ASWF_GTEST_VERSION" +LABEL io.aswf.docker.versions.libbacktrace="$ASWF_LIBBACKTRACE_VERSION" +LABEL io.aswf.docker.versions.libdeflate="$ASWF_LIBDEFLATE_VERSION" +LABEL io.aswf.docker.versions.libiconv="$ASWF_LIBICONV_VERSION" +LABEL io.aswf.docker.versions.libxcrypt="$ASWF_LIBXCRYPT_VERSION" +LABEL io.aswf.docker.versions.lz4="$ASWF_LZ4_VERSION" +LABEL io.aswf.docker.versions.pugixml="$ASWF_PUGIXML_VERSION" +LABEL io.aswf.docker.versions.pystring="$ASWF_PYSTRING_VERSION" +LABEL io.aswf.docker.versions.snappy="$ASWF_SNAPPY_VERSION" +LABEL io.aswf.docker.versions.tbb="$ASWF_TBB_VERSION" +LABEL io.aswf.docker.versions.tsl-robin-map="$ASWF_TSL_ROBIN_MAP_VERSION" +LABEL io.aswf.docker.versions.yaml-cpp="$ASWF_YAML_CPP_VERSION" +LABEL io.aswf.docker.versions.zlib="$ASWF_ZLIB_VERSION" +LABEL io.aswf.docker.versions.zstd="$ASWF_ZSTD_VERSION" +LABEL io.aswf.docker.versions.blosc="$ASWF_BLOSC_VERSION" +LABEL io.aswf.docker.versions.cpython="$ASWF_CPYTHON_VERSION" +LABEL io.aswf.docker.versions.freetype="$ASWF_FREETYPE_VERSION" +LABEL io.aswf.docker.versions.gdbm="$ASWF_GDBM_VERSION" LABEL io.aswf.docker.versions.glew="$ASWF_GLEW_VERSION" LABEL io.aswf.docker.versions.glfw="$ASWF_GLFW_VERSION" -LABEL io.aswf.docker.versions.gtest="$ASWF_GTEST_VERSION" LABEL io.aswf.docker.versions.log4cplus="$ASWF_LOG4CPLUS_VERSION" +LABEL io.aswf.docker.versions.minizip-ng="$ASWF_MINIZIP_NG_VERSION" +LABEL io.aswf.docker.versions.boost="$ASWF_BOOST_VERSION" LABEL io.aswf.docker.versions.pybind11="$ASWF_PYBIND11_VERSION" -LABEL io.aswf.docker.versions.python="$ASWF_PYTHON_VERSION" -LABEL io.aswf.docker.versions.tbb="$ASWF_TBB_VERSION" +LABEL io.aswf.docker.versions.libjpeg-turbo="$ASWF_LIBJPEG_TURBO_VERSION" +LABEL io.aswf.docker.versions.libwebp="$ASWF_LIBWEBP_VERSION" +LABEL io.aswf.docker.versions.md4c="$ASWF_MD4C_VERSION" LABEL io.aswf.docker.versions.qt="$ASWF_QT_VERSION" LABEL io.aswf.docker.versions.pyside="$ASWF_PYSIDE_VERSION" LABEL io.aswf.docker.versions.numpy="$ASWF_NUMPY_VERSION" @@ -107,57 +165,100 @@ ENV ASWF_PYSIDE_CLANG_VERSION=${ASWF_PYSIDE_CLANG_VERSION} ENV ASWF_VFXPLATFORM_VERSION=${ASWF_VFXPLATFORM_VERSION} -ENV ASWF_BLOSC_VERSION=$ASWF_BLOSC_VERSION -ENV ASWF_BOOST_VERSION=$ASWF_BOOST_VERSION -ENV ASWF_CMAKE_VERSION=$ASWF_CMAKE_VERSION +ENV ASWF_B2_VERSION=$ASWF_B2_VERSION +ENV ASWF_BZIP2_VERSION=$ASWF_BZIP2_VERSION ENV ASWF_CPPUNIT_VERSION=$ASWF_CPPUNIT_VERSION ENV ASWF_EXPAT_VERSION=$ASWF_EXPAT_VERSION +ENV ASWF_FMT_VERSION=$ASWF_FMT_VERSION +ENV ASWF_GTEST_VERSION=$ASWF_GTEST_VERSION +ENV ASWF_LIBBACKTRACE_VERSION=$ASWF_LIBBACKTRACE_VERSION +ENV ASWF_LIBDEFLATE_VERSION=$ASWF_LIBDEFLATE_VERSION +ENV ASWF_LIBICONV_VERSION=$ASWF_LIBICONV_VERSION +ENV ASWF_LIBXCRYPT_VERSION=$ASWF_LIBXCRYPT_VERSION +ENV ASWF_LZ4_VERSION=$ASWF_LZ4_VERSION +ENV ASWF_PUGIXML_VERSION=$ASWF_PUGIXML_VERSION +ENV ASWF_PYSTRING_VERSION=$ASWF_PYSTRING_VERSION +ENV ASWF_SNAPPY_VERSION=$ASWF_SNAPPY_VERSION +ENV ASWF_TBB_VERSION=$ASWF_TBB_VERSION +ENV ASWF_TSL_ROBIN_MAP_VERSION=$ASWF_TSL_ROBIN_MAP_VERSION +ENV ASWF_YAML_CPP_VERSION=$ASWF_YAML_CPP_VERSION +ENV ASWF_ZLIB_VERSION=$ASWF_ZLIB_VERSION +ENV ASWF_ZSTD_VERSION=$ASWF_ZSTD_VERSION +ENV ASWF_BLOSC_VERSION=$ASWF_BLOSC_VERSION +ENV ASWF_CPYTHON_VERSION=$ASWF_CPYTHON_VERSION +ENV ASWF_FREETYPE_VERSION=$ASWF_FREETYPE_VERSION +ENV ASWF_GDBM_VERSION=$ASWF_GDBM_VERSION ENV ASWF_GLEW_VERSION=$ASWF_GLEW_VERSION ENV ASWF_GLFW_VERSION=$ASWF_GLFW_VERSION -ENV ASWF_GTEST_VERSION=$ASWF_GTEST_VERSION ENV ASWF_LOG4CPLUS_VERSION=$ASWF_LOG4CPLUS_VERSION +ENV ASWF_MINIZIP_NG_VERSION=$ASWF_MINIZIP_NG_VERSION +ENV ASWF_BOOST_VERSION=$ASWF_BOOST_VERSION ENV ASWF_PYBIND11_VERSION=$ASWF_PYBIND11_VERSION -ENV ASWF_PYTHON_VERSION=$ASWF_PYTHON_VERSION -ENV ASWF_TBB_VERSION=$ASWF_TBB_VERSION +ENV ASWF_LIBJPEG_TURBO_VERSION=$ASWF_LIBJPEG_TURBO_VERSION +ENV ASWF_LIBWEBP_VERSION=$ASWF_LIBWEBP_VERSION +ENV ASWF_MD4C_VERSION=$ASWF_MD4C_VERSION ENV ASWF_QT_VERSION=$ASWF_QT_VERSION ENV ASWF_PYSIDE_VERSION=$ASWF_PYSIDE_VERSION ENV ASWF_NUMPY_VERSION=$ASWF_NUMPY_VERSION ENV ASWF_VFXPLATFORM_VERSION=$ASWF_VFXPLATFORM_VERSION -ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=$ASWF_PYTHON_MAJOR_MINOR_VERSION COPY ci-baseqt/README.md ci-baseqt/image.yaml /usr/local/aswf/ -ENV PYTHONPATH=/usr/local/lib/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib64/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib/python:${PYTHONPATH} COPY scripts/common/install_conanpackages.sh /tmp/ +ARG ASWF_PYTHON_MAJOR_MINOR_VERSION +ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=${ASWF_PYTHON_MAJOR_MINOR_VERSION} + # conan-only packages COPY < . [requires] -blosc/${ASWF_BLOSC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +b2/${ASWF_B2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +bzip2/${ASWF_BZIP2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} cppunit/${ASWF_CPPUNIT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} expat/${ASWF_EXPAT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +fmt/${ASWF_FMT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +gtest/${ASWF_GTEST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libbacktrace/${ASWF_LIBBACKTRACE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libdeflate/${ASWF_LIBDEFLATE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libiconv/${ASWF_LIBICONV_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libxcrypt/${ASWF_LIBXCRYPT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +lz4/${ASWF_LZ4_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pugixml/${ASWF_PUGIXML_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pystring/${ASWF_PYSTRING_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +snappy/${ASWF_SNAPPY_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tsl-robin-map/${ASWF_TSL_ROBIN_MAP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +yaml-cpp/${ASWF_YAML_CPP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zlib/${ASWF_ZLIB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zstd/${ASWF_ZSTD_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +blosc/${ASWF_BLOSC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cpython/${ASWF_CPYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +freetype/${ASWF_FREETYPE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +gdbm/${ASWF_GDBM_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} glew/${ASWF_GLEW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} glfw/${ASWF_GLFW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -gtest/${ASWF_GTEST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} log4cplus/${ASWF_LOG4CPLUS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +minizip-ng/${ASWF_MINIZIP_NG_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} pybind11/${ASWF_PYBIND11_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -python/${ASWF_PYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libjpeg-turbo/${ASWF_LIBJPEG_TURBO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libwebp/${ASWF_LIBWEBP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +md4c/${ASWF_MD4C_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} qt/${ASWF_QT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} pyside/${ASWF_PYSIDE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF +ENV CONAN_HOME=${CONAN_USER_HOME}/.conan2 + RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} diff --git a/ci-baseqt/README.md b/ci-baseqt/README.md index cbee182c..75475b81 100644 --- a/ci-baseqt/README.md +++ b/ci-baseqt/README.md @@ -20,17 +20,16 @@ Contains: Python, TBB, Boost, Qt, PySide and other base libraries ## [aswf/ci-baseqt:2019.2](https://hub.docker.com/r/aswf/ci-baseqt/tags?page=1&name=2019.2) Contains: -* blosc-1.5.0 -* boost-1.66.0 -* cmake-3.12.4 * cppunit-1.14.0 +* gtest-1.8.1 +* tbb-2018 +* blosc-1.5.0 +* cpython-2.7.15 * glew-2.1.0 * glfw-3.1.2 -* gtest-1.8.1 * log4cplus-1.1.2 +* boost-1.66.0 * pybind11-2.4.3 -* python-2.7.15 -* tbb-2018 * qt-5.12.6 * pyside-5.12.6 * numpy-1.14 @@ -39,17 +38,16 @@ Contains: ## [aswf/ci-baseqt:2020.2](https://hub.docker.com/r/aswf/ci-baseqt/tags?page=1&name=2020.2) Contains: -* blosc-1.5.0 -* boost-1.70.0 -* cmake-3.18.4 * cppunit-1.15.1 +* gtest-1.10.0 +* tbb-2019_u6 +* blosc-1.5.0 +* cpython-3.7.3 * glew-2.1.0 * glfw-3.1.2 -* gtest-1.10.0 * log4cplus-1.1.2 +* boost-1.70.0 * pybind11-2.4.3 -* python-3.7.3 -* tbb-2019_U6 * qt-5.12.6 * pyside-5.12.6 * numpy-1.16 @@ -58,17 +56,16 @@ Contains: ## [aswf/ci-baseqt:2021.3](https://hub.docker.com/r/aswf/ci-baseqt/tags?page=1&name=2021.3) Contains: -* blosc-1.5.0 -* boost-1.73.0 -* cmake-3.19.3 * cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u2 +* blosc-1.5.0 +* cpython-3.7.9 * glew-2.1.0 * glfw-3.1.2 -* gtest-1.11.0 * log4cplus-1.1.2 +* boost-1.73.0 * pybind11-2.6.2 -* python-3.7.9 -* tbb-2020_U2 * qt-5.15.2 * pyside-5.15.2 * numpy-1.19 @@ -77,17 +74,16 @@ Contains: ## [aswf/ci-baseqt:2022.4](https://hub.docker.com/r/aswf/ci-baseqt/tags?page=1&name=2022.4) Contains: -* blosc-1.17.0 -* boost-1.76.0 -* cmake-3.22.0 * cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.9.15 * glew-2.1.0 * glfw-3.1.2 -* gtest-1.11.0 * log4cplus-1.1.2 +* boost-1.76.0 * pybind11-2.8.1 -* python-3.9.15 -* tbb-2020_U3 * qt-5.15.2 * pyside-5.15.2 * numpy-1.20 @@ -96,17 +92,16 @@ Contains: ## [aswf/ci-baseqt:2023.2](https://hub.docker.com/r/aswf/ci-baseqt/tags?page=1&name=2023.2) Contains: -* blosc-1.17.0 -* boost-1.80.0 -* cmake-3.27.2 * cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.10.11 * glew-2.1.0 * glfw-3.1.2 -* gtest-1.11.0 * log4cplus-1.1.2 +* boost-1.80.0 * pybind11-2.9.2 -* python-3.10.11 -* tbb-2020_U3 * qt-5.15.9 * pyside-5.15.9 * numpy-1.23.5 @@ -115,20 +110,72 @@ Contains: ## [aswf/ci-baseqt:2024.2](https://hub.docker.com/r/aswf/ci-baseqt/tags?page=1&name=2024.2) Contains: -* blosc-1.21.5 -* boost-1.82.0 -* cmake-3.27.9 +* b2-5.2.1 +* bzip2-1.0.8 * cppunit-1.15.1 -* expat-2.6.3 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.14.0 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.5 +* cpython-3.11.11 +* freetype-2.13.2 +* gdbm-system * glew-2.1.0 * glfw-3.3.8 -* gtest-1.14.0 * log4cplus-2.1.1 +* boost-1.82.0 * pybind11-2.12.0 -* python-3.11.10 -* tbb-2020_U3 -* qt-6.5.3 -* pyside-6.5.3 +* libwebp-1.5.0 +* md4c-0.4.8 +* qt-6.5.4 +* pyside-6.5.4 * numpy-1.24.3 * vfxplatform-2024 +## [aswf/ci-baseqt:2025.0](https://hub.docker.com/r/aswf/ci-baseqt/tags?page=1&name=2025.0) + +Contains: +* b2-5.2.1 +* bzip2-1.0.8 +* cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.15.2 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.6 +* cpython-3.11.11 +* freetype-2.13.2 +* gdbm-system +* glew-2.2.0 +* glfw-3.4 +* log4cplus-2.1.2 +* boost-1.85.0 +* pybind11-2.13.6 +* libwebp-1.5.0 +* md4c-0.4.8 +* qt-6.5.4 +* pyside-6.5.4 +* numpy-1.26.4 +* vfxplatform-2025 + diff --git a/ci-baseqt/image.yaml b/ci-baseqt/image.yaml index 3dcee19c..04eddb06 100644 --- a/ci-baseqt/image.yaml +++ b/ci-baseqt/image.yaml @@ -3,20 +3,40 @@ title: "Base with Qt and PySide CI Docker Image" description: | Contains: Python, TBB, Boost, Qt, PySide and other base libraries packages: - - blosc - - boost - - cmake + - b2 # base1-1 packages + - bzip2 - cppunit - expat + - fmt + - gtest + - libbacktrace + - libdeflate + - libiconv + - libxcrypt + - lz4 + - pugixml + - pystring + - snappy + - tbb + - tsl-robin-map + - yaml-cpp + - zlib + - zstd + - blosc # base1-2 packages + - cpython + - freetype + - gdbm - glew - glfw - - gtest - log4cplus + - minizip-ng + - boost # base1-3 packages - pybind11 - - python - - tbb - - qt - - pyside + - libjpeg-turbo # base2-1 packages + - libwebp + - md4c + - qt # base2-2 packages + - pyside # base2-3 packages implicit_packages: - numpy - vfxplatform diff --git a/ci-common/Dockerfile b/ci-common/Dockerfile index e3816a6e..bb49b684 100644 --- a/ci-common/Dockerfile +++ b/ci-common/Dockerfile @@ -13,6 +13,7 @@ ARG ASWF_CONAN_CHANNEL ARG ASWF_CLANG_VERSION +ARG ASWF_CMAKE_VERSION ARG ASWF_NINJA_VERSION ARG ASWF_CUDA_VERSION ARG ASWF_GLVND_VERSION @@ -20,7 +21,6 @@ ARG ASWF_CCACHE_VERSION ARG ASWF_DTS_VERSION ARG ASWF_SONAR_VERSION ARG ASWF_CONAN_VERSION -ARG ASWF_CMAKE_VERSION ARG ASWF_CONAN_PYTHON_VERSION @@ -45,6 +45,7 @@ ARG ASWF_DTS_PREFIX ARG ASWF_CLANG_VERSION +ARG ASWF_CMAKE_VERSION ARG ASWF_NINJA_VERSION ARG ASWF_CUDA_VERSION ARG ASWF_GLVND_VERSION @@ -52,7 +53,6 @@ ARG ASWF_CCACHE_VERSION ARG ASWF_DTS_VERSION ARG ASWF_SONAR_VERSION ARG ASWF_CONAN_VERSION -ARG ASWF_CMAKE_VERSION ARG ASWF_CONAN_PYTHON_VERSION @@ -68,6 +68,7 @@ LABEL org.opencontainers.image.version="${ASWF_VERSION}" LABEL io.aswf.docker.versions.clang="$ASWF_CLANG_VERSION" +LABEL io.aswf.docker.versions.cmake="$ASWF_CMAKE_VERSION" LABEL io.aswf.docker.versions.ninja="$ASWF_NINJA_VERSION" LABEL io.aswf.docker.versions.cuda="$ASWF_CUDA_VERSION" LABEL io.aswf.docker.versions.glvnd="$ASWF_GLVND_VERSION" @@ -75,7 +76,6 @@ LABEL io.aswf.docker.versions.ccache="$ASWF_CCACHE_VERSION" LABEL io.aswf.docker.versions.dts="$ASWF_DTS_VERSION" LABEL io.aswf.docker.versions.sonar="$ASWF_SONAR_VERSION" LABEL io.aswf.docker.versions.conan="$ASWF_CONAN_VERSION" -LABEL io.aswf.docker.versions.cmake="$ASWF_CMAKE_VERSION" ENV ASWF_ORG=${ASWF_ORG} @@ -88,6 +88,7 @@ ENV ASWF_DTS_PREFIX=$ASWF_DTS_PREFIX ENV ASWF_CLANG_VERSION=$ASWF_CLANG_VERSION +ENV ASWF_CMAKE_VERSION=$ASWF_CMAKE_VERSION ENV ASWF_NINJA_VERSION=$ASWF_NINJA_VERSION ENV ASWF_CUDA_VERSION=$ASWF_CUDA_VERSION ENV ASWF_GLVND_VERSION=$ASWF_GLVND_VERSION @@ -95,7 +96,6 @@ ENV ASWF_CCACHE_VERSION=$ASWF_CCACHE_VERSION ENV ASWF_DTS_VERSION=$ASWF_DTS_VERSION ENV ASWF_SONAR_VERSION=$ASWF_SONAR_VERSION ENV ASWF_CONAN_VERSION=$ASWF_CONAN_VERSION -ENV ASWF_CMAKE_VERSION=$ASWF_CMAKE_VERSION ENV ASWF_CONAN_PYTHON_VERSION=$ASWF_CONAN_PYTHON_VERSION @@ -165,6 +165,9 @@ ENV CONAN_USER_HOME=/opt/conan_home COPY scripts/common/install_conanpackages.sh /tmp/ +ARG ASWF_PYTHON_MAJOR_MINOR_VERSION +ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=${ASWF_PYTHON_MAJOR_MINOR_VERSION} + # conan-only packages COPY < . [requires] clang/${ASWF_CLANG_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} ninja/${ASWF_NINJA_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF +ENV CONAN_HOME=${CONAN_USER_HOME}/.conan2 + RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local ci_common${CI_COMMON_VERSION} diff --git a/ci-common/README.md b/ci-common/README.md index 8e0ff41e..e0307cbe 100644 --- a/ci-common/README.md +++ b/ci-common/README.md @@ -165,23 +165,51 @@ Contains: Contains: * clang-16.0.6 -* ninja-1.11.1 +* cmake-3.27.9 +* ninja-1.12.1 * cuda-12.6.1 * glvnd-1.7.0 * ccache-4.8.3 * dts-11 -* sonar-5.0.1.3006 -* conan-1.65.0 +* sonar-6.2.1.4610 +* conan-2.14.0 ## [aswf/ci-common:4-clang17.2](https://hub.docker.com/r/aswf/ci-common/tags?page=1&name=4-clang17.2) Contains: * clang-17.0.6 -* ninja-1.11.1 +* cmake-3.27.9 +* ninja-1.12.1 * cuda-12.6.1 * glvnd-1.7.0 * ccache-4.8.3 * dts-11 -* sonar-5.0.1.3006 -* conan-1.65.0 +* sonar-6.2.1.4610 +* conan-2.14.0 + +## [aswf/ci-common:5-clang18.0](https://hub.docker.com/r/aswf/ci-common/tags?page=1&name=5-clang18.0) + +Contains: +* clang-18.1.8 +* cmake-3.31.6 +* ninja-1.12.1 +* cuda-12.6.1 +* glvnd-1.7.0 +* ccache-4.9.1 +* dts-11 +* sonar-6.2.1.4610 +* conan-2.14.0 + +## [aswf/ci-common:5-clang19.0](https://hub.docker.com/r/aswf/ci-common/tags?page=1&name=5-clang19.0) + +Contains: +* clang-19.1.1 +* cmake-3.31.6 +* ninja-1.12.1 +* cuda-12.6.1 +* glvnd-1.7.0 +* ccache-4.9.1 +* dts-11 +* sonar-6.2.1.4610 +* conan-2.14.0 diff --git a/ci-common/image.yaml b/ci-common/image.yaml index ef20defb..dcd83e35 100644 --- a/ci-common/image.yaml +++ b/ci-common/image.yaml @@ -4,6 +4,7 @@ description: | Contains: GCC, Clang, CMake, Jinja, ccache and all base OS libraries packages: - clang + - cmake - ninja implicit_packages: - cuda @@ -12,7 +13,6 @@ implicit_packages: - dts - sonar - conan - - cmake docker_from: ${ASWF_BASEOS_IMAGE}:${ASWF_CUDA_VERSION}-devel-${ASWF_BASEOS_DISTRO} docker_package_version: $CI_COMMON_VERSION docker_commands: | diff --git a/ci-materialx/Dockerfile b/ci-materialx/Dockerfile index 49c27a4f..4c3abcca 100644 --- a/ci-materialx/Dockerfile +++ b/ci-materialx/Dockerfile @@ -14,12 +14,50 @@ ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_VERSION +ARG ASWF_B2_VERSION +ARG ASWF_BZIP2_VERSION +ARG ASWF_CPPUNIT_VERSION +ARG ASWF_EXPAT_VERSION +ARG ASWF_FMT_VERSION +ARG ASWF_GTEST_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBXCRYPT_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_PUGIXML_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_SNAPPY_VERSION +ARG ASWF_TBB_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION +ARG ASWF_BLOSC_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_FREETYPE_VERSION +ARG ASWF_GDBM_VERSION +ARG ASWF_GLEW_VERSION +ARG ASWF_GLFW_VERSION +ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_MINIZIP_NG_VERSION +ARG ASWF_BOOST_VERSION ARG ASWF_PYBIND11_VERSION -ARG ASWF_CMAKE_VERSION +ARG ASWF_LIBJPEG_TURBO_VERSION +ARG ASWF_LIBWEBP_VERSION +ARG ASWF_MD4C_VERSION +ARG ASWF_QT_VERSION +ARG ASWF_HIGHWAY_VERSION +ARG ASWF_IMATH_VERSION +ARG ASWF_LCMS_VERSION +ARG ASWF_LIBUHDR_VERSION +ARG ASWF_PTEX_VERSION +ARG ASWF_LIBJXL_VERSION +ARG ASWF_OPENEXR_VERSION +ARG ASWF_OCIO_VERSION +ARG ASWF_OIIO_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION @@ -37,12 +75,50 @@ ARG ASWF_CONAN_CHANNEL -ARG ASWF_PYTHON_VERSION +ARG ASWF_B2_VERSION +ARG ASWF_BZIP2_VERSION +ARG ASWF_CPPUNIT_VERSION +ARG ASWF_EXPAT_VERSION +ARG ASWF_FMT_VERSION +ARG ASWF_GTEST_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBXCRYPT_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_PUGIXML_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_SNAPPY_VERSION +ARG ASWF_TBB_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION +ARG ASWF_BLOSC_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_FREETYPE_VERSION +ARG ASWF_GDBM_VERSION +ARG ASWF_GLEW_VERSION +ARG ASWF_GLFW_VERSION +ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_MINIZIP_NG_VERSION +ARG ASWF_BOOST_VERSION ARG ASWF_PYBIND11_VERSION -ARG ASWF_CMAKE_VERSION +ARG ASWF_LIBJPEG_TURBO_VERSION +ARG ASWF_LIBWEBP_VERSION +ARG ASWF_MD4C_VERSION +ARG ASWF_QT_VERSION +ARG ASWF_HIGHWAY_VERSION +ARG ASWF_IMATH_VERSION +ARG ASWF_LCMS_VERSION +ARG ASWF_LIBUHDR_VERSION +ARG ASWF_PTEX_VERSION +ARG ASWF_LIBJXL_VERSION +ARG ASWF_OPENEXR_VERSION +ARG ASWF_OCIO_VERSION +ARG ASWF_OIIO_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION LABEL org.opencontainers.image.name="$ASWF_ORG/ci-materialx" @@ -59,9 +135,48 @@ LABEL org.opencontainers.image.version="${ASWF_VERSION}" LABEL com.vfxplatform.version="${ASWF_VFXPLATFORM_VERSION}" -LABEL io.aswf.docker.versions.python="$ASWF_PYTHON_VERSION" +LABEL io.aswf.docker.versions.b2="$ASWF_B2_VERSION" +LABEL io.aswf.docker.versions.bzip2="$ASWF_BZIP2_VERSION" +LABEL io.aswf.docker.versions.cppunit="$ASWF_CPPUNIT_VERSION" +LABEL io.aswf.docker.versions.expat="$ASWF_EXPAT_VERSION" +LABEL io.aswf.docker.versions.fmt="$ASWF_FMT_VERSION" +LABEL io.aswf.docker.versions.gtest="$ASWF_GTEST_VERSION" +LABEL io.aswf.docker.versions.libbacktrace="$ASWF_LIBBACKTRACE_VERSION" +LABEL io.aswf.docker.versions.libdeflate="$ASWF_LIBDEFLATE_VERSION" +LABEL io.aswf.docker.versions.libiconv="$ASWF_LIBICONV_VERSION" +LABEL io.aswf.docker.versions.libxcrypt="$ASWF_LIBXCRYPT_VERSION" +LABEL io.aswf.docker.versions.lz4="$ASWF_LZ4_VERSION" +LABEL io.aswf.docker.versions.pugixml="$ASWF_PUGIXML_VERSION" +LABEL io.aswf.docker.versions.pystring="$ASWF_PYSTRING_VERSION" +LABEL io.aswf.docker.versions.snappy="$ASWF_SNAPPY_VERSION" +LABEL io.aswf.docker.versions.tbb="$ASWF_TBB_VERSION" +LABEL io.aswf.docker.versions.tsl-robin-map="$ASWF_TSL_ROBIN_MAP_VERSION" +LABEL io.aswf.docker.versions.yaml-cpp="$ASWF_YAML_CPP_VERSION" +LABEL io.aswf.docker.versions.zlib="$ASWF_ZLIB_VERSION" +LABEL io.aswf.docker.versions.zstd="$ASWF_ZSTD_VERSION" +LABEL io.aswf.docker.versions.blosc="$ASWF_BLOSC_VERSION" +LABEL io.aswf.docker.versions.cpython="$ASWF_CPYTHON_VERSION" +LABEL io.aswf.docker.versions.freetype="$ASWF_FREETYPE_VERSION" +LABEL io.aswf.docker.versions.gdbm="$ASWF_GDBM_VERSION" +LABEL io.aswf.docker.versions.glew="$ASWF_GLEW_VERSION" +LABEL io.aswf.docker.versions.glfw="$ASWF_GLFW_VERSION" +LABEL io.aswf.docker.versions.log4cplus="$ASWF_LOG4CPLUS_VERSION" +LABEL io.aswf.docker.versions.minizip-ng="$ASWF_MINIZIP_NG_VERSION" +LABEL io.aswf.docker.versions.boost="$ASWF_BOOST_VERSION" LABEL io.aswf.docker.versions.pybind11="$ASWF_PYBIND11_VERSION" -LABEL io.aswf.docker.versions.cmake="$ASWF_CMAKE_VERSION" +LABEL io.aswf.docker.versions.libjpeg-turbo="$ASWF_LIBJPEG_TURBO_VERSION" +LABEL io.aswf.docker.versions.libwebp="$ASWF_LIBWEBP_VERSION" +LABEL io.aswf.docker.versions.md4c="$ASWF_MD4C_VERSION" +LABEL io.aswf.docker.versions.qt="$ASWF_QT_VERSION" +LABEL io.aswf.docker.versions.highway="$ASWF_HIGHWAY_VERSION" +LABEL io.aswf.docker.versions.imath="$ASWF_IMATH_VERSION" +LABEL io.aswf.docker.versions.lcms="$ASWF_LCMS_VERSION" +LABEL io.aswf.docker.versions.libuhdr="$ASWF_LIBUHDR_VERSION" +LABEL io.aswf.docker.versions.ptex="$ASWF_PTEX_VERSION" +LABEL io.aswf.docker.versions.libjxl="$ASWF_LIBJXL_VERSION" +LABEL io.aswf.docker.versions.openexr="$ASWF_OPENEXR_VERSION" +LABEL io.aswf.docker.versions.ocio="$ASWF_OCIO_VERSION" +LABEL io.aswf.docker.versions.oiio="$ASWF_OIIO_VERSION" LABEL io.aswf.docker.versions.numpy="$ASWF_NUMPY_VERSION" LABEL io.aswf.docker.versions.vfxplatform="$ASWF_VFXPLATFORM_VERSION" @@ -75,35 +190,116 @@ ENV ASWF_PYSIDE_CLANG_VERSION=${ASWF_PYSIDE_CLANG_VERSION} ENV ASWF_VFXPLATFORM_VERSION=${ASWF_VFXPLATFORM_VERSION} -ENV ASWF_PYTHON_VERSION=$ASWF_PYTHON_VERSION +ENV ASWF_B2_VERSION=$ASWF_B2_VERSION +ENV ASWF_BZIP2_VERSION=$ASWF_BZIP2_VERSION +ENV ASWF_CPPUNIT_VERSION=$ASWF_CPPUNIT_VERSION +ENV ASWF_EXPAT_VERSION=$ASWF_EXPAT_VERSION +ENV ASWF_FMT_VERSION=$ASWF_FMT_VERSION +ENV ASWF_GTEST_VERSION=$ASWF_GTEST_VERSION +ENV ASWF_LIBBACKTRACE_VERSION=$ASWF_LIBBACKTRACE_VERSION +ENV ASWF_LIBDEFLATE_VERSION=$ASWF_LIBDEFLATE_VERSION +ENV ASWF_LIBICONV_VERSION=$ASWF_LIBICONV_VERSION +ENV ASWF_LIBXCRYPT_VERSION=$ASWF_LIBXCRYPT_VERSION +ENV ASWF_LZ4_VERSION=$ASWF_LZ4_VERSION +ENV ASWF_PUGIXML_VERSION=$ASWF_PUGIXML_VERSION +ENV ASWF_PYSTRING_VERSION=$ASWF_PYSTRING_VERSION +ENV ASWF_SNAPPY_VERSION=$ASWF_SNAPPY_VERSION +ENV ASWF_TBB_VERSION=$ASWF_TBB_VERSION +ENV ASWF_TSL_ROBIN_MAP_VERSION=$ASWF_TSL_ROBIN_MAP_VERSION +ENV ASWF_YAML_CPP_VERSION=$ASWF_YAML_CPP_VERSION +ENV ASWF_ZLIB_VERSION=$ASWF_ZLIB_VERSION +ENV ASWF_ZSTD_VERSION=$ASWF_ZSTD_VERSION +ENV ASWF_BLOSC_VERSION=$ASWF_BLOSC_VERSION +ENV ASWF_CPYTHON_VERSION=$ASWF_CPYTHON_VERSION +ENV ASWF_FREETYPE_VERSION=$ASWF_FREETYPE_VERSION +ENV ASWF_GDBM_VERSION=$ASWF_GDBM_VERSION +ENV ASWF_GLEW_VERSION=$ASWF_GLEW_VERSION +ENV ASWF_GLFW_VERSION=$ASWF_GLFW_VERSION +ENV ASWF_LOG4CPLUS_VERSION=$ASWF_LOG4CPLUS_VERSION +ENV ASWF_MINIZIP_NG_VERSION=$ASWF_MINIZIP_NG_VERSION +ENV ASWF_BOOST_VERSION=$ASWF_BOOST_VERSION ENV ASWF_PYBIND11_VERSION=$ASWF_PYBIND11_VERSION -ENV ASWF_CMAKE_VERSION=$ASWF_CMAKE_VERSION +ENV ASWF_LIBJPEG_TURBO_VERSION=$ASWF_LIBJPEG_TURBO_VERSION +ENV ASWF_LIBWEBP_VERSION=$ASWF_LIBWEBP_VERSION +ENV ASWF_MD4C_VERSION=$ASWF_MD4C_VERSION +ENV ASWF_QT_VERSION=$ASWF_QT_VERSION +ENV ASWF_HIGHWAY_VERSION=$ASWF_HIGHWAY_VERSION +ENV ASWF_IMATH_VERSION=$ASWF_IMATH_VERSION +ENV ASWF_LCMS_VERSION=$ASWF_LCMS_VERSION +ENV ASWF_LIBUHDR_VERSION=$ASWF_LIBUHDR_VERSION +ENV ASWF_PTEX_VERSION=$ASWF_PTEX_VERSION +ENV ASWF_LIBJXL_VERSION=$ASWF_LIBJXL_VERSION +ENV ASWF_OPENEXR_VERSION=$ASWF_OPENEXR_VERSION +ENV ASWF_OCIO_VERSION=$ASWF_OCIO_VERSION +ENV ASWF_OIIO_VERSION=$ASWF_OIIO_VERSION ENV ASWF_NUMPY_VERSION=$ASWF_NUMPY_VERSION ENV ASWF_VFXPLATFORM_VERSION=$ASWF_VFXPLATFORM_VERSION -ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=$ASWF_PYTHON_MAJOR_MINOR_VERSION COPY ci-materialx/README.md ci-materialx/image.yaml /usr/local/aswf/ -ENV PYTHONPATH=/usr/local/lib/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib64/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib/python:${PYTHONPATH} COPY scripts/common/install_conanpackages.sh /tmp/ +ARG ASWF_PYTHON_MAJOR_MINOR_VERSION +ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=${ASWF_PYTHON_MAJOR_MINOR_VERSION} + # conan-only packages COPY < . [requires] -python/${ASWF_PYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +b2/${ASWF_B2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +bzip2/${ASWF_BZIP2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cppunit/${ASWF_CPPUNIT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +expat/${ASWF_EXPAT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +fmt/${ASWF_FMT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +gtest/${ASWF_GTEST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libbacktrace/${ASWF_LIBBACKTRACE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libdeflate/${ASWF_LIBDEFLATE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libiconv/${ASWF_LIBICONV_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libxcrypt/${ASWF_LIBXCRYPT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +lz4/${ASWF_LZ4_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pugixml/${ASWF_PUGIXML_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pystring/${ASWF_PYSTRING_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +snappy/${ASWF_SNAPPY_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tsl-robin-map/${ASWF_TSL_ROBIN_MAP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +yaml-cpp/${ASWF_YAML_CPP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zlib/${ASWF_ZLIB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zstd/${ASWF_ZSTD_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +blosc/${ASWF_BLOSC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cpython/${ASWF_CPYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +freetype/${ASWF_FREETYPE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +gdbm/${ASWF_GDBM_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +glew/${ASWF_GLEW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +glfw/${ASWF_GLFW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +log4cplus/${ASWF_LOG4CPLUS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +minizip-ng/${ASWF_MINIZIP_NG_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} pybind11/${ASWF_PYBIND11_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libjpeg-turbo/${ASWF_LIBJPEG_TURBO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libwebp/${ASWF_LIBWEBP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +md4c/${ASWF_MD4C_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +qt/${ASWF_QT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +highway/${ASWF_HIGHWAY_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +imath/${ASWF_IMATH_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +lcms/${ASWF_LCMS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libuhdr/${ASWF_LIBUHDR_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +ptex/${ASWF_PTEX_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libjxl/${ASWF_LIBJXL_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +openexr/${ASWF_OPENEXR_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +ocio/${ASWF_OCIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +oiio/${ASWF_OIIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF +ENV CONAN_HOME=${CONAN_USER_HOME}/.conan2 + RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} diff --git a/ci-materialx/README.md b/ci-materialx/README.md index 4cd94f45..e1bff1c2 100644 --- a/ci-materialx/README.md +++ b/ci-materialx/README.md @@ -21,27 +21,132 @@ Warning: this image does *not* contain MaterialX itself as it is used to *build* ## [aswf/ci-materialx:2022.1](https://hub.docker.com/r/aswf/ci-materialx/tags?page=1&name=2022.1) Contains: -* python-3.9.15 +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.9.15 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 +* boost-1.76.0 * pybind11-2.8.1 -* cmake-3.22.0 +* qt-5.15.2 +* imath-3.1.5 +* ptex-2.4.0 +* openexr-3.1.5 +* ocio-2.1.1 +* oiio-2.4.5.0 * numpy-1.20 * vfxplatform-2022 ## [aswf/ci-materialx:2023.2](https://hub.docker.com/r/aswf/ci-materialx/tags?page=1&name=2023.2) Contains: -* python-3.10.11 +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.10.11 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 +* boost-1.80.0 * pybind11-2.9.2 -* cmake-3.27.2 +* qt-5.15.9 +* imath-3.1.9 +* ptex-2.4.2 +* openexr-3.1.11 +* ocio-2.2.1 +* oiio-2.4.13.0 * numpy-1.23.5 * vfxplatform-2023 ## [aswf/ci-materialx:2024.2](https://hub.docker.com/r/aswf/ci-materialx/tags?page=1&name=2024.2) Contains: -* python-3.11.10 +* b2-5.2.1 +* bzip2-1.0.8 +* cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.14.0 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.5 +* cpython-3.11.11 +* freetype-2.13.2 +* gdbm-system +* glew-2.1.0 +* glfw-3.3.8 +* log4cplus-2.1.1 +* boost-1.82.0 * pybind11-2.12.0 -* cmake-3.27.9 +* libwebp-1.5.0 +* md4c-0.4.8 +* qt-6.5.4 +* highway-1.2.0 +* imath-3.1.12 +* lcms-2.16 +* libuhdr-1.4.0 +* ptex-2.4.2 +* libjxl-0.11.1 +* openexr-3.2.4 +* ocio-2.3.2 +* oiio-2.5.18.0 * numpy-1.24.3 * vfxplatform-2024 +## [aswf/ci-materialx:2025.0](https://hub.docker.com/r/aswf/ci-materialx/tags?page=1&name=2025.0) + +Contains: +* b2-5.2.1 +* bzip2-1.0.8 +* cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.15.2 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.6 +* cpython-3.11.11 +* freetype-2.13.2 +* gdbm-system +* glew-2.2.0 +* glfw-3.4 +* log4cplus-2.1.2 +* boost-1.85.0 +* pybind11-2.13.6 +* libwebp-1.5.0 +* md4c-0.4.8 +* qt-6.5.4 +* highway-1.2.0 +* imath-3.1.12 +* lcms-2.16 +* libuhdr-1.4.0 +* ptex-2.4.3 +* libjxl-0.11.1 +* openexr-3.3.3 +* ocio-2.4.2 +* oiio-3.0.5.0 +* numpy-1.26.4 +* vfxplatform-2025 + diff --git a/ci-materialx/image.yaml b/ci-materialx/image.yaml index 3b18acaf..431e26be 100644 --- a/ci-materialx/image.yaml +++ b/ci-materialx/image.yaml @@ -4,9 +4,48 @@ description: | Contains: Python, Boost and other MaterialX upstream dependencies Warning: this image does *not* contain MaterialX itself as it is used to *build* MaterialX! packages: - - python + - b2 # base1-1 packages + - bzip2 + - cppunit + - expat + - fmt + - gtest + - libbacktrace + - libdeflate + - libiconv + - libxcrypt + - lz4 + - pugixml + - pystring + - snappy + - tbb + - tsl-robin-map + - yaml-cpp + - zlib + - zstd + - blosc # base1-2 packages + - cpython + - freetype + - gdbm + - glew + - glfw + - log4cplus + - minizip-ng + - boost # base1-3 packages - pybind11 - - cmake + - libjpeg-turbo # base2-1 packages + - libwebp + - md4c + - qt # base2-2 packages + - highway # vfx1-1 packages + - imath + - lcms + - libuhdr + - ptex + - libjxl # vfx1-2 packages + - openexr + - ocio # vfx1-3 packages + - oiio implicit_packages: - numpy - vfxplatform diff --git a/ci-ocio/Dockerfile b/ci-ocio/Dockerfile index 9a194e46..9cafe548 100644 --- a/ci-ocio/Dockerfile +++ b/ci-ocio/Dockerfile @@ -14,30 +14,45 @@ ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_VERSION -ARG ASWF_PYBIND11_VERSION -ARG ASWF_TBB_VERSION -ARG ASWF_BOOST_VERSION +ARG ASWF_B2_VERSION +ARG ASWF_BZIP2_VERSION +ARG ASWF_CPPUNIT_VERSION ARG ASWF_EXPAT_VERSION +ARG ASWF_FMT_VERSION +ARG ASWF_GTEST_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBXCRYPT_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_PUGIXML_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_SNAPPY_VERSION +ARG ASWF_TBB_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION +ARG ASWF_BLOSC_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_FREETYPE_VERSION +ARG ASWF_GDBM_VERSION ARG ASWF_GLEW_VERSION ARG ASWF_GLFW_VERSION -ARG ASWF_CMAKE_VERSION +ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_MINIZIP_NG_VERSION +ARG ASWF_BOOST_VERSION +ARG ASWF_PYBIND11_VERSION ARG ASWF_IMATH_VERSION +ARG ASWF_LCMS_VERSION ARG ASWF_OPENEXR_VERSION -ARG ASWF_BLOSC_VERSION -ARG ASWF_PARTIO_VERSION -ARG ASWF_OPENVDB_VERSION -ARG ASWF_OSL_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION # Comment out this block to use Conan packages -FROM ${ASWF_PKG_ORG}/ci-package-openvdb:$ASWF_VFXPLATFORM_VERSION-$ASWF_OPENVDB_VERSION AS ci-package-openvdb -FROM ${ASWF_PKG_ORG}/ci-package-osl:$ASWF_VFXPLATFORM_VERSION-$ASWF_OSL_VERSION AS ci-package-osl FROM ${ASWF_ORG}/ci-common:${CI_COMMON_VERSION}-clang${ASWF_CLANG_MAJOR_VERSION} AS ci-ocio @@ -50,23 +65,40 @@ ARG ASWF_CONAN_CHANNEL -ARG ASWF_PYTHON_VERSION -ARG ASWF_PYBIND11_VERSION -ARG ASWF_TBB_VERSION -ARG ASWF_BOOST_VERSION +ARG ASWF_B2_VERSION +ARG ASWF_BZIP2_VERSION +ARG ASWF_CPPUNIT_VERSION ARG ASWF_EXPAT_VERSION +ARG ASWF_FMT_VERSION +ARG ASWF_GTEST_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBXCRYPT_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_PUGIXML_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_SNAPPY_VERSION +ARG ASWF_TBB_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION +ARG ASWF_BLOSC_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_FREETYPE_VERSION +ARG ASWF_GDBM_VERSION ARG ASWF_GLEW_VERSION ARG ASWF_GLFW_VERSION -ARG ASWF_CMAKE_VERSION +ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_MINIZIP_NG_VERSION +ARG ASWF_BOOST_VERSION +ARG ASWF_PYBIND11_VERSION ARG ASWF_IMATH_VERSION +ARG ASWF_LCMS_VERSION ARG ASWF_OPENEXR_VERSION -ARG ASWF_BLOSC_VERSION -ARG ASWF_PARTIO_VERSION -ARG ASWF_OPENVDB_VERSION -ARG ASWF_OSL_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION LABEL org.opencontainers.image.name="$ASWF_ORG/ci-ocio" @@ -83,20 +115,38 @@ LABEL org.opencontainers.image.version="${ASWF_VERSION}" LABEL com.vfxplatform.version="${ASWF_VFXPLATFORM_VERSION}" -LABEL io.aswf.docker.versions.python="$ASWF_PYTHON_VERSION" -LABEL io.aswf.docker.versions.pybind11="$ASWF_PYBIND11_VERSION" -LABEL io.aswf.docker.versions.tbb="$ASWF_TBB_VERSION" -LABEL io.aswf.docker.versions.boost="$ASWF_BOOST_VERSION" +LABEL io.aswf.docker.versions.b2="$ASWF_B2_VERSION" +LABEL io.aswf.docker.versions.bzip2="$ASWF_BZIP2_VERSION" +LABEL io.aswf.docker.versions.cppunit="$ASWF_CPPUNIT_VERSION" LABEL io.aswf.docker.versions.expat="$ASWF_EXPAT_VERSION" +LABEL io.aswf.docker.versions.fmt="$ASWF_FMT_VERSION" +LABEL io.aswf.docker.versions.gtest="$ASWF_GTEST_VERSION" +LABEL io.aswf.docker.versions.libbacktrace="$ASWF_LIBBACKTRACE_VERSION" +LABEL io.aswf.docker.versions.libdeflate="$ASWF_LIBDEFLATE_VERSION" +LABEL io.aswf.docker.versions.libiconv="$ASWF_LIBICONV_VERSION" +LABEL io.aswf.docker.versions.libxcrypt="$ASWF_LIBXCRYPT_VERSION" +LABEL io.aswf.docker.versions.lz4="$ASWF_LZ4_VERSION" +LABEL io.aswf.docker.versions.pugixml="$ASWF_PUGIXML_VERSION" +LABEL io.aswf.docker.versions.pystring="$ASWF_PYSTRING_VERSION" +LABEL io.aswf.docker.versions.snappy="$ASWF_SNAPPY_VERSION" +LABEL io.aswf.docker.versions.tbb="$ASWF_TBB_VERSION" +LABEL io.aswf.docker.versions.tsl-robin-map="$ASWF_TSL_ROBIN_MAP_VERSION" +LABEL io.aswf.docker.versions.yaml-cpp="$ASWF_YAML_CPP_VERSION" +LABEL io.aswf.docker.versions.zlib="$ASWF_ZLIB_VERSION" +LABEL io.aswf.docker.versions.zstd="$ASWF_ZSTD_VERSION" +LABEL io.aswf.docker.versions.blosc="$ASWF_BLOSC_VERSION" +LABEL io.aswf.docker.versions.cpython="$ASWF_CPYTHON_VERSION" +LABEL io.aswf.docker.versions.freetype="$ASWF_FREETYPE_VERSION" +LABEL io.aswf.docker.versions.gdbm="$ASWF_GDBM_VERSION" LABEL io.aswf.docker.versions.glew="$ASWF_GLEW_VERSION" LABEL io.aswf.docker.versions.glfw="$ASWF_GLFW_VERSION" -LABEL io.aswf.docker.versions.cmake="$ASWF_CMAKE_VERSION" +LABEL io.aswf.docker.versions.log4cplus="$ASWF_LOG4CPLUS_VERSION" +LABEL io.aswf.docker.versions.minizip-ng="$ASWF_MINIZIP_NG_VERSION" +LABEL io.aswf.docker.versions.boost="$ASWF_BOOST_VERSION" +LABEL io.aswf.docker.versions.pybind11="$ASWF_PYBIND11_VERSION" LABEL io.aswf.docker.versions.imath="$ASWF_IMATH_VERSION" +LABEL io.aswf.docker.versions.lcms="$ASWF_LCMS_VERSION" LABEL io.aswf.docker.versions.openexr="$ASWF_OPENEXR_VERSION" -LABEL io.aswf.docker.versions.blosc="$ASWF_BLOSC_VERSION" -LABEL io.aswf.docker.versions.partio="$ASWF_PARTIO_VERSION" -LABEL io.aswf.docker.versions.openvdb="$ASWF_OPENVDB_VERSION" -LABEL io.aswf.docker.versions.osl="$ASWF_OSL_VERSION" LABEL io.aswf.docker.versions.numpy="$ASWF_NUMPY_VERSION" LABEL io.aswf.docker.versions.vfxplatform="$ASWF_VFXPLATFORM_VERSION" @@ -110,59 +160,96 @@ ENV ASWF_PYSIDE_CLANG_VERSION=${ASWF_PYSIDE_CLANG_VERSION} ENV ASWF_VFXPLATFORM_VERSION=${ASWF_VFXPLATFORM_VERSION} -ENV ASWF_PYTHON_VERSION=$ASWF_PYTHON_VERSION -ENV ASWF_PYBIND11_VERSION=$ASWF_PYBIND11_VERSION -ENV ASWF_TBB_VERSION=$ASWF_TBB_VERSION -ENV ASWF_BOOST_VERSION=$ASWF_BOOST_VERSION +ENV ASWF_B2_VERSION=$ASWF_B2_VERSION +ENV ASWF_BZIP2_VERSION=$ASWF_BZIP2_VERSION +ENV ASWF_CPPUNIT_VERSION=$ASWF_CPPUNIT_VERSION ENV ASWF_EXPAT_VERSION=$ASWF_EXPAT_VERSION +ENV ASWF_FMT_VERSION=$ASWF_FMT_VERSION +ENV ASWF_GTEST_VERSION=$ASWF_GTEST_VERSION +ENV ASWF_LIBBACKTRACE_VERSION=$ASWF_LIBBACKTRACE_VERSION +ENV ASWF_LIBDEFLATE_VERSION=$ASWF_LIBDEFLATE_VERSION +ENV ASWF_LIBICONV_VERSION=$ASWF_LIBICONV_VERSION +ENV ASWF_LIBXCRYPT_VERSION=$ASWF_LIBXCRYPT_VERSION +ENV ASWF_LZ4_VERSION=$ASWF_LZ4_VERSION +ENV ASWF_PUGIXML_VERSION=$ASWF_PUGIXML_VERSION +ENV ASWF_PYSTRING_VERSION=$ASWF_PYSTRING_VERSION +ENV ASWF_SNAPPY_VERSION=$ASWF_SNAPPY_VERSION +ENV ASWF_TBB_VERSION=$ASWF_TBB_VERSION +ENV ASWF_TSL_ROBIN_MAP_VERSION=$ASWF_TSL_ROBIN_MAP_VERSION +ENV ASWF_YAML_CPP_VERSION=$ASWF_YAML_CPP_VERSION +ENV ASWF_ZLIB_VERSION=$ASWF_ZLIB_VERSION +ENV ASWF_ZSTD_VERSION=$ASWF_ZSTD_VERSION +ENV ASWF_BLOSC_VERSION=$ASWF_BLOSC_VERSION +ENV ASWF_CPYTHON_VERSION=$ASWF_CPYTHON_VERSION +ENV ASWF_FREETYPE_VERSION=$ASWF_FREETYPE_VERSION +ENV ASWF_GDBM_VERSION=$ASWF_GDBM_VERSION ENV ASWF_GLEW_VERSION=$ASWF_GLEW_VERSION ENV ASWF_GLFW_VERSION=$ASWF_GLFW_VERSION -ENV ASWF_CMAKE_VERSION=$ASWF_CMAKE_VERSION +ENV ASWF_LOG4CPLUS_VERSION=$ASWF_LOG4CPLUS_VERSION +ENV ASWF_MINIZIP_NG_VERSION=$ASWF_MINIZIP_NG_VERSION +ENV ASWF_BOOST_VERSION=$ASWF_BOOST_VERSION +ENV ASWF_PYBIND11_VERSION=$ASWF_PYBIND11_VERSION ENV ASWF_IMATH_VERSION=$ASWF_IMATH_VERSION +ENV ASWF_LCMS_VERSION=$ASWF_LCMS_VERSION ENV ASWF_OPENEXR_VERSION=$ASWF_OPENEXR_VERSION -ENV ASWF_BLOSC_VERSION=$ASWF_BLOSC_VERSION -ENV ASWF_PARTIO_VERSION=$ASWF_PARTIO_VERSION -ENV ASWF_OPENVDB_VERSION=$ASWF_OPENVDB_VERSION -ENV ASWF_OSL_VERSION=$ASWF_OSL_VERSION ENV ASWF_NUMPY_VERSION=$ASWF_NUMPY_VERSION ENV ASWF_VFXPLATFORM_VERSION=$ASWF_VFXPLATFORM_VERSION -ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=$ASWF_PYTHON_MAJOR_MINOR_VERSION -COPY --from=ci-package-openvdb /. /usr/local/ -COPY --from=ci-package-osl /. /usr/local/ COPY ci-ocio/README.md ci-ocio/image.yaml /usr/local/aswf/ -ENV PYTHONPATH=/usr/local/lib/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib64/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib/python:${PYTHONPATH} COPY scripts/common/install_conanpackages.sh /tmp/ +ARG ASWF_PYTHON_MAJOR_MINOR_VERSION +ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=${ASWF_PYTHON_MAJOR_MINOR_VERSION} + # conan-only packages COPY < . [requires] -python/${ASWF_PYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -pybind11/${ASWF_PYBIND11_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +b2/${ASWF_B2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +bzip2/${ASWF_BZIP2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cppunit/${ASWF_CPPUNIT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} expat/${ASWF_EXPAT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +fmt/${ASWF_FMT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +gtest/${ASWF_GTEST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libbacktrace/${ASWF_LIBBACKTRACE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libdeflate/${ASWF_LIBDEFLATE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libiconv/${ASWF_LIBICONV_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libxcrypt/${ASWF_LIBXCRYPT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +lz4/${ASWF_LZ4_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pugixml/${ASWF_PUGIXML_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pystring/${ASWF_PYSTRING_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +snappy/${ASWF_SNAPPY_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tsl-robin-map/${ASWF_TSL_ROBIN_MAP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +yaml-cpp/${ASWF_YAML_CPP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zlib/${ASWF_ZLIB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zstd/${ASWF_ZSTD_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +blosc/${ASWF_BLOSC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cpython/${ASWF_CPYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +freetype/${ASWF_FREETYPE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +gdbm/${ASWF_GDBM_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} glew/${ASWF_GLEW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} glfw/${ASWF_GLFW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +log4cplus/${ASWF_LOG4CPLUS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +minizip-ng/${ASWF_MINIZIP_NG_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pybind11/${ASWF_PYBIND11_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} imath/${ASWF_IMATH_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +lcms/${ASWF_LCMS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} openexr/${ASWF_OPENEXR_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -blosc/${ASWF_BLOSC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -partio/${ASWF_PARTIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -# openvdb/${ASWF_OPENVDB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -# osl/${ASWF_OSL_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF +ENV CONAN_HOME=${CONAN_USER_HOME}/.conan2 + RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} diff --git a/ci-ocio/README.md b/ci-ocio/README.md index 9e5cee7a..8cff2853 100644 --- a/ci-ocio/README.md +++ b/ci-ocio/README.md @@ -21,115 +21,160 @@ Warning: this image does *not* contain OpenColorIO itself as it is used to *buil ## [aswf/ci-ocio:2019.9](https://hub.docker.com/r/aswf/ci-ocio/tags?page=1&name=2019.9) Contains: -* python-2.7.15 -* pybind11-2.4.3 +* cppunit-1.14.0 +* gtest-1.8.1 * tbb-2018 -* boost-1.66.0 +* blosc-1.5.0 +* cpython-2.7.15 * glew-2.1.0 * glfw-3.1.2 -* cmake-3.12.4 +* log4cplus-1.1.2 +* boost-1.66.0 +* pybind11-2.4.3 * imath-2.3.0 * openexr-2.3.0 -* blosc-1.5.0 -* partio-1.10.1 -* openvdb-6.2.1 -* osl-1.10.9 * numpy-1.14 * vfxplatform-2019 ## [aswf/ci-ocio:2020.8](https://hub.docker.com/r/aswf/ci-ocio/tags?page=1&name=2020.8) Contains: -* python-3.7.3 -* pybind11-2.4.3 -* tbb-2019_U6 -* boost-1.70.0 +* cppunit-1.15.1 +* gtest-1.10.0 +* tbb-2019_u6 +* blosc-1.5.0 +* cpython-3.7.3 * glew-2.1.0 * glfw-3.1.2 -* cmake-3.18.4 +* log4cplus-1.1.2 +* boost-1.70.0 +* pybind11-2.4.3 * imath-2.4.0 * openexr-2.4.0 -* blosc-1.5.0 -* partio-1.10.1 -* openvdb-7.1.0 -* osl-1.10.10 * numpy-1.16 * vfxplatform-2020 ## [aswf/ci-ocio:2021.6](https://hub.docker.com/r/aswf/ci-ocio/tags?page=1&name=2021.6) Contains: -* python-3.7.9 -* pybind11-2.6.2 -* tbb-2020_U2 -* boost-1.73.0 +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u2 +* blosc-1.5.0 +* cpython-3.7.9 * glew-2.1.0 * glfw-3.1.2 -* cmake-3.19.3 +* log4cplus-1.1.2 +* boost-1.73.0 +* pybind11-2.6.2 * imath-2.5.5 * openexr-2.5.5 -* blosc-1.5.0 -* partio-1.14.0 -* openvdb-8.0.1 -* osl-1.11.13.0 * numpy-1.19 * vfxplatform-2021 ## [aswf/ci-ocio:2022.4](https://hub.docker.com/r/aswf/ci-ocio/tags?page=1&name=2022.4) Contains: -* python-3.9.15 -* pybind11-2.8.1 -* tbb-2020_U3 -* boost-1.76.0 +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.9.15 * glew-2.1.0 * glfw-3.1.2 -* cmake-3.22.0 +* log4cplus-1.1.2 +* boost-1.76.0 +* pybind11-2.8.1 * imath-3.1.5 * openexr-3.1.5 -* blosc-1.17.0 -* partio-1.14.0 -* openvdb-9.1.0 -* osl-1.12.7.0 * numpy-1.20 * vfxplatform-2022 ## [aswf/ci-ocio:2023.2](https://hub.docker.com/r/aswf/ci-ocio/tags?page=1&name=2023.2) Contains: -* python-3.10.11 -* pybind11-2.9.2 -* tbb-2020_U3 -* boost-1.80.0 +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.10.11 * glew-2.1.0 * glfw-3.1.2 -* cmake-3.27.2 +* log4cplus-1.1.2 +* boost-1.80.0 +* pybind11-2.9.2 * imath-3.1.9 * openexr-3.1.11 -* blosc-1.17.0 -* partio-1.17.1 -* openvdb-10.0.1 -* osl-1.12.13.0 * numpy-1.23.5 * vfxplatform-2023 ## [aswf/ci-ocio:2024.2](https://hub.docker.com/r/aswf/ci-ocio/tags?page=1&name=2024.2) Contains: -* python-3.11.10 -* pybind11-2.12.0 -* tbb-2020_U3 -* boost-1.82.0 -* expat-2.6.3 +* b2-5.2.1 +* bzip2-1.0.8 +* cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.14.0 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.5 +* cpython-3.11.11 +* freetype-2.13.2 +* gdbm-system * glew-2.1.0 * glfw-3.3.8 -* cmake-3.27.9 +* log4cplus-2.1.1 +* boost-1.82.0 +* pybind11-2.12.0 * imath-3.1.12 +* lcms-2.16 * openexr-3.2.4 -* blosc-1.21.5 -* partio-1.17.1 -* openvdb-11.0.0 -* osl-1.13.11.0 * numpy-1.24.3 * vfxplatform-2024 +## [aswf/ci-ocio:2025.0](https://hub.docker.com/r/aswf/ci-ocio/tags?page=1&name=2025.0) + +Contains: +* b2-5.2.1 +* bzip2-1.0.8 +* cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.15.2 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.6 +* cpython-3.11.11 +* freetype-2.13.2 +* gdbm-system +* glew-2.2.0 +* glfw-3.4 +* log4cplus-2.1.2 +* boost-1.85.0 +* pybind11-2.13.6 +* imath-3.1.12 +* lcms-2.16 +* openexr-3.3.3 +* numpy-1.26.4 +* vfxplatform-2025 + diff --git a/ci-ocio/image.yaml b/ci-ocio/image.yaml index a5ead8a9..23860ced 100644 --- a/ci-ocio/image.yaml +++ b/ci-ocio/image.yaml @@ -4,20 +4,38 @@ description: | Contains: Python, TBB, Boost and other OpenColorIO upstream dependencies Warning: this image does *not* contain OpenColorIO itself as it is used to *build* OpenColorIO! packages: - - python - - pybind11 - - tbb - - boost + - b2 # base1-1 packages + - bzip2 + - cppunit - expat + - fmt + - gtest + - libbacktrace + - libdeflate + - libiconv + - libxcrypt + - lz4 + - pugixml + - pystring + - snappy + - tbb + - tsl-robin-map + - yaml-cpp + - zlib + - zstd + - blosc # base1-2 packages + - cpython + - freetype + - gdbm - glew - glfw - - cmake - - imath - - openexr - - blosc - - partio - - openvdb - - osl + - log4cplus + - minizip-ng + - boost # base1-3 packages + - pybind11 + - imath # vfx1-1 packages + - lcms + - openexr # vfx1-2 packages implicit_packages: - numpy - vfxplatform diff --git a/ci-oiio/Dockerfile b/ci-oiio/Dockerfile index 5e8c431a..2dfcb8e7 100644 --- a/ci-oiio/Dockerfile +++ b/ci-oiio/Dockerfile @@ -14,28 +14,55 @@ ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION +ARG ASWF_B2_VERSION +ARG ASWF_BZIP2_VERSION +ARG ASWF_CPPUNIT_VERSION +ARG ASWF_EXPAT_VERSION +ARG ASWF_FMT_VERSION +ARG ASWF_GTEST_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBXCRYPT_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_PUGIXML_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_SNAPPY_VERSION +ARG ASWF_TBB_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION ARG ASWF_BLOSC_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_FREETYPE_VERSION +ARG ASWF_GDBM_VERSION +ARG ASWF_GLEW_VERSION +ARG ASWF_GLFW_VERSION +ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_MINIZIP_NG_VERSION ARG ASWF_BOOST_VERSION -ARG ASWF_CMAKE_VERSION -ARG ASWF_EXPAT_VERSION -ARG ASWF_PYTHON_VERSION +ARG ASWF_PYBIND11_VERSION +ARG ASWF_LIBJPEG_TURBO_VERSION +ARG ASWF_LIBWEBP_VERSION +ARG ASWF_MD4C_VERSION +ARG ASWF_QT_VERSION +ARG ASWF_HIGHWAY_VERSION ARG ASWF_IMATH_VERSION -ARG ASWF_OCIO_VERSION +ARG ASWF_LCMS_VERSION +ARG ASWF_LIBUHDR_VERSION +ARG ASWF_PTEX_VERSION +ARG ASWF_LIBJXL_VERSION ARG ASWF_OPENEXR_VERSION +ARG ASWF_OCIO_VERSION ARG ASWF_OPENVDB_VERSION -ARG ASWF_PYBIND11_VERSION -ARG ASWF_PTEX_VERSION -ARG ASWF_QT_VERSION -ARG ASWF_TBB_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION # Comment out this block to use Conan packages -FROM ${ASWF_PKG_ORG}/ci-package-ocio:$ASWF_VFXPLATFORM_VERSION-$ASWF_OCIO_VERSION AS ci-package-ocio FROM ${ASWF_PKG_ORG}/ci-package-openvdb:$ASWF_VFXPLATFORM_VERSION-$ASWF_OPENVDB_VERSION AS ci-package-openvdb FROM ${ASWF_ORG}/ci-common:${CI_COMMON_VERSION}-clang${ASWF_CLANG_MAJOR_VERSION} AS ci-oiio @@ -49,27 +76,55 @@ ARG ASWF_CONAN_CHANNEL +ARG ASWF_B2_VERSION +ARG ASWF_BZIP2_VERSION +ARG ASWF_CPPUNIT_VERSION +ARG ASWF_EXPAT_VERSION +ARG ASWF_FMT_VERSION +ARG ASWF_GTEST_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBXCRYPT_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_PUGIXML_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_SNAPPY_VERSION +ARG ASWF_TBB_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION ARG ASWF_BLOSC_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_FREETYPE_VERSION +ARG ASWF_GDBM_VERSION +ARG ASWF_GLEW_VERSION +ARG ASWF_GLFW_VERSION +ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_MINIZIP_NG_VERSION ARG ASWF_BOOST_VERSION -ARG ASWF_CMAKE_VERSION -ARG ASWF_EXPAT_VERSION -ARG ASWF_PYTHON_VERSION +ARG ASWF_PYBIND11_VERSION +ARG ASWF_LIBJPEG_TURBO_VERSION +ARG ASWF_LIBWEBP_VERSION +ARG ASWF_MD4C_VERSION +ARG ASWF_QT_VERSION +ARG ASWF_HIGHWAY_VERSION ARG ASWF_IMATH_VERSION -ARG ASWF_OCIO_VERSION +ARG ASWF_LCMS_VERSION +ARG ASWF_LIBUHDR_VERSION +ARG ASWF_PTEX_VERSION +ARG ASWF_LIBJXL_VERSION ARG ASWF_OPENEXR_VERSION +ARG ASWF_OCIO_VERSION ARG ASWF_OPENVDB_VERSION -ARG ASWF_PYBIND11_VERSION -ARG ASWF_PTEX_VERSION -ARG ASWF_QT_VERSION -ARG ASWF_TBB_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION LABEL org.opencontainers.image.name="$ASWF_ORG/ci-oiio" LABEL org.opencontainers.image.title="OpenImageIO CI Docker Image" -LABEL org.opencontainers.image.description="Contains: Python, Boost, OpenEXR, Partio and other OpenImageIO upstream dependencies\ +LABEL org.opencontainers.image.description="Contains: Python, OpenEXR, Partio and other OpenImageIO upstream dependencies\ Warning: this image does *not* contain OpenImageIO itself as it is used to *build* OpenImageIO!" LABEL org.opencontainers.image.url="http://aswf.io/" LABEL org.opencontainers.image.source="https://github.com/AcademySoftwareFoundation/aswf-docker/blob/main/ci-oiio/Dockerfile" @@ -81,19 +136,48 @@ LABEL org.opencontainers.image.version="${ASWF_VERSION}" LABEL com.vfxplatform.version="${ASWF_VFXPLATFORM_VERSION}" +LABEL io.aswf.docker.versions.b2="$ASWF_B2_VERSION" +LABEL io.aswf.docker.versions.bzip2="$ASWF_BZIP2_VERSION" +LABEL io.aswf.docker.versions.cppunit="$ASWF_CPPUNIT_VERSION" +LABEL io.aswf.docker.versions.expat="$ASWF_EXPAT_VERSION" +LABEL io.aswf.docker.versions.fmt="$ASWF_FMT_VERSION" +LABEL io.aswf.docker.versions.gtest="$ASWF_GTEST_VERSION" +LABEL io.aswf.docker.versions.libbacktrace="$ASWF_LIBBACKTRACE_VERSION" +LABEL io.aswf.docker.versions.libdeflate="$ASWF_LIBDEFLATE_VERSION" +LABEL io.aswf.docker.versions.libiconv="$ASWF_LIBICONV_VERSION" +LABEL io.aswf.docker.versions.libxcrypt="$ASWF_LIBXCRYPT_VERSION" +LABEL io.aswf.docker.versions.lz4="$ASWF_LZ4_VERSION" +LABEL io.aswf.docker.versions.pugixml="$ASWF_PUGIXML_VERSION" +LABEL io.aswf.docker.versions.pystring="$ASWF_PYSTRING_VERSION" +LABEL io.aswf.docker.versions.snappy="$ASWF_SNAPPY_VERSION" +LABEL io.aswf.docker.versions.tbb="$ASWF_TBB_VERSION" +LABEL io.aswf.docker.versions.tsl-robin-map="$ASWF_TSL_ROBIN_MAP_VERSION" +LABEL io.aswf.docker.versions.yaml-cpp="$ASWF_YAML_CPP_VERSION" +LABEL io.aswf.docker.versions.zlib="$ASWF_ZLIB_VERSION" +LABEL io.aswf.docker.versions.zstd="$ASWF_ZSTD_VERSION" LABEL io.aswf.docker.versions.blosc="$ASWF_BLOSC_VERSION" +LABEL io.aswf.docker.versions.cpython="$ASWF_CPYTHON_VERSION" +LABEL io.aswf.docker.versions.freetype="$ASWF_FREETYPE_VERSION" +LABEL io.aswf.docker.versions.gdbm="$ASWF_GDBM_VERSION" +LABEL io.aswf.docker.versions.glew="$ASWF_GLEW_VERSION" +LABEL io.aswf.docker.versions.glfw="$ASWF_GLFW_VERSION" +LABEL io.aswf.docker.versions.log4cplus="$ASWF_LOG4CPLUS_VERSION" +LABEL io.aswf.docker.versions.minizip-ng="$ASWF_MINIZIP_NG_VERSION" LABEL io.aswf.docker.versions.boost="$ASWF_BOOST_VERSION" -LABEL io.aswf.docker.versions.cmake="$ASWF_CMAKE_VERSION" -LABEL io.aswf.docker.versions.expat="$ASWF_EXPAT_VERSION" -LABEL io.aswf.docker.versions.python="$ASWF_PYTHON_VERSION" +LABEL io.aswf.docker.versions.pybind11="$ASWF_PYBIND11_VERSION" +LABEL io.aswf.docker.versions.libjpeg-turbo="$ASWF_LIBJPEG_TURBO_VERSION" +LABEL io.aswf.docker.versions.libwebp="$ASWF_LIBWEBP_VERSION" +LABEL io.aswf.docker.versions.md4c="$ASWF_MD4C_VERSION" +LABEL io.aswf.docker.versions.qt="$ASWF_QT_VERSION" +LABEL io.aswf.docker.versions.highway="$ASWF_HIGHWAY_VERSION" LABEL io.aswf.docker.versions.imath="$ASWF_IMATH_VERSION" -LABEL io.aswf.docker.versions.ocio="$ASWF_OCIO_VERSION" +LABEL io.aswf.docker.versions.lcms="$ASWF_LCMS_VERSION" +LABEL io.aswf.docker.versions.libuhdr="$ASWF_LIBUHDR_VERSION" +LABEL io.aswf.docker.versions.ptex="$ASWF_PTEX_VERSION" +LABEL io.aswf.docker.versions.libjxl="$ASWF_LIBJXL_VERSION" LABEL io.aswf.docker.versions.openexr="$ASWF_OPENEXR_VERSION" +LABEL io.aswf.docker.versions.ocio="$ASWF_OCIO_VERSION" LABEL io.aswf.docker.versions.openvdb="$ASWF_OPENVDB_VERSION" -LABEL io.aswf.docker.versions.pybind11="$ASWF_PYBIND11_VERSION" -LABEL io.aswf.docker.versions.ptex="$ASWF_PTEX_VERSION" -LABEL io.aswf.docker.versions.qt="$ASWF_QT_VERSION" -LABEL io.aswf.docker.versions.tbb="$ASWF_TBB_VERSION" LABEL io.aswf.docker.versions.numpy="$ASWF_NUMPY_VERSION" LABEL io.aswf.docker.versions.vfxplatform="$ASWF_VFXPLATFORM_VERSION" @@ -107,57 +191,117 @@ ENV ASWF_PYSIDE_CLANG_VERSION=${ASWF_PYSIDE_CLANG_VERSION} ENV ASWF_VFXPLATFORM_VERSION=${ASWF_VFXPLATFORM_VERSION} +ENV ASWF_B2_VERSION=$ASWF_B2_VERSION +ENV ASWF_BZIP2_VERSION=$ASWF_BZIP2_VERSION +ENV ASWF_CPPUNIT_VERSION=$ASWF_CPPUNIT_VERSION +ENV ASWF_EXPAT_VERSION=$ASWF_EXPAT_VERSION +ENV ASWF_FMT_VERSION=$ASWF_FMT_VERSION +ENV ASWF_GTEST_VERSION=$ASWF_GTEST_VERSION +ENV ASWF_LIBBACKTRACE_VERSION=$ASWF_LIBBACKTRACE_VERSION +ENV ASWF_LIBDEFLATE_VERSION=$ASWF_LIBDEFLATE_VERSION +ENV ASWF_LIBICONV_VERSION=$ASWF_LIBICONV_VERSION +ENV ASWF_LIBXCRYPT_VERSION=$ASWF_LIBXCRYPT_VERSION +ENV ASWF_LZ4_VERSION=$ASWF_LZ4_VERSION +ENV ASWF_PUGIXML_VERSION=$ASWF_PUGIXML_VERSION +ENV ASWF_PYSTRING_VERSION=$ASWF_PYSTRING_VERSION +ENV ASWF_SNAPPY_VERSION=$ASWF_SNAPPY_VERSION +ENV ASWF_TBB_VERSION=$ASWF_TBB_VERSION +ENV ASWF_TSL_ROBIN_MAP_VERSION=$ASWF_TSL_ROBIN_MAP_VERSION +ENV ASWF_YAML_CPP_VERSION=$ASWF_YAML_CPP_VERSION +ENV ASWF_ZLIB_VERSION=$ASWF_ZLIB_VERSION +ENV ASWF_ZSTD_VERSION=$ASWF_ZSTD_VERSION ENV ASWF_BLOSC_VERSION=$ASWF_BLOSC_VERSION +ENV ASWF_CPYTHON_VERSION=$ASWF_CPYTHON_VERSION +ENV ASWF_FREETYPE_VERSION=$ASWF_FREETYPE_VERSION +ENV ASWF_GDBM_VERSION=$ASWF_GDBM_VERSION +ENV ASWF_GLEW_VERSION=$ASWF_GLEW_VERSION +ENV ASWF_GLFW_VERSION=$ASWF_GLFW_VERSION +ENV ASWF_LOG4CPLUS_VERSION=$ASWF_LOG4CPLUS_VERSION +ENV ASWF_MINIZIP_NG_VERSION=$ASWF_MINIZIP_NG_VERSION ENV ASWF_BOOST_VERSION=$ASWF_BOOST_VERSION -ENV ASWF_CMAKE_VERSION=$ASWF_CMAKE_VERSION -ENV ASWF_EXPAT_VERSION=$ASWF_EXPAT_VERSION -ENV ASWF_PYTHON_VERSION=$ASWF_PYTHON_VERSION +ENV ASWF_PYBIND11_VERSION=$ASWF_PYBIND11_VERSION +ENV ASWF_LIBJPEG_TURBO_VERSION=$ASWF_LIBJPEG_TURBO_VERSION +ENV ASWF_LIBWEBP_VERSION=$ASWF_LIBWEBP_VERSION +ENV ASWF_MD4C_VERSION=$ASWF_MD4C_VERSION +ENV ASWF_QT_VERSION=$ASWF_QT_VERSION +ENV ASWF_HIGHWAY_VERSION=$ASWF_HIGHWAY_VERSION ENV ASWF_IMATH_VERSION=$ASWF_IMATH_VERSION -ENV ASWF_OCIO_VERSION=$ASWF_OCIO_VERSION +ENV ASWF_LCMS_VERSION=$ASWF_LCMS_VERSION +ENV ASWF_LIBUHDR_VERSION=$ASWF_LIBUHDR_VERSION +ENV ASWF_PTEX_VERSION=$ASWF_PTEX_VERSION +ENV ASWF_LIBJXL_VERSION=$ASWF_LIBJXL_VERSION ENV ASWF_OPENEXR_VERSION=$ASWF_OPENEXR_VERSION +ENV ASWF_OCIO_VERSION=$ASWF_OCIO_VERSION ENV ASWF_OPENVDB_VERSION=$ASWF_OPENVDB_VERSION -ENV ASWF_PYBIND11_VERSION=$ASWF_PYBIND11_VERSION -ENV ASWF_PTEX_VERSION=$ASWF_PTEX_VERSION -ENV ASWF_QT_VERSION=$ASWF_QT_VERSION -ENV ASWF_TBB_VERSION=$ASWF_TBB_VERSION ENV ASWF_NUMPY_VERSION=$ASWF_NUMPY_VERSION ENV ASWF_VFXPLATFORM_VERSION=$ASWF_VFXPLATFORM_VERSION -ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=$ASWF_PYTHON_MAJOR_MINOR_VERSION -COPY --from=ci-package-ocio /. /usr/local/ COPY --from=ci-package-openvdb /. /usr/local/ COPY ci-oiio/README.md ci-oiio/image.yaml /usr/local/aswf/ -ENV PYTHONPATH=/usr/local/lib/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib64/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib/python:${PYTHONPATH} COPY scripts/common/install_conanpackages.sh /tmp/ +ARG ASWF_PYTHON_MAJOR_MINOR_VERSION +ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=${ASWF_PYTHON_MAJOR_MINOR_VERSION} + # conan-only packages COPY < . [requires] +b2/${ASWF_B2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +bzip2/${ASWF_BZIP2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cppunit/${ASWF_CPPUNIT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +expat/${ASWF_EXPAT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +fmt/${ASWF_FMT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +gtest/${ASWF_GTEST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libbacktrace/${ASWF_LIBBACKTRACE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libdeflate/${ASWF_LIBDEFLATE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libiconv/${ASWF_LIBICONV_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libxcrypt/${ASWF_LIBXCRYPT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +lz4/${ASWF_LZ4_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pugixml/${ASWF_PUGIXML_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pystring/${ASWF_PYSTRING_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +snappy/${ASWF_SNAPPY_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tsl-robin-map/${ASWF_TSL_ROBIN_MAP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +yaml-cpp/${ASWF_YAML_CPP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zlib/${ASWF_ZLIB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zstd/${ASWF_ZSTD_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} blosc/${ASWF_BLOSC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cpython/${ASWF_CPYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +freetype/${ASWF_FREETYPE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +gdbm/${ASWF_GDBM_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +glew/${ASWF_GLEW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +glfw/${ASWF_GLFW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +log4cplus/${ASWF_LOG4CPLUS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +minizip-ng/${ASWF_MINIZIP_NG_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -expat/${ASWF_EXPAT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -python/${ASWF_PYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pybind11/${ASWF_PYBIND11_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libjpeg-turbo/${ASWF_LIBJPEG_TURBO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libwebp/${ASWF_LIBWEBP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +md4c/${ASWF_MD4C_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +qt/${ASWF_QT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +highway/${ASWF_HIGHWAY_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} imath/${ASWF_IMATH_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -# ocio/${ASWF_OCIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +lcms/${ASWF_LCMS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libuhdr/${ASWF_LIBUHDR_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +ptex/${ASWF_PTEX_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libjxl/${ASWF_LIBJXL_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} openexr/${ASWF_OPENEXR_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +ocio/${ASWF_OCIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} # openvdb/${ASWF_OPENVDB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -pybind11/${ASWF_PYBIND11_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -ptex/${ASWF_PTEX_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -qt/${ASWF_QT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF +ENV CONAN_HOME=${CONAN_USER_HOME}/.conan2 + RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} diff --git a/ci-oiio/README.md b/ci-oiio/README.md index e20a5552..3642ee5b 100644 --- a/ci-oiio/README.md +++ b/ci-oiio/README.md @@ -13,7 +13,7 @@ for further information, and participate in the discussion on the ## OpenImageIO CI Docker Image -Contains: Python, Boost, OpenEXR, Partio and other OpenImageIO upstream dependencies +Contains: Python, OpenEXR, Partio and other OpenImageIO upstream dependencies Warning: this image does *not* contain OpenImageIO itself as it is used to *build* OpenImageIO! [Docker Image Source](https://github.com/AcademySoftwareFoundation/aswf-docker/blob/main/ci-oiio/Dockerfile) @@ -21,19 +21,88 @@ Warning: this image does *not* contain OpenImageIO itself as it is used to *buil ## [aswf/ci-oiio:2024.2](https://hub.docker.com/r/aswf/ci-oiio/tags?page=1&name=2024.2) Contains: +* b2-5.2.1 +* bzip2-1.0.8 +* cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.14.0 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 * blosc-1.21.5 +* cpython-3.11.11 +* freetype-2.13.2 +* gdbm-system +* glew-2.1.0 +* glfw-3.3.8 +* log4cplus-2.1.1 * boost-1.82.0 -* cmake-3.27.9 -* expat-2.6.3 -* python-3.11.10 +* pybind11-2.12.0 +* libwebp-1.5.0 +* md4c-0.4.8 +* qt-6.5.4 +* highway-1.2.0 * imath-3.1.12 -* ocio-2.3.2 +* lcms-2.16 +* libuhdr-1.4.0 +* ptex-2.4.2 +* libjxl-0.11.1 * openexr-3.2.4 +* ocio-2.3.2 * openvdb-11.0.0 -* pybind11-2.12.0 -* ptex-2.4.2 -* qt-6.5.3 -* tbb-2020_U3 * numpy-1.24.3 * vfxplatform-2024 +## [aswf/ci-oiio:2025.0](https://hub.docker.com/r/aswf/ci-oiio/tags?page=1&name=2025.0) + +Contains: +* b2-5.2.1 +* bzip2-1.0.8 +* cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.15.2 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.6 +* cpython-3.11.11 +* freetype-2.13.2 +* gdbm-system +* glew-2.2.0 +* glfw-3.4 +* log4cplus-2.1.2 +* boost-1.85.0 +* pybind11-2.13.6 +* libwebp-1.5.0 +* md4c-0.4.8 +* qt-6.5.4 +* highway-1.2.0 +* imath-3.1.12 +* lcms-2.16 +* libuhdr-1.4.0 +* ptex-2.4.3 +* libjxl-0.11.1 +* openexr-3.3.3 +* ocio-2.4.2 +* openvdb-12.0.0 +* numpy-1.26.4 +* vfxplatform-2025 + diff --git a/ci-oiio/image.yaml b/ci-oiio/image.yaml index fc4a141f..f023ce45 100644 --- a/ci-oiio/image.yaml +++ b/ci-oiio/image.yaml @@ -1,22 +1,51 @@ name: "oiio" title: "OpenImageIO CI Docker Image" description: | - Contains: Python, Boost, OpenEXR, Partio and other OpenImageIO upstream dependencies + Contains: Python, OpenEXR, Partio and other OpenImageIO upstream dependencies Warning: this image does *not* contain OpenImageIO itself as it is used to *build* OpenImageIO! packages: - - blosc - - boost - - cmake + - b2 # base1-1 packages + - bzip2 + - cppunit - expat - - python - - imath - - ocio - - openexr - - openvdb + - fmt + - gtest + - libbacktrace + - libdeflate + - libiconv + - libxcrypt + - lz4 + - pugixml + - pystring + - snappy + - tbb + - tsl-robin-map + - yaml-cpp + - zlib + - zstd + - blosc # base1-2 packages + - cpython + - freetype + - gdbm + - glew + - glfw + - log4cplus + - minizip-ng + - boost # base1-3 packages - pybind11 + - libjpeg-turbo # base2-1 packages + - libwebp + - md4c + - qt # base2-2 packages + - highway # vfx1-1 packages + - imath + - lcms + - libuhdr - ptex - - qt - - tbb + - libjxl # vfx1-2 packages + - openexr + - ocio # vfx1-3 packages + - openvdb # vfx1 non Conan packages implicit_packages: - numpy - vfxplatform diff --git a/ci-opencue/Dockerfile b/ci-opencue/Dockerfile index 8146a98b..7ea29466 100644 --- a/ci-opencue/Dockerfile +++ b/ci-opencue/Dockerfile @@ -14,11 +14,9 @@ ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_VERSION -ARG ASWF_CMAKE_VERSION +ARG ASWF_CPYTHON_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION @@ -36,11 +34,9 @@ ARG ASWF_CONAN_CHANNEL -ARG ASWF_PYTHON_VERSION -ARG ASWF_CMAKE_VERSION +ARG ASWF_CPYTHON_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION LABEL org.opencontainers.image.name="$ASWF_ORG/ci-opencue" @@ -57,8 +53,7 @@ LABEL org.opencontainers.image.version="${ASWF_VERSION}" LABEL com.vfxplatform.version="${ASWF_VFXPLATFORM_VERSION}" -LABEL io.aswf.docker.versions.python="$ASWF_PYTHON_VERSION" -LABEL io.aswf.docker.versions.cmake="$ASWF_CMAKE_VERSION" +LABEL io.aswf.docker.versions.cpython="$ASWF_CPYTHON_VERSION" LABEL io.aswf.docker.versions.numpy="$ASWF_NUMPY_VERSION" LABEL io.aswf.docker.versions.vfxplatform="$ASWF_VFXPLATFORM_VERSION" @@ -72,11 +67,9 @@ ENV ASWF_PYSIDE_CLANG_VERSION=${ASWF_PYSIDE_CLANG_VERSION} ENV ASWF_VFXPLATFORM_VERSION=${ASWF_VFXPLATFORM_VERSION} -ENV ASWF_PYTHON_VERSION=$ASWF_PYTHON_VERSION -ENV ASWF_CMAKE_VERSION=$ASWF_CMAKE_VERSION +ENV ASWF_CPYTHON_VERSION=$ASWF_CPYTHON_VERSION ENV ASWF_NUMPY_VERSION=$ASWF_NUMPY_VERSION ENV ASWF_VFXPLATFORM_VERSION=$ASWF_VFXPLATFORM_VERSION -ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=$ASWF_PYTHON_MAJOR_MINOR_VERSION COPY ci-opencue/README.md ci-opencue/image.yaml /usr/local/aswf/ @@ -89,22 +82,25 @@ RUN sudo alternatives --set java java-17-openjdk.x86_64 && \ sudo alternatives --set jre_openjdk java-17-openjdk.x86_64 -ENV PYTHONPATH=/usr/local/lib/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib64/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib/python:${PYTHONPATH} COPY scripts/common/install_conanpackages.sh /tmp/ +ARG ASWF_PYTHON_MAJOR_MINOR_VERSION +ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=${ASWF_PYTHON_MAJOR_MINOR_VERSION} + # conan-only packages COPY < . [requires] -python/${ASWF_PYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cpython/${ASWF_CPYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF +ENV CONAN_HOME=${CONAN_USER_HOME}/.conan2 + RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} diff --git a/ci-opencue/README.md b/ci-opencue/README.md index 0923e9aa..5d2bf4cf 100644 --- a/ci-opencue/README.md +++ b/ci-opencue/README.md @@ -21,48 +21,49 @@ Warning: this image does *not* contain OpenCue itself as it is used to *build* O ## [aswf/ci-opencue:2019.10](https://hub.docker.com/r/aswf/ci-opencue/tags?page=1&name=2019.10) Contains: -* python-2.7.15 -* cmake-3.12.4 +* cpython-2.7.15 * numpy-1.14 * vfxplatform-2019 ## [aswf/ci-opencue:2020.10](https://hub.docker.com/r/aswf/ci-opencue/tags?page=1&name=2020.10) Contains: -* python-3.7.3 -* cmake-3.18.4 +* cpython-3.7.3 * numpy-1.16 * vfxplatform-2020 ## [aswf/ci-opencue:2021.7](https://hub.docker.com/r/aswf/ci-opencue/tags?page=1&name=2021.7) Contains: -* python-3.7.9 -* cmake-3.19.3 +* cpython-3.7.9 * numpy-1.19 * vfxplatform-2021 ## [aswf/ci-opencue:2022.3](https://hub.docker.com/r/aswf/ci-opencue/tags?page=1&name=2022.3) Contains: -* python-3.9.15 -* cmake-3.22.0 +* cpython-3.9.15 * numpy-1.20 * vfxplatform-2022 ## [aswf/ci-opencue:2023.2](https://hub.docker.com/r/aswf/ci-opencue/tags?page=1&name=2023.2) Contains: -* python-3.10.11 -* cmake-3.27.2 +* cpython-3.10.11 * numpy-1.23.5 * vfxplatform-2023 ## [aswf/ci-opencue:2024.2](https://hub.docker.com/r/aswf/ci-opencue/tags?page=1&name=2024.2) Contains: -* python-3.11.10 -* cmake-3.27.9 +* cpython-3.11.11 * numpy-1.24.3 * vfxplatform-2024 +## [aswf/ci-opencue:2025.0](https://hub.docker.com/r/aswf/ci-opencue/tags?page=1&name=2025.0) + +Contains: +* cpython-3.11.11 +* numpy-1.26.4 +* vfxplatform-2025 + diff --git a/ci-opencue/image.yaml b/ci-opencue/image.yaml index 277cc279..de29bc3a 100644 --- a/ci-opencue/image.yaml +++ b/ci-opencue/image.yaml @@ -4,8 +4,7 @@ description: | Contains: Python, CMake and other OpenCue upstream dependencies Warning: this image does *not* contain OpenCue itself as it is used to *build* OpenCue! packages: - - python - - cmake + - cpython implicit_packages: - numpy - vfxplatform diff --git a/ci-openexr/Dockerfile b/ci-openexr/Dockerfile index be55a024..c05f5fd4 100644 --- a/ci-openexr/Dockerfile +++ b/ci-openexr/Dockerfile @@ -14,13 +14,14 @@ ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_VERSION ARG ASWF_BOOST_VERSION -ARG ASWF_CMAKE_VERSION +ARG ASWF_BZIP2_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION ARG ASWF_PYBIND11_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION @@ -38,18 +39,19 @@ ARG ASWF_CONAN_CHANNEL -ARG ASWF_PYTHON_VERSION ARG ASWF_BOOST_VERSION -ARG ASWF_CMAKE_VERSION +ARG ASWF_BZIP2_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION ARG ASWF_PYBIND11_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION LABEL org.opencontainers.image.name="$ASWF_ORG/ci-openexr" LABEL org.opencontainers.image.title="OpenEXR CI Docker Image" -LABEL org.opencontainers.image.description="Contains: Python, Boost and other OpenEXR upstream dependencies\ +LABEL org.opencontainers.image.description="Contains: Python and other OpenEXR upstream dependencies\ Warning: this image does *not* contain OpenEXR itself as it is used to *build* OpenEXR!" LABEL org.opencontainers.image.url="http://aswf.io/" LABEL org.opencontainers.image.source="https://github.com/AcademySoftwareFoundation/aswf-docker/blob/main/ci-openexr/Dockerfile" @@ -61,9 +63,11 @@ LABEL org.opencontainers.image.version="${ASWF_VERSION}" LABEL com.vfxplatform.version="${ASWF_VFXPLATFORM_VERSION}" -LABEL io.aswf.docker.versions.python="$ASWF_PYTHON_VERSION" LABEL io.aswf.docker.versions.boost="$ASWF_BOOST_VERSION" -LABEL io.aswf.docker.versions.cmake="$ASWF_CMAKE_VERSION" +LABEL io.aswf.docker.versions.bzip2="$ASWF_BZIP2_VERSION" +LABEL io.aswf.docker.versions.cpython="$ASWF_CPYTHON_VERSION" +LABEL io.aswf.docker.versions.libbacktrace="$ASWF_LIBBACKTRACE_VERSION" +LABEL io.aswf.docker.versions.libdeflate="$ASWF_LIBDEFLATE_VERSION" LABEL io.aswf.docker.versions.pybind11="$ASWF_PYBIND11_VERSION" LABEL io.aswf.docker.versions.numpy="$ASWF_NUMPY_VERSION" LABEL io.aswf.docker.versions.vfxplatform="$ASWF_VFXPLATFORM_VERSION" @@ -78,37 +82,44 @@ ENV ASWF_PYSIDE_CLANG_VERSION=${ASWF_PYSIDE_CLANG_VERSION} ENV ASWF_VFXPLATFORM_VERSION=${ASWF_VFXPLATFORM_VERSION} -ENV ASWF_PYTHON_VERSION=$ASWF_PYTHON_VERSION ENV ASWF_BOOST_VERSION=$ASWF_BOOST_VERSION -ENV ASWF_CMAKE_VERSION=$ASWF_CMAKE_VERSION +ENV ASWF_BZIP2_VERSION=$ASWF_BZIP2_VERSION +ENV ASWF_CPYTHON_VERSION=$ASWF_CPYTHON_VERSION +ENV ASWF_LIBBACKTRACE_VERSION=$ASWF_LIBBACKTRACE_VERSION +ENV ASWF_LIBDEFLATE_VERSION=$ASWF_LIBDEFLATE_VERSION ENV ASWF_PYBIND11_VERSION=$ASWF_PYBIND11_VERSION ENV ASWF_NUMPY_VERSION=$ASWF_NUMPY_VERSION ENV ASWF_VFXPLATFORM_VERSION=$ASWF_VFXPLATFORM_VERSION -ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=$ASWF_PYTHON_MAJOR_MINOR_VERSION COPY ci-openexr/README.md ci-openexr/image.yaml /usr/local/aswf/ -ENV PYTHONPATH=/usr/local/lib/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib64/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib/python:${PYTHONPATH} COPY scripts/common/install_conanpackages.sh /tmp/ +ARG ASWF_PYTHON_MAJOR_MINOR_VERSION +ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=${ASWF_PYTHON_MAJOR_MINOR_VERSION} + # conan-only packages COPY < . [requires] -python/${ASWF_PYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +bzip2/${ASWF_BZIP2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cpython/${ASWF_CPYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libbacktrace/${ASWF_LIBBACKTRACE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libdeflate/${ASWF_LIBDEFLATE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} pybind11/${ASWF_PYBIND11_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF +ENV CONAN_HOME=${CONAN_USER_HOME}/.conan2 + RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} diff --git a/ci-openexr/README.md b/ci-openexr/README.md index a0aaf680..a4f9ed56 100644 --- a/ci-openexr/README.md +++ b/ci-openexr/README.md @@ -13,7 +13,7 @@ for further information, and participate in the discussion on the ## OpenEXR CI Docker Image -Contains: Python, Boost and other OpenEXR upstream dependencies +Contains: Python and other OpenEXR upstream dependencies Warning: this image does *not* contain OpenEXR itself as it is used to *build* OpenEXR! [Docker Image Source](https://github.com/AcademySoftwareFoundation/aswf-docker/blob/main/ci-openexr/Dockerfile) @@ -21,9 +21,8 @@ Warning: this image does *not* contain OpenEXR itself as it is used to *build* O ## [aswf/ci-openexr:2019.8](https://hub.docker.com/r/aswf/ci-openexr/tags?page=1&name=2019.8) Contains: -* python-2.7.15 * boost-1.66.0 -* cmake-3.12.4 +* cpython-2.7.15 * pybind11-2.4.3 * numpy-1.14 * vfxplatform-2019 @@ -31,9 +30,8 @@ Contains: ## [aswf/ci-openexr:2020.8](https://hub.docker.com/r/aswf/ci-openexr/tags?page=1&name=2020.8) Contains: -* python-3.7.3 * boost-1.70.0 -* cmake-3.18.4 +* cpython-3.7.3 * pybind11-2.4.3 * numpy-1.16 * vfxplatform-2020 @@ -41,9 +39,8 @@ Contains: ## [aswf/ci-openexr:2021.5](https://hub.docker.com/r/aswf/ci-openexr/tags?page=1&name=2021.5) Contains: -* python-3.7.9 * boost-1.73.0 -* cmake-3.19.3 +* cpython-3.7.9 * pybind11-2.6.2 * numpy-1.19 * vfxplatform-2021 @@ -51,9 +48,8 @@ Contains: ## [aswf/ci-openexr:2022.3](https://hub.docker.com/r/aswf/ci-openexr/tags?page=1&name=2022.3) Contains: -* python-3.9.15 * boost-1.76.0 -* cmake-3.22.0 +* cpython-3.9.15 * pybind11-2.8.1 * numpy-1.20 * vfxplatform-2022 @@ -61,9 +57,8 @@ Contains: ## [aswf/ci-openexr:2023.2](https://hub.docker.com/r/aswf/ci-openexr/tags?page=1&name=2023.2) Contains: -* python-3.10.11 * boost-1.80.0 -* cmake-3.27.2 +* cpython-3.10.11 * pybind11-2.9.2 * numpy-1.23.5 * vfxplatform-2023 @@ -71,10 +66,24 @@ Contains: ## [aswf/ci-openexr:2024.2](https://hub.docker.com/r/aswf/ci-openexr/tags?page=1&name=2024.2) Contains: -* python-3.11.10 * boost-1.82.0 -* cmake-3.27.9 +* bzip2-1.0.8 +* cpython-3.11.11 +* libbacktrace-cci.20210118 +* libdeflate-1.23 * pybind11-2.12.0 * numpy-1.24.3 * vfxplatform-2024 +## [aswf/ci-openexr:2025.0](https://hub.docker.com/r/aswf/ci-openexr/tags?page=1&name=2025.0) + +Contains: +* boost-1.85.0 +* bzip2-1.0.8 +* cpython-3.11.11 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* pybind11-2.13.6 +* numpy-1.26.4 +* vfxplatform-2025 + diff --git a/ci-openexr/image.yaml b/ci-openexr/image.yaml index acc5de0d..0569193d 100644 --- a/ci-openexr/image.yaml +++ b/ci-openexr/image.yaml @@ -1,12 +1,14 @@ name: "openexr" title: "OpenEXR CI Docker Image" description: | - Contains: Python, Boost and other OpenEXR upstream dependencies + Contains: Python and other OpenEXR upstream dependencies Warning: this image does *not* contain OpenEXR itself as it is used to *build* OpenEXR! packages: - - python - - boost - - cmake + - boost # boost and dependencies + - bzip2 + - cpython + - libbacktrace + - libdeflate # other dependencies - pybind11 implicit_packages: - numpy diff --git a/ci-openrv/Dockerfile b/ci-openrv/Dockerfile index 2f1e2803..7a8a3c7d 100644 --- a/ci-openrv/Dockerfile +++ b/ci-openrv/Dockerfile @@ -14,13 +14,11 @@ ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_CMAKE_VERSION -ARG ASWF_PYTHON_VERSION +ARG ASWF_CPYTHON_VERSION ARG ASWF_EXPAT_VERSION ARG ASWF_QT_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION @@ -38,13 +36,11 @@ ARG ASWF_CONAN_CHANNEL -ARG ASWF_CMAKE_VERSION -ARG ASWF_PYTHON_VERSION +ARG ASWF_CPYTHON_VERSION ARG ASWF_EXPAT_VERSION ARG ASWF_QT_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION LABEL org.opencontainers.image.name="$ASWF_ORG/ci-openrv" @@ -61,8 +57,7 @@ LABEL org.opencontainers.image.version="${ASWF_VERSION}" LABEL com.vfxplatform.version="${ASWF_VFXPLATFORM_VERSION}" -LABEL io.aswf.docker.versions.cmake="$ASWF_CMAKE_VERSION" -LABEL io.aswf.docker.versions.python="$ASWF_PYTHON_VERSION" +LABEL io.aswf.docker.versions.cpython="$ASWF_CPYTHON_VERSION" LABEL io.aswf.docker.versions.expat="$ASWF_EXPAT_VERSION" LABEL io.aswf.docker.versions.qt="$ASWF_QT_VERSION" LABEL io.aswf.docker.versions.numpy="$ASWF_NUMPY_VERSION" @@ -78,37 +73,38 @@ ENV ASWF_PYSIDE_CLANG_VERSION=${ASWF_PYSIDE_CLANG_VERSION} ENV ASWF_VFXPLATFORM_VERSION=${ASWF_VFXPLATFORM_VERSION} -ENV ASWF_CMAKE_VERSION=$ASWF_CMAKE_VERSION -ENV ASWF_PYTHON_VERSION=$ASWF_PYTHON_VERSION +ENV ASWF_CPYTHON_VERSION=$ASWF_CPYTHON_VERSION ENV ASWF_EXPAT_VERSION=$ASWF_EXPAT_VERSION ENV ASWF_QT_VERSION=$ASWF_QT_VERSION ENV ASWF_NUMPY_VERSION=$ASWF_NUMPY_VERSION ENV ASWF_VFXPLATFORM_VERSION=$ASWF_VFXPLATFORM_VERSION -ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=$ASWF_PYTHON_MAJOR_MINOR_VERSION COPY ci-openrv/README.md ci-openrv/image.yaml /usr/local/aswf/ -ENV PYTHONPATH=/usr/local/lib/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib64/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib/python:${PYTHONPATH} COPY scripts/common/install_conanpackages.sh /tmp/ +ARG ASWF_PYTHON_MAJOR_MINOR_VERSION +ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=${ASWF_PYTHON_MAJOR_MINOR_VERSION} + # conan-only packages COPY < . [requires] -cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -python/${ASWF_PYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cpython/${ASWF_CPYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} expat/${ASWF_EXPAT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} qt/${ASWF_QT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF +ENV CONAN_HOME=${CONAN_USER_HOME}/.conan2 + RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} diff --git a/ci-openrv/README.md b/ci-openrv/README.md index fcb583c0..b5be4918 100644 --- a/ci-openrv/README.md +++ b/ci-openrv/README.md @@ -21,10 +21,18 @@ Warning: this image does *not* contain OpenRV itself as it is used to *build* Op ## [aswf/ci-openrv:2024.2](https://hub.docker.com/r/aswf/ci-openrv/tags?page=1&name=2024.2) Contains: -* cmake-3.27.9 -* python-3.11.10 -* expat-2.6.3 -* qt-6.5.3 +* cpython-3.11.11 +* expat-2.6.4 +* qt-6.5.4 * numpy-1.24.3 * vfxplatform-2024 +## [aswf/ci-openrv:2025.0](https://hub.docker.com/r/aswf/ci-openrv/tags?page=1&name=2025.0) + +Contains: +* cpython-3.11.11 +* expat-2.6.4 +* qt-6.5.4 +* numpy-1.26.4 +* vfxplatform-2025 + diff --git a/ci-openrv/image.yaml b/ci-openrv/image.yaml index 92ffd463..e9a43a3e 100644 --- a/ci-openrv/image.yaml +++ b/ci-openrv/image.yaml @@ -4,8 +4,7 @@ description: | Contains: Python, Boost, OpenEXR and other OpenRV upstream dependencies Warning: this image does *not* contain OpenRV itself as it is used to *build* OpenRV! packages: - - cmake - - python + - cpython - expat - qt implicit_packages: diff --git a/ci-openvdb/Dockerfile b/ci-openvdb/Dockerfile index 3720f2d3..ee575d6b 100644 --- a/ci-openvdb/Dockerfile +++ b/ci-openvdb/Dockerfile @@ -14,21 +14,52 @@ ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_BOOST_VERSION -ARG ASWF_CMAKE_VERSION +ARG ASWF_B2_VERSION +ARG ASWF_BZIP2_VERSION +ARG ASWF_CPPUNIT_VERSION ARG ASWF_EXPAT_VERSION +ARG ASWF_FMT_VERSION ARG ASWF_GTEST_VERSION -ARG ASWF_CPPUNIT_VERSION -ARG ASWF_GLFW_VERSION -ARG ASWF_PYTHON_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBXCRYPT_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_PUGIXML_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_SNAPPY_VERSION ARG ASWF_TBB_VERSION -ARG ASWF_IMATH_VERSION -ARG ASWF_OPENEXR_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION ARG ASWF_BLOSC_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_FREETYPE_VERSION +ARG ASWF_GDBM_VERSION +ARG ASWF_GLEW_VERSION +ARG ASWF_GLFW_VERSION +ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_MINIZIP_NG_VERSION +ARG ASWF_BOOST_VERSION ARG ASWF_PYBIND11_VERSION +ARG ASWF_LIBJPEG_TURBO_VERSION +ARG ASWF_LIBWEBP_VERSION +ARG ASWF_MD4C_VERSION +ARG ASWF_QT_VERSION +ARG ASWF_PYSIDE_VERSION +ARG ASWF_HIGHWAY_VERSION +ARG ASWF_IMATH_VERSION +ARG ASWF_LCMS_VERSION +ARG ASWF_LIBUHDR_VERSION +ARG ASWF_PTEX_VERSION +ARG ASWF_LIBJXL_VERSION +ARG ASWF_OPENEXR_VERSION +ARG ASWF_OCIO_VERSION +ARG ASWF_OIIO_VERSION +ARG ASWF_PARTIO_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION @@ -46,21 +77,52 @@ ARG ASWF_CONAN_CHANNEL -ARG ASWF_BOOST_VERSION -ARG ASWF_CMAKE_VERSION +ARG ASWF_B2_VERSION +ARG ASWF_BZIP2_VERSION +ARG ASWF_CPPUNIT_VERSION ARG ASWF_EXPAT_VERSION +ARG ASWF_FMT_VERSION ARG ASWF_GTEST_VERSION -ARG ASWF_CPPUNIT_VERSION -ARG ASWF_GLFW_VERSION -ARG ASWF_PYTHON_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBXCRYPT_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_PUGIXML_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_SNAPPY_VERSION ARG ASWF_TBB_VERSION -ARG ASWF_IMATH_VERSION -ARG ASWF_OPENEXR_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION ARG ASWF_BLOSC_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_FREETYPE_VERSION +ARG ASWF_GDBM_VERSION +ARG ASWF_GLEW_VERSION +ARG ASWF_GLFW_VERSION +ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_MINIZIP_NG_VERSION +ARG ASWF_BOOST_VERSION ARG ASWF_PYBIND11_VERSION +ARG ASWF_LIBJPEG_TURBO_VERSION +ARG ASWF_LIBWEBP_VERSION +ARG ASWF_MD4C_VERSION +ARG ASWF_QT_VERSION +ARG ASWF_PYSIDE_VERSION +ARG ASWF_HIGHWAY_VERSION +ARG ASWF_IMATH_VERSION +ARG ASWF_LCMS_VERSION +ARG ASWF_LIBUHDR_VERSION +ARG ASWF_PTEX_VERSION +ARG ASWF_LIBJXL_VERSION +ARG ASWF_OPENEXR_VERSION +ARG ASWF_OCIO_VERSION +ARG ASWF_OIIO_VERSION +ARG ASWF_PARTIO_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION LABEL org.opencontainers.image.name="$ASWF_ORG/ci-openvdb" @@ -77,18 +139,50 @@ LABEL org.opencontainers.image.version="${ASWF_VERSION}" LABEL com.vfxplatform.version="${ASWF_VFXPLATFORM_VERSION}" -LABEL io.aswf.docker.versions.boost="$ASWF_BOOST_VERSION" -LABEL io.aswf.docker.versions.cmake="$ASWF_CMAKE_VERSION" +LABEL io.aswf.docker.versions.b2="$ASWF_B2_VERSION" +LABEL io.aswf.docker.versions.bzip2="$ASWF_BZIP2_VERSION" +LABEL io.aswf.docker.versions.cppunit="$ASWF_CPPUNIT_VERSION" LABEL io.aswf.docker.versions.expat="$ASWF_EXPAT_VERSION" +LABEL io.aswf.docker.versions.fmt="$ASWF_FMT_VERSION" LABEL io.aswf.docker.versions.gtest="$ASWF_GTEST_VERSION" -LABEL io.aswf.docker.versions.cppunit="$ASWF_CPPUNIT_VERSION" -LABEL io.aswf.docker.versions.glfw="$ASWF_GLFW_VERSION" -LABEL io.aswf.docker.versions.python="$ASWF_PYTHON_VERSION" +LABEL io.aswf.docker.versions.libbacktrace="$ASWF_LIBBACKTRACE_VERSION" +LABEL io.aswf.docker.versions.libdeflate="$ASWF_LIBDEFLATE_VERSION" +LABEL io.aswf.docker.versions.libiconv="$ASWF_LIBICONV_VERSION" +LABEL io.aswf.docker.versions.libxcrypt="$ASWF_LIBXCRYPT_VERSION" +LABEL io.aswf.docker.versions.lz4="$ASWF_LZ4_VERSION" +LABEL io.aswf.docker.versions.pugixml="$ASWF_PUGIXML_VERSION" +LABEL io.aswf.docker.versions.pystring="$ASWF_PYSTRING_VERSION" +LABEL io.aswf.docker.versions.snappy="$ASWF_SNAPPY_VERSION" LABEL io.aswf.docker.versions.tbb="$ASWF_TBB_VERSION" -LABEL io.aswf.docker.versions.imath="$ASWF_IMATH_VERSION" -LABEL io.aswf.docker.versions.openexr="$ASWF_OPENEXR_VERSION" +LABEL io.aswf.docker.versions.tsl-robin-map="$ASWF_TSL_ROBIN_MAP_VERSION" +LABEL io.aswf.docker.versions.yaml-cpp="$ASWF_YAML_CPP_VERSION" +LABEL io.aswf.docker.versions.zlib="$ASWF_ZLIB_VERSION" +LABEL io.aswf.docker.versions.zstd="$ASWF_ZSTD_VERSION" LABEL io.aswf.docker.versions.blosc="$ASWF_BLOSC_VERSION" +LABEL io.aswf.docker.versions.cpython="$ASWF_CPYTHON_VERSION" +LABEL io.aswf.docker.versions.freetype="$ASWF_FREETYPE_VERSION" +LABEL io.aswf.docker.versions.gdbm="$ASWF_GDBM_VERSION" +LABEL io.aswf.docker.versions.glew="$ASWF_GLEW_VERSION" +LABEL io.aswf.docker.versions.glfw="$ASWF_GLFW_VERSION" +LABEL io.aswf.docker.versions.log4cplus="$ASWF_LOG4CPLUS_VERSION" +LABEL io.aswf.docker.versions.minizip-ng="$ASWF_MINIZIP_NG_VERSION" +LABEL io.aswf.docker.versions.boost="$ASWF_BOOST_VERSION" LABEL io.aswf.docker.versions.pybind11="$ASWF_PYBIND11_VERSION" +LABEL io.aswf.docker.versions.libjpeg-turbo="$ASWF_LIBJPEG_TURBO_VERSION" +LABEL io.aswf.docker.versions.libwebp="$ASWF_LIBWEBP_VERSION" +LABEL io.aswf.docker.versions.md4c="$ASWF_MD4C_VERSION" +LABEL io.aswf.docker.versions.qt="$ASWF_QT_VERSION" +LABEL io.aswf.docker.versions.pyside="$ASWF_PYSIDE_VERSION" +LABEL io.aswf.docker.versions.highway="$ASWF_HIGHWAY_VERSION" +LABEL io.aswf.docker.versions.imath="$ASWF_IMATH_VERSION" +LABEL io.aswf.docker.versions.lcms="$ASWF_LCMS_VERSION" +LABEL io.aswf.docker.versions.libuhdr="$ASWF_LIBUHDR_VERSION" +LABEL io.aswf.docker.versions.ptex="$ASWF_PTEX_VERSION" +LABEL io.aswf.docker.versions.libjxl="$ASWF_LIBJXL_VERSION" +LABEL io.aswf.docker.versions.openexr="$ASWF_OPENEXR_VERSION" +LABEL io.aswf.docker.versions.ocio="$ASWF_OCIO_VERSION" +LABEL io.aswf.docker.versions.oiio="$ASWF_OIIO_VERSION" +LABEL io.aswf.docker.versions.partio="$ASWF_PARTIO_VERSION" LABEL io.aswf.docker.versions.numpy="$ASWF_NUMPY_VERSION" LABEL io.aswf.docker.versions.vfxplatform="$ASWF_VFXPLATFORM_VERSION" @@ -102,53 +196,120 @@ ENV ASWF_PYSIDE_CLANG_VERSION=${ASWF_PYSIDE_CLANG_VERSION} ENV ASWF_VFXPLATFORM_VERSION=${ASWF_VFXPLATFORM_VERSION} -ENV ASWF_BOOST_VERSION=$ASWF_BOOST_VERSION -ENV ASWF_CMAKE_VERSION=$ASWF_CMAKE_VERSION +ENV ASWF_B2_VERSION=$ASWF_B2_VERSION +ENV ASWF_BZIP2_VERSION=$ASWF_BZIP2_VERSION +ENV ASWF_CPPUNIT_VERSION=$ASWF_CPPUNIT_VERSION ENV ASWF_EXPAT_VERSION=$ASWF_EXPAT_VERSION +ENV ASWF_FMT_VERSION=$ASWF_FMT_VERSION ENV ASWF_GTEST_VERSION=$ASWF_GTEST_VERSION -ENV ASWF_CPPUNIT_VERSION=$ASWF_CPPUNIT_VERSION -ENV ASWF_GLFW_VERSION=$ASWF_GLFW_VERSION -ENV ASWF_PYTHON_VERSION=$ASWF_PYTHON_VERSION +ENV ASWF_LIBBACKTRACE_VERSION=$ASWF_LIBBACKTRACE_VERSION +ENV ASWF_LIBDEFLATE_VERSION=$ASWF_LIBDEFLATE_VERSION +ENV ASWF_LIBICONV_VERSION=$ASWF_LIBICONV_VERSION +ENV ASWF_LIBXCRYPT_VERSION=$ASWF_LIBXCRYPT_VERSION +ENV ASWF_LZ4_VERSION=$ASWF_LZ4_VERSION +ENV ASWF_PUGIXML_VERSION=$ASWF_PUGIXML_VERSION +ENV ASWF_PYSTRING_VERSION=$ASWF_PYSTRING_VERSION +ENV ASWF_SNAPPY_VERSION=$ASWF_SNAPPY_VERSION ENV ASWF_TBB_VERSION=$ASWF_TBB_VERSION -ENV ASWF_IMATH_VERSION=$ASWF_IMATH_VERSION -ENV ASWF_OPENEXR_VERSION=$ASWF_OPENEXR_VERSION +ENV ASWF_TSL_ROBIN_MAP_VERSION=$ASWF_TSL_ROBIN_MAP_VERSION +ENV ASWF_YAML_CPP_VERSION=$ASWF_YAML_CPP_VERSION +ENV ASWF_ZLIB_VERSION=$ASWF_ZLIB_VERSION +ENV ASWF_ZSTD_VERSION=$ASWF_ZSTD_VERSION ENV ASWF_BLOSC_VERSION=$ASWF_BLOSC_VERSION +ENV ASWF_CPYTHON_VERSION=$ASWF_CPYTHON_VERSION +ENV ASWF_FREETYPE_VERSION=$ASWF_FREETYPE_VERSION +ENV ASWF_GDBM_VERSION=$ASWF_GDBM_VERSION +ENV ASWF_GLEW_VERSION=$ASWF_GLEW_VERSION +ENV ASWF_GLFW_VERSION=$ASWF_GLFW_VERSION +ENV ASWF_LOG4CPLUS_VERSION=$ASWF_LOG4CPLUS_VERSION +ENV ASWF_MINIZIP_NG_VERSION=$ASWF_MINIZIP_NG_VERSION +ENV ASWF_BOOST_VERSION=$ASWF_BOOST_VERSION ENV ASWF_PYBIND11_VERSION=$ASWF_PYBIND11_VERSION +ENV ASWF_LIBJPEG_TURBO_VERSION=$ASWF_LIBJPEG_TURBO_VERSION +ENV ASWF_LIBWEBP_VERSION=$ASWF_LIBWEBP_VERSION +ENV ASWF_MD4C_VERSION=$ASWF_MD4C_VERSION +ENV ASWF_QT_VERSION=$ASWF_QT_VERSION +ENV ASWF_PYSIDE_VERSION=$ASWF_PYSIDE_VERSION +ENV ASWF_HIGHWAY_VERSION=$ASWF_HIGHWAY_VERSION +ENV ASWF_IMATH_VERSION=$ASWF_IMATH_VERSION +ENV ASWF_LCMS_VERSION=$ASWF_LCMS_VERSION +ENV ASWF_LIBUHDR_VERSION=$ASWF_LIBUHDR_VERSION +ENV ASWF_PTEX_VERSION=$ASWF_PTEX_VERSION +ENV ASWF_LIBJXL_VERSION=$ASWF_LIBJXL_VERSION +ENV ASWF_OPENEXR_VERSION=$ASWF_OPENEXR_VERSION +ENV ASWF_OCIO_VERSION=$ASWF_OCIO_VERSION +ENV ASWF_OIIO_VERSION=$ASWF_OIIO_VERSION +ENV ASWF_PARTIO_VERSION=$ASWF_PARTIO_VERSION ENV ASWF_NUMPY_VERSION=$ASWF_NUMPY_VERSION ENV ASWF_VFXPLATFORM_VERSION=$ASWF_VFXPLATFORM_VERSION -ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=$ASWF_PYTHON_MAJOR_MINOR_VERSION COPY ci-openvdb/README.md ci-openvdb/image.yaml /usr/local/aswf/ -ENV PYTHONPATH=/usr/local/lib/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib64/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib/python:${PYTHONPATH} COPY scripts/common/install_conanpackages.sh /tmp/ +ARG ASWF_PYTHON_MAJOR_MINOR_VERSION +ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=${ASWF_PYTHON_MAJOR_MINOR_VERSION} + # conan-only packages COPY < . [requires] -boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +b2/${ASWF_B2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +bzip2/${ASWF_BZIP2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cppunit/${ASWF_CPPUNIT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} expat/${ASWF_EXPAT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +fmt/${ASWF_FMT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} gtest/${ASWF_GTEST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -cppunit/${ASWF_CPPUNIT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -glfw/${ASWF_GLFW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -python/${ASWF_PYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libbacktrace/${ASWF_LIBBACKTRACE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libdeflate/${ASWF_LIBDEFLATE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libiconv/${ASWF_LIBICONV_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libxcrypt/${ASWF_LIBXCRYPT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +lz4/${ASWF_LZ4_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pugixml/${ASWF_PUGIXML_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pystring/${ASWF_PYSTRING_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +snappy/${ASWF_SNAPPY_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -imath/${ASWF_IMATH_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -openexr/${ASWF_OPENEXR_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tsl-robin-map/${ASWF_TSL_ROBIN_MAP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +yaml-cpp/${ASWF_YAML_CPP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zlib/${ASWF_ZLIB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zstd/${ASWF_ZSTD_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} blosc/${ASWF_BLOSC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cpython/${ASWF_CPYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +freetype/${ASWF_FREETYPE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +gdbm/${ASWF_GDBM_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +glew/${ASWF_GLEW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +glfw/${ASWF_GLFW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +log4cplus/${ASWF_LOG4CPLUS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +minizip-ng/${ASWF_MINIZIP_NG_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} pybind11/${ASWF_PYBIND11_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libjpeg-turbo/${ASWF_LIBJPEG_TURBO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libwebp/${ASWF_LIBWEBP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +md4c/${ASWF_MD4C_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +qt/${ASWF_QT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pyside/${ASWF_PYSIDE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +highway/${ASWF_HIGHWAY_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +imath/${ASWF_IMATH_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +lcms/${ASWF_LCMS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libuhdr/${ASWF_LIBUHDR_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +ptex/${ASWF_PTEX_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libjxl/${ASWF_LIBJXL_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +openexr/${ASWF_OPENEXR_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +ocio/${ASWF_OCIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +oiio/${ASWF_OIIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +partio/${ASWF_PARTIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF +ENV CONAN_HOME=${CONAN_USER_HOME}/.conan2 + RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} diff --git a/ci-openvdb/README.md b/ci-openvdb/README.md index f0b2d767..e2c4bf70 100644 --- a/ci-openvdb/README.md +++ b/ci-openvdb/README.md @@ -21,257 +21,496 @@ Warning: this image does *not* contain OpenVDB itself as it is used to *build* O ## [aswf/ci-openvdb:2019-clang6.8](https://hub.docker.com/r/aswf/ci-openvdb/tags?page=1&name=2019-clang6.8) Contains: -* boost-1.66.0 -* cmake-3.12.4 -* gtest-1.8.1 * cppunit-1.14.0 -* glfw-3.1.2 -* python-2.7.15 +* gtest-1.8.1 * tbb-2018 -* imath-2.3.0 -* openexr-2.3.0 * blosc-1.5.0 +* cpython-2.7.15 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 +* boost-1.66.0 * pybind11-2.4.3 +* qt-5.12.6 +* pyside-5.12.6 +* imath-2.3.0 +* ptex-2.1.33 +* openexr-2.3.0 +* ocio-1.1.0 +* oiio-2.0.8 +* partio-1.10.1 * numpy-1.14 * vfxplatform-2019 ## [aswf/ci-openvdb:2019-clang7.8](https://hub.docker.com/r/aswf/ci-openvdb/tags?page=1&name=2019-clang7.8) Contains: -* boost-1.66.0 -* cmake-3.12.4 -* gtest-1.8.1 * cppunit-1.14.0 -* glfw-3.1.2 -* python-2.7.15 +* gtest-1.8.1 * tbb-2018 -* imath-2.3.0 -* openexr-2.3.0 * blosc-1.5.0 +* cpython-2.7.15 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 +* boost-1.66.0 * pybind11-2.4.3 +* qt-5.12.6 +* pyside-5.12.6 +* imath-2.3.0 +* ptex-2.1.33 +* openexr-2.3.0 +* ocio-1.1.0 +* oiio-2.0.8 +* partio-1.10.1 * numpy-1.14 * vfxplatform-2019 ## [aswf/ci-openvdb:2019-clang8.8](https://hub.docker.com/r/aswf/ci-openvdb/tags?page=1&name=2019-clang8.8) Contains: -* boost-1.66.0 -* cmake-3.12.4 -* gtest-1.8.1 * cppunit-1.14.0 -* glfw-3.1.2 -* python-2.7.15 +* gtest-1.8.1 * tbb-2018 -* imath-2.3.0 -* openexr-2.3.0 * blosc-1.5.0 +* cpython-2.7.15 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 +* boost-1.66.0 * pybind11-2.4.3 +* qt-5.12.6 +* pyside-5.12.6 +* imath-2.3.0 +* ptex-2.1.33 +* openexr-2.3.0 +* ocio-1.1.0 +* oiio-2.0.8 +* partio-1.10.1 * numpy-1.14 * vfxplatform-2019 ## [aswf/ci-openvdb:2019-clang9.8](https://hub.docker.com/r/aswf/ci-openvdb/tags?page=1&name=2019-clang9.8) Contains: -* boost-1.66.0 -* cmake-3.12.4 -* gtest-1.8.1 * cppunit-1.14.0 -* glfw-3.1.2 -* python-2.7.15 +* gtest-1.8.1 * tbb-2018 -* imath-2.3.0 -* openexr-2.3.0 * blosc-1.5.0 +* cpython-2.7.15 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 +* boost-1.66.0 * pybind11-2.4.3 +* qt-5.12.6 +* pyside-5.12.6 +* imath-2.3.0 +* ptex-2.1.33 +* openexr-2.3.0 +* ocio-1.1.0 +* oiio-2.0.8 +* partio-1.10.1 * numpy-1.14 * vfxplatform-2019 ## [aswf/ci-openvdb:2020-clang7.8](https://hub.docker.com/r/aswf/ci-openvdb/tags?page=1&name=2020-clang7.8) Contains: -* boost-1.70.0 -* cmake-3.18.4 -* gtest-1.10.0 * cppunit-1.15.1 +* gtest-1.10.0 +* tbb-2019_u6 +* blosc-1.5.0 +* cpython-3.7.3 +* glew-2.1.0 * glfw-3.1.2 -* python-3.7.3 -* tbb-2019_U6 +* log4cplus-1.1.2 +* boost-1.70.0 +* pybind11-2.4.3 +* qt-5.12.6 +* pyside-5.12.6 * imath-2.4.0 +* ptex-2.3.2 * openexr-2.4.0 -* blosc-1.5.0 -* pybind11-2.4.3 +* ocio-1.1.1 +* oiio-2.1.13.0 +* partio-1.10.1 * numpy-1.16 * vfxplatform-2020 ## [aswf/ci-openvdb:2021-clang10.6](https://hub.docker.com/r/aswf/ci-openvdb/tags?page=1&name=2021-clang10.6) Contains: -* boost-1.73.0 -* cmake-3.19.3 -* gtest-1.11.0 * cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u2 +* blosc-1.5.0 +* cpython-3.7.9 +* glew-2.1.0 * glfw-3.1.2 -* python-3.7.9 -* tbb-2020_U2 +* log4cplus-1.1.2 +* boost-1.73.0 +* pybind11-2.6.2 +* qt-5.15.2 +* pyside-5.15.2 * imath-2.5.5 +* ptex-2.3.2 * openexr-2.5.5 -* blosc-1.5.0 -* pybind11-2.6.2 +* ocio-2.0.1 +* oiio-2.2.14.0 +* partio-1.14.0 * numpy-1.19 * vfxplatform-2021 ## [aswf/ci-openvdb:2022-clang10.12](https://hub.docker.com/r/aswf/ci-openvdb/tags?page=1&name=2022-clang10.12) Contains: -* boost-1.76.0 -* cmake-3.22.0 -* gtest-1.11.0 * cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.9.15 +* glew-2.1.0 * glfw-3.1.2 -* python-3.9.15 -* tbb-2020_U3 +* log4cplus-1.1.2 +* boost-1.76.0 +* pybind11-2.8.1 +* qt-5.15.2 +* pyside-5.15.2 * imath-3.1.5 +* ptex-2.4.0 * openexr-3.1.5 -* blosc-1.17.0 -* pybind11-2.8.1 +* ocio-2.1.1 +* oiio-2.4.5.0 +* partio-1.14.0 * numpy-1.20 * vfxplatform-2022 ## [aswf/ci-openvdb:2022-clang11.12](https://hub.docker.com/r/aswf/ci-openvdb/tags?page=1&name=2022-clang11.12) Contains: -* boost-1.76.0 -* cmake-3.22.0 -* gtest-1.11.0 * cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.9.15 +* glew-2.1.0 * glfw-3.1.2 -* python-3.9.15 -* tbb-2020_U3 +* log4cplus-1.1.2 +* boost-1.76.0 +* pybind11-2.8.1 +* qt-5.15.2 +* pyside-5.15.2 * imath-3.1.5 +* ptex-2.4.0 * openexr-3.1.5 -* blosc-1.17.0 -* pybind11-2.8.1 +* ocio-2.1.1 +* oiio-2.4.5.0 +* partio-1.14.0 * numpy-1.20 * vfxplatform-2022 ## [aswf/ci-openvdb:2022-clang12.3](https://hub.docker.com/r/aswf/ci-openvdb/tags?page=1&name=2022-clang12.3) Contains: -* boost-1.76.0 -* cmake-3.22.0 -* gtest-1.11.0 * cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.9.15 +* glew-2.1.0 * glfw-3.1.2 -* python-3.9.15 -* tbb-2020_U3 +* log4cplus-1.1.2 +* boost-1.76.0 +* pybind11-2.8.1 +* qt-5.15.2 +* pyside-5.15.2 * imath-3.1.5 +* ptex-2.4.0 * openexr-3.1.5 -* blosc-1.17.0 -* pybind11-2.8.1 +* ocio-2.1.1 +* oiio-2.4.5.0 +* partio-1.14.0 * numpy-1.20 * vfxplatform-2022 ## [aswf/ci-openvdb:2022-clang13.3](https://hub.docker.com/r/aswf/ci-openvdb/tags?page=1&name=2022-clang13.3) Contains: -* boost-1.76.0 -* cmake-3.22.0 -* gtest-1.11.0 * cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.9.15 +* glew-2.1.0 * glfw-3.1.2 -* python-3.9.15 -* tbb-2020_U3 +* log4cplus-1.1.2 +* boost-1.76.0 +* pybind11-2.8.1 +* qt-5.15.2 +* pyside-5.15.2 * imath-3.1.5 +* ptex-2.4.0 * openexr-3.1.5 -* blosc-1.17.0 -* pybind11-2.8.1 +* ocio-2.1.1 +* oiio-2.4.5.0 +* partio-1.14.0 * numpy-1.20 * vfxplatform-2022 ## [aswf/ci-openvdb:2022-clang14.2](https://hub.docker.com/r/aswf/ci-openvdb/tags?page=1&name=2022-clang14.2) Contains: -* boost-1.76.0 -* cmake-3.22.0 -* gtest-1.11.0 * cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.9.15 +* glew-2.1.0 * glfw-3.1.2 -* python-3.9.15 -* tbb-2020_U3 +* log4cplus-1.1.2 +* boost-1.76.0 +* pybind11-2.8.1 +* qt-5.15.2 +* pyside-5.15.2 * imath-3.1.5 +* ptex-2.4.0 * openexr-3.1.5 -* blosc-1.17.0 -* pybind11-2.8.1 +* ocio-2.1.1 +* oiio-2.4.5.0 +* partio-1.14.0 * numpy-1.20 * vfxplatform-2022 ## [aswf/ci-openvdb:2023-clang14.2](https://hub.docker.com/r/aswf/ci-openvdb/tags?page=1&name=2023-clang14.2) Contains: -* boost-1.80.0 -* cmake-3.27.2 -* gtest-1.11.0 * cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.10.11 +* glew-2.1.0 * glfw-3.1.2 -* python-3.10.11 -* tbb-2020_U3 +* log4cplus-1.1.2 +* boost-1.80.0 +* pybind11-2.9.2 +* qt-5.15.9 +* pyside-5.15.9 * imath-3.1.9 +* ptex-2.4.2 * openexr-3.1.11 -* blosc-1.17.0 -* pybind11-2.9.2 +* ocio-2.2.1 +* oiio-2.4.13.0 +* partio-1.17.1 * numpy-1.23.5 * vfxplatform-2023 ## [aswf/ci-openvdb:2023-clang15.2](https://hub.docker.com/r/aswf/ci-openvdb/tags?page=1&name=2023-clang15.2) Contains: -* boost-1.80.0 -* cmake-3.27.2 -* gtest-1.11.0 * cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.10.11 +* glew-2.1.0 * glfw-3.1.2 -* python-3.10.11 -* tbb-2020_U3 +* log4cplus-1.1.2 +* boost-1.80.0 +* pybind11-2.9.2 +* qt-5.15.9 +* pyside-5.15.9 * imath-3.1.9 +* ptex-2.4.2 * openexr-3.1.11 -* blosc-1.17.0 -* pybind11-2.9.2 +* ocio-2.2.1 +* oiio-2.4.13.0 +* partio-1.17.1 * numpy-1.23.5 * vfxplatform-2023 ## [aswf/ci-openvdb:2024-clang16.2](https://hub.docker.com/r/aswf/ci-openvdb/tags?page=1&name=2024-clang16.2) Contains: -* boost-1.82.0 -* cmake-3.27.9 -* expat-2.6.3 -* gtest-1.14.0 +* b2-5.2.1 +* bzip2-1.0.8 * cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.14.0 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.5 +* cpython-3.11.11 +* freetype-2.13.2 +* gdbm-system +* glew-2.1.0 * glfw-3.3.8 -* python-3.11.10 -* tbb-2020_U3 +* log4cplus-2.1.1 +* boost-1.82.0 +* pybind11-2.12.0 +* libwebp-1.5.0 +* md4c-0.4.8 +* qt-6.5.4 +* pyside-6.5.4 +* highway-1.2.0 * imath-3.1.12 +* lcms-2.16 +* libuhdr-1.4.0 +* ptex-2.4.2 +* libjxl-0.11.1 * openexr-3.2.4 -* blosc-1.21.5 -* pybind11-2.12.0 +* ocio-2.3.2 +* oiio-2.5.18.0 +* partio-1.17.1 * numpy-1.24.3 * vfxplatform-2024 ## [aswf/ci-openvdb:2024-clang17.2](https://hub.docker.com/r/aswf/ci-openvdb/tags?page=1&name=2024-clang17.2) Contains: -* boost-1.82.0 -* cmake-3.27.9 -* expat-2.6.3 -* gtest-1.14.0 +* b2-5.2.1 +* bzip2-1.0.8 * cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.14.0 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.5 +* cpython-3.11.11 +* freetype-2.13.2 +* gdbm-system +* glew-2.1.0 * glfw-3.3.8 -* python-3.11.10 -* tbb-2020_U3 +* log4cplus-2.1.1 +* boost-1.82.0 +* pybind11-2.12.0 +* libwebp-1.5.0 +* md4c-0.4.8 +* qt-6.5.4 +* pyside-6.5.4 +* highway-1.2.0 * imath-3.1.12 +* lcms-2.16 +* libuhdr-1.4.0 +* ptex-2.4.2 +* libjxl-0.11.1 * openexr-3.2.4 -* blosc-1.21.5 -* pybind11-2.12.0 +* ocio-2.3.2 +* oiio-2.5.18.0 +* partio-1.17.1 * numpy-1.24.3 * vfxplatform-2024 +## [aswf/ci-openvdb:2025-clang18.0](https://hub.docker.com/r/aswf/ci-openvdb/tags?page=1&name=2025-clang18.0) + +Contains: +* b2-5.2.1 +* bzip2-1.0.8 +* cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.15.2 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.6 +* cpython-3.11.11 +* freetype-2.13.2 +* gdbm-system +* glew-2.2.0 +* glfw-3.4 +* log4cplus-2.1.2 +* boost-1.85.0 +* pybind11-2.13.6 +* libwebp-1.5.0 +* md4c-0.4.8 +* qt-6.5.4 +* pyside-6.5.4 +* highway-1.2.0 +* imath-3.1.12 +* lcms-2.16 +* libuhdr-1.4.0 +* ptex-2.4.3 +* libjxl-0.11.1 +* openexr-3.3.3 +* ocio-2.4.2 +* oiio-3.0.5.0 +* partio-1.17.3 +* numpy-1.26.4 +* vfxplatform-2025 + +## [aswf/ci-openvdb:2025-clang19.0](https://hub.docker.com/r/aswf/ci-openvdb/tags?page=1&name=2025-clang19.0) + +Contains: +* b2-5.2.1 +* bzip2-1.0.8 +* cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.15.2 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.6 +* cpython-3.11.11 +* freetype-2.13.2 +* gdbm-system +* glew-2.2.0 +* glfw-3.4 +* log4cplus-2.1.2 +* boost-1.85.0 +* pybind11-2.13.6 +* libwebp-1.5.0 +* md4c-0.4.8 +* qt-6.5.4 +* pyside-6.5.4 +* highway-1.2.0 +* imath-3.1.12 +* lcms-2.16 +* libuhdr-1.4.0 +* ptex-2.4.3 +* libjxl-0.11.1 +* openexr-3.3.3 +* ocio-2.4.2 +* oiio-3.0.5.0 +* partio-1.17.3 +* numpy-1.26.4 +* vfxplatform-2025 + diff --git a/ci-openvdb/image.yaml b/ci-openvdb/image.yaml index 61aefa64..eee94053 100644 --- a/ci-openvdb/image.yaml +++ b/ci-openvdb/image.yaml @@ -4,18 +4,50 @@ description: | Contains: Python, Boost, TBB and other OpenVDB upstream dependencies Warning: this image does *not* contain OpenVDB itself as it is used to *build* OpenVDB! packages: - - boost - - cmake + - b2 # base1-1 packages + - bzip2 + - cppunit - expat + - fmt - gtest - - cppunit - - glfw - - python + - libbacktrace + - libdeflate + - libiconv + - libxcrypt + - lz4 + - pugixml + - pystring + - snappy - tbb + - tsl-robin-map + - yaml-cpp + - zlib + - zstd + - blosc # base1-2 packages + - cpython + - freetype + - gdbm + - glew + - glfw + - log4cplus + - minizip-ng + - boost # base1-3 packages + - pybind11 + - libjpeg-turbo # base2-1 packages + - libwebp + - md4c + - qt # base2-2 packages + - pyside # base2-3 packages + - highway # vfx1-1 packages - imath + - lcms + - libuhdr + - ptex + - libjxl # vfx1-2 packages - openexr - - blosc - - pybind11 + - ocio # vfx1-3 packages + - oiio # vfx1-4 packages + - partio # vfx2-1 packages implicit_packages: - numpy - vfxplatform diff --git a/ci-osl/Dockerfile b/ci-osl/Dockerfile index 5405a18c..7f6c5b3d 100644 --- a/ci-osl/Dockerfile +++ b/ci-osl/Dockerfile @@ -14,30 +14,58 @@ ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_BOOST_VERSION -ARG ASWF_CMAKE_VERSION +ARG ASWF_B2_VERSION +ARG ASWF_BZIP2_VERSION +ARG ASWF_CPPUNIT_VERSION ARG ASWF_EXPAT_VERSION -ARG ASWF_PYTHON_VERSION +ARG ASWF_FMT_VERSION +ARG ASWF_GTEST_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBXCRYPT_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_PUGIXML_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_SNAPPY_VERSION +ARG ASWF_TBB_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION +ARG ASWF_BLOSC_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_FREETYPE_VERSION +ARG ASWF_GDBM_VERSION +ARG ASWF_GLEW_VERSION +ARG ASWF_GLFW_VERSION +ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_MINIZIP_NG_VERSION +ARG ASWF_BOOST_VERSION +ARG ASWF_PYBIND11_VERSION +ARG ASWF_LIBJPEG_TURBO_VERSION +ARG ASWF_LIBWEBP_VERSION +ARG ASWF_MD4C_VERSION ARG ASWF_QT_VERSION +ARG ASWF_PYSIDE_VERSION +ARG ASWF_HIGHWAY_VERSION ARG ASWF_IMATH_VERSION +ARG ASWF_LCMS_VERSION +ARG ASWF_LIBUHDR_VERSION +ARG ASWF_PTEX_VERSION +ARG ASWF_LIBJXL_VERSION ARG ASWF_OPENEXR_VERSION -ARG ASWF_OIIO_VERSION ARG ASWF_OCIO_VERSION -ARG ASWF_PARTIO_VERSION -ARG ASWF_PTEX_VERSION -ARG ASWF_TBB_VERSION -ARG ASWF_BLOSC_VERSION +ARG ASWF_OIIO_VERSION ARG ASWF_OPENVDB_VERSION +ARG ASWF_PARTIO_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION # Comment out this block to use Conan packages -FROM ${ASWF_PKG_ORG}/ci-package-oiio:$ASWF_VFXPLATFORM_VERSION-$ASWF_OIIO_VERSION AS ci-package-oiio -FROM ${ASWF_PKG_ORG}/ci-package-ocio:$ASWF_VFXPLATFORM_VERSION-$ASWF_OCIO_VERSION AS ci-package-ocio FROM ${ASWF_PKG_ORG}/ci-package-openvdb:$ASWF_VFXPLATFORM_VERSION-$ASWF_OPENVDB_VERSION AS ci-package-openvdb FROM ${ASWF_ORG}/ci-common:${CI_COMMON_VERSION}-clang${ASWF_CLANG_MAJOR_VERSION} AS ci-osl @@ -51,23 +79,53 @@ ARG ASWF_CONAN_CHANNEL -ARG ASWF_BOOST_VERSION -ARG ASWF_CMAKE_VERSION +ARG ASWF_B2_VERSION +ARG ASWF_BZIP2_VERSION +ARG ASWF_CPPUNIT_VERSION ARG ASWF_EXPAT_VERSION -ARG ASWF_PYTHON_VERSION +ARG ASWF_FMT_VERSION +ARG ASWF_GTEST_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBXCRYPT_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_PUGIXML_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_SNAPPY_VERSION +ARG ASWF_TBB_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION +ARG ASWF_BLOSC_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_FREETYPE_VERSION +ARG ASWF_GDBM_VERSION +ARG ASWF_GLEW_VERSION +ARG ASWF_GLFW_VERSION +ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_MINIZIP_NG_VERSION +ARG ASWF_BOOST_VERSION +ARG ASWF_PYBIND11_VERSION +ARG ASWF_LIBJPEG_TURBO_VERSION +ARG ASWF_LIBWEBP_VERSION +ARG ASWF_MD4C_VERSION ARG ASWF_QT_VERSION +ARG ASWF_PYSIDE_VERSION +ARG ASWF_HIGHWAY_VERSION ARG ASWF_IMATH_VERSION +ARG ASWF_LCMS_VERSION +ARG ASWF_LIBUHDR_VERSION +ARG ASWF_PTEX_VERSION +ARG ASWF_LIBJXL_VERSION ARG ASWF_OPENEXR_VERSION -ARG ASWF_OIIO_VERSION ARG ASWF_OCIO_VERSION -ARG ASWF_PARTIO_VERSION -ARG ASWF_PTEX_VERSION -ARG ASWF_TBB_VERSION -ARG ASWF_BLOSC_VERSION +ARG ASWF_OIIO_VERSION ARG ASWF_OPENVDB_VERSION +ARG ASWF_PARTIO_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION LABEL org.opencontainers.image.name="$ASWF_ORG/ci-osl" @@ -84,20 +142,51 @@ LABEL org.opencontainers.image.version="${ASWF_VERSION}" LABEL com.vfxplatform.version="${ASWF_VFXPLATFORM_VERSION}" -LABEL io.aswf.docker.versions.boost="$ASWF_BOOST_VERSION" -LABEL io.aswf.docker.versions.cmake="$ASWF_CMAKE_VERSION" +LABEL io.aswf.docker.versions.b2="$ASWF_B2_VERSION" +LABEL io.aswf.docker.versions.bzip2="$ASWF_BZIP2_VERSION" +LABEL io.aswf.docker.versions.cppunit="$ASWF_CPPUNIT_VERSION" LABEL io.aswf.docker.versions.expat="$ASWF_EXPAT_VERSION" -LABEL io.aswf.docker.versions.python="$ASWF_PYTHON_VERSION" +LABEL io.aswf.docker.versions.fmt="$ASWF_FMT_VERSION" +LABEL io.aswf.docker.versions.gtest="$ASWF_GTEST_VERSION" +LABEL io.aswf.docker.versions.libbacktrace="$ASWF_LIBBACKTRACE_VERSION" +LABEL io.aswf.docker.versions.libdeflate="$ASWF_LIBDEFLATE_VERSION" +LABEL io.aswf.docker.versions.libiconv="$ASWF_LIBICONV_VERSION" +LABEL io.aswf.docker.versions.libxcrypt="$ASWF_LIBXCRYPT_VERSION" +LABEL io.aswf.docker.versions.lz4="$ASWF_LZ4_VERSION" +LABEL io.aswf.docker.versions.pugixml="$ASWF_PUGIXML_VERSION" +LABEL io.aswf.docker.versions.pystring="$ASWF_PYSTRING_VERSION" +LABEL io.aswf.docker.versions.snappy="$ASWF_SNAPPY_VERSION" +LABEL io.aswf.docker.versions.tbb="$ASWF_TBB_VERSION" +LABEL io.aswf.docker.versions.tsl-robin-map="$ASWF_TSL_ROBIN_MAP_VERSION" +LABEL io.aswf.docker.versions.yaml-cpp="$ASWF_YAML_CPP_VERSION" +LABEL io.aswf.docker.versions.zlib="$ASWF_ZLIB_VERSION" +LABEL io.aswf.docker.versions.zstd="$ASWF_ZSTD_VERSION" +LABEL io.aswf.docker.versions.blosc="$ASWF_BLOSC_VERSION" +LABEL io.aswf.docker.versions.cpython="$ASWF_CPYTHON_VERSION" +LABEL io.aswf.docker.versions.freetype="$ASWF_FREETYPE_VERSION" +LABEL io.aswf.docker.versions.gdbm="$ASWF_GDBM_VERSION" +LABEL io.aswf.docker.versions.glew="$ASWF_GLEW_VERSION" +LABEL io.aswf.docker.versions.glfw="$ASWF_GLFW_VERSION" +LABEL io.aswf.docker.versions.log4cplus="$ASWF_LOG4CPLUS_VERSION" +LABEL io.aswf.docker.versions.minizip-ng="$ASWF_MINIZIP_NG_VERSION" +LABEL io.aswf.docker.versions.boost="$ASWF_BOOST_VERSION" +LABEL io.aswf.docker.versions.pybind11="$ASWF_PYBIND11_VERSION" +LABEL io.aswf.docker.versions.libjpeg-turbo="$ASWF_LIBJPEG_TURBO_VERSION" +LABEL io.aswf.docker.versions.libwebp="$ASWF_LIBWEBP_VERSION" +LABEL io.aswf.docker.versions.md4c="$ASWF_MD4C_VERSION" LABEL io.aswf.docker.versions.qt="$ASWF_QT_VERSION" +LABEL io.aswf.docker.versions.pyside="$ASWF_PYSIDE_VERSION" +LABEL io.aswf.docker.versions.highway="$ASWF_HIGHWAY_VERSION" LABEL io.aswf.docker.versions.imath="$ASWF_IMATH_VERSION" +LABEL io.aswf.docker.versions.lcms="$ASWF_LCMS_VERSION" +LABEL io.aswf.docker.versions.libuhdr="$ASWF_LIBUHDR_VERSION" +LABEL io.aswf.docker.versions.ptex="$ASWF_PTEX_VERSION" +LABEL io.aswf.docker.versions.libjxl="$ASWF_LIBJXL_VERSION" LABEL io.aswf.docker.versions.openexr="$ASWF_OPENEXR_VERSION" -LABEL io.aswf.docker.versions.oiio="$ASWF_OIIO_VERSION" LABEL io.aswf.docker.versions.ocio="$ASWF_OCIO_VERSION" -LABEL io.aswf.docker.versions.partio="$ASWF_PARTIO_VERSION" -LABEL io.aswf.docker.versions.ptex="$ASWF_PTEX_VERSION" -LABEL io.aswf.docker.versions.tbb="$ASWF_TBB_VERSION" -LABEL io.aswf.docker.versions.blosc="$ASWF_BLOSC_VERSION" +LABEL io.aswf.docker.versions.oiio="$ASWF_OIIO_VERSION" LABEL io.aswf.docker.versions.openvdb="$ASWF_OPENVDB_VERSION" +LABEL io.aswf.docker.versions.partio="$ASWF_PARTIO_VERSION" LABEL io.aswf.docker.versions.numpy="$ASWF_NUMPY_VERSION" LABEL io.aswf.docker.versions.vfxplatform="$ASWF_VFXPLATFORM_VERSION" @@ -111,60 +200,123 @@ ENV ASWF_PYSIDE_CLANG_VERSION=${ASWF_PYSIDE_CLANG_VERSION} ENV ASWF_VFXPLATFORM_VERSION=${ASWF_VFXPLATFORM_VERSION} -ENV ASWF_BOOST_VERSION=$ASWF_BOOST_VERSION -ENV ASWF_CMAKE_VERSION=$ASWF_CMAKE_VERSION +ENV ASWF_B2_VERSION=$ASWF_B2_VERSION +ENV ASWF_BZIP2_VERSION=$ASWF_BZIP2_VERSION +ENV ASWF_CPPUNIT_VERSION=$ASWF_CPPUNIT_VERSION ENV ASWF_EXPAT_VERSION=$ASWF_EXPAT_VERSION -ENV ASWF_PYTHON_VERSION=$ASWF_PYTHON_VERSION +ENV ASWF_FMT_VERSION=$ASWF_FMT_VERSION +ENV ASWF_GTEST_VERSION=$ASWF_GTEST_VERSION +ENV ASWF_LIBBACKTRACE_VERSION=$ASWF_LIBBACKTRACE_VERSION +ENV ASWF_LIBDEFLATE_VERSION=$ASWF_LIBDEFLATE_VERSION +ENV ASWF_LIBICONV_VERSION=$ASWF_LIBICONV_VERSION +ENV ASWF_LIBXCRYPT_VERSION=$ASWF_LIBXCRYPT_VERSION +ENV ASWF_LZ4_VERSION=$ASWF_LZ4_VERSION +ENV ASWF_PUGIXML_VERSION=$ASWF_PUGIXML_VERSION +ENV ASWF_PYSTRING_VERSION=$ASWF_PYSTRING_VERSION +ENV ASWF_SNAPPY_VERSION=$ASWF_SNAPPY_VERSION +ENV ASWF_TBB_VERSION=$ASWF_TBB_VERSION +ENV ASWF_TSL_ROBIN_MAP_VERSION=$ASWF_TSL_ROBIN_MAP_VERSION +ENV ASWF_YAML_CPP_VERSION=$ASWF_YAML_CPP_VERSION +ENV ASWF_ZLIB_VERSION=$ASWF_ZLIB_VERSION +ENV ASWF_ZSTD_VERSION=$ASWF_ZSTD_VERSION +ENV ASWF_BLOSC_VERSION=$ASWF_BLOSC_VERSION +ENV ASWF_CPYTHON_VERSION=$ASWF_CPYTHON_VERSION +ENV ASWF_FREETYPE_VERSION=$ASWF_FREETYPE_VERSION +ENV ASWF_GDBM_VERSION=$ASWF_GDBM_VERSION +ENV ASWF_GLEW_VERSION=$ASWF_GLEW_VERSION +ENV ASWF_GLFW_VERSION=$ASWF_GLFW_VERSION +ENV ASWF_LOG4CPLUS_VERSION=$ASWF_LOG4CPLUS_VERSION +ENV ASWF_MINIZIP_NG_VERSION=$ASWF_MINIZIP_NG_VERSION +ENV ASWF_BOOST_VERSION=$ASWF_BOOST_VERSION +ENV ASWF_PYBIND11_VERSION=$ASWF_PYBIND11_VERSION +ENV ASWF_LIBJPEG_TURBO_VERSION=$ASWF_LIBJPEG_TURBO_VERSION +ENV ASWF_LIBWEBP_VERSION=$ASWF_LIBWEBP_VERSION +ENV ASWF_MD4C_VERSION=$ASWF_MD4C_VERSION ENV ASWF_QT_VERSION=$ASWF_QT_VERSION +ENV ASWF_PYSIDE_VERSION=$ASWF_PYSIDE_VERSION +ENV ASWF_HIGHWAY_VERSION=$ASWF_HIGHWAY_VERSION ENV ASWF_IMATH_VERSION=$ASWF_IMATH_VERSION +ENV ASWF_LCMS_VERSION=$ASWF_LCMS_VERSION +ENV ASWF_LIBUHDR_VERSION=$ASWF_LIBUHDR_VERSION +ENV ASWF_PTEX_VERSION=$ASWF_PTEX_VERSION +ENV ASWF_LIBJXL_VERSION=$ASWF_LIBJXL_VERSION ENV ASWF_OPENEXR_VERSION=$ASWF_OPENEXR_VERSION -ENV ASWF_OIIO_VERSION=$ASWF_OIIO_VERSION ENV ASWF_OCIO_VERSION=$ASWF_OCIO_VERSION -ENV ASWF_PARTIO_VERSION=$ASWF_PARTIO_VERSION -ENV ASWF_PTEX_VERSION=$ASWF_PTEX_VERSION -ENV ASWF_TBB_VERSION=$ASWF_TBB_VERSION -ENV ASWF_BLOSC_VERSION=$ASWF_BLOSC_VERSION +ENV ASWF_OIIO_VERSION=$ASWF_OIIO_VERSION ENV ASWF_OPENVDB_VERSION=$ASWF_OPENVDB_VERSION +ENV ASWF_PARTIO_VERSION=$ASWF_PARTIO_VERSION ENV ASWF_NUMPY_VERSION=$ASWF_NUMPY_VERSION ENV ASWF_VFXPLATFORM_VERSION=$ASWF_VFXPLATFORM_VERSION -ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=$ASWF_PYTHON_MAJOR_MINOR_VERSION -COPY --from=ci-package-oiio /. /usr/local/ -COPY --from=ci-package-ocio /. /usr/local/ COPY --from=ci-package-openvdb /. /usr/local/ COPY ci-osl/README.md ci-osl/image.yaml /usr/local/aswf/ -ENV PYTHONPATH=/usr/local/lib/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib64/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib/python:${PYTHONPATH} COPY scripts/common/install_conanpackages.sh /tmp/ +ARG ASWF_PYTHON_MAJOR_MINOR_VERSION +ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=${ASWF_PYTHON_MAJOR_MINOR_VERSION} + # conan-only packages COPY < . [requires] -boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +b2/${ASWF_B2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +bzip2/${ASWF_BZIP2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cppunit/${ASWF_CPPUNIT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} expat/${ASWF_EXPAT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -python/${ASWF_PYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +fmt/${ASWF_FMT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +gtest/${ASWF_GTEST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libbacktrace/${ASWF_LIBBACKTRACE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libdeflate/${ASWF_LIBDEFLATE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libiconv/${ASWF_LIBICONV_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libxcrypt/${ASWF_LIBXCRYPT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +lz4/${ASWF_LZ4_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pugixml/${ASWF_PUGIXML_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pystring/${ASWF_PYSTRING_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +snappy/${ASWF_SNAPPY_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tsl-robin-map/${ASWF_TSL_ROBIN_MAP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +yaml-cpp/${ASWF_YAML_CPP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zlib/${ASWF_ZLIB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zstd/${ASWF_ZSTD_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +blosc/${ASWF_BLOSC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cpython/${ASWF_CPYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +freetype/${ASWF_FREETYPE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +gdbm/${ASWF_GDBM_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +glew/${ASWF_GLEW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +glfw/${ASWF_GLFW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +log4cplus/${ASWF_LOG4CPLUS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +minizip-ng/${ASWF_MINIZIP_NG_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pybind11/${ASWF_PYBIND11_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libjpeg-turbo/${ASWF_LIBJPEG_TURBO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libwebp/${ASWF_LIBWEBP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +md4c/${ASWF_MD4C_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} qt/${ASWF_QT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pyside/${ASWF_PYSIDE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +highway/${ASWF_HIGHWAY_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} imath/${ASWF_IMATH_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -openexr/${ASWF_OPENEXR_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -# oiio/${ASWF_OIIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -# ocio/${ASWF_OCIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -partio/${ASWF_PARTIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +lcms/${ASWF_LCMS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libuhdr/${ASWF_LIBUHDR_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} ptex/${ASWF_PTEX_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -blosc/${ASWF_BLOSC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libjxl/${ASWF_LIBJXL_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +openexr/${ASWF_OPENEXR_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +ocio/${ASWF_OCIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +oiio/${ASWF_OIIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} # openvdb/${ASWF_OPENVDB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +partio/${ASWF_PARTIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF +ENV CONAN_HOME=${CONAN_USER_HOME}/.conan2 + RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} diff --git a/ci-osl/README.md b/ci-osl/README.md index 480738c5..9792db62 100644 --- a/ci-osl/README.md +++ b/ci-osl/README.md @@ -21,325 +21,563 @@ Warning: this image does *not* contain OpenShadingLanguage itself as it is used ## [aswf/ci-osl:2019-clang6.5](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2019-clang6.5) Contains: +* cppunit-1.14.0 +* gtest-1.8.1 +* tbb-2018 +* blosc-1.5.0 +* cpython-2.7.15 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 * boost-1.66.0 -* cmake-3.12.4 -* python-2.7.15 +* pybind11-2.4.3 * qt-5.12.6 +* pyside-5.12.6 * imath-2.3.0 +* ptex-2.1.33 * openexr-2.3.0 -* oiio-2.0.8 * ocio-1.1.0 -* partio-1.10.1 -* ptex-2.1.33 -* tbb-2018 -* blosc-1.5.0 +* oiio-2.0.8 * openvdb-6.2.1 +* partio-1.10.1 * numpy-1.14 * vfxplatform-2019 ## [aswf/ci-osl:2019-clang7.5](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2019-clang7.5) Contains: +* cppunit-1.14.0 +* gtest-1.8.1 +* tbb-2018 +* blosc-1.5.0 +* cpython-2.7.15 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 * boost-1.66.0 -* cmake-3.12.4 -* python-2.7.15 +* pybind11-2.4.3 * qt-5.12.6 +* pyside-5.12.6 * imath-2.3.0 +* ptex-2.1.33 * openexr-2.3.0 -* oiio-2.0.8 * ocio-1.1.0 -* partio-1.10.1 -* ptex-2.1.33 -* tbb-2018 -* blosc-1.5.0 +* oiio-2.0.8 * openvdb-6.2.1 +* partio-1.10.1 * numpy-1.14 * vfxplatform-2019 ## [aswf/ci-osl:2019-clang8.5](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2019-clang8.5) Contains: +* cppunit-1.14.0 +* gtest-1.8.1 +* tbb-2018 +* blosc-1.5.0 +* cpython-2.7.15 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 * boost-1.66.0 -* cmake-3.12.4 -* python-2.7.15 +* pybind11-2.4.3 * qt-5.12.6 +* pyside-5.12.6 * imath-2.3.0 +* ptex-2.1.33 * openexr-2.3.0 -* oiio-2.0.8 * ocio-1.1.0 -* partio-1.10.1 -* ptex-2.1.33 -* tbb-2018 -* blosc-1.5.0 +* oiio-2.0.8 * openvdb-6.2.1 +* partio-1.10.1 * numpy-1.14 * vfxplatform-2019 ## [aswf/ci-osl:2019-clang9.5](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2019-clang9.5) Contains: +* cppunit-1.14.0 +* gtest-1.8.1 +* tbb-2018 +* blosc-1.5.0 +* cpython-2.7.15 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 * boost-1.66.0 -* cmake-3.12.4 -* python-2.7.15 +* pybind11-2.4.3 * qt-5.12.6 +* pyside-5.12.6 * imath-2.3.0 +* ptex-2.1.33 * openexr-2.3.0 -* oiio-2.0.8 * ocio-1.1.0 -* partio-1.10.1 -* ptex-2.1.33 -* tbb-2018 -* blosc-1.5.0 +* oiio-2.0.8 * openvdb-6.2.1 +* partio-1.10.1 * numpy-1.14 * vfxplatform-2019 ## [aswf/ci-osl:2019-clang10.5](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2019-clang10.5) Contains: +* cppunit-1.14.0 +* gtest-1.8.1 +* tbb-2018 +* blosc-1.5.0 +* cpython-2.7.15 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 * boost-1.66.0 -* cmake-3.12.4 -* python-2.7.15 +* pybind11-2.4.3 * qt-5.12.6 +* pyside-5.12.6 * imath-2.3.0 +* ptex-2.1.33 * openexr-2.3.0 -* oiio-2.0.8 * ocio-1.1.0 -* partio-1.10.1 -* ptex-2.1.33 -* tbb-2018 -* blosc-1.5.0 +* oiio-2.0.8 * openvdb-6.2.1 +* partio-1.10.1 * numpy-1.14 * vfxplatform-2019 ## [aswf/ci-osl:2020-clang7.5](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2020-clang7.5) Contains: +* cppunit-1.15.1 +* gtest-1.10.0 +* tbb-2019_u6 +* blosc-1.5.0 +* cpython-3.7.3 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 * boost-1.70.0 -* cmake-3.18.4 -* python-3.7.3 +* pybind11-2.4.3 * qt-5.12.6 +* pyside-5.12.6 * imath-2.4.0 +* ptex-2.3.2 * openexr-2.4.0 -* oiio-2.1.13.0 * ocio-1.1.1 -* partio-1.10.1 -* ptex-2.3.2 -* tbb-2019_U6 -* blosc-1.5.0 +* oiio-2.1.13.0 * openvdb-7.1.0 +* partio-1.10.1 * numpy-1.16 * vfxplatform-2020 ## [aswf/ci-osl:2021-clang10.7](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2021-clang10.7) Contains: +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u2 +* blosc-1.5.0 +* cpython-3.7.9 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 * boost-1.73.0 -* cmake-3.19.3 -* python-3.7.9 +* pybind11-2.6.2 * qt-5.15.2 +* pyside-5.15.2 * imath-2.5.5 +* ptex-2.3.2 * openexr-2.5.5 -* oiio-2.2.14.0 * ocio-2.0.1 -* partio-1.14.0 -* ptex-2.3.2 -* tbb-2020_U2 -* blosc-1.5.0 +* oiio-2.2.14.0 * openvdb-8.0.1 +* partio-1.14.0 * numpy-1.19 * vfxplatform-2021 ## [aswf/ci-osl:2021-clang11.7](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2021-clang11.7) Contains: +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u2 +* blosc-1.5.0 +* cpython-3.7.9 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 * boost-1.73.0 -* cmake-3.19.3 -* python-3.7.9 +* pybind11-2.6.2 * qt-5.15.2 +* pyside-5.15.2 * imath-2.5.5 +* ptex-2.3.2 * openexr-2.5.5 -* oiio-2.2.14.0 * ocio-2.0.1 -* partio-1.14.0 -* ptex-2.3.2 -* tbb-2020_U2 -* blosc-1.5.0 +* oiio-2.2.14.0 * openvdb-8.0.1 +* partio-1.14.0 * numpy-1.19 * vfxplatform-2021 ## [aswf/ci-osl:2022-clang10.11](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2022-clang10.11) Contains: +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.9.15 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 * boost-1.76.0 -* cmake-3.22.0 -* python-3.9.15 +* pybind11-2.8.1 * qt-5.15.2 +* pyside-5.15.2 * imath-3.1.5 +* ptex-2.4.0 * openexr-3.1.5 -* oiio-2.4.5.0 * ocio-2.1.1 -* partio-1.14.0 -* ptex-2.4.0 -* tbb-2020_U3 -* blosc-1.17.0 +* oiio-2.4.5.0 * openvdb-9.1.0 +* partio-1.14.0 * numpy-1.20 * vfxplatform-2022 ## [aswf/ci-osl:2022-clang11.11](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2022-clang11.11) Contains: +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.9.15 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 * boost-1.76.0 -* cmake-3.22.0 -* python-3.9.15 +* pybind11-2.8.1 * qt-5.15.2 +* pyside-5.15.2 * imath-3.1.5 +* ptex-2.4.0 * openexr-3.1.5 -* oiio-2.4.5.0 * ocio-2.1.1 -* partio-1.14.0 -* ptex-2.4.0 -* tbb-2020_U3 -* blosc-1.17.0 +* oiio-2.4.5.0 * openvdb-9.1.0 +* partio-1.14.0 * numpy-1.20 * vfxplatform-2022 ## [aswf/ci-osl:2022-clang12.2](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2022-clang12.2) Contains: +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.9.15 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 * boost-1.76.0 -* cmake-3.22.0 -* python-3.9.15 +* pybind11-2.8.1 * qt-5.15.2 +* pyside-5.15.2 * imath-3.1.5 +* ptex-2.4.0 * openexr-3.1.5 -* oiio-2.4.5.0 * ocio-2.1.1 -* partio-1.14.0 -* ptex-2.4.0 -* tbb-2020_U3 -* blosc-1.17.0 +* oiio-2.4.5.0 * openvdb-9.1.0 +* partio-1.14.0 * numpy-1.20 * vfxplatform-2022 ## [aswf/ci-osl:2022-clang13.2](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2022-clang13.2) Contains: +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.9.15 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 * boost-1.76.0 -* cmake-3.22.0 -* python-3.9.15 +* pybind11-2.8.1 * qt-5.15.2 +* pyside-5.15.2 * imath-3.1.5 +* ptex-2.4.0 * openexr-3.1.5 -* oiio-2.4.5.0 * ocio-2.1.1 -* partio-1.14.0 -* ptex-2.4.0 -* tbb-2020_U3 -* blosc-1.17.0 +* oiio-2.4.5.0 * openvdb-9.1.0 +* partio-1.14.0 * numpy-1.20 * vfxplatform-2022 ## [aswf/ci-osl:2022-clang14.1](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2022-clang14.1) Contains: +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.9.15 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 * boost-1.76.0 -* cmake-3.22.0 -* python-3.9.15 +* pybind11-2.8.1 * qt-5.15.2 +* pyside-5.15.2 * imath-3.1.5 +* ptex-2.4.0 * openexr-3.1.5 -* oiio-2.4.5.0 * ocio-2.1.1 -* partio-1.14.0 -* ptex-2.4.0 -* tbb-2020_U3 -* blosc-1.17.0 +* oiio-2.4.5.0 * openvdb-9.1.0 +* partio-1.14.0 * numpy-1.20 * vfxplatform-2022 ## [aswf/ci-osl:2023-clang14.2](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2023-clang14.2) Contains: +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.10.11 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 * boost-1.80.0 -* cmake-3.27.2 -* python-3.10.11 +* pybind11-2.9.2 * qt-5.15.9 +* pyside-5.15.9 * imath-3.1.9 +* ptex-2.4.2 * openexr-3.1.11 -* oiio-2.4.13.0 * ocio-2.2.1 -* partio-1.17.1 -* ptex-2.4.2 -* tbb-2020_U3 -* blosc-1.17.0 +* oiio-2.4.13.0 * openvdb-10.0.1 +* partio-1.17.1 * numpy-1.23.5 * vfxplatform-2023 ## [aswf/ci-osl:2023-clang15.2](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2023-clang15.2) Contains: +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.10.11 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 * boost-1.80.0 -* cmake-3.27.2 -* python-3.10.11 +* pybind11-2.9.2 * qt-5.15.9 +* pyside-5.15.9 * imath-3.1.9 +* ptex-2.4.2 * openexr-3.1.11 -* oiio-2.4.13.0 * ocio-2.2.1 -* partio-1.17.1 -* ptex-2.4.2 -* tbb-2020_U3 -* blosc-1.17.0 +* oiio-2.4.13.0 * openvdb-10.0.1 +* partio-1.17.1 * numpy-1.23.5 * vfxplatform-2023 ## [aswf/ci-osl:2024-clang16.2](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2024-clang16.2) Contains: +* b2-5.2.1 +* bzip2-1.0.8 +* cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.14.0 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.5 +* cpython-3.11.11 +* freetype-2.13.2 +* gdbm-system +* glew-2.1.0 +* glfw-3.3.8 +* log4cplus-2.1.1 * boost-1.82.0 -* cmake-3.27.9 -* expat-2.6.3 -* python-3.11.10 -* qt-6.5.3 +* pybind11-2.12.0 +* libwebp-1.5.0 +* md4c-0.4.8 +* qt-6.5.4 +* pyside-6.5.4 +* highway-1.2.0 * imath-3.1.12 +* lcms-2.16 +* libuhdr-1.4.0 +* ptex-2.4.2 +* libjxl-0.11.1 * openexr-3.2.4 -* oiio-2.5.16.0 * ocio-2.3.2 -* partio-1.17.1 -* ptex-2.4.2 -* tbb-2020_U3 -* blosc-1.21.5 +* oiio-2.5.18.0 * openvdb-11.0.0 +* partio-1.17.1 * numpy-1.24.3 * vfxplatform-2024 ## [aswf/ci-osl:2024-clang17.2](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2024-clang17.2) Contains: +* b2-5.2.1 +* bzip2-1.0.8 +* cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.14.0 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.5 +* cpython-3.11.11 +* freetype-2.13.2 +* gdbm-system +* glew-2.1.0 +* glfw-3.3.8 +* log4cplus-2.1.1 * boost-1.82.0 -* cmake-3.27.9 -* expat-2.6.3 -* python-3.11.10 -* qt-6.5.3 +* pybind11-2.12.0 +* libwebp-1.5.0 +* md4c-0.4.8 +* qt-6.5.4 +* pyside-6.5.4 +* highway-1.2.0 * imath-3.1.12 +* lcms-2.16 +* libuhdr-1.4.0 +* ptex-2.4.2 +* libjxl-0.11.1 * openexr-3.2.4 -* oiio-2.5.16.0 * ocio-2.3.2 -* partio-1.17.1 -* ptex-2.4.2 -* tbb-2020_U3 -* blosc-1.21.5 +* oiio-2.5.18.0 * openvdb-11.0.0 +* partio-1.17.1 * numpy-1.24.3 * vfxplatform-2024 +## [aswf/ci-osl:2025-clang18.0](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2025-clang18.0) + +Contains: +* b2-5.2.1 +* bzip2-1.0.8 +* cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.15.2 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.6 +* cpython-3.11.11 +* freetype-2.13.2 +* gdbm-system +* glew-2.2.0 +* glfw-3.4 +* log4cplus-2.1.2 +* boost-1.85.0 +* pybind11-2.13.6 +* libwebp-1.5.0 +* md4c-0.4.8 +* qt-6.5.4 +* pyside-6.5.4 +* highway-1.2.0 +* imath-3.1.12 +* lcms-2.16 +* libuhdr-1.4.0 +* ptex-2.4.3 +* libjxl-0.11.1 +* openexr-3.3.3 +* ocio-2.4.2 +* oiio-3.0.5.0 +* openvdb-12.0.0 +* partio-1.17.3 +* numpy-1.26.4 +* vfxplatform-2025 + +## [aswf/ci-osl:2025-clang19.0](https://hub.docker.com/r/aswf/ci-osl/tags?page=1&name=2025-clang19.0) + +Contains: +* b2-5.2.1 +* bzip2-1.0.8 +* cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.15.2 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.6 +* cpython-3.11.11 +* freetype-2.13.2 +* gdbm-system +* glew-2.2.0 +* glfw-3.4 +* log4cplus-2.1.2 +* boost-1.85.0 +* pybind11-2.13.6 +* libwebp-1.5.0 +* md4c-0.4.8 +* qt-6.5.4 +* pyside-6.5.4 +* highway-1.2.0 +* imath-3.1.12 +* lcms-2.16 +* libuhdr-1.4.0 +* ptex-2.4.3 +* libjxl-0.11.1 +* openexr-3.3.3 +* ocio-2.4.2 +* oiio-3.0.5.0 +* openvdb-12.0.0 +* partio-1.17.3 +* numpy-1.26.4 +* vfxplatform-2025 + diff --git a/ci-osl/image.yaml b/ci-osl/image.yaml index 20484403..73f57a55 100644 --- a/ci-osl/image.yaml +++ b/ci-osl/image.yaml @@ -4,20 +4,51 @@ description: | Contains: Python, Boost, Qt, OpenEXR, OpenImageIO, Partio and other OpenShadingLanguage upstream dependencies Warning: this image does *not* contain OpenShadingLanguage itself as it is used to *build* OpenShadingLanguage! packages: - - boost - - cmake + - b2 # base1-1 packages + - bzip2 + - cppunit - expat - - python - - qt + - fmt + - gtest + - libbacktrace + - libdeflate + - libiconv + - libxcrypt + - lz4 + - pugixml + - pystring + - snappy + - tbb + - tsl-robin-map + - yaml-cpp + - zlib + - zstd + - blosc # base1-2 packages + - cpython + - freetype + - gdbm + - glew + - glfw + - log4cplus + - minizip-ng + - boost # base1-3 packages + - pybind11 + - libjpeg-turbo # base2-1 packages + - libwebp + - md4c + - qt # base2-2 packages + - pyside # base2-3 packages + - highway # vfx1-1 packages - imath - - openexr - - oiio - - ocio - - partio + - lcms + - libuhdr - ptex - - tbb - - blosc - - openvdb + - libjxl # vfx1-2 packages + - openexr + - ocio # vfx1-3 packages + - oiio # vfx1-4 packages + - openvdb # vfx1 non Conan packages + - partio # vfx2-1 packages implicit_packages: - numpy - vfxplatform diff --git a/ci-otio/Dockerfile b/ci-otio/Dockerfile index 21020c42..32b0e43d 100644 --- a/ci-otio/Dockerfile +++ b/ci-otio/Dockerfile @@ -14,14 +14,42 @@ ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_VERSION -ARG ASWF_CMAKE_VERSION +ARG ASWF_B2_VERSION +ARG ASWF_BZIP2_VERSION +ARG ASWF_CPPUNIT_VERSION ARG ASWF_EXPAT_VERSION +ARG ASWF_FMT_VERSION +ARG ASWF_GTEST_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBXCRYPT_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_PUGIXML_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_SNAPPY_VERSION +ARG ASWF_TBB_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION +ARG ASWF_BLOSC_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_FREETYPE_VERSION +ARG ASWF_GLEW_VERSION +ARG ASWF_GLFW_VERSION +ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_MINIZIP_NG_VERSION +ARG ASWF_BOOST_VERSION +ARG ASWF_PYBIND11_VERSION +ARG ASWF_LIBJPEG_TURBO_VERSION +ARG ASWF_LIBWEBP_VERSION +ARG ASWF_MD4C_VERSION ARG ASWF_QT_VERSION ARG ASWF_PYSIDE_VERSION +ARG ASWF_IMATH_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION @@ -39,14 +67,42 @@ ARG ASWF_CONAN_CHANNEL -ARG ASWF_PYTHON_VERSION -ARG ASWF_CMAKE_VERSION +ARG ASWF_B2_VERSION +ARG ASWF_BZIP2_VERSION +ARG ASWF_CPPUNIT_VERSION ARG ASWF_EXPAT_VERSION +ARG ASWF_FMT_VERSION +ARG ASWF_GTEST_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBXCRYPT_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_PUGIXML_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_SNAPPY_VERSION +ARG ASWF_TBB_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION +ARG ASWF_BLOSC_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_FREETYPE_VERSION +ARG ASWF_GLEW_VERSION +ARG ASWF_GLFW_VERSION +ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_MINIZIP_NG_VERSION +ARG ASWF_BOOST_VERSION +ARG ASWF_PYBIND11_VERSION +ARG ASWF_LIBJPEG_TURBO_VERSION +ARG ASWF_LIBWEBP_VERSION +ARG ASWF_MD4C_VERSION ARG ASWF_QT_VERSION ARG ASWF_PYSIDE_VERSION +ARG ASWF_IMATH_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION LABEL org.opencontainers.image.name="$ASWF_ORG/ci-otio" @@ -63,11 +119,40 @@ LABEL org.opencontainers.image.version="${ASWF_VERSION}" LABEL com.vfxplatform.version="${ASWF_VFXPLATFORM_VERSION}" -LABEL io.aswf.docker.versions.python="$ASWF_PYTHON_VERSION" -LABEL io.aswf.docker.versions.cmake="$ASWF_CMAKE_VERSION" +LABEL io.aswf.docker.versions.b2="$ASWF_B2_VERSION" +LABEL io.aswf.docker.versions.bzip2="$ASWF_BZIP2_VERSION" +LABEL io.aswf.docker.versions.cppunit="$ASWF_CPPUNIT_VERSION" LABEL io.aswf.docker.versions.expat="$ASWF_EXPAT_VERSION" +LABEL io.aswf.docker.versions.fmt="$ASWF_FMT_VERSION" +LABEL io.aswf.docker.versions.gtest="$ASWF_GTEST_VERSION" +LABEL io.aswf.docker.versions.libbacktrace="$ASWF_LIBBACKTRACE_VERSION" +LABEL io.aswf.docker.versions.libdeflate="$ASWF_LIBDEFLATE_VERSION" +LABEL io.aswf.docker.versions.libiconv="$ASWF_LIBICONV_VERSION" +LABEL io.aswf.docker.versions.libxcrypt="$ASWF_LIBXCRYPT_VERSION" +LABEL io.aswf.docker.versions.lz4="$ASWF_LZ4_VERSION" +LABEL io.aswf.docker.versions.pugixml="$ASWF_PUGIXML_VERSION" +LABEL io.aswf.docker.versions.pystring="$ASWF_PYSTRING_VERSION" +LABEL io.aswf.docker.versions.snappy="$ASWF_SNAPPY_VERSION" +LABEL io.aswf.docker.versions.tbb="$ASWF_TBB_VERSION" +LABEL io.aswf.docker.versions.tsl-robin-map="$ASWF_TSL_ROBIN_MAP_VERSION" +LABEL io.aswf.docker.versions.yaml-cpp="$ASWF_YAML_CPP_VERSION" +LABEL io.aswf.docker.versions.zlib="$ASWF_ZLIB_VERSION" +LABEL io.aswf.docker.versions.zstd="$ASWF_ZSTD_VERSION" +LABEL io.aswf.docker.versions.blosc="$ASWF_BLOSC_VERSION" +LABEL io.aswf.docker.versions.cpython="$ASWF_CPYTHON_VERSION" +LABEL io.aswf.docker.versions.freetype="$ASWF_FREETYPE_VERSION" +LABEL io.aswf.docker.versions.glew="$ASWF_GLEW_VERSION" +LABEL io.aswf.docker.versions.glfw="$ASWF_GLFW_VERSION" +LABEL io.aswf.docker.versions.log4cplus="$ASWF_LOG4CPLUS_VERSION" +LABEL io.aswf.docker.versions.minizip-ng="$ASWF_MINIZIP_NG_VERSION" +LABEL io.aswf.docker.versions.boost="$ASWF_BOOST_VERSION" +LABEL io.aswf.docker.versions.pybind11="$ASWF_PYBIND11_VERSION" +LABEL io.aswf.docker.versions.libjpeg-turbo="$ASWF_LIBJPEG_TURBO_VERSION" +LABEL io.aswf.docker.versions.libwebp="$ASWF_LIBWEBP_VERSION" +LABEL io.aswf.docker.versions.md4c="$ASWF_MD4C_VERSION" LABEL io.aswf.docker.versions.qt="$ASWF_QT_VERSION" LABEL io.aswf.docker.versions.pyside="$ASWF_PYSIDE_VERSION" +LABEL io.aswf.docker.versions.imath="$ASWF_IMATH_VERSION" LABEL io.aswf.docker.versions.numpy="$ASWF_NUMPY_VERSION" LABEL io.aswf.docker.versions.vfxplatform="$ASWF_VFXPLATFORM_VERSION" @@ -81,39 +166,100 @@ ENV ASWF_PYSIDE_CLANG_VERSION=${ASWF_PYSIDE_CLANG_VERSION} ENV ASWF_VFXPLATFORM_VERSION=${ASWF_VFXPLATFORM_VERSION} -ENV ASWF_PYTHON_VERSION=$ASWF_PYTHON_VERSION -ENV ASWF_CMAKE_VERSION=$ASWF_CMAKE_VERSION +ENV ASWF_B2_VERSION=$ASWF_B2_VERSION +ENV ASWF_BZIP2_VERSION=$ASWF_BZIP2_VERSION +ENV ASWF_CPPUNIT_VERSION=$ASWF_CPPUNIT_VERSION ENV ASWF_EXPAT_VERSION=$ASWF_EXPAT_VERSION +ENV ASWF_FMT_VERSION=$ASWF_FMT_VERSION +ENV ASWF_GTEST_VERSION=$ASWF_GTEST_VERSION +ENV ASWF_LIBBACKTRACE_VERSION=$ASWF_LIBBACKTRACE_VERSION +ENV ASWF_LIBDEFLATE_VERSION=$ASWF_LIBDEFLATE_VERSION +ENV ASWF_LIBICONV_VERSION=$ASWF_LIBICONV_VERSION +ENV ASWF_LIBXCRYPT_VERSION=$ASWF_LIBXCRYPT_VERSION +ENV ASWF_LZ4_VERSION=$ASWF_LZ4_VERSION +ENV ASWF_PUGIXML_VERSION=$ASWF_PUGIXML_VERSION +ENV ASWF_PYSTRING_VERSION=$ASWF_PYSTRING_VERSION +ENV ASWF_SNAPPY_VERSION=$ASWF_SNAPPY_VERSION +ENV ASWF_TBB_VERSION=$ASWF_TBB_VERSION +ENV ASWF_TSL_ROBIN_MAP_VERSION=$ASWF_TSL_ROBIN_MAP_VERSION +ENV ASWF_YAML_CPP_VERSION=$ASWF_YAML_CPP_VERSION +ENV ASWF_ZLIB_VERSION=$ASWF_ZLIB_VERSION +ENV ASWF_ZSTD_VERSION=$ASWF_ZSTD_VERSION +ENV ASWF_BLOSC_VERSION=$ASWF_BLOSC_VERSION +ENV ASWF_CPYTHON_VERSION=$ASWF_CPYTHON_VERSION +ENV ASWF_FREETYPE_VERSION=$ASWF_FREETYPE_VERSION +ENV ASWF_GLEW_VERSION=$ASWF_GLEW_VERSION +ENV ASWF_GLFW_VERSION=$ASWF_GLFW_VERSION +ENV ASWF_LOG4CPLUS_VERSION=$ASWF_LOG4CPLUS_VERSION +ENV ASWF_MINIZIP_NG_VERSION=$ASWF_MINIZIP_NG_VERSION +ENV ASWF_BOOST_VERSION=$ASWF_BOOST_VERSION +ENV ASWF_PYBIND11_VERSION=$ASWF_PYBIND11_VERSION +ENV ASWF_LIBJPEG_TURBO_VERSION=$ASWF_LIBJPEG_TURBO_VERSION +ENV ASWF_LIBWEBP_VERSION=$ASWF_LIBWEBP_VERSION +ENV ASWF_MD4C_VERSION=$ASWF_MD4C_VERSION ENV ASWF_QT_VERSION=$ASWF_QT_VERSION ENV ASWF_PYSIDE_VERSION=$ASWF_PYSIDE_VERSION +ENV ASWF_IMATH_VERSION=$ASWF_IMATH_VERSION ENV ASWF_NUMPY_VERSION=$ASWF_NUMPY_VERSION ENV ASWF_VFXPLATFORM_VERSION=$ASWF_VFXPLATFORM_VERSION -ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=$ASWF_PYTHON_MAJOR_MINOR_VERSION COPY ci-otio/README.md ci-otio/image.yaml /usr/local/aswf/ -ENV PYTHONPATH=/usr/local/lib/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib64/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib/python:${PYTHONPATH} COPY scripts/common/install_conanpackages.sh /tmp/ +ARG ASWF_PYTHON_MAJOR_MINOR_VERSION +ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=${ASWF_PYTHON_MAJOR_MINOR_VERSION} + # conan-only packages COPY < . [requires] -python/${ASWF_PYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +b2/${ASWF_B2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +bzip2/${ASWF_BZIP2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cppunit/${ASWF_CPPUNIT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} expat/${ASWF_EXPAT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +fmt/${ASWF_FMT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +gtest/${ASWF_GTEST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libbacktrace/${ASWF_LIBBACKTRACE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libdeflate/${ASWF_LIBDEFLATE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libiconv/${ASWF_LIBICONV_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libxcrypt/${ASWF_LIBXCRYPT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +lz4/${ASWF_LZ4_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pugixml/${ASWF_PUGIXML_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pystring/${ASWF_PYSTRING_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +snappy/${ASWF_SNAPPY_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tsl-robin-map/${ASWF_TSL_ROBIN_MAP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +yaml-cpp/${ASWF_YAML_CPP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zlib/${ASWF_ZLIB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zstd/${ASWF_ZSTD_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +blosc/${ASWF_BLOSC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cpython/${ASWF_CPYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +freetype/${ASWF_FREETYPE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +glew/${ASWF_GLEW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +glfw/${ASWF_GLFW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +log4cplus/${ASWF_LOG4CPLUS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +minizip-ng/${ASWF_MINIZIP_NG_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pybind11/${ASWF_PYBIND11_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libjpeg-turbo/${ASWF_LIBJPEG_TURBO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libwebp/${ASWF_LIBWEBP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +md4c/${ASWF_MD4C_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} qt/${ASWF_QT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} pyside/${ASWF_PYSIDE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +imath/${ASWF_IMATH_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF +ENV CONAN_HOME=${CONAN_USER_HOME}/.conan2 + RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} diff --git a/ci-otio/README.md b/ci-otio/README.md index 844c9d17..e229232c 100644 --- a/ci-otio/README.md +++ b/ci-otio/README.md @@ -21,61 +21,167 @@ Warning: this image does *not* contain OpenTimelineIO itself as it is used to *b ## [aswf/ci-otio:2019.3](https://hub.docker.com/r/aswf/ci-otio/tags?page=1&name=2019.3) Contains: -* python-2.7.15 -* cmake-3.12.4 +* cppunit-1.14.0 +* gtest-1.8.1 +* tbb-2018 +* blosc-1.5.0 +* cpython-2.7.15 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 +* boost-1.66.0 +* pybind11-2.4.3 * qt-5.12.6 * pyside-5.12.6 +* imath-2.3.0 * numpy-1.14 * vfxplatform-2019 ## [aswf/ci-otio:2020.3](https://hub.docker.com/r/aswf/ci-otio/tags?page=1&name=2020.3) Contains: -* python-3.7.3 -* cmake-3.18.4 +* cppunit-1.15.1 +* gtest-1.10.0 +* tbb-2019_u6 +* blosc-1.5.0 +* cpython-3.7.3 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 +* boost-1.70.0 +* pybind11-2.4.3 * qt-5.12.6 * pyside-5.12.6 +* imath-2.4.0 * numpy-1.16 * vfxplatform-2020 ## [aswf/ci-otio:2021.5](https://hub.docker.com/r/aswf/ci-otio/tags?page=1&name=2021.5) Contains: -* python-3.7.9 -* cmake-3.19.3 +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u2 +* blosc-1.5.0 +* cpython-3.7.9 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 +* boost-1.73.0 +* pybind11-2.6.2 * qt-5.15.2 * pyside-5.15.2 +* imath-2.5.5 * numpy-1.19 * vfxplatform-2021 ## [aswf/ci-otio:2022.3](https://hub.docker.com/r/aswf/ci-otio/tags?page=1&name=2022.3) Contains: -* python-3.9.15 -* cmake-3.22.0 +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.9.15 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 +* boost-1.76.0 +* pybind11-2.8.1 * qt-5.15.2 * pyside-5.15.2 +* imath-3.1.5 * numpy-1.20 * vfxplatform-2022 ## [aswf/ci-otio:2023.2](https://hub.docker.com/r/aswf/ci-otio/tags?page=1&name=2023.2) Contains: -* python-3.10.11 -* cmake-3.27.2 +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.10.11 +* glew-2.1.0 +* glfw-3.1.2 +* log4cplus-1.1.2 +* boost-1.80.0 +* pybind11-2.9.2 * qt-5.15.9 * pyside-5.15.9 +* imath-3.1.9 * numpy-1.23.5 * vfxplatform-2023 ## [aswf/ci-otio:2024.2](https://hub.docker.com/r/aswf/ci-otio/tags?page=1&name=2024.2) Contains: -* python-3.11.10 -* cmake-3.27.9 -* expat-2.6.3 -* qt-6.5.3 -* pyside-6.5.3 +* b2-5.2.1 +* bzip2-1.0.8 +* cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.14.0 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.5 +* cpython-3.11.11 +* freetype-2.13.2 +* glew-2.1.0 +* glfw-3.3.8 +* log4cplus-2.1.1 +* boost-1.82.0 +* pybind11-2.12.0 +* libwebp-1.5.0 +* md4c-0.4.8 +* qt-6.5.4 +* pyside-6.5.4 +* imath-3.1.12 * numpy-1.24.3 * vfxplatform-2024 +## [aswf/ci-otio:2025.0](https://hub.docker.com/r/aswf/ci-otio/tags?page=1&name=2025.0) + +Contains: +* b2-5.2.1 +* bzip2-1.0.8 +* cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.15.2 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.6 +* cpython-3.11.11 +* freetype-2.13.2 +* glew-2.2.0 +* glfw-3.4 +* log4cplus-2.1.2 +* boost-1.85.0 +* pybind11-2.13.6 +* libwebp-1.5.0 +* md4c-0.4.8 +* qt-6.5.4 +* pyside-6.5.4 +* imath-3.1.12 +* numpy-1.26.4 +* vfxplatform-2025 + diff --git a/ci-otio/image.yaml b/ci-otio/image.yaml index bacb7ef1..41ea8127 100644 --- a/ci-otio/image.yaml +++ b/ci-otio/image.yaml @@ -4,11 +4,40 @@ description: | Contains: Python, Qt, PySide and other OpenTimelineIO upstream dependencies Warning: this image does *not* contain OpenTimelineIO itself as it is used to *build* OpenTimelineIO! packages: - - python - - cmake + - b2 # base1-1 packages + - bzip2 + - cppunit - expat - - qt - - pyside + - fmt + - gtest + - libbacktrace + - libdeflate + - libiconv + - libxcrypt + - lz4 + - pugixml + - pystring + - snappy + - tbb + - tsl-robin-map + - yaml-cpp + - zlib + - zstd + - blosc # base1-2 packages + - cpython + - freetype + - glew + - glfw + - log4cplus + - minizip-ng + - boost # base1-3 packages + - pybind11 + - libjpeg-turbo # base2-1 packages + - libwebp + - md4c + - qt # base2-2 packages + - pyside # base2-3 packages + - imath # vfx1-1 packages implicit_packages: - numpy - vfxplatform diff --git a/ci-usd/Dockerfile b/ci-usd/Dockerfile index 135eb786..21113f80 100644 --- a/ci-usd/Dockerfile +++ b/ci-usd/Dockerfile @@ -14,39 +14,52 @@ ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_VERSION -ARG ASWF_TBB_VERSION -ARG ASWF_BOOST_VERSION +ARG ASWF_B2_VERSION +ARG ASWF_BZIP2_VERSION +ARG ASWF_CPPUNIT_VERSION ARG ASWF_EXPAT_VERSION +ARG ASWF_FMT_VERSION +ARG ASWF_GTEST_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBXCRYPT_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_PUGIXML_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_SNAPPY_VERSION +ARG ASWF_TBB_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION +ARG ASWF_BLOSC_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_FREETYPE_VERSION ARG ASWF_GLEW_VERSION ARG ASWF_GLFW_VERSION ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_MINIZIP_NG_VERSION +ARG ASWF_BOOST_VERSION +ARG ASWF_PYBIND11_VERSION +ARG ASWF_LIBJPEG_TURBO_VERSION +ARG ASWF_LIBWEBP_VERSION +ARG ASWF_MD4C_VERSION ARG ASWF_QT_VERSION ARG ASWF_PYSIDE_VERSION -ARG ASWF_CMAKE_VERSION ARG ASWF_IMATH_VERSION -ARG ASWF_MATERIALX_VERSION -ARG ASWF_OPENEXR_VERSION -ARG ASWF_OIIO_VERSION -ARG ASWF_OCIO_VERSION -ARG ASWF_PYBIND11_VERSION -ARG ASWF_PTEX_VERSION -ARG ASWF_OPENSUBDIV_VERSION ARG ASWF_ALEMBIC_VERSION -ARG ASWF_BLOSC_VERSION -ARG ASWF_OPENVDB_VERSION +ARG ASWF_OPENSUBDIV_VERSION +ARG ASWF_PARTIO_VERSION +ARG ASWF_MATERIALX_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_HDF5_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION # Comment out this block to use Conan packages -FROM ${ASWF_PKG_ORG}/ci-package-oiio:$ASWF_VFXPLATFORM_VERSION-$ASWF_OIIO_VERSION AS ci-package-oiio -FROM ${ASWF_PKG_ORG}/ci-package-ocio:$ASWF_VFXPLATFORM_VERSION-$ASWF_OCIO_VERSION AS ci-package-ocio -FROM ${ASWF_PKG_ORG}/ci-package-openvdb:$ASWF_VFXPLATFORM_VERSION-$ASWF_OPENVDB_VERSION AS ci-package-openvdb FROM ${ASWF_ORG}/ci-common:${CI_COMMON_VERSION}-clang${ASWF_CLANG_MAJOR_VERSION} AS ci-usd @@ -59,31 +72,47 @@ ARG ASWF_CONAN_CHANNEL -ARG ASWF_PYTHON_VERSION -ARG ASWF_TBB_VERSION -ARG ASWF_BOOST_VERSION +ARG ASWF_B2_VERSION +ARG ASWF_BZIP2_VERSION +ARG ASWF_CPPUNIT_VERSION ARG ASWF_EXPAT_VERSION +ARG ASWF_FMT_VERSION +ARG ASWF_GTEST_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LIBDEFLATE_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBXCRYPT_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_PUGIXML_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_SNAPPY_VERSION +ARG ASWF_TBB_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION +ARG ASWF_BLOSC_VERSION +ARG ASWF_CPYTHON_VERSION +ARG ASWF_FREETYPE_VERSION ARG ASWF_GLEW_VERSION ARG ASWF_GLFW_VERSION ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_MINIZIP_NG_VERSION +ARG ASWF_BOOST_VERSION +ARG ASWF_PYBIND11_VERSION +ARG ASWF_LIBJPEG_TURBO_VERSION +ARG ASWF_LIBWEBP_VERSION +ARG ASWF_MD4C_VERSION ARG ASWF_QT_VERSION ARG ASWF_PYSIDE_VERSION -ARG ASWF_CMAKE_VERSION ARG ASWF_IMATH_VERSION -ARG ASWF_MATERIALX_VERSION -ARG ASWF_OPENEXR_VERSION -ARG ASWF_OIIO_VERSION -ARG ASWF_OCIO_VERSION -ARG ASWF_PYBIND11_VERSION -ARG ASWF_PTEX_VERSION -ARG ASWF_OPENSUBDIV_VERSION ARG ASWF_ALEMBIC_VERSION -ARG ASWF_BLOSC_VERSION -ARG ASWF_OPENVDB_VERSION +ARG ASWF_OPENSUBDIV_VERSION +ARG ASWF_PARTIO_VERSION +ARG ASWF_MATERIALX_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_HDF5_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION LABEL org.opencontainers.image.name="$ASWF_ORG/ci-usd" @@ -100,27 +129,44 @@ LABEL org.opencontainers.image.version="${ASWF_VERSION}" LABEL com.vfxplatform.version="${ASWF_VFXPLATFORM_VERSION}" -LABEL io.aswf.docker.versions.python="$ASWF_PYTHON_VERSION" -LABEL io.aswf.docker.versions.tbb="$ASWF_TBB_VERSION" -LABEL io.aswf.docker.versions.boost="$ASWF_BOOST_VERSION" +LABEL io.aswf.docker.versions.b2="$ASWF_B2_VERSION" +LABEL io.aswf.docker.versions.bzip2="$ASWF_BZIP2_VERSION" +LABEL io.aswf.docker.versions.cppunit="$ASWF_CPPUNIT_VERSION" LABEL io.aswf.docker.versions.expat="$ASWF_EXPAT_VERSION" +LABEL io.aswf.docker.versions.fmt="$ASWF_FMT_VERSION" +LABEL io.aswf.docker.versions.gtest="$ASWF_GTEST_VERSION" +LABEL io.aswf.docker.versions.libbacktrace="$ASWF_LIBBACKTRACE_VERSION" +LABEL io.aswf.docker.versions.libdeflate="$ASWF_LIBDEFLATE_VERSION" +LABEL io.aswf.docker.versions.libiconv="$ASWF_LIBICONV_VERSION" +LABEL io.aswf.docker.versions.libxcrypt="$ASWF_LIBXCRYPT_VERSION" +LABEL io.aswf.docker.versions.lz4="$ASWF_LZ4_VERSION" +LABEL io.aswf.docker.versions.pugixml="$ASWF_PUGIXML_VERSION" +LABEL io.aswf.docker.versions.pystring="$ASWF_PYSTRING_VERSION" +LABEL io.aswf.docker.versions.snappy="$ASWF_SNAPPY_VERSION" +LABEL io.aswf.docker.versions.tbb="$ASWF_TBB_VERSION" +LABEL io.aswf.docker.versions.tsl-robin-map="$ASWF_TSL_ROBIN_MAP_VERSION" +LABEL io.aswf.docker.versions.yaml-cpp="$ASWF_YAML_CPP_VERSION" +LABEL io.aswf.docker.versions.zlib="$ASWF_ZLIB_VERSION" +LABEL io.aswf.docker.versions.zstd="$ASWF_ZSTD_VERSION" +LABEL io.aswf.docker.versions.blosc="$ASWF_BLOSC_VERSION" +LABEL io.aswf.docker.versions.cpython="$ASWF_CPYTHON_VERSION" +LABEL io.aswf.docker.versions.freetype="$ASWF_FREETYPE_VERSION" LABEL io.aswf.docker.versions.glew="$ASWF_GLEW_VERSION" LABEL io.aswf.docker.versions.glfw="$ASWF_GLFW_VERSION" LABEL io.aswf.docker.versions.log4cplus="$ASWF_LOG4CPLUS_VERSION" +LABEL io.aswf.docker.versions.minizip-ng="$ASWF_MINIZIP_NG_VERSION" +LABEL io.aswf.docker.versions.boost="$ASWF_BOOST_VERSION" +LABEL io.aswf.docker.versions.pybind11="$ASWF_PYBIND11_VERSION" +LABEL io.aswf.docker.versions.libjpeg-turbo="$ASWF_LIBJPEG_TURBO_VERSION" +LABEL io.aswf.docker.versions.libwebp="$ASWF_LIBWEBP_VERSION" +LABEL io.aswf.docker.versions.md4c="$ASWF_MD4C_VERSION" LABEL io.aswf.docker.versions.qt="$ASWF_QT_VERSION" LABEL io.aswf.docker.versions.pyside="$ASWF_PYSIDE_VERSION" -LABEL io.aswf.docker.versions.cmake="$ASWF_CMAKE_VERSION" LABEL io.aswf.docker.versions.imath="$ASWF_IMATH_VERSION" -LABEL io.aswf.docker.versions.materialx="$ASWF_MATERIALX_VERSION" -LABEL io.aswf.docker.versions.openexr="$ASWF_OPENEXR_VERSION" -LABEL io.aswf.docker.versions.oiio="$ASWF_OIIO_VERSION" -LABEL io.aswf.docker.versions.ocio="$ASWF_OCIO_VERSION" -LABEL io.aswf.docker.versions.pybind11="$ASWF_PYBIND11_VERSION" -LABEL io.aswf.docker.versions.ptex="$ASWF_PTEX_VERSION" -LABEL io.aswf.docker.versions.opensubdiv="$ASWF_OPENSUBDIV_VERSION" LABEL io.aswf.docker.versions.alembic="$ASWF_ALEMBIC_VERSION" -LABEL io.aswf.docker.versions.blosc="$ASWF_BLOSC_VERSION" -LABEL io.aswf.docker.versions.openvdb="$ASWF_OPENVDB_VERSION" +LABEL io.aswf.docker.versions.opensubdiv="$ASWF_OPENSUBDIV_VERSION" +LABEL io.aswf.docker.versions.partio="$ASWF_PARTIO_VERSION" +LABEL io.aswf.docker.versions.materialx="$ASWF_MATERIALX_VERSION" LABEL io.aswf.docker.versions.numpy="$ASWF_NUMPY_VERSION" LABEL io.aswf.docker.versions.hdf5="$ASWF_HDF5_VERSION" LABEL io.aswf.docker.versions.vfxplatform="$ASWF_VFXPLATFORM_VERSION" @@ -135,75 +181,109 @@ ENV ASWF_PYSIDE_CLANG_VERSION=${ASWF_PYSIDE_CLANG_VERSION} ENV ASWF_VFXPLATFORM_VERSION=${ASWF_VFXPLATFORM_VERSION} -ENV ASWF_PYTHON_VERSION=$ASWF_PYTHON_VERSION -ENV ASWF_TBB_VERSION=$ASWF_TBB_VERSION -ENV ASWF_BOOST_VERSION=$ASWF_BOOST_VERSION +ENV ASWF_B2_VERSION=$ASWF_B2_VERSION +ENV ASWF_BZIP2_VERSION=$ASWF_BZIP2_VERSION +ENV ASWF_CPPUNIT_VERSION=$ASWF_CPPUNIT_VERSION ENV ASWF_EXPAT_VERSION=$ASWF_EXPAT_VERSION +ENV ASWF_FMT_VERSION=$ASWF_FMT_VERSION +ENV ASWF_GTEST_VERSION=$ASWF_GTEST_VERSION +ENV ASWF_LIBBACKTRACE_VERSION=$ASWF_LIBBACKTRACE_VERSION +ENV ASWF_LIBDEFLATE_VERSION=$ASWF_LIBDEFLATE_VERSION +ENV ASWF_LIBICONV_VERSION=$ASWF_LIBICONV_VERSION +ENV ASWF_LIBXCRYPT_VERSION=$ASWF_LIBXCRYPT_VERSION +ENV ASWF_LZ4_VERSION=$ASWF_LZ4_VERSION +ENV ASWF_PUGIXML_VERSION=$ASWF_PUGIXML_VERSION +ENV ASWF_PYSTRING_VERSION=$ASWF_PYSTRING_VERSION +ENV ASWF_SNAPPY_VERSION=$ASWF_SNAPPY_VERSION +ENV ASWF_TBB_VERSION=$ASWF_TBB_VERSION +ENV ASWF_TSL_ROBIN_MAP_VERSION=$ASWF_TSL_ROBIN_MAP_VERSION +ENV ASWF_YAML_CPP_VERSION=$ASWF_YAML_CPP_VERSION +ENV ASWF_ZLIB_VERSION=$ASWF_ZLIB_VERSION +ENV ASWF_ZSTD_VERSION=$ASWF_ZSTD_VERSION +ENV ASWF_BLOSC_VERSION=$ASWF_BLOSC_VERSION +ENV ASWF_CPYTHON_VERSION=$ASWF_CPYTHON_VERSION +ENV ASWF_FREETYPE_VERSION=$ASWF_FREETYPE_VERSION ENV ASWF_GLEW_VERSION=$ASWF_GLEW_VERSION ENV ASWF_GLFW_VERSION=$ASWF_GLFW_VERSION ENV ASWF_LOG4CPLUS_VERSION=$ASWF_LOG4CPLUS_VERSION +ENV ASWF_MINIZIP_NG_VERSION=$ASWF_MINIZIP_NG_VERSION +ENV ASWF_BOOST_VERSION=$ASWF_BOOST_VERSION +ENV ASWF_PYBIND11_VERSION=$ASWF_PYBIND11_VERSION +ENV ASWF_LIBJPEG_TURBO_VERSION=$ASWF_LIBJPEG_TURBO_VERSION +ENV ASWF_LIBWEBP_VERSION=$ASWF_LIBWEBP_VERSION +ENV ASWF_MD4C_VERSION=$ASWF_MD4C_VERSION ENV ASWF_QT_VERSION=$ASWF_QT_VERSION ENV ASWF_PYSIDE_VERSION=$ASWF_PYSIDE_VERSION -ENV ASWF_CMAKE_VERSION=$ASWF_CMAKE_VERSION ENV ASWF_IMATH_VERSION=$ASWF_IMATH_VERSION -ENV ASWF_MATERIALX_VERSION=$ASWF_MATERIALX_VERSION -ENV ASWF_OPENEXR_VERSION=$ASWF_OPENEXR_VERSION -ENV ASWF_OIIO_VERSION=$ASWF_OIIO_VERSION -ENV ASWF_OCIO_VERSION=$ASWF_OCIO_VERSION -ENV ASWF_PYBIND11_VERSION=$ASWF_PYBIND11_VERSION -ENV ASWF_PTEX_VERSION=$ASWF_PTEX_VERSION -ENV ASWF_OPENSUBDIV_VERSION=$ASWF_OPENSUBDIV_VERSION ENV ASWF_ALEMBIC_VERSION=$ASWF_ALEMBIC_VERSION -ENV ASWF_BLOSC_VERSION=$ASWF_BLOSC_VERSION -ENV ASWF_OPENVDB_VERSION=$ASWF_OPENVDB_VERSION +ENV ASWF_OPENSUBDIV_VERSION=$ASWF_OPENSUBDIV_VERSION +ENV ASWF_PARTIO_VERSION=$ASWF_PARTIO_VERSION +ENV ASWF_MATERIALX_VERSION=$ASWF_MATERIALX_VERSION ENV ASWF_NUMPY_VERSION=$ASWF_NUMPY_VERSION ENV ASWF_HDF5_VERSION=$ASWF_HDF5_VERSION ENV ASWF_VFXPLATFORM_VERSION=$ASWF_VFXPLATFORM_VERSION -ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=$ASWF_PYTHON_MAJOR_MINOR_VERSION -COPY --from=ci-package-oiio /. /usr/local/ -COPY --from=ci-package-ocio /. /usr/local/ -COPY --from=ci-package-openvdb /. /usr/local/ COPY ci-usd/README.md ci-usd/image.yaml /usr/local/aswf/ -ENV PYTHONPATH=/usr/local/lib/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib64/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib/python:${PYTHONPATH} COPY scripts/common/install_conanpackages.sh /tmp/ +ARG ASWF_PYTHON_MAJOR_MINOR_VERSION +ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=${ASWF_PYTHON_MAJOR_MINOR_VERSION} + # conan-only packages COPY < . [requires] -python/${ASWF_PYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +b2/${ASWF_B2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +bzip2/${ASWF_BZIP2_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cppunit/${ASWF_CPPUNIT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} expat/${ASWF_EXPAT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +fmt/${ASWF_FMT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +gtest/${ASWF_GTEST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libbacktrace/${ASWF_LIBBACKTRACE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libdeflate/${ASWF_LIBDEFLATE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libiconv/${ASWF_LIBICONV_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libxcrypt/${ASWF_LIBXCRYPT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +lz4/${ASWF_LZ4_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pugixml/${ASWF_PUGIXML_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pystring/${ASWF_PYSTRING_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +snappy/${ASWF_SNAPPY_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tsl-robin-map/${ASWF_TSL_ROBIN_MAP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +yaml-cpp/${ASWF_YAML_CPP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zlib/${ASWF_ZLIB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zstd/${ASWF_ZSTD_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +blosc/${ASWF_BLOSC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cpython/${ASWF_CPYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +freetype/${ASWF_FREETYPE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} glew/${ASWF_GLEW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} glfw/${ASWF_GLFW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} log4cplus/${ASWF_LOG4CPLUS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +minizip-ng/${ASWF_MINIZIP_NG_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pybind11/${ASWF_PYBIND11_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libjpeg-turbo/${ASWF_LIBJPEG_TURBO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libwebp/${ASWF_LIBWEBP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +md4c/${ASWF_MD4C_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} qt/${ASWF_QT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} pyside/${ASWF_PYSIDE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} imath/${ASWF_IMATH_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -materialx/${ASWF_MATERIALX_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -openexr/${ASWF_OPENEXR_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -# oiio/${ASWF_OIIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -# ocio/${ASWF_OCIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -pybind11/${ASWF_PYBIND11_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -ptex/${ASWF_PTEX_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -opensubdiv/${ASWF_OPENSUBDIV_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} alembic/${ASWF_ALEMBIC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -blosc/${ASWF_BLOSC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -# openvdb/${ASWF_OPENVDB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +opensubdiv/${ASWF_OPENSUBDIV_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +partio/${ASWF_PARTIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +materialx/${ASWF_MATERIALX_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF +ENV CONAN_HOME=${CONAN_USER_HOME}/.conan2 + RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} diff --git a/ci-usd/README.md b/ci-usd/README.md index e8ad45b5..1f161bdd 100644 --- a/ci-usd/README.md +++ b/ci-usd/README.md @@ -21,25 +21,22 @@ Warning: this image does *not* contain USD itself as it is used to *build* USD! ## [aswf/ci-usd:2019.9](https://hub.docker.com/r/aswf/ci-usd/tags?page=1&name=2019.9) Contains: -* python-2.7.15 +* cppunit-1.14.0 +* gtest-1.8.1 * tbb-2018 -* boost-1.66.0 +* blosc-1.5.0 +* cpython-2.7.15 * glew-2.1.0 * glfw-3.1.2 * log4cplus-1.1.2 +* boost-1.66.0 +* pybind11-2.4.3 * qt-5.12.6 * pyside-5.12.6 -* cmake-3.12.4 * imath-2.3.0 -* openexr-2.3.0 -* oiio-2.0.8 -* ocio-1.1.0 -* pybind11-2.4.3 -* ptex-2.1.33 -* opensubdiv-3_3_3 * alembic-1.7.11 -* blosc-1.5.0 -* openvdb-6.2.1 +* opensubdiv-3_3_3 +* partio-1.10.1 * numpy-1.14 * hdf5-1.8.21 * vfxplatform-2019 @@ -47,25 +44,22 @@ Contains: ## [aswf/ci-usd:2020.8](https://hub.docker.com/r/aswf/ci-usd/tags?page=1&name=2020.8) Contains: -* python-3.7.3 -* tbb-2019_U6 -* boost-1.70.0 +* cppunit-1.15.1 +* gtest-1.10.0 +* tbb-2019_u6 +* blosc-1.5.0 +* cpython-3.7.3 * glew-2.1.0 * glfw-3.1.2 * log4cplus-1.1.2 +* boost-1.70.0 +* pybind11-2.4.3 * qt-5.12.6 * pyside-5.12.6 -* cmake-3.18.4 * imath-2.4.0 -* openexr-2.4.0 -* oiio-2.1.13.0 -* ocio-1.1.1 -* pybind11-2.4.3 -* ptex-2.3.2 -* opensubdiv-3_4_3 * alembic-1.7.12 -* blosc-1.5.0 -* openvdb-7.1.0 +* opensubdiv-3_4_3 +* partio-1.10.1 * numpy-1.16 * hdf5-1.8.21 * vfxplatform-2020 @@ -73,25 +67,22 @@ Contains: ## [aswf/ci-usd:2021.6](https://hub.docker.com/r/aswf/ci-usd/tags?page=1&name=2021.6) Contains: -* python-3.7.9 -* tbb-2020_U2 -* boost-1.73.0 +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u2 +* blosc-1.5.0 +* cpython-3.7.9 * glew-2.1.0 * glfw-3.1.2 * log4cplus-1.1.2 +* boost-1.73.0 +* pybind11-2.6.2 * qt-5.15.2 * pyside-5.15.2 -* cmake-3.19.3 * imath-2.5.5 -* openexr-2.5.5 -* oiio-2.2.14.0 -* ocio-2.0.1 -* pybind11-2.6.2 -* ptex-2.3.2 -* opensubdiv-3_4_3 * alembic-1.7.16 -* blosc-1.5.0 -* openvdb-8.0.1 +* opensubdiv-3_4_3 +* partio-1.14.0 * numpy-1.19 * hdf5-1.8.21 * vfxplatform-2021 @@ -99,26 +90,23 @@ Contains: ## [aswf/ci-usd:2022.4](https://hub.docker.com/r/aswf/ci-usd/tags?page=1&name=2022.4) Contains: -* python-3.9.15 -* tbb-2020_U3 -* boost-1.76.0 +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.9.15 * glew-2.1.0 * glfw-3.1.2 * log4cplus-1.1.2 +* boost-1.76.0 +* pybind11-2.8.1 * qt-5.15.2 * pyside-5.15.2 -* cmake-3.22.0 * imath-3.1.5 -* materialx-1.38.5 -* openexr-3.1.5 -* oiio-2.4.5.0 -* ocio-2.1.1 -* pybind11-2.8.1 -* ptex-2.4.0 -* opensubdiv-3_4_4 * alembic-1.8.2 -* blosc-1.17.0 -* openvdb-9.1.0 +* opensubdiv-3_4_4 +* partio-1.14.0 +* materialx-1.38.5 * numpy-1.20 * hdf5-1.8.21 * vfxplatform-2022 @@ -126,26 +114,23 @@ Contains: ## [aswf/ci-usd:2023.2](https://hub.docker.com/r/aswf/ci-usd/tags?page=1&name=2023.2) Contains: -* python-3.10.11 -* tbb-2020_U3 -* boost-1.80.0 +* cppunit-1.15.1 +* gtest-1.11.0 +* tbb-2020_u3 +* blosc-1.17.0 +* cpython-3.10.11 * glew-2.1.0 * glfw-3.1.2 * log4cplus-1.1.2 +* boost-1.80.0 +* pybind11-2.9.2 * qt-5.15.9 * pyside-5.15.9 -* cmake-3.27.2 * imath-3.1.9 -* materialx-1.38.7 -* openexr-3.1.11 -* oiio-2.4.13.0 -* ocio-2.2.1 -* pybind11-2.9.2 -* ptex-2.4.2 -* opensubdiv-3_5_0 * alembic-1.8.5 -* blosc-1.17.0 -* openvdb-10.0.1 +* opensubdiv-3_5_0 +* partio-1.17.1 +* materialx-1.38.7 * numpy-1.23.5 * hdf5-1.8.23 * vfxplatform-2023 @@ -153,28 +138,82 @@ Contains: ## [aswf/ci-usd:2024.2](https://hub.docker.com/r/aswf/ci-usd/tags?page=1&name=2024.2) Contains: -* python-3.11.10 -* tbb-2020_U3 -* boost-1.82.0 -* expat-2.6.3 +* b2-5.2.1 +* bzip2-1.0.8 +* cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.14.0 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.5 +* cpython-3.11.11 +* freetype-2.13.2 * glew-2.1.0 * glfw-3.3.8 * log4cplus-2.1.1 -* qt-6.5.3 -* pyside-6.5.3 -* cmake-3.27.9 -* imath-3.1.12 -* materialx-1.39.1 -* openexr-3.2.4 -* oiio-2.5.16.0 -* ocio-2.3.2 +* boost-1.82.0 * pybind11-2.12.0 -* ptex-2.4.2 -* opensubdiv-3.6.0 +* libwebp-1.5.0 +* md4c-0.4.8 +* qt-6.5.4 +* pyside-6.5.4 +* imath-3.1.12 * alembic-1.8.6 -* blosc-1.21.5 -* openvdb-11.0.0 +* opensubdiv-3.6.0 +* partio-1.17.1 +* materialx-1.39.2 * numpy-1.24.3 * hdf5-1.8.23 * vfxplatform-2024 +## [aswf/ci-usd:2025.0](https://hub.docker.com/r/aswf/ci-usd/tags?page=1&name=2025.0) + +Contains: +* b2-5.2.1 +* bzip2-1.0.8 +* cppunit-1.15.1 +* expat-2.6.4 +* fmt-11.1.4 +* gtest-1.15.2 +* libbacktrace-cci.20210118 +* libdeflate-1.23 +* libiconv-1.17 +* libxcrypt-4.4.36 +* lz4-1.10.0 +* pugixml-1.14 +* pystring-1.1.4 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* blosc-1.21.6 +* cpython-3.11.11 +* freetype-2.13.2 +* glew-2.2.0 +* glfw-3.4 +* log4cplus-2.1.2 +* boost-1.85.0 +* pybind11-2.13.6 +* libwebp-1.5.0 +* md4c-0.4.8 +* qt-6.5.4 +* pyside-6.5.4 +* imath-3.1.12 +* alembic-1.8.8 +* opensubdiv-3.6.0 +* partio-1.17.3 +* materialx-1.39.3 +* numpy-1.26.4 +* hdf5-1.8.23 +* vfxplatform-2025 + diff --git a/ci-usd/image.yaml b/ci-usd/image.yaml index cb6c6dac..2bee1daa 100644 --- a/ci-usd/image.yaml +++ b/ci-usd/image.yaml @@ -4,27 +4,44 @@ description: | Contains: Python, Qt, PySide and other USD upstream dependencies Warning: this image does *not* contain USD itself as it is used to *build* USD! packages: - - python - - tbb - - boost + - b2 # base1-1 packages + - bzip2 + - cppunit - expat + - fmt + - gtest + - libbacktrace + - libdeflate + - libiconv + - libxcrypt + - lz4 + - pugixml + - pystring + - snappy + - tbb + - tsl-robin-map + - yaml-cpp + - zlib + - zstd + - blosc # base1-2 packages + - cpython + - freetype - glew - glfw - log4cplus - - qt - - pyside - - cmake - - imath - - materialx - - openexr - - oiio - - ocio + - minizip-ng + - boost # base1-3 packages - pybind11 - - ptex - - opensubdiv - - alembic - - blosc - - openvdb + - libjpeg-turbo # base2-1 packages + - libwebp + - md4c + - qt # base2-2 packages + - pyside # base2-3 packages + - imath # vfx1-1 packages + - alembic # vfx1-3 packages + - opensubdiv # vfx2-1 packages + - partio + - materialx implicit_packages: - numpy - hdf5 diff --git a/ci-vfxall/Dockerfile b/ci-vfxall/Dockerfile index f8a1a5da..08a34840 100644 --- a/ci-vfxall/Dockerfile +++ b/ci-vfxall/Dockerfile @@ -14,24 +14,48 @@ ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_VERSION -ARG ASWF_TBB_VERSION +ARG ASWF_BLOSC_VERSION ARG ASWF_BOOST_VERSION ARG ASWF_CPPUNIT_VERSION +ARG ASWF_CPYTHON_VERSION ARG ASWF_EXPAT_VERSION -ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_FREETYPE_VERSION ARG ASWF_GLEW_VERSION ARG ASWF_GLFW_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_MD4C_VERSION +ARG ASWF_PYBIND11_VERSION +ARG ASWF_SNAPPY_VERSION +ARG ASWF_TBB_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION +ARG ASWF_DBUS_VERSION +ARG ASWF_DOUBLE_CONVERSION_VERSION +ARG ASWF_FONTCONFIG_VERSION +ARG ASWF_GLIB_VERSION +ARG ASWF_LIBALSA_VERSION +ARG ASWF_LIBDRM_VERSION +ARG ASWF_LIBJPEG_TURBO_VERSION +ARG ASWF_LIBSNDFILE_VERSION +ARG ASWF_LIBTIFF_VERSION +ARG ASWF_LIBWEBP_VERSION +ARG ASWF_LIBXSHMFENCE_VERSION +ARG ASWF_MD4C_VERSION +ARG ASWF_NSS_VERSION +ARG ASWF_OPENAL_SOFT_VERSION +ARG ASWF_OPENJPEG_VERSION +ARG ASWF_OPUS_VERSION +ARG ASWF_PULSEAUDIO_VERSION +ARG ASWF_XKBCOMMON_VERSION ARG ASWF_QT_VERSION ARG ASWF_PYSIDE_VERSION -ARG ASWF_CMAKE_VERSION ARG ASWF_IMATH_VERSION ARG ASWF_OPENEXR_VERSION -ARG ASWF_BLOSC_VERSION ARG ASWF_ALEMBIC_VERSION ARG ASWF_OIIO_VERSION ARG ASWF_OCIO_VERSION -ARG ASWF_PYBIND11_VERSION ARG ASWF_OPENSUBDIV_VERSION ARG ASWF_PTEX_VERSION ARG ASWF_OPENVDB_VERSION @@ -43,14 +67,11 @@ ARG ASWF_OTIO_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_HDF5_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION # Comment out this block to use Conan packages -FROM ${ASWF_PKG_ORG}/ci-package-oiio:$ASWF_VFXPLATFORM_VERSION-$ASWF_OIIO_VERSION AS ci-package-oiio -FROM ${ASWF_PKG_ORG}/ci-package-ocio:$ASWF_VFXPLATFORM_VERSION-$ASWF_OCIO_VERSION AS ci-package-ocio FROM ${ASWF_PKG_ORG}/ci-package-openvdb:$ASWF_VFXPLATFORM_VERSION-$ASWF_OPENVDB_VERSION AS ci-package-openvdb FROM ${ASWF_PKG_ORG}/ci-package-usd:$ASWF_VFXPLATFORM_VERSION-$ASWF_USD_VERSION AS ci-package-usd FROM ${ASWF_PKG_ORG}/ci-package-osl:$ASWF_VFXPLATFORM_VERSION-$ASWF_OSL_VERSION AS ci-package-osl @@ -67,24 +88,48 @@ ARG ASWF_CONAN_CHANNEL -ARG ASWF_PYTHON_VERSION -ARG ASWF_TBB_VERSION +ARG ASWF_BLOSC_VERSION ARG ASWF_BOOST_VERSION ARG ASWF_CPPUNIT_VERSION +ARG ASWF_CPYTHON_VERSION ARG ASWF_EXPAT_VERSION -ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_FREETYPE_VERSION ARG ASWF_GLEW_VERSION ARG ASWF_GLFW_VERSION +ARG ASWF_LIBBACKTRACE_VERSION +ARG ASWF_LOG4CPLUS_VERSION +ARG ASWF_LZ4_VERSION +ARG ASWF_MD4C_VERSION +ARG ASWF_PYBIND11_VERSION +ARG ASWF_SNAPPY_VERSION +ARG ASWF_TBB_VERSION +ARG ASWF_ZLIB_VERSION +ARG ASWF_ZSTD_VERSION +ARG ASWF_DBUS_VERSION +ARG ASWF_DOUBLE_CONVERSION_VERSION +ARG ASWF_FONTCONFIG_VERSION +ARG ASWF_GLIB_VERSION +ARG ASWF_LIBALSA_VERSION +ARG ASWF_LIBDRM_VERSION +ARG ASWF_LIBJPEG_TURBO_VERSION +ARG ASWF_LIBSNDFILE_VERSION +ARG ASWF_LIBTIFF_VERSION +ARG ASWF_LIBWEBP_VERSION +ARG ASWF_LIBXSHMFENCE_VERSION +ARG ASWF_MD4C_VERSION +ARG ASWF_NSS_VERSION +ARG ASWF_OPENAL_SOFT_VERSION +ARG ASWF_OPENJPEG_VERSION +ARG ASWF_OPUS_VERSION +ARG ASWF_PULSEAUDIO_VERSION +ARG ASWF_XKBCOMMON_VERSION ARG ASWF_QT_VERSION ARG ASWF_PYSIDE_VERSION -ARG ASWF_CMAKE_VERSION ARG ASWF_IMATH_VERSION ARG ASWF_OPENEXR_VERSION -ARG ASWF_BLOSC_VERSION ARG ASWF_ALEMBIC_VERSION ARG ASWF_OIIO_VERSION ARG ASWF_OCIO_VERSION -ARG ASWF_PYBIND11_VERSION ARG ASWF_OPENSUBDIV_VERSION ARG ASWF_PTEX_VERSION ARG ASWF_OPENVDB_VERSION @@ -96,7 +141,6 @@ ARG ASWF_OTIO_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_HDF5_VERSION ARG ASWF_VFXPLATFORM_VERSION -ARG ASWF_PYTHON_MAJOR_MINOR_VERSION LABEL org.opencontainers.image.name="$ASWF_ORG/ci-vfxall" @@ -112,24 +156,48 @@ LABEL org.opencontainers.image.version="${ASWF_VERSION}" LABEL com.vfxplatform.version="${ASWF_VFXPLATFORM_VERSION}" -LABEL io.aswf.docker.versions.python="$ASWF_PYTHON_VERSION" -LABEL io.aswf.docker.versions.tbb="$ASWF_TBB_VERSION" +LABEL io.aswf.docker.versions.blosc="$ASWF_BLOSC_VERSION" LABEL io.aswf.docker.versions.boost="$ASWF_BOOST_VERSION" LABEL io.aswf.docker.versions.cppunit="$ASWF_CPPUNIT_VERSION" +LABEL io.aswf.docker.versions.cpython="$ASWF_CPYTHON_VERSION" LABEL io.aswf.docker.versions.expat="$ASWF_EXPAT_VERSION" -LABEL io.aswf.docker.versions.log4cplus="$ASWF_LOG4CPLUS_VERSION" +LABEL io.aswf.docker.versions.freetype="$ASWF_FREETYPE_VERSION" LABEL io.aswf.docker.versions.glew="$ASWF_GLEW_VERSION" LABEL io.aswf.docker.versions.glfw="$ASWF_GLFW_VERSION" +LABEL io.aswf.docker.versions.libbacktrace="$ASWF_LIBBACKTRACE_VERSION" +LABEL io.aswf.docker.versions.log4cplus="$ASWF_LOG4CPLUS_VERSION" +LABEL io.aswf.docker.versions.lz4="$ASWF_LZ4_VERSION" +LABEL io.aswf.docker.versions.md4c="$ASWF_MD4C_VERSION" +LABEL io.aswf.docker.versions.pybind11="$ASWF_PYBIND11_VERSION" +LABEL io.aswf.docker.versions.snappy="$ASWF_SNAPPY_VERSION" +LABEL io.aswf.docker.versions.tbb="$ASWF_TBB_VERSION" +LABEL io.aswf.docker.versions.zlib="$ASWF_ZLIB_VERSION" +LABEL io.aswf.docker.versions.zstd="$ASWF_ZSTD_VERSION" +LABEL io.aswf.docker.versions.dbus="$ASWF_DBUS_VERSION" +LABEL io.aswf.docker.versions.double-conversion="$ASWF_DOUBLE_CONVERSION_VERSION" +LABEL io.aswf.docker.versions.fontconfig="$ASWF_FONTCONFIG_VERSION" +LABEL io.aswf.docker.versions.glib="$ASWF_GLIB_VERSION" +LABEL io.aswf.docker.versions.libalsa="$ASWF_LIBALSA_VERSION" +LABEL io.aswf.docker.versions.libdrm="$ASWF_LIBDRM_VERSION" +LABEL io.aswf.docker.versions.libjpeg-turbo="$ASWF_LIBJPEG_TURBO_VERSION" +LABEL io.aswf.docker.versions.libsndfile="$ASWF_LIBSNDFILE_VERSION" +LABEL io.aswf.docker.versions.libtiff="$ASWF_LIBTIFF_VERSION" +LABEL io.aswf.docker.versions.libwebp="$ASWF_LIBWEBP_VERSION" +LABEL io.aswf.docker.versions.libxshmfence="$ASWF_LIBXSHMFENCE_VERSION" +LABEL io.aswf.docker.versions.md4c="$ASWF_MD4C_VERSION" +LABEL io.aswf.docker.versions.nss="$ASWF_NSS_VERSION" +LABEL io.aswf.docker.versions.openal-soft="$ASWF_OPENAL_SOFT_VERSION" +LABEL io.aswf.docker.versions.openjpeg="$ASWF_OPENJPEG_VERSION" +LABEL io.aswf.docker.versions.opus="$ASWF_OPUS_VERSION" +LABEL io.aswf.docker.versions.pulseaudio="$ASWF_PULSEAUDIO_VERSION" +LABEL io.aswf.docker.versions.xkbcommon="$ASWF_XKBCOMMON_VERSION" LABEL io.aswf.docker.versions.qt="$ASWF_QT_VERSION" LABEL io.aswf.docker.versions.pyside="$ASWF_PYSIDE_VERSION" -LABEL io.aswf.docker.versions.cmake="$ASWF_CMAKE_VERSION" LABEL io.aswf.docker.versions.imath="$ASWF_IMATH_VERSION" LABEL io.aswf.docker.versions.openexr="$ASWF_OPENEXR_VERSION" -LABEL io.aswf.docker.versions.blosc="$ASWF_BLOSC_VERSION" LABEL io.aswf.docker.versions.alembic="$ASWF_ALEMBIC_VERSION" LABEL io.aswf.docker.versions.oiio="$ASWF_OIIO_VERSION" LABEL io.aswf.docker.versions.ocio="$ASWF_OCIO_VERSION" -LABEL io.aswf.docker.versions.pybind11="$ASWF_PYBIND11_VERSION" LABEL io.aswf.docker.versions.opensubdiv="$ASWF_OPENSUBDIV_VERSION" LABEL io.aswf.docker.versions.ptex="$ASWF_PTEX_VERSION" LABEL io.aswf.docker.versions.openvdb="$ASWF_OPENVDB_VERSION" @@ -152,24 +220,48 @@ ENV ASWF_PYSIDE_CLANG_VERSION=${ASWF_PYSIDE_CLANG_VERSION} ENV ASWF_VFXPLATFORM_VERSION=${ASWF_VFXPLATFORM_VERSION} -ENV ASWF_PYTHON_VERSION=$ASWF_PYTHON_VERSION -ENV ASWF_TBB_VERSION=$ASWF_TBB_VERSION +ENV ASWF_BLOSC_VERSION=$ASWF_BLOSC_VERSION ENV ASWF_BOOST_VERSION=$ASWF_BOOST_VERSION ENV ASWF_CPPUNIT_VERSION=$ASWF_CPPUNIT_VERSION +ENV ASWF_CPYTHON_VERSION=$ASWF_CPYTHON_VERSION ENV ASWF_EXPAT_VERSION=$ASWF_EXPAT_VERSION -ENV ASWF_LOG4CPLUS_VERSION=$ASWF_LOG4CPLUS_VERSION +ENV ASWF_FREETYPE_VERSION=$ASWF_FREETYPE_VERSION ENV ASWF_GLEW_VERSION=$ASWF_GLEW_VERSION ENV ASWF_GLFW_VERSION=$ASWF_GLFW_VERSION +ENV ASWF_LIBBACKTRACE_VERSION=$ASWF_LIBBACKTRACE_VERSION +ENV ASWF_LOG4CPLUS_VERSION=$ASWF_LOG4CPLUS_VERSION +ENV ASWF_LZ4_VERSION=$ASWF_LZ4_VERSION +ENV ASWF_MD4C_VERSION=$ASWF_MD4C_VERSION +ENV ASWF_PYBIND11_VERSION=$ASWF_PYBIND11_VERSION +ENV ASWF_SNAPPY_VERSION=$ASWF_SNAPPY_VERSION +ENV ASWF_TBB_VERSION=$ASWF_TBB_VERSION +ENV ASWF_ZLIB_VERSION=$ASWF_ZLIB_VERSION +ENV ASWF_ZSTD_VERSION=$ASWF_ZSTD_VERSION +ENV ASWF_DBUS_VERSION=$ASWF_DBUS_VERSION +ENV ASWF_DOUBLE_CONVERSION_VERSION=$ASWF_DOUBLE_CONVERSION_VERSION +ENV ASWF_FONTCONFIG_VERSION=$ASWF_FONTCONFIG_VERSION +ENV ASWF_GLIB_VERSION=$ASWF_GLIB_VERSION +ENV ASWF_LIBALSA_VERSION=$ASWF_LIBALSA_VERSION +ENV ASWF_LIBDRM_VERSION=$ASWF_LIBDRM_VERSION +ENV ASWF_LIBJPEG_TURBO_VERSION=$ASWF_LIBJPEG_TURBO_VERSION +ENV ASWF_LIBSNDFILE_VERSION=$ASWF_LIBSNDFILE_VERSION +ENV ASWF_LIBTIFF_VERSION=$ASWF_LIBTIFF_VERSION +ENV ASWF_LIBWEBP_VERSION=$ASWF_LIBWEBP_VERSION +ENV ASWF_LIBXSHMFENCE_VERSION=$ASWF_LIBXSHMFENCE_VERSION +ENV ASWF_MD4C_VERSION=$ASWF_MD4C_VERSION +ENV ASWF_NSS_VERSION=$ASWF_NSS_VERSION +ENV ASWF_OPENAL_SOFT_VERSION=$ASWF_OPENAL_SOFT_VERSION +ENV ASWF_OPENJPEG_VERSION=$ASWF_OPENJPEG_VERSION +ENV ASWF_OPUS_VERSION=$ASWF_OPUS_VERSION +ENV ASWF_PULSEAUDIO_VERSION=$ASWF_PULSEAUDIO_VERSION +ENV ASWF_XKBCOMMON_VERSION=$ASWF_XKBCOMMON_VERSION ENV ASWF_QT_VERSION=$ASWF_QT_VERSION ENV ASWF_PYSIDE_VERSION=$ASWF_PYSIDE_VERSION -ENV ASWF_CMAKE_VERSION=$ASWF_CMAKE_VERSION ENV ASWF_IMATH_VERSION=$ASWF_IMATH_VERSION ENV ASWF_OPENEXR_VERSION=$ASWF_OPENEXR_VERSION -ENV ASWF_BLOSC_VERSION=$ASWF_BLOSC_VERSION ENV ASWF_ALEMBIC_VERSION=$ASWF_ALEMBIC_VERSION ENV ASWF_OIIO_VERSION=$ASWF_OIIO_VERSION ENV ASWF_OCIO_VERSION=$ASWF_OCIO_VERSION -ENV ASWF_PYBIND11_VERSION=$ASWF_PYBIND11_VERSION ENV ASWF_OPENSUBDIV_VERSION=$ASWF_OPENSUBDIV_VERSION ENV ASWF_PTEX_VERSION=$ASWF_PTEX_VERSION ENV ASWF_OPENVDB_VERSION=$ASWF_OPENVDB_VERSION @@ -181,11 +273,8 @@ ENV ASWF_OTIO_VERSION=$ASWF_OTIO_VERSION ENV ASWF_NUMPY_VERSION=$ASWF_NUMPY_VERSION ENV ASWF_HDF5_VERSION=$ASWF_HDF5_VERSION ENV ASWF_VFXPLATFORM_VERSION=$ASWF_VFXPLATFORM_VERSION -ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=$ASWF_PYTHON_MAJOR_MINOR_VERSION -COPY --from=ci-package-oiio /. /usr/local/ -COPY --from=ci-package-ocio /. /usr/local/ COPY --from=ci-package-openvdb /. /usr/local/ COPY --from=ci-package-usd /. /usr/local/ COPY --from=ci-package-osl /. /usr/local/ @@ -194,33 +283,59 @@ COPY ci-vfxall/README.md ci-vfxall/image.yaml /usr/local/aswf/ -ENV PYTHONPATH=/usr/local/lib/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib64/python${ASWF_PYTHON_MAJOR_MINOR_VERSION}/site-packages:/usr/local/lib/python:${PYTHONPATH} COPY scripts/common/install_conanpackages.sh /tmp/ +ARG ASWF_PYTHON_MAJOR_MINOR_VERSION +ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=${ASWF_PYTHON_MAJOR_MINOR_VERSION} + # conan-only packages COPY < . [requires] -python/${ASWF_PYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +blosc/${ASWF_BLOSC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} cppunit/${ASWF_CPPUNIT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cpython/${ASWF_CPYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} expat/${ASWF_EXPAT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -log4cplus/${ASWF_LOG4CPLUS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +freetype/${ASWF_FREETYPE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} glew/${ASWF_GLEW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} glfw/${ASWF_GLFW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libbacktrace/${ASWF_LIBBACKTRACE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +log4cplus/${ASWF_LOG4CPLUS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +lz4/${ASWF_LZ4_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +md4c/${ASWF_MD4C_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pybind11/${ASWF_PYBIND11_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +snappy/${ASWF_SNAPPY_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zlib/${ASWF_ZLIB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +zstd/${ASWF_ZSTD_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +dbus/${ASWF_DBUS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +double-conversion/${ASWF_DOUBLE_CONVERSION_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +fontconfig/${ASWF_FONTCONFIG_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +glib/${ASWF_GLIB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libalsa/${ASWF_LIBALSA_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libdrm/${ASWF_LIBDRM_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libjpeg-turbo/${ASWF_LIBJPEG_TURBO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libsndfile/${ASWF_LIBSNDFILE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libtiff/${ASWF_LIBTIFF_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libwebp/${ASWF_LIBWEBP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libxshmfence/${ASWF_LIBXSHMFENCE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +md4c/${ASWF_MD4C_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +nss/${ASWF_NSS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +openal-soft/${ASWF_OPENAL_SOFT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +openjpeg/${ASWF_OPENJPEG_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +opus/${ASWF_OPUS_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pulseaudio/${ASWF_PULSEAUDIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +xkbcommon/${ASWF_XKBCOMMON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} qt/${ASWF_QT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} pyside/${ASWF_PYSIDE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} imath/${ASWF_IMATH_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} openexr/${ASWF_OPENEXR_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -blosc/${ASWF_BLOSC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} alembic/${ASWF_ALEMBIC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -# oiio/${ASWF_OIIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -# ocio/${ASWF_OCIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -pybind11/${ASWF_PYBIND11_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +oiio/${ASWF_OIIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +ocio/${ASWF_OCIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} opensubdiv/${ASWF_OPENSUBDIV_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} ptex/${ASWF_PTEX_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} # openvdb/${ASWF_OPENVDB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} @@ -231,9 +346,11 @@ partio/${ASWF_PARTIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} # otio/${ASWF_OTIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF +ENV CONAN_HOME=${CONAN_USER_HOME}/.conan2 + RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} diff --git a/ci-vfxall/README.md b/ci-vfxall/README.md index 701b3667..2a59b2b6 100644 --- a/ci-vfxall/README.md +++ b/ci-vfxall/README.md @@ -20,23 +20,22 @@ Contains: all supported VFX packages ## [aswf/ci-vfxall:2019-clang6.12](https://hub.docker.com/r/aswf/ci-vfxall/tags?page=1&name=2019-clang6.12) Contains: -* python-2.7.15 -* tbb-2018 +* blosc-1.5.0 * boost-1.66.0 * cppunit-1.14.0 -* log4cplus-1.1.2 +* cpython-2.7.15 * glew-2.1.0 * glfw-3.1.2 +* log4cplus-1.1.2 +* pybind11-2.4.3 +* tbb-2018 * qt-5.12.6 * pyside-5.12.6 -* cmake-3.12.4 * imath-2.3.0 * openexr-2.3.0 -* blosc-1.5.0 * alembic-1.7.11 * oiio-2.0.8 * ocio-1.1.0 -* pybind11-2.4.3 * opensubdiv-3_3_3 * ptex-2.1.33 * openvdb-6.2.1 @@ -51,23 +50,22 @@ Contains: ## [aswf/ci-vfxall:2019-clang7.12](https://hub.docker.com/r/aswf/ci-vfxall/tags?page=1&name=2019-clang7.12) Contains: -* python-2.7.15 -* tbb-2018 +* blosc-1.5.0 * boost-1.66.0 * cppunit-1.14.0 -* log4cplus-1.1.2 +* cpython-2.7.15 * glew-2.1.0 * glfw-3.1.2 +* log4cplus-1.1.2 +* pybind11-2.4.3 +* tbb-2018 * qt-5.12.6 * pyside-5.12.6 -* cmake-3.12.4 * imath-2.3.0 * openexr-2.3.0 -* blosc-1.5.0 * alembic-1.7.11 * oiio-2.0.8 * ocio-1.1.0 -* pybind11-2.4.3 * opensubdiv-3_3_3 * ptex-2.1.33 * openvdb-6.2.1 @@ -82,23 +80,22 @@ Contains: ## [aswf/ci-vfxall:2019-clang8.12](https://hub.docker.com/r/aswf/ci-vfxall/tags?page=1&name=2019-clang8.12) Contains: -* python-2.7.15 -* tbb-2018 +* blosc-1.5.0 * boost-1.66.0 * cppunit-1.14.0 -* log4cplus-1.1.2 +* cpython-2.7.15 * glew-2.1.0 * glfw-3.1.2 +* log4cplus-1.1.2 +* pybind11-2.4.3 +* tbb-2018 * qt-5.12.6 * pyside-5.12.6 -* cmake-3.12.4 * imath-2.3.0 * openexr-2.3.0 -* blosc-1.5.0 * alembic-1.7.11 * oiio-2.0.8 * ocio-1.1.0 -* pybind11-2.4.3 * opensubdiv-3_3_3 * ptex-2.1.33 * openvdb-6.2.1 @@ -113,23 +110,22 @@ Contains: ## [aswf/ci-vfxall:2019-clang9.12](https://hub.docker.com/r/aswf/ci-vfxall/tags?page=1&name=2019-clang9.12) Contains: -* python-2.7.15 -* tbb-2018 +* blosc-1.5.0 * boost-1.66.0 * cppunit-1.14.0 -* log4cplus-1.1.2 +* cpython-2.7.15 * glew-2.1.0 * glfw-3.1.2 +* log4cplus-1.1.2 +* pybind11-2.4.3 +* tbb-2018 * qt-5.12.6 * pyside-5.12.6 -* cmake-3.12.4 * imath-2.3.0 * openexr-2.3.0 -* blosc-1.5.0 * alembic-1.7.11 * oiio-2.0.8 * ocio-1.1.0 -* pybind11-2.4.3 * opensubdiv-3_3_3 * ptex-2.1.33 * openvdb-6.2.1 @@ -144,23 +140,22 @@ Contains: ## [aswf/ci-vfxall:2020-clang7.10](https://hub.docker.com/r/aswf/ci-vfxall/tags?page=1&name=2020-clang7.10) Contains: -* python-3.7.3 -* tbb-2019_U6 +* blosc-1.5.0 * boost-1.70.0 * cppunit-1.15.1 -* log4cplus-1.1.2 +* cpython-3.7.3 * glew-2.1.0 * glfw-3.1.2 +* log4cplus-1.1.2 +* pybind11-2.4.3 +* tbb-2019_u6 * qt-5.12.6 * pyside-5.12.6 -* cmake-3.18.4 * imath-2.4.0 * openexr-2.4.0 -* blosc-1.5.0 * alembic-1.7.12 * oiio-2.1.13.0 * ocio-1.1.1 -* pybind11-2.4.3 * opensubdiv-3_4_3 * ptex-2.3.2 * openvdb-7.1.0 @@ -175,23 +170,22 @@ Contains: ## [aswf/ci-vfxall:2021-clang10.7](https://hub.docker.com/r/aswf/ci-vfxall/tags?page=1&name=2021-clang10.7) Contains: -* python-3.7.9 -* tbb-2020_U2 +* blosc-1.5.0 * boost-1.73.0 * cppunit-1.15.1 -* log4cplus-1.1.2 +* cpython-3.7.9 * glew-2.1.0 * glfw-3.1.2 +* log4cplus-1.1.2 +* pybind11-2.6.2 +* tbb-2020_u2 * qt-5.15.2 * pyside-5.15.2 -* cmake-3.19.3 * imath-2.5.5 * openexr-2.5.5 -* blosc-1.5.0 * alembic-1.7.16 * oiio-2.2.14.0 * ocio-2.0.1 -* pybind11-2.6.2 * opensubdiv-3_4_3 * ptex-2.3.2 * openvdb-8.0.1 @@ -206,23 +200,22 @@ Contains: ## [aswf/ci-vfxall:2022-clang10.13](https://hub.docker.com/r/aswf/ci-vfxall/tags?page=1&name=2022-clang10.13) Contains: -* python-3.9.15 -* tbb-2020_U3 +* blosc-1.17.0 * boost-1.76.0 * cppunit-1.15.1 -* log4cplus-1.1.2 +* cpython-3.9.15 * glew-2.1.0 * glfw-3.1.2 +* log4cplus-1.1.2 +* pybind11-2.8.1 +* tbb-2020_u3 * qt-5.15.2 * pyside-5.15.2 -* cmake-3.22.0 * imath-3.1.5 * openexr-3.1.5 -* blosc-1.17.0 * alembic-1.8.2 * oiio-2.4.5.0 * ocio-2.1.1 -* pybind11-2.8.1 * opensubdiv-3_4_4 * ptex-2.4.0 * openvdb-9.1.0 @@ -238,23 +231,22 @@ Contains: ## [aswf/ci-vfxall:2022-clang11.13](https://hub.docker.com/r/aswf/ci-vfxall/tags?page=1&name=2022-clang11.13) Contains: -* python-3.9.15 -* tbb-2020_U3 +* blosc-1.17.0 * boost-1.76.0 * cppunit-1.15.1 -* log4cplus-1.1.2 +* cpython-3.9.15 * glew-2.1.0 * glfw-3.1.2 +* log4cplus-1.1.2 +* pybind11-2.8.1 +* tbb-2020_u3 * qt-5.15.2 * pyside-5.15.2 -* cmake-3.22.0 * imath-3.1.5 * openexr-3.1.5 -* blosc-1.17.0 * alembic-1.8.2 * oiio-2.4.5.0 * ocio-2.1.1 -* pybind11-2.8.1 * opensubdiv-3_4_4 * ptex-2.4.0 * openvdb-9.1.0 @@ -270,23 +262,22 @@ Contains: ## [aswf/ci-vfxall:2022-clang12.4](https://hub.docker.com/r/aswf/ci-vfxall/tags?page=1&name=2022-clang12.4) Contains: -* python-3.9.15 -* tbb-2020_U3 +* blosc-1.17.0 * boost-1.76.0 * cppunit-1.15.1 -* log4cplus-1.1.2 +* cpython-3.9.15 * glew-2.1.0 * glfw-3.1.2 +* log4cplus-1.1.2 +* pybind11-2.8.1 +* tbb-2020_u3 * qt-5.15.2 * pyside-5.15.2 -* cmake-3.22.0 * imath-3.1.5 * openexr-3.1.5 -* blosc-1.17.0 * alembic-1.8.2 * oiio-2.4.5.0 * ocio-2.1.1 -* pybind11-2.8.1 * opensubdiv-3_4_4 * ptex-2.4.0 * openvdb-9.1.0 @@ -302,23 +293,22 @@ Contains: ## [aswf/ci-vfxall:2022-clang13.4](https://hub.docker.com/r/aswf/ci-vfxall/tags?page=1&name=2022-clang13.4) Contains: -* python-3.9.15 -* tbb-2020_U3 +* blosc-1.17.0 * boost-1.76.0 * cppunit-1.15.1 -* log4cplus-1.1.2 +* cpython-3.9.15 * glew-2.1.0 * glfw-3.1.2 +* log4cplus-1.1.2 +* pybind11-2.8.1 +* tbb-2020_u3 * qt-5.15.2 * pyside-5.15.2 -* cmake-3.22.0 * imath-3.1.5 * openexr-3.1.5 -* blosc-1.17.0 * alembic-1.8.2 * oiio-2.4.5.0 * ocio-2.1.1 -* pybind11-2.8.1 * opensubdiv-3_4_4 * ptex-2.4.0 * openvdb-9.1.0 @@ -334,23 +324,22 @@ Contains: ## [aswf/ci-vfxall:2022-clang14.3](https://hub.docker.com/r/aswf/ci-vfxall/tags?page=1&name=2022-clang14.3) Contains: -* python-3.9.15 -* tbb-2020_U3 +* blosc-1.17.0 * boost-1.76.0 * cppunit-1.15.1 -* log4cplus-1.1.2 +* cpython-3.9.15 * glew-2.1.0 * glfw-3.1.2 +* log4cplus-1.1.2 +* pybind11-2.8.1 +* tbb-2020_u3 * qt-5.15.2 * pyside-5.15.2 -* cmake-3.22.0 * imath-3.1.5 * openexr-3.1.5 -* blosc-1.17.0 * alembic-1.8.2 * oiio-2.4.5.0 * ocio-2.1.1 -* pybind11-2.8.1 * opensubdiv-3_4_4 * ptex-2.4.0 * openvdb-9.1.0 @@ -366,23 +355,22 @@ Contains: ## [aswf/ci-vfxall:2023-clang14.2](https://hub.docker.com/r/aswf/ci-vfxall/tags?page=1&name=2023-clang14.2) Contains: -* python-3.10.11 -* tbb-2020_U3 +* blosc-1.17.0 * boost-1.80.0 * cppunit-1.15.1 -* log4cplus-1.1.2 +* cpython-3.10.11 * glew-2.1.0 * glfw-3.1.2 +* log4cplus-1.1.2 +* pybind11-2.9.2 +* tbb-2020_u3 * qt-5.15.9 * pyside-5.15.9 -* cmake-3.27.2 * imath-3.1.9 * openexr-3.1.11 -* blosc-1.17.0 * alembic-1.8.5 * oiio-2.4.13.0 * ocio-2.2.1 -* pybind11-2.9.2 * opensubdiv-3_5_0 * ptex-2.4.2 * openvdb-10.0.1 @@ -398,23 +386,22 @@ Contains: ## [aswf/ci-vfxall:2023-clang15.2](https://hub.docker.com/r/aswf/ci-vfxall/tags?page=1&name=2023-clang15.2) Contains: -* python-3.10.11 -* tbb-2020_U3 +* blosc-1.17.0 * boost-1.80.0 * cppunit-1.15.1 -* log4cplus-1.1.2 +* cpython-3.10.11 * glew-2.1.0 * glfw-3.1.2 +* log4cplus-1.1.2 +* pybind11-2.9.2 +* tbb-2020_u3 * qt-5.15.9 * pyside-5.15.9 -* cmake-3.27.2 * imath-3.1.9 * openexr-3.1.11 -* blosc-1.17.0 * alembic-1.8.5 * oiio-2.4.13.0 * ocio-2.2.1 -* pybind11-2.9.2 * opensubdiv-3_5_0 * ptex-2.4.2 * openvdb-10.0.1 @@ -430,28 +417,49 @@ Contains: ## [aswf/ci-vfxall:2024-clang16.2](https://hub.docker.com/r/aswf/ci-vfxall/tags?page=1&name=2024-clang16.2) Contains: -* python-3.11.10 -* tbb-2020_U3 +* blosc-1.21.5 * boost-1.82.0 * cppunit-1.15.1 -* expat-2.6.3 -* log4cplus-2.1.1 +* cpython-3.11.11 +* expat-2.6.4 +* freetype-2.13.2 * glew-2.1.0 * glfw-3.3.8 -* qt-6.5.3 -* pyside-6.5.3 -* cmake-3.27.9 +* libbacktrace-cci.20210118 +* log4cplus-2.1.1 +* lz4-1.10.0 +* md4c-0.4.8 +* pybind11-2.12.0 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* dbus-system +* fontconfig-system +* glib-2.78.3 +* libalsa-system +* libdrm-system +* libsndfile-system +* libtiff-4.0.9 +* libwebp-1.5.0 +* libxshmfence-system +* md4c-0.4.8 +* nss-3.93 +* openjpeg-2.4.0 +* opus-system +* pulseaudio-system +* xkbcommon-0.9.1 +* qt-6.5.4 +* pyside-6.5.4 * imath-3.1.12 * openexr-3.2.4 -* blosc-1.21.5 * alembic-1.8.6 -* oiio-2.5.16.0 +* oiio-2.5.18.0 * ocio-2.3.2 -* pybind11-2.12.0 * opensubdiv-3.6.0 * ptex-2.4.2 * openvdb-11.0.0 -* materialx-1.39.1 +* materialx-1.39.2 * usd-24.08 * partio-1.17.1 * osl-1.13.11.0 @@ -463,28 +471,49 @@ Contains: ## [aswf/ci-vfxall:2024-clang17.2](https://hub.docker.com/r/aswf/ci-vfxall/tags?page=1&name=2024-clang17.2) Contains: -* python-3.11.10 -* tbb-2020_U3 +* blosc-1.21.5 * boost-1.82.0 * cppunit-1.15.1 -* expat-2.6.3 -* log4cplus-2.1.1 +* cpython-3.11.11 +* expat-2.6.4 +* freetype-2.13.2 * glew-2.1.0 * glfw-3.3.8 -* qt-6.5.3 -* pyside-6.5.3 -* cmake-3.27.9 +* libbacktrace-cci.20210118 +* log4cplus-2.1.1 +* lz4-1.10.0 +* md4c-0.4.8 +* pybind11-2.12.0 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* dbus-system +* fontconfig-system +* glib-2.78.3 +* libalsa-system +* libdrm-system +* libsndfile-system +* libtiff-4.0.9 +* libwebp-1.5.0 +* libxshmfence-system +* md4c-0.4.8 +* nss-3.93 +* openjpeg-2.4.0 +* opus-system +* pulseaudio-system +* xkbcommon-0.9.1 +* qt-6.5.4 +* pyside-6.5.4 * imath-3.1.12 * openexr-3.2.4 -* blosc-1.21.5 * alembic-1.8.6 -* oiio-2.5.16.0 +* oiio-2.5.18.0 * ocio-2.3.2 -* pybind11-2.12.0 * opensubdiv-3.6.0 * ptex-2.4.2 * openvdb-11.0.0 -* materialx-1.39.1 +* materialx-1.39.2 * usd-24.08 * partio-1.17.1 * osl-1.13.11.0 @@ -493,3 +522,111 @@ Contains: * hdf5-1.8.23 * vfxplatform-2024 +## [aswf/ci-vfxall:2025-clang18.0](https://hub.docker.com/r/aswf/ci-vfxall/tags?page=1&name=2025-clang18.0) + +Contains: +* blosc-1.21.6 +* boost-1.85.0 +* cppunit-1.15.1 +* cpython-3.11.11 +* expat-2.6.4 +* freetype-2.13.2 +* glew-2.2.0 +* glfw-3.4 +* libbacktrace-cci.20210118 +* log4cplus-2.1.2 +* lz4-1.10.0 +* md4c-0.4.8 +* pybind11-2.13.6 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* dbus-system +* fontconfig-system +* glib-2.78.3 +* libalsa-system +* libdrm-system +* libsndfile-system +* libtiff-4.0.9 +* libwebp-1.5.0 +* libxshmfence-system +* md4c-0.4.8 +* nss-3.93 +* openjpeg-2.4.0 +* opus-system +* pulseaudio-system +* xkbcommon-0.9.1 +* qt-6.5.4 +* pyside-6.5.4 +* imath-3.1.12 +* openexr-3.3.3 +* alembic-1.8.8 +* oiio-3.0.5.0 +* ocio-2.4.2 +* opensubdiv-3.6.0 +* ptex-2.4.3 +* openvdb-12.0.0 +* materialx-1.39.3 +* usd-25.02a.eae7e67 +* partio-1.17.3 +* osl-1.14.5.0 +* otio-0.17.0 +* numpy-1.26.4 +* hdf5-1.8.23 +* vfxplatform-2025 + +## [aswf/ci-vfxall:2025-clang19.0](https://hub.docker.com/r/aswf/ci-vfxall/tags?page=1&name=2025-clang19.0) + +Contains: +* blosc-1.21.6 +* boost-1.85.0 +* cppunit-1.15.1 +* cpython-3.11.11 +* expat-2.6.4 +* freetype-2.13.2 +* glew-2.2.0 +* glfw-3.4 +* libbacktrace-cci.20210118 +* log4cplus-2.1.2 +* lz4-1.10.0 +* md4c-0.4.8 +* pybind11-2.13.6 +* snappy-1.1.10 +* tbb-2020_u3 +* zlib-1.3.1 +* zstd-1.5.6 +* dbus-system +* fontconfig-system +* glib-2.78.3 +* libalsa-system +* libdrm-system +* libsndfile-system +* libtiff-4.0.9 +* libwebp-1.5.0 +* libxshmfence-system +* md4c-0.4.8 +* nss-3.93 +* openjpeg-2.4.0 +* opus-system +* pulseaudio-system +* xkbcommon-0.9.1 +* qt-6.5.4 +* pyside-6.5.4 +* imath-3.1.12 +* openexr-3.3.3 +* alembic-1.8.8 +* oiio-3.0.5.0 +* ocio-2.4.2 +* opensubdiv-3.6.0 +* ptex-2.4.3 +* openvdb-12.0.0 +* materialx-1.39.3 +* usd-25.02a.eae7e67 +* partio-1.17.3 +* osl-1.14.5.0 +* otio-0.17.0 +* numpy-1.26.4 +* hdf5-1.8.23 +* vfxplatform-2025 + diff --git a/ci-vfxall/image.yaml b/ci-vfxall/image.yaml index 9c8c9ae4..78f2b53f 100644 --- a/ci-vfxall/image.yaml +++ b/ci-vfxall/image.yaml @@ -3,24 +3,48 @@ title: "VFX All CI Docker Image" description: | Contains: all supported VFX packages packages: - - python - - tbb + - blosc - boost - cppunit + - cpython - expat - - log4cplus + - freetype - glew - glfw + - libbacktrace + - log4cplus + - lz4 + - md4c + - pybind11 + - snappy + - tbb + - zlib + - zstd + - dbus + - double-conversion + - fontconfig + - glib + - libalsa + - libdrm + - libjpeg-turbo + - libsndfile + - libtiff + - libwebp + - libxshmfence + - md4c + - nss + - openal-soft + - openjpeg + - opus + - pulseaudio + - xkbcommon - qt - pyside - - cmake - imath - openexr - - blosc - alembic - oiio - ocio - - pybind11 - opensubdiv - ptex - openvdb diff --git a/packages/base1/Dockerfile b/packages/base1/Dockerfile index 462ca0e5..dca3c837 100644 --- a/packages/base1/Dockerfile +++ b/packages/base1/Dockerfile @@ -19,7 +19,7 @@ ARG ASWF_LOG4CPLUS_VERSION ARG ASWF_NINJA_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_PYBIND11_VERSION -ARG ASWF_PYTHON_VERSION +ARG ASWF_CPYTHON_VERSION ARG ASWF_PYTHON_MAJOR_MINOR_VERSION ARG ASWF_TBB_VERSION ARG ASWF_VFXPLATFORM_VERSION diff --git a/packages/base2/Dockerfile b/packages/base2/Dockerfile index 4e9164f0..55570b20 100644 --- a/packages/base2/Dockerfile +++ b/packages/base2/Dockerfile @@ -7,7 +7,7 @@ ARG ASWF_ORG ARG CI_COMMON_VERSION ARG ASWF_CMAKE_VERSION ARG ASWF_CLANG_MAJOR_VERSION -ARG ASWF_PYTHON_VERSION +ARG ASWF_CPYTHON_VERSION ARG ASWF_PYTHON_MAJOR_MINOR_VERSION ARG ASWF_QT_VERSION ARG ASWF_VFXPLATFORM_VERSION @@ -15,30 +15,14 @@ ARG ASWF_VFXPLATFORM_VERSION #################### ci-baseos-gl-packages #################### FROM ${ASWF_ORG}/ci-common:${CI_COMMON_VERSION}-clang${ASWF_CLANG_MAJOR_VERSION} AS ci-baseos-gl-packages -ARG ASWF_CMAKE_VERSION -ARG ASWF_NINJA_VERSION ARG ASWF_PKG_ORG ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION -ENV ASWF_CMAKE_VERSION=${ASWF_CMAKE_VERSION} -ENV ASWF_NINJA_VERSION=${ASWF_NINJA_VERSION} ENV ASWF_VFXPLATFORM_VERSION=${ASWF_VFXPLATFORM_VERSION} -COPY scripts/common/install_conanpackages.sh /tmp - -# Use conan to install some packages -COPY < . -[requires] -cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -ninja/${ASWF_NINJA_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -EOF - RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} COPY ../scripts/common/before_build.sh \ diff --git a/packages/base3/Dockerfile b/packages/base3/Dockerfile index 725f64a9..64f8c342 100644 --- a/packages/base3/Dockerfile +++ b/packages/base3/Dockerfile @@ -7,7 +7,7 @@ ARG ASWF_ORG ARG CI_COMMON_VERSION ARG ASWF_CLANG_MAJOR_VERSION ARG ASWF_CMAKE_VERSION -ARG ASWF_PYTHON_VERSION +ARG ASWF_CPYTHON_VERSION ARG ASWF_PYTHON_MAJOR_MINOR_VERSION ARG ASWF_QT_VERSION ARG ASWF_VFXPLATFORM_VERSION @@ -19,27 +19,14 @@ FROM ${ASWF_ORG}/ci-package-qt:${ASWF_VFXPLATFORM_VERSION}-${ASWF_QT_VERSION} AS #################### ci-baseos-gl-packages #################### FROM ${ASWF_ORG}/ci-common:${CI_COMMON_VERSION}-clang${ASWF_CLANG_MAJOR_VERSION} AS ci-baseos-gl-packages -ARG ASWF_CMAKE_VERSION ARG ASWF_PKG_ORG ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION -ENV ASWF_CMAKE_VERSION=${ASWF_CMAKE_VERSION} ENV ASWF_VFXPLATFORM_VERSION=${ASWF_VFXPLATFORM_VERSION} -COPY scripts/common/install_conanpackages.sh /tmp - -# Use conan to install some packages -COPY < . -[requires] -cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -EOF - RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} COPY ../scripts/common/before_build.sh \ @@ -55,14 +42,14 @@ ENV DOWNLOADS_DIR=/tmp/downloads \ #################### ci-pyside-builder #################### FROM ci-baseos-gl-packages AS ci-pyside-builder -ARG ASWF_PYTHON_VERSION +ARG ASWF_CPYTHON_VERSION ARG ASWF_PYSIDE_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_PKG_ORG ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION -ENV ASWF_PYTHON_VERSION=${ASWF_PYTHON_VERSION} +ENV ASWF_CPYTHON_VERSION=${ASWF_CPYTHON_VERSION} ENV ASWF_PYSIDE_VERSION=${ASWF_PYSIDE_VERSION} ENV ASWF_NUMPY_VERSION=${ASWF_NUMPY_VERSION} ENV ASWF_PKG_ORG=${ASWF_PKG_ORG} @@ -77,11 +64,11 @@ COPY < . [requires] -python/${ASWF_PYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cpython/${ASWF_CPYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} diff --git a/packages/common/Dockerfile b/packages/common/Dockerfile index ce89b711..491d77f3 100644 --- a/packages/common/Dockerfile +++ b/packages/common/Dockerfile @@ -104,8 +104,8 @@ ARG ASWF_CLANG_VERSION ENV ASWF_CLANG_VERSION=${ASWF_CLANG_VERSION} ARG ASWF_PYSIDE_CLANG_VERSION ENV ASWF_PYSIDE_CLANG_VERSION=${ASWF_CLANG_VERSION} -ARG ASWF_PYTHON_VERSION -ENV ASWF_PYTHON_VERSION=${ASWF_PYTHON_VERSION} +ARG ASWF_CPYTHON_VERSION +ENV ASWF_CPYTHON_VERSION=${ASWF_CPYTHON_VERSION} ARG ASWF_PYTHON_MAJOR_MINOR_VERSION ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=${ASWF_PYTHON_MAJOR_MINOR_VERSION} ARG ASWF_NUMPY_VERSION @@ -126,6 +126,10 @@ ARG ASWF_GLFW_VERSION ENV ASWF_GLFW_VERSION=${ASWF_GLFW_VERSION} ARG ASWF_TBB_VERSION ENV ASWF_TBB_VERSION=${ASWF_TBB_VERSION} +ARG ASWF_MD4C_VERSION +ENV ASWF_MD4C_VERSION=${ASWF_MD4C_VERSION} +ARG ASWF_FREETYPE_VERSION +ENV ASWF_FREETYPE_VERSION=${ASWF_FREETYPE_VERSION} # These are a bit of a circular dependency, but ci-conan-package-builder # is also used to build vfx1/vfx2 packages @@ -140,6 +144,8 @@ ARG ASWF_PARTIO_VERSION ENV ASWF_PARTIO_VERSION=${ASWF_PARTIO_VERSION} ARG ASWF_PTEX_VERSION ENV ASWF_PTEX_VERSION=${ASWF_PTEX_VERSION} +ARG ASWF_OIIO_VERSION +ENV ASWF_OIIO_VERSION=${ASWF_OIIO_VERSION} ARG ASWF_EXPAT_VERSION ENV ASWF_EXPAT_VERSION=${ASWF_EXPAT_VERSION} @@ -154,42 +160,30 @@ ENV ASWF_CONAN_ROOT=/opt/conan \ ENV GCC_INSTALL_PREFIX=/opt/rh/${ASWF_DTS_PREFIX}-${ASWF_DTS_VERSION}/root/usr # With "conan create --profile" we no longer need to set a default profile +ENV CONAN_HOME=${CONAN_USER_HOME}/.conan2 + RUN --mount=type=cache,target=${CONAN_USER_HOME}/d \ --mount=type=cache,target=${CCACHE_DIR} \ - --mount=type=bind,rw,target=${CONAN_USER_HOME}/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=${CONAN_USER_HOME}/.conan2,source=packages/conan/settings \ --mount=type=bind,rw,target=${CONAN_USER_HOME}/recipes,source=packages/conan/recipes \ conan create \ ${ASWF_CONAN_KEEP_SOURCE} \ ${ASWF_CONAN_KEEP_BUILD} \ ${ASWF_CONAN_BUILD_MISSING} \ - --profile:build=${ASWF_CONAN_CHANNEL} \ - ${CONAN_USER_HOME}/recipes/${ASWF_PKG_NAME} \ - ${ASWF_PKG_NAME}/${ASWF_PKG_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} - -RUN --mount=type=cache,target=${CONAN_USER_HOME}/d \ - --mount=type=cache,target=${CCACHE_DIR} \ - --mount=type=bind,rw,target=${CONAN_USER_HOME}/.conan,source=packages/conan/settings \ - --mount=type=bind,rw,target=${CONAN_USER_HOME}/recipes,source=packages/conan/recipes \ - conan alias ${ASWF_PKG_NAME}/latest@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} ${ASWF_PKG_NAME}/${ASWF_PKG_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} + --profile:all ${CONAN_USER_HOME}/.conan2/profiles_${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} \ + --name ${ASWF_PKG_NAME} \ + --version ${ASWF_PKG_VERSION} \ + --user ${ASWF_PKG_ORG} \ + --channel ${ASWF_CONAN_CHANNEL} \ + ${CONAN_USER_HOME}/recipes/${ASWF_PKG_NAME} # Upload build to repository if called for RUN --mount=type=cache,target=${CONAN_USER_HOME}/d \ --mount=type=cache,target=${CCACHE_DIR} \ - --mount=type=bind,rw,target=${CONAN_USER_HOME}/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=${CONAN_USER_HOME}/.conan2,source=packages/conan/settings \ --mount=type=bind,rw,target=${CONAN_USER_HOME}/recipes,source=packages/conan/recipes \ if [ -n "${ASWF_CONAN_PUSH}" ] ; then \ - conan upload --all -r ${ASWF_PKG_ORG} ${ASWF_PKG_NAME}/${ASWF_PKG_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} ;\ + conan upload --all --remote ${ASWF_PKG_ORG} ${ASWF_PKG_NAME}/${ASWF_PKG_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} ;\ else \ echo "conan upload of package ${ASWF_PKG_NAME} skipped" ; \ fi - -# Upload build alias to latest if called for -RUN --mount=type=cache,target=${CONAN_USER_HOME}/d \ - --mount=type=cache,target=${CCACHE_DIR} \ - --mount=type=bind,rw,target=${CONAN_USER_HOME}/.conan,source=packages/conan/settings \ - --mount=type=bind,rw,target=${CONAN_USER_HOME}/recipes,source=packages/conan/recipes \ - if [ -n "${ASWF_CONAN_PUSH}" ] ; then \ - conan upload --all -r ${ASWF_PKG_ORG} ${ASWF_PKG_NAME}/latest@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} ;\ - else \ - echo "conan upload of package ${ASWF_PKG_NAME} alias skipped" ;\ - fi diff --git a/packages/conan/recipes/alembic/conandata.yml b/packages/conan/recipes/alembic/conandata.yml index 44148c65..641e7133 100644 --- a/packages/conan/recipes/alembic/conandata.yml +++ b/packages/conan/recipes/alembic/conandata.yml @@ -1,4 +1,16 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/cceee569179c10fa56d1fd9c3582f3371944ba59/recipes/alembic/all/conandata.yml + sources: + "1.8.8": + url: "https://github.com/alembic/alembic/archive/1.8.8.tar.gz" + sha256: "ba1f34544608ef7d3f68cafea946ec9cc84792ddf9cda3e8d5590821df71f6c6" + "1.8.7": + url: "https://github.com/alembic/alembic/archive/1.8.7.tar.gz" + sha256: "3590f51f82e3675bb907f7a6a7149a76c06c23ef25d153e64391bcd22d86cc8c" "1.8.6": url: "https://github.com/alembic/alembic/archive/1.8.6.tar.gz" sha256: "c572ebdea3a5f0ce13774dd1fceb5b5815265cd1b29d142cf8c144b03c131c8c" @@ -12,6 +24,14 @@ sources: url: "https://github.com/alembic/alembic/archive/refs/tags/1.8.2.tar.gz" sha256: "3f1c466ee1600578689b32b1f2587066d3259704ec7ed1fcf80c324d01274f48" patches: + "1.8.8": + - patch_file: "patches/1.8.8-0001-fix-cmake.patch" + patch_description: "CMake: fix install layout, don't link directly to zlib if hdf5, relocatable shared lib for macOS" + patch_type: "conan" + "1.8.7": + - patch_file: "patches/1.8.5-0001-fix-cmake.patch" + patch_description: "CMake: fix install layout, don't link directly to zlib if hdf5, relocatable shared lib for macOS" + patch_type: "conan" "1.8.6": - patch_file: "patches/1.8.5-0001-fix-cmake.patch" patch_description: "CMake: fix install layout, don't link directly to zlib if hdf5, relocatable shared lib for macOS" diff --git a/packages/conan/recipes/alembic/conanfile.py b/packages/conan/recipes/alembic/conanfile.py index 16f8b4b4..21666595 100644 --- a/packages/conan/recipes/alembic/conanfile.py +++ b/packages/conan/recipes/alembic/conanfile.py @@ -1,17 +1,13 @@ # Copyright (c) Contributors to the conan-center-index Project. All rights reserved. # Copyright (c) Contributors to the aswf-docker Project. All rights reserved. # SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/cceee569179c10fa56d1fd9c3582f3371944ba59/recipes/alembic/all/conanfile.py from conan import ConanFile +from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import ( - apply_conandata_patches, - collect_libs, - copy, - export_conandata_patches, - get, - rmdir, -) +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.scm import Version import os @@ -21,25 +17,20 @@ class AlembicConan(ConanFile): name = "alembic" license = "BSD-3-Clause" - description = "Alembic is an open framework for storing and sharing scene data that includes a C++ library, a file format, and client plugins and applications." - topics = "conan", "alembic", "python", "binding" - homepage = "https://www.alembic.io" - url = "https://github.com/AcademySoftwareFoundation/aswf-docker" + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://www.alembic.io" + description = "Open framework for storing and sharing scene data." + topics = ("3d", "scene", "geometry", "graphics") + package_type = "library" - settings = ( - "os", - "arch", - "compiler", - "build_type", - "python", - ) + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], "with_hdf5": [True, False], } default_options = { - "shared": True, + "shared": False, "fPIC": True, "with_hdf5": False, } @@ -57,27 +48,20 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") - # We want DSOs in lib64 + # ASWF: DSOs in lib64 self.cpp.package.libdirs = ["lib64"] def requirements(self): - self.requires( - f"python/{os.environ['ASWF_PYTHON_VERSION']}@{self.user}/{self.channel}" - ) - self.requires( - f"boost/{os.environ['ASWF_BOOST_VERSION']}@{self.user}/{self.channel}" - ) - self.requires( - f"imath/{os.environ['ASWF_IMATH_VERSION']}@{self.user}/{self.channel}" - ) - self.requires( - f"openexr/{os.environ['ASWF_OPENEXR_VERSION']}@{self.user}/{self.channel}" - ) - - def build_requirements(self): - self.build_requires( - f"cmake/{os.environ['ASWF_CMAKE_VERSION']}@{self.user}/{self.channel}" - ) + self.requires(f"cpython/{os.environ['ASWF_CPYTHON_VERSION']}@{self.user}/{self.channel}") + self.requires(f"boost/{os.environ['ASWF_BOOST_VERSION']}@{self.user}/{self.channel}") + self.requires(f"imath/{os.environ['ASWF_IMATH_VERSION']}@{self.user}/{self.channel}", transitive_headers = True, transitive_libs = True) + self.requires(f"openexr/{os.environ['ASWF_OPENEXR_VERSION']}@{self.user}/{self.channel}") + if self.options.with_hdf5: + self.requires("hdf5/1.14.3") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -93,9 +77,7 @@ def generate(self): tc.variables["USE_HDF5"] = self.options.with_hdf5 tc.variables["USE_TESTS"] = False tc.variables["ALEMBIC_BUILD_LIBS"] = True - tc.variables[ - "ALEMBIC_ILMBASE_LINK_STATIC" - ] = False # for -DOPENEXR_DLL, handled by OpenEXR package + tc.variables["ALEMBIC_ILMBASE_LINK_STATIC"] = False # for -DOPENEXR_DLL, handled by OpenEXR package tc.variables["ALEMBIC_SHARED_LIBS"] = self.options.shared tc.variables["ALEMBIC_USING_IMATH_3"] = True tc.variables["ALEMBIC_ILMBASE_FOUND"] = 1 @@ -113,41 +95,27 @@ def build(self): cmake.build() def package(self): - copy( - self, - "LICENSE.txt", - src=self.source_folder, - dst=os.path.join(self.package_folder, "licenses", self.name), - ) + # ASWF: separate license files per package + copy(self, "LICENSE.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) def package_info(self): - self.cpp_info.requires.append("python::PythonLibs") - self.cpp_info.requires.append("boost::python") - pymajorminor = self.deps_user_info["python"].python_interp - self.env_info.PYTHONPATH.append( - os.path.join(self.package_folder, "lib64", pymajorminor, "site-packages") - ) - - # self.cpp_info.libs = ["IlmImf", "IlmImfUtils"] - # if Version(self.version) >= "3": - self.cpp_info.requires.append("Imath::Imath") - self.cpp_info.set_property("cmake_file_name", "Alembic") self.cpp_info.set_property("cmake_target_name", "Alembic::Alembic") self.cpp_info.libs = ["Alembic"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.extend(["m", "pthread"]) + # ASWF add explicit package requirements + self.cpp_info.requires.append("cpython::cpython") + self.cpp_info.requires.append("boost::boost") + self.cpp_info.requires.append("imath::imath") + self.cpp_info.requires.append("openexr::openexr") + # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.names["cmake_find_package"] = "Alembic" self.cpp_info.names["cmake_find_package_multi"] = "Alembic" - self.env_info.CMAKE_PREFIX_PATH.append( - os.path.join(self.package_folder, "lib64", "cmake") - ) - def deploy(self): - self.copy("*", symlinks=True) diff --git a/packages/conan/recipes/alembic/patches/1.8.8-0001-fix-cmake.patch b/packages/conan/recipes/alembic/patches/1.8.8-0001-fix-cmake.patch new file mode 100644 index 00000000..9ae66793 --- /dev/null +++ b/packages/conan/recipes/alembic/patches/1.8.8-0001-fix-cmake.patch @@ -0,0 +1,44 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -206,7 +206,6 @@ + + # HDF5 + IF (USE_HDF5) +- FIND_PACKAGE(ZLIB REQUIRED) + SET(ALEMBIC_WITH_HDF5 "1") + INCLUDE("./cmake/AlembicHDF5.cmake") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DH5_USE_18_API") +--- a/lib/Alembic/CMakeLists.txt ++++ b/lib/Alembic/CMakeLists.txt +@@ -68,20 +68,18 @@ + + if (ALEMBIC_USING_IMATH_3) + if (APPLE OR UNIX) +- set_target_properties(Alembic PROPERTIES INSTALL_RPATH "$") + endif () + endif () + ENDIF() + + + TARGET_LINK_LIBRARIES(Alembic +- LINK_PUBLIC ++ PUBLIC + ${ALEMBIC_ILMBASE_LIBS} + ${CMAKE_THREAD_LIBS_INIT} + ${EXTERNAL_MATH_LIBS} +- LINK_PRIVATE ++ PRIVATE + ${HDF5_LIBRARIES} +- ${ZLIB_LIBRARY} + ) + + INSTALL(TARGETS Alembic +@@ -96,7 +94,7 @@ + + set(alembic_targets_file "${PROJECT_NAME}Targets.cmake") + +-SET(ConfigPackageLocation lib/cmake/Alembic CACHE PATH ++SET(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/Alembic CACHE PATH + "Where to install the Alembic's cmake files") + + INCLUDE(CMakePackageConfigHelpers) diff --git a/packages/conan/recipes/alembic/test_package/CMakeLists.txt b/packages/conan/recipes/alembic/test_package/CMakeLists.txt new file mode 100644 index 00000000..882a4ef8 --- /dev/null +++ b/packages/conan/recipes/alembic/test_package/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/alembic/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(Alembic REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE Alembic::Alembic) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/packages/conan/recipes/alembic/test_package/conanfile.py b/packages/conan/recipes/alembic/test_package/conanfile.py new file mode 100644 index 00000000..e8a02447 --- /dev/null +++ b/packages/conan/recipes/alembic/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/alembic/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build(cli_args=["--verbose"]) + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/alembic/test_package/test_package.cpp b/packages/conan/recipes/alembic/test_package/test_package.cpp new file mode 100644 index 00000000..ce514e1d --- /dev/null +++ b/packages/conan/recipes/alembic/test_package/test_package.cpp @@ -0,0 +1,32 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/alembic/all/test_package/test_package.cpp +*/ + +#include + +#include +#include +#include + +void write() +{ + Alembic::Abc::OArchive archive(Alembic::AbcCoreOgawa::WriteArchive(), "Collection.abc"); + Alembic::Abc::OObject root(archive, Alembic::Abc::kTop); + Alembic::Abc::OObject test(root, "test"); +} + +void read() +{ + Alembic::Abc::IArchive archive(Alembic::AbcCoreOgawa::ReadArchive(), "Collection.abc"); + Alembic::Abc::IObject test(archive.getTop(), "test"); +} + +int main() { + write(); + read(); + return EXIT_SUCCESS; +} diff --git a/packages/conan/recipes/b2/conandata.yml b/packages/conan/recipes/b2/conandata.yml new file mode 100644 index 00000000..c464545e --- /dev/null +++ b/packages/conan/recipes/b2/conandata.yml @@ -0,0 +1,31 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/7abb9ee39e6009e3dbc45043307a1098246d4ad7/recipes/b2/portable/conandata.yml + +sources: + "4.8.2": + url: "https://github.com/bfgroup/b2/archive/4.8.2.tar.gz" + sha256: "220edfbd5022394c5dc264dfdd8bf6d3ec53b784db87461026bb23ea9d9ec4bd" + "4.9.6": + url: "https://github.com/bfgroup/b2/releases/download/4.9.6/b2-4.9.6.tar.bz2" + sha256: "10c1344c751fcf5a1f9ec6f52c02626cfbf78a4806f7817949b115e107bbbc5f" + "4.10.0": + url: "https://github.com/bfgroup/b2/releases/download/4.10.0/b2-4.10.0.tar.bz2" + sha256: "aee0185473141d4acb56e39c78758b1016e66393ea5ca86ef29403bd9258f2e2" + "4.10.1": + url: "https://github.com/bfgroup/b2/releases/download/4.10.1/b2-4.10.1.tar.bz2" + sha256: "d0818276955c3351eac26e4aa1e61046cfded88773232d76f2833c93bb917633" + "5.0.0": + url: "https://github.com/bfgroup/b2/releases/download/5.0.0/b2-5.0.0.tar.bz2" + sha256: "1ef867f7d374345a948baca025ed277dadda05a68439aa383a06aceb9911f7d3" + "5.1.0": + url: "https://github.com/bfgroup/b2/releases/download/5.1.0/b2-5.1.0.tar.bz2" + sha256: "8429a2e7c9c4484f6a4bd7fb18743f0ea1dba41eb024479a9b23381bcb813623" + "5.2.0": + url: "https://github.com/bfgroup/b2/releases/download/5.2.0/b2-5.2.0.tar.bz2" + sha256: "c27adfb4e667d748bb7d3e18657938fa8bcf185b74a29bf091113299f532ed6d" + "5.2.1": + url: "https://github.com/bfgroup/b2/releases/download/5.2.1/b2-5.2.1.tar.bz2" + sha256: "6428edec31731aa479b4e7d8f83898831a0919352ec7d7f9874145abe165a578" diff --git a/packages/conan/recipes/b2/conanfile.py b/packages/conan/recipes/b2/conanfile.py new file mode 100644 index 00000000..6cefaf4c --- /dev/null +++ b/packages/conan/recipes/b2/conanfile.py @@ -0,0 +1,214 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/7abb9ee39e6009e3dbc45043307a1098246d4ad7/recipes/b2/portable/conanfile.py + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import chdir, copy, get +from conan.tools.layout import basic_layout + +from contextlib import contextmanager +import os +from io import StringIO + +required_conan_version = ">=1.47.0" + + +class B2Conan(ConanFile): + name = "b2" + homepage = "https://www.bfgroup.xyz/b2/" + description = "B2 makes it easy to build C++ projects, everywhere." + topics = ("installer", "builder", "build", "build-system") + license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + + settings = "os", "arch" + package_type = "application" + + ''' + * use_cxx_env: False, True + + Indicates if the build will use the CXX and + CXXFLAGS environment variables. The common use is to add additional flags + for building on specific platforms or for additional optimization options. + + * toolset: 'auto', 'cxx', 'cross-cxx', + 'acc', 'borland', 'clang', 'como', 'gcc-nocygwin', 'gcc', + 'intel-darwin', 'intel-linux', 'intel-win32', 'kcc', 'kylix', + 'mingw', 'mipspro', 'pathscale', 'pgi', 'qcc', 'sun', 'sunpro', + 'tru64cxx', 'vacpp', 'vc12', 'vc14', 'vc141', 'vc142', 'vc143' + + Specifies the toolset to use for building. The default of 'auto' detects + a usable compiler for building and should be preferred. The 'cxx' toolset + uses the 'CXX' and 'CXXFLAGS' solely for building. Using the 'cxx' + toolset will also turn on the 'use_cxx_env' option. And the 'cross-cxx' + toolset uses the 'BUILD_CXX' and 'BUILD_CXXFLAGS' vars. This frees the + 'CXX' and 'CXXFLAGS' variables for use in subprocesses. + ''' + options = { + 'use_cxx_env': [False, True], + 'toolset': [ + 'auto', 'cxx', 'cross-cxx', + 'acc', 'borland', 'clang', 'como', 'gcc-nocygwin', 'gcc', + 'intel-darwin', 'intel-linux', 'intel-win32', 'kcc', 'kylix', + 'mingw', 'mipspro', 'pathscale', 'pgi', 'qcc', 'sun', 'sunpro', + 'tru64cxx', 'vacpp', 'vc12', 'vc14', 'vc141', 'vc142', 'vc143', + ] + } + default_options = { + 'use_cxx_env': False, + 'toolset': 'auto' + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + del self.info.options.use_cxx_env + del self.info.options.toolset + + if self._is_macos_intel_or_arm(self.info.settings): + self.info.settings.arch = "x86_64,armv8" + + def validate_build(self): + if hasattr(self, "settings_build") and cross_building(self) and not self._is_macos_intel_or_arm(self.settings): + raise ConanInvalidConfiguration(f"{self.ref} recipe doesn't support cross-build yet") + + def validate(self): + if (self.options.toolset == 'cxx' or self.options.toolset == 'cross-cxx') and not self.options.use_cxx_env: + raise ConanInvalidConfiguration( + "Option toolset 'cxx' and 'cross-cxx' requires 'use_cxx_env=True'") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + @property + def _b2_dir(self): + return self.source_folder + + @property + def _b2_engine_dir(self): + return os.path.join(self._b2_dir, "src", "engine") + + @property + def _b2_output_dir(self): + return os.path.join(self.build_folder, "output") + + @property + def _pkg_bin_dir(self): + return os.path.join(self.package_folder, "bin") + + def _is_macos_intel_or_arm(self, settings): + return settings.os == "Macos" and settings.arch in ["x86_64", "armv8"] + + @contextmanager + def _bootstrap_env(self): + saved_env = dict(os.environ) + # Vcvars will change the directory after it runs in the situation when + # the user has previously run the VS command console inits. In that + # context it remembers the dir and resets it at each vcvars invocation. + os.environ.update({"VSCMD_START_DIR": os.getcwd()}) + if not self.options.use_cxx_env: + # To avoid using the CXX env vars we clear them out for the build. + os.environ.update({ + "CXX": "", + "CXXFLAGS": ""}) + try: + yield + finally: + os.environ.clear() + os.environ.update(saved_env) + + def _write_project_config(self, cxx): + with open(os.path.join(self.source_folder, "project-config.jam"), "w") as f: + f.write( + f"using {self.options.toolset} : : {cxx} ;\n" + ) + + def build(self): + # The order of the with:with: below is important. The first one changes + # the current dir. While the second does env changes that guarantees + # that dir doesn't change if/when vsvars runs to set the msvc compile + # env. + self.output.info("Build engine..") + command = "" + b2_toolset = self.options.toolset + use_windows_commands = os.name == 'nt' + if b2_toolset == 'auto': + if use_windows_commands: + # For windows auto detection it can evaluate to a msvc version + # that it's not aware of. Most likely because it's a future one + # that didn't exist when the build was written. This turns that + # into a generic msvc toolset build assuming it could work, + # since it's a better version. + with chdir(self, self._b2_engine_dir): + with self._bootstrap_env(): + buf = StringIO() + self.run('guess_toolset && set', buf) + guess_vars = map( + lambda x: x.strip(), buf.getvalue().split("\n")) + if "B2_TOOLSET=vcunk" in guess_vars: + b2_toolset = 'msvc' + for kv in guess_vars: + if kv.startswith("B2_TOOLSET_ROOT="): + b2_vcvars = os.path.join( + kv.split('=')[1].strip(), 'Auxiliary', 'Build', 'vcvars32.bat') + command += '"'+b2_vcvars+'" && ' + command += "build" if use_windows_commands else "./build.sh" + + cxxflags = "" + if self._is_macos_intel_or_arm(self.settings): + cxxflags += " -arch arm64 -arch x86_64" + + if self.options.use_cxx_env: + envvars = VirtualBuildEnv(self).vars() + + cxx_env = envvars.get("CXX") + if cxx_env: + command += f" --cxx={cxx_env}" + self._write_project_config(cxx_env) + + cxxflags_env = envvars.get("CXXFLAGS") + if cxxflags_env: + cxxflags = f"{cxxflags} {cxxflags_env}" + + if cxxflags: + command += f' --cxxflags="{cxxflags}"' + + if b2_toolset != 'auto': + command += " "+str(b2_toolset) + with chdir(self, self._b2_engine_dir): + with self._bootstrap_env(): + self.run(command) + + self.output.info("Install..") + command = os.path.join( + self._b2_engine_dir, "b2.exe" if use_windows_commands else "b2") + if b2_toolset not in ["auto", "cxx", "cross-cxx"]: + command += " toolset=" + str(b2_toolset) + full_command = \ + (f"{command} --ignore-site-config " + + f"--prefix={self._b2_output_dir} " + + "--abbreviate-paths " + + "install " + + "b2-install-layout=portable") + with chdir(self, self._b2_dir): + self.run(full_command) + + def package(self): + copy(self, "LICENSE.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + copy(self, "*.LICENSE", src=self._b2_engine_dir, dst=os.path.join(self.package_folder, "licenses", self.name)) + copy(self, "*b2", dst=self._pkg_bin_dir, src=self._b2_output_dir) + copy(self, "*b2.exe", dst=self._pkg_bin_dir, src=self._b2_output_dir) + copy(self, "*.jam", dst=self._pkg_bin_dir, src=self._b2_output_dir) + + def package_info(self): + self.cpp_info.includedirs = [] + self.cpp_info.libdirs = [] + + # TODO: to remove in conan v2 + self.env_info.PATH.append(self._pkg_bin_dir) diff --git a/packages/conan/recipes/b2/test_package/conanfile.py b/packages/conan/recipes/b2/test_package/conanfile.py new file mode 100644 index 00000000..5889c895 --- /dev/null +++ b/packages/conan/recipes/b2/test_package/conanfile.py @@ -0,0 +1,19 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/7abb9ee39e6009e3dbc45043307a1098246d4ad7/recipes/b2/portable/test_package/conanfile.py + +from conan import ConanFile + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "VirtualBuildEnv" + test_type = "explicit" + + def build_requirements(self): + self.tool_requires(self.tested_reference_str) + + def test(self): + self.run("b2 -v") diff --git a/packages/conan/recipes/blosc/conandata.yml b/packages/conan/recipes/blosc/conandata.yml index a47eb694..ddee2a32 100644 --- a/packages/conan/recipes/blosc/conandata.yml +++ b/packages/conan/recipes/blosc/conandata.yml @@ -1,4 +1,13 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/c-blosc/all/conandata.yml + sources: + "1.21.6": + url: "https://github.com/Blosc/c-blosc/archive/v1.21.6.tar.gz" + sha256: "9fcd60301aae28f97f1301b735f966cc19e7c49b6b4321b839b4579a0c156f38" "1.21.5": url: "https://github.com/Blosc/c-blosc/archive/v1.21.5.tar.gz" sha256: "32e61961bbf81ffea6ff30e9d70fca36c86178afd3e3cfa13376adec8c687509" @@ -30,6 +39,10 @@ sources: url: "https://github.com/Blosc/c-blosc/archive/v1.17.1.tar.gz" sha256: "19a6948b579c27e8ac440b4f077f99fc90e7292b1d9cb896bec0fd781d68fba2" patches: + "1.21.6": + - patch_file: "patches/cmake-dependencies-1.21.4+.patch" + patch_description: "use cci package" + patch_type: "conan" "1.21.5": - patch_file: "patches/cmake-dependencies-1.21.4+.patch" patch_description: "use cci package" diff --git a/packages/conan/recipes/blosc/conanfile.py b/packages/conan/recipes/blosc/conanfile.py index fff899fd..49ca46fe 100644 --- a/packages/conan/recipes/blosc/conanfile.py +++ b/packages/conan/recipes/blosc/conanfile.py @@ -1,16 +1,12 @@ # Copyright (c) Contributors to the conan-center-index Project. All rights reserved. # Copyright (c) Contributors to the aswf-docker Project. All rights reserved. # SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/c-blosc/all/conanfile.py from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import ( - apply_conandata_patches, - copy, - export_conandata_patches, - get, - rmdir, -) +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.microsoft import is_msvc from conan.tools.scm import Version import os @@ -23,7 +19,7 @@ class CbloscConan(ConanFile): description = "An extremely fast, multi-threaded, meta-compressor library." license = "BSD-3-Clause" topics = ("blosc", "compression") - url = "https://github.com/AcademySoftwareFoundation/aswf-docker" + url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/Blosc/c-blosc" package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -37,11 +33,11 @@ class CbloscConan(ConanFile): "with_zstd": [True, False], } default_options = { - "shared": True, + "shared": False, "fPIC": True, "simd_intrinsics": "sse2", "with_lz4": True, - "with_snappy": False, + "with_snappy": True, "with_zlib": True, "with_zstd": True, } @@ -63,20 +59,18 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") - # We want DSOs in lib64 + # ASWF: we want DSOs in lib64 self.cpp.package.libdirs = ["lib64"] def requirements(self): - # Use system installed instead - pass - # if self.options.with_lz4: - # self.requires("lz4/1.9.4") - # if self.options.with_snappy: - # self.requires("snappy/1.1.10") - # if self.options.with_zlib: - # self.requires("zlib/[>=1.2.11 <2]") - # if self.options.with_zstd: - # self.requires("zstd/1.5.5") + if self.options.with_lz4: + self.requires(f"lz4/1.10.0@{os.environ['ASWF_PKG_ORG']}/{os.environ['ASWF_CONAN_CHANNEL']}", transitive_libs=True) + if self.options.with_snappy: + self.requires(f"snappy/1.1.10@{os.environ['ASWF_PKG_ORG']}/{os.environ['ASWF_CONAN_CHANNEL']}", transitive_libs=True) + if self.options.with_zlib: + self.requires(f"zlib/[>=1.2.11 <2]@{os.environ['ASWF_PKG_ORG']}/{os.environ['ASWF_CONAN_CHANNEL']}", transitive_libs=True) + if self.options.with_zstd: + self.requires(f"zstd/1.5.6@{os.environ['ASWF_PKG_ORG']}/{os.environ['ASWF_CONAN_CHANNEL']}", transitive_libs=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -98,11 +92,11 @@ def generate(self): tc.variables["DEACTIVATE_ZLIB"] = not self.options.with_zlib tc.variables["DEACTIVATE_ZSTD"] = not self.options.with_zstd tc.variables["DEACTIVATE_SYMBOLS_CHECK"] = True - tc.variables["PREFER_EXTERNAL_LZ4"] = False + tc.variables["PREFER_EXTERNAL_LZ4"] = True if Version(self.version) < "1.19.0": tc.variables["PREFER_EXTERNAL_SNAPPY"] = True - tc.variables["PREFER_EXTERNAL_ZLIB"] = False - tc.variables["PREFER_EXTERNAL_ZSTD"] = False + tc.variables["PREFER_EXTERNAL_ZLIB"] = True + tc.variables["PREFER_EXTERNAL_ZSTD"] = True tc.variables["CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP"] = True # Generate a relocatable shared lib on Macos tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" @@ -122,38 +116,16 @@ def build(self): cmake.build() def package(self): - licenses = [ - "BLOSC.txt", - "BITSHUFFLE.txt", - "FASTLZ.txt", - "LZ4.txt", - "SNAPPY.txt", - "STDINT.txt", - "ZLIB-NG.txt", - "ZLIB.txt", - ] + licenses = [ "BLOSC.txt", "BITSHUFFLE.txt", "FASTLZ.txt" ] for license_file in licenses: - copy( - self, - license_file, - src=os.path.join(self.source_folder, "LICENSES"), - dst=os.path.join(self.package_folder, "licenses", self.name), - ) - copy( - self, - "LICENSE.txt", - src=self.source_folder, - dst=os.path.join(self.package_folder, "licenses", self.name), - ) + copy(self, license_file, src=os.path.join(self.source_folder, "LICENSES"), dst=os.path.join(self.package_folder, "licenses", self.name)) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) def package_info(self): + self.cpp_info.set_property("pkg_config_name", "blosc") prefix = "lib" if is_msvc(self) and not self.options.shared else "" self.cpp_info.libs = [f"{prefix}blosc"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.extend(["m", "pthread"]) - - def deploy(self): - self.copy("*", symlinks=True) diff --git a/packages/conan/recipes/blosc/test_package/CMakeLists.txt b/packages/conan/recipes/blosc/test_package/CMakeLists.txt index 31bb1319..61e34277 100644 --- a/packages/conan/recipes/blosc/test_package/CMakeLists.txt +++ b/packages/conan/recipes/blosc/test_package/CMakeLists.txt @@ -1,3 +1,9 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/c-blosc/all/test_package/CMakeLists.txt + cmake_minimum_required(VERSION 3.1) project(test_package LANGUAGES C) diff --git a/packages/conan/recipes/blosc/test_package/conanfile.py b/packages/conan/recipes/blosc/test_package/conanfile.py index 0a6bc687..44d2591e 100644 --- a/packages/conan/recipes/blosc/test_package/conanfile.py +++ b/packages/conan/recipes/blosc/test_package/conanfile.py @@ -1,3 +1,9 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/c-blosc/all/test_package/conanfile.py + from conan import ConanFile from conan.tools.build import can_run from conan.tools.cmake import CMake, cmake_layout diff --git a/packages/conan/recipes/blosc/test_package/test_package.c b/packages/conan/recipes/blosc/test_package/test_package.c index 9d87c11a..a02efb41 100644 --- a/packages/conan/recipes/blosc/test_package/test_package.c +++ b/packages/conan/recipes/blosc/test_package/test_package.c @@ -1,3 +1,10 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/c-blosc/all/test_package/test_package.c +*/ /* Copyright (C) 2014 Francesc Alted http://blosc.org diff --git a/packages/conan/recipes/boost/conandata.yml b/packages/conan/recipes/boost/conandata.yml index 49673633..89f97f31 100644 --- a/packages/conan/recipes/boost/conandata.yml +++ b/packages/conan/recipes/boost/conandata.yml @@ -1,20 +1,47 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/boost/all/conandata.yml + sources: - 1.66.0: - url: "https://boostorg.jfrog.io/artifactory/main/release/1.66.0/source/boost_1_66_0.tar.bz2" - sha256: "5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9" - 1.70.0: - url: "https://boostorg.jfrog.io/artifactory/main/release/1.70.0/source/boost_1_70_0.tar.bz2" - sha256: "430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778" - 1.73.0: - url: "https://boostorg.jfrog.io/artifactory/main/release/1.73.0/source/boost_1_73_0.tar.bz2" - sha256: "4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402" - 1.76.0: - url: "https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2" - sha256: "f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41" - 1.80.0: - url: "https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.bz2" - sha256: "1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0" - 1.82.0: + "1.87.0": + url: "https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.bz2" + sha256: "af57be25cb4c4f4b413ed692fe378affb4352ea50fbe294a11ef548f4d527d89" + "1.86.0": + url: "https://archives.boost.io/release/1.86.0/source/boost_1_86_0.tar.bz2" + sha256: "1bed88e40401b2cb7a1f76d4bab499e352fa4d0c5f31c0dbae64e24d34d7513b" + "1.85.0": + url: "https://archives.boost.io/release/1.85.0/source/boost_1_85_0.tar.bz2" + sha256: "7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617" + "1.82.0": url: "https://boostorg.jfrog.io/artifactory/main/release/1.82.0/source/boost_1_82_0.tar.bz2" sha256: "a6e1ab9b0860e6a2881dd7b21fe9f737a095e5f33a3a874afc6a345228597ee6" + "1.80.0": + url: "https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.bz2" + sha256: "1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0" + "1.76.0": + url: "https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2" + sha256: "f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41" + "1.73.0": + url: "https://boostorg.jfrog.io/artifactory/main/release/1.73.0/source/boost_1_73_0.tar.bz2" + sha256: "4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402" + "1.70.0": + url: "https://boostorg.jfrog.io/artifactory/main/release/1.70.0/source/boost_1_70_0.tar.bz2" + sha256: "430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778" + "1.66.0": + url: "https://boostorg.jfrog.io/artifactory/main/release/1.66.0/source/boost_1_66_0.tar.bz2" + sha256: "5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9" patches: + "1.86.0": + - patch_file: "patches/1.82.0-locale-iconv-library-option.patch" + patch_description: "Optional flag to specify iconv from either libc of libiconv" + patch_type: "conan" + "1.85.0": + - patch_file: "patches/1.82.0-locale-iconv-library-option.patch" + patch_description: "Optional flag to specify iconv from either libc of libiconv" + patch_type: "conan" + - patch_file: "patches/1.85.0-container-aliasing-violation-fix.patch" + patch_description: "Fix aliasing violation in boost::container" + patch_type: "official" + patch_source: "https://github.com/boostorg/container/commit/20ad12f20e661978e90dc7f36d8ab8ac05e5a5a9" diff --git a/packages/conan/recipes/boost/conanfile.py b/packages/conan/recipes/boost/conanfile.py index 31b8802b..0ec06ee0 100644 --- a/packages/conan/recipes/boost/conanfile.py +++ b/packages/conan/recipes/boost/conanfile.py @@ -1,26 +1,44 @@ # Copyright (c) Contributors to the conan-center-index Project. All rights reserved. # Copyright (c) Contributors to the aswf-docker Project. All rights reserved. # SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/cceee569179c10fa56d1fd9c3582f3371944ba59/recipes/boost/all/conanfile.py -from conans import AutoToolsBuildEnvironment, ConanFile, tools -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.layout import basic_layout -from contextlib import contextmanager +from conan import ConanFile +from conan.errors import ConanException, ConanInvalidConfiguration +from conan.tools.apple import is_apple_os, to_apple_arch, XCRun +from conan.tools.build import build_jobs, cross_building, valid_min_cppstd, supported_cppstd +from conan.tools.env import VirtualBuildEnv from conan.tools.files import ( - apply_conandata_patches, - collect_libs, - copy, - export_conandata_patches, - get, - rmdir, + apply_conandata_patches, chdir, collect_libs, copy, export_conandata_patches, + get, mkdir, rename, replace_in_file, rm, rmdir, save ) +from conan.tools.gnu import AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime, MSBuildToolchain, msvc_runtime_flag, VCVars +from conan.tools.scm import Version + +import glob +from io import StringIO import os +import re +import shlex +import shutil +import sys +import yaml +required_conan_version = ">=1.53.0" + +# When adding (or removing) an option, also add this option to the list in +# `rebuild-dependencies.yml` and re-run that script. CONFIGURE_OPTIONS = ( "atomic", + "charconv", "chrono", + "cobalt", "container", "context", + "contract", "coroutine", "date_time", "exception", @@ -29,10 +47,13 @@ "graph", "graph_parallel", "iostreams", + "json", "locale", "log", "math", "mpi", + "nowide", + "process", "program_options", "python", "random", @@ -44,124 +65,1705 @@ "thread", "timer", "type_erasure", + "url", "wave", ) class BoostConan(ConanFile): name = "boost" - settings = ( - "os", - "arch", - "compiler", - "build_type", - "python", - ) description = "Boost provides free peer-reviewed portable C++ source libraries" - url = "https://github.com/AcademySoftwareFoundation/aswf-docker" + url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.boost.org" license = "BSL-1.0" - topics = "conan", "boost", "libraries", "cpp", "" - generators = "pkg_config" + topics = ("libraries", "cpp") - options = {} - options.update( - {"without_{}".format(_name): [True, False] for _name in CONFIGURE_OPTIONS} - ) + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "header_only": [True, False], + "error_code_header_only": [True, False], + "system_no_deprecated": [True, False], + "asio_no_deprecated": [True, False], + "filesystem_no_deprecated": [True, False], + "filesystem_use_std_fs": [True, False], + "filesystem_version": [None, "3", "4"], + "layout": ["system", "versioned", "tagged"], + "magic_autolink": [True, False], # enables BOOST_ALL_NO_LIB + "diagnostic_definitions": [True, False], # enables BOOST_LIB_DIAGNOSTIC + "python_executable": [None, "ANY"], # system default python installation is used, if None + "python_version": [None, "ANY"], # major.minor; computed automatically, if None + "namespace": ["ANY"], # custom boost namespace for bcp, e.g. myboost + "namespace_alias": [True, False], # enable namespace alias for bcp, boost=myboost + "multithreading": [True, False], # enables multithreading support + "numa": [True, False], + "zlib": [True, False], + "bzip2": [True, False], + "lzma": [True, False], + "zstd": [True, False], + "segmented_stacks": [True, False], + "debug_level": list(range(0, 14)), + "pch": [True, False], + "extra_b2_flags": [None, "ANY"], # custom b2 flags + "i18n_backend": ["iconv", "icu", None, "deprecated"], + "i18n_backend_iconv": ["libc", "libiconv", "off"], + "i18n_backend_icu": [True, False], + "visibility": ["global", "protected", "hidden"], + "addr2line_location": ["ANY"], + "with_stacktrace_backtrace": [True, False], + "buildid": [None, "ANY"], + "python_buildid": [None, "ANY"], + "system_use_utf8": [True, False], + } + options.update({f"without_{_name}": [True, False] for _name in CONFIGURE_OPTIONS}) - default_options = {} - default_options.update( - {"without_{}".format(_name): False for _name in CONFIGURE_OPTIONS} - ) + default_options = { + "shared": False, + "fPIC": True, + "header_only": False, + "error_code_header_only": False, + "system_no_deprecated": False, + "asio_no_deprecated": False, + "filesystem_no_deprecated": False, + "filesystem_use_std_fs": False, + "filesystem_version": None, + "layout": "system", + "magic_autolink": False, + "diagnostic_definitions": False, + "python_executable": None, + "python_version": None, + "namespace": "boost", + "namespace_alias": False, + "multithreading": True, + "numa": True, + "zlib": True, + "bzip2": True, + "lzma": False, + "zstd": False, + "segmented_stacks": False, + "debug_level": 0, + "pch": True, + "extra_b2_flags": None, + "i18n_backend": "deprecated", + "i18n_backend_iconv": "libc", + "i18n_backend_icu": False, + "visibility": "hidden", + "addr2line_location": "/usr/bin/addr2line", + "with_stacktrace_backtrace": True, + "buildid": None, + "python_buildid": None, + "system_use_utf8": False, + } + default_options.update({f"without_{_name}": False for _name in CONFIGURE_OPTIONS}) + # ASWF: we want BoostPython + # default_options.update({f"without_{_name}": True for _name in ("graph_parallel", "mpi", "python")}) + default_options.update({f"without_{_name}": True for _name in ("graph_parallel", "mpi")}) + default_options.update({"without_python": False}) - generators = "cmake" + short_paths = True + no_copy_source = True + _cached_dependencies = None - def _with_component(self, comp): - return not self.options.get_safe(f"without_{comp}", False) - - def requirements(self): - if self._with_component("python"): - self.requires( - f"python/{os.environ['ASWF_PYTHON_VERSION']}@{self.user}/{self.channel}" - ) + def export(self): + copy(self, f"dependencies/{self._dependency_filename}", src=self.recipe_folder, dst=self.export_folder) def export_sources(self): export_conandata_patches(self) + def _cppstd_flag(self, compiler_cppstd=None): + """Return the flag for the given C++ standard and compiler""" + # TODO: Replace it by Conan tool when available: https://github.com/conan-io/conan/issues/12603 + compiler = self.settings.get_safe("compiler") + compiler_version = self.settings.get_safe("compiler.version") + cppstd = self.settings.get_safe("compiler.cppstd") or compiler_cppstd + if not compiler or not compiler_version or not cppstd: + return "" + + def _cppstd_gcc(gcc_version, cppstd): + """Return the flag for the given C++ standard and GCC version""" + cppstd_flags = {} + cppstd_flags.setdefault("98", "98" if gcc_version >= "3.4" else None) + cppstd_flags.setdefault("11", "11" if gcc_version >= "4.7" else "0x" if gcc_version >= "4.3" else None) + cppstd_flags.setdefault("14", "14" if gcc_version >= "4.9" else "1y" if gcc_version >= "4.8" else None) + cppstd_flags.setdefault("17", "17" if gcc_version >= "5.2" else "1z" if gcc_version >= "5" else None) + cppstd_flags.setdefault("20", "2a" if gcc_version >= "8" else "20" if gcc_version >= "12" else None) + cppstd_flags.setdefault("23", "2b" if gcc_version >= "11" else None) + return cppstd_flags.get(cppstd.lstrip("gnu")) + + def _cppstd_clang(clang_version, cppstd): + """Return the flag for the given C++ standard and Clang version""" + cppstd_flags = {} + cppstd_flags.setdefault("98", "98" if clang_version >= "2.1" else None) + cppstd_flags.setdefault("11", "11" if clang_version >= "3.1" else "0x" if clang_version >= "2.1" else None) + cppstd_flags.setdefault("14", "14" if clang_version >= "3.5" else "1y" if clang_version >= "3.4" else None) + cppstd_flags.setdefault("17", "17" if clang_version >= "5" else "1z" if clang_version >= "3.5" else None) + cppstd_flags.setdefault("20", "2a" if clang_version >= "6" else "20" if clang_version >= "12" else None) + cppstd_flags.setdefault("23", "2b" if clang_version >= "13" else "23" if clang_version >= "17" else None) + return cppstd_flags.get(cppstd.lstrip("gnu")) + + + def _cppstd_apple_clang(clang_version, cppstd): + """Return the flag for the given C++ standard and Apple Clang version""" + cppstd_flags = {} + cppstd_flags.setdefault("98", "98" if clang_version >= "4.0" else None) + cppstd_flags.setdefault("11", "11" if clang_version >= "4.0" else None) + cppstd_flags.setdefault("14", "14" if clang_version >= "6.1" else "1y" if clang_version >= "5.1" else None) + cppstd_flags.setdefault("17", "17" if clang_version >= "9.1" else "1z" if clang_version >= "6.1" else None) + cppstd_flags.setdefault("20", "20" if clang_version >= "13.0" else "2a" if clang_version >= "10.0" else None) + cppstd_flags.setdefault("23", "2b" if clang_version >= "13.0" else None) + return cppstd_flags.get(cppstd.lstrip("gnu")) + + def _cppstd_msvc(visual_version, cppstd): + """Return the flag for the given C++ standard and MSVC version""" + cppstd_flags = {} + cppstd_flags.setdefault("98", "98") + cppstd_flags.setdefault("11", "11") + cppstd_flags.setdefault("14", "14" if visual_version >= "190" else None) + cppstd_flags.setdefault("17", "17" if visual_version >= "191" else "latest" if visual_version >= "190" else None) + cppstd_flags.setdefault("20", "20" if visual_version >= "192" else "latest" if visual_version >= "191" else None) + cppstd_flags.setdefault("23", "latest" if visual_version >= "193" else None) + return cppstd_flags.get(cppstd) + + func = {"gcc": _cppstd_gcc, "clang": _cppstd_clang, "apple-clang": _cppstd_apple_clang, "msvc": _cppstd_msvc}.get(compiler) + flag = cppstd + if func: + flag = func(Version(compiler_version), str(cppstd)) + return flag + + @property + def _min_compiler_version_default_cxx11(self): + """ Minimum compiler version having c++ standard >= 11 + """ + return { + "gcc": 6, + "clang": 6, + "apple-clang": 99, # still uses C++98 by default. XCode does not reflect apple-clang + "Visual Studio": 14, # guess + "msvc": 190, # guess + }.get(str(self.settings.compiler)) + + @property + def _min_compiler_version_default_cxx14(self): + """ Minimum compiler version having c++ standard >= 14 + https://gcc.gnu.org/gcc-6/changes.html + https://releases.llvm.org/6.0.0/tools/clang/docs/ReleaseNotes.html#id9 + https://learn.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=msvc-150#remarks + """ + return { + "gcc": 6, + "clang": 6, + "apple-clang": 99, # still uses C++98 by default. XCode does not reflect apple-clang + "Visual Studio": 15, # guess + "msvc": 191, # guess + }.get(str(self.settings.compiler)) + + @property + def _min_compiler_version_default_cxx20(self): + return { + "gcc": 99, + "clang": 99, + "apple-clang": 99, + "Visual Studio": 99, + "msvc": 999, + }.get(str(self.settings.compiler)) + + @property + def _has_cppstd_11_supported(self): + cppstd = self.settings.compiler.get_safe("cppstd") + if cppstd: + return valid_min_cppstd(self, 11) + compiler_version = self._min_compiler_version_default_cxx11 + if compiler_version: + return (Version(self.settings.compiler.version) >= compiler_version) or "11" in supported_cppstd(self) + + @property + def _has_cppstd_14_supported(self): + cppstd = self.settings.compiler.get_safe("cppstd") + if cppstd: + return valid_min_cppstd(self, 14) + required_compiler_version = self._min_compiler_version_default_cxx14 + if required_compiler_version: + msvc_versions = {14: 190, 15: 191, 16: 192, 17: 193} + compiler_version = Version(self.settings.compiler.version) + is_visual_studio = str(self.settings.compiler) == "Visual Studio" + # supported_cppstd only supports msvc, but not Visual Studio as compiler + supported_cxx14 = "14" in supported_cppstd(self, "msvc", msvc_versions.get(compiler_version)) if is_visual_studio else "14" in supported_cppstd(self) + # supported_cppstd: lists GCC 5 due partial support for C++14, but not enough for Boost + return (compiler_version >= required_compiler_version) and supported_cxx14 + + @property + def _has_cppstd_20_supported(self): + cppstd = self.settings.compiler.get_safe("cppstd") + if cppstd: + return valid_min_cppstd(self, 20) + required_compiler_version = self._min_compiler_version_default_cxx20 + if required_compiler_version: + msvc_versions = {14: 190, 15: 191, 16: 192, 17: 193} + compiler_version = Version(self.settings.compiler.version) + is_visual_studio = str(self.settings.compiler) == "Visual Studio" + # supported_cppstd only supports msvc, but not Visual Studio as compiler + supported_cxx20 = "20" in supported_cppstd(self, "msvc", msvc_versions.get(compiler_version)) if is_visual_studio else "20" in supported_cppstd(self) + # We still dont have a compiler using C++20 by default + return (compiler_version >= required_compiler_version) or supported_cxx20 + + @property + def _has_coroutine_supported(self): + cppstd = self.settings.compiler.get_safe("cppstd") + cppstd_20_supported = True + if cppstd: + cppstd_20_supported = valid_min_cppstd(self, 20) + # https://en.cppreference.com/w/cpp/compiler_support#cpp20 + # https://releases.llvm.org/14.0.0/tools/clang/docs/ReleaseNotes.html#clang-format: before is experimental header + # https://gcc.gnu.org/gcc-10/changes.html: requires -fcoroutines + min_compiler_versions = { + "apple-clang": "12", + "clang": "14", + "gcc": "10", + "msvc": "192", + "Visual Studio": "16",} + required_compiler_version = min_compiler_versions.get(str(self.settings.compiler)) + if not required_compiler_version: + return cppstd_20_supported + return cppstd_20_supported and Version(self.settings.compiler.version) >= required_compiler_version + + @property + def _min_compiler_version_nowide(self): + # Nowide needs c++11 + swappable std::fstream + return { + "gcc": 4.8, + "clang": 5, + "Visual Studio": 14, # guess + "msvc": 190, # guess + }.get(str(self.settings.compiler)) + + @property + def _dependency_filename(self): + return f"dependencies-{self.version}.yml" + + @property + def _dependencies(self): + if self._cached_dependencies is None: + dependencies_filepath = os.path.join(self.recipe_folder, "dependencies", self._dependency_filename) + if not os.path.isfile(dependencies_filepath): + raise ConanException(f"Cannot find {dependencies_filepath}") + with open(dependencies_filepath, encoding='utf-8') as f: + self._cached_dependencies = yaml.safe_load(f) + return self._cached_dependencies + + def _all_dependent_modules(self, name): + dependencies = {name} + while True: + new_dependencies = set() + for dependency in dependencies: + new_dependencies.update(set(self._dependencies["dependencies"][dependency])) + new_dependencies.update(dependencies) + if len(new_dependencies) > len(dependencies): + dependencies = new_dependencies + else: + break + return dependencies + + def _all_super_modules(self, name): + dependencies = {name} + while True: + new_dependencies = set(dependencies) + for module in self._dependencies["dependencies"]: + if dependencies.intersection(set(self._dependencies["dependencies"][module])): + new_dependencies.add(module) + if len(new_dependencies) > len(dependencies): + dependencies = new_dependencies + else: + break + return dependencies + + @property + def _bcp_dir(self): + return "custom-boost" + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + @property + def _is_clang_cl(self): + return self.settings.os == "Windows" and self.settings.compiler == "clang" + + @property + def _python_executable(self): + """ + obtain full path to the python interpreter executable + :return: path to the python interpreter executable, either set by option, or system default + """ + # ASWF: eventually we want our own Python, but we don't know where it lives until + # requirements() has been called. Until then we just use the system puthon. + # exe = self.options.python_executable if self.options.python_executable else sys.executable + exe = self.options.python_executable if self.options.python_executable else "python" + return str(exe).replace("\\", "/") + + @property + def _is_windows_platform(self): + return self.settings.os in ["Windows", "WindowsStore", "WindowsCE"] + + @property + def _is_apple_embedded_platform(self): + return self.settings.os in ["iOS", "watchOS", "tvOS"] + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + # Test whether all config_options from the yml are available in CONFIGURE_OPTIONS + for opt_name in self._configure_options: + if f"without_{opt_name}" not in self.options: + raise ConanException(f"{self._dependency_filename} has the configure options {opt_name} which is not available in conanfile.py") + + # stacktrace_backtrace not supported on Windows + if self.settings.os == "Windows": + del self.options.with_stacktrace_backtrace + + # nowide requires a c++11-able compiler + movable std::fstream: change default to not build on compiler with too old default c++ standard or too low compiler.cppstd + # json requires a c++11-able compiler: change default to not build on compiler with too old default c++ standard or too low compiler.cppstd + if self.settings.compiler.get_safe("cppstd"): + if not valid_min_cppstd(self, 11): + self.options.without_fiber = True + self.options.without_nowide = True + self.options.without_json = True + self.options.without_url = True + else: + version_cxx11_standard_json = self._min_compiler_version_default_cxx11 + if version_cxx11_standard_json: + if not self._has_cppstd_11_supported: + self.options.without_fiber = True + self.options.without_json = True + self.options.without_nowide = True + self.options.without_url = True + else: + self.options.without_fiber = True + self.options.without_json = True + self.options.without_nowide = True + self.options.without_url = True + if Version(self.version) >= "1.85.0" and not self._has_cppstd_14_supported: + self.options.without_math = True + if Version(self.version) >= "1.86.0" and not self._has_cppstd_14_supported: + self.options.without_graph = True + + # iconv is off by default on Windows and Solaris + if self._is_windows_platform or self.settings.os == "SunOS": + self.options.i18n_backend_iconv = "off" + elif is_apple_os(self): + self.options.i18n_backend_iconv = "libiconv" + elif self.settings.os == "Android": + # bionic provides iconv since API level 28 + api_level = self.settings.get_safe("os.api_level") + if api_level and Version(api_level) < "28": + self.options.i18n_backend_iconv = "libiconv" + + # Remove options not supported by this version of boost + for dep_name in CONFIGURE_OPTIONS: + if dep_name not in self._configure_options: + delattr(self.options, f"without_{dep_name}") + + def disable_math(): + super_modules = self._all_super_modules("math") + for smod in super_modules: + try: + setattr(self.options, f"without_{smod}", True) + except ConanException: + pass + + def disable_graph(): + super_modules = self._all_super_modules("graph") + for smod in super_modules: + try: + setattr(self.options, f"without_{smod}", True) + except ConanException: + pass + + # Starting from 1.76.0, Boost.Math requires a c++11 capable compiler + # ==> disable it by default for older compilers or c++ standards + if self.settings.compiler.get_safe("cppstd"): + if not valid_min_cppstd(self, 11): + disable_math() + else: + min_compiler_version = self._min_compiler_version_default_cxx11 + if min_compiler_version is None: + self.output.warning("Assuming the compiler supports c++11 by default") + elif not self._has_cppstd_11_supported: + disable_math() + # Boost.Math is not built when the compiler is GCC < 5 and uses C++11 + elif self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5": + disable_math() + + if Version(self.version) >= "1.79.0": + # Starting from 1.79.0, Boost.Wave requires a c++11 capable compiler + # ==> disable it by default for older compilers or c++ standards + + def disable_wave(): + super_modules = self._all_super_modules("wave") + for smod in super_modules: + try: + setattr(self.options, f"without_{smod}", True) + except ConanException: + pass + + if self.settings.compiler.get_safe("cppstd"): + if not valid_min_cppstd(self, 11): + disable_wave() + else: + min_compiler_version = self._min_compiler_version_default_cxx11 + if min_compiler_version is None: + self.output.warning("Assuming the compiler supports c++11 by default") + elif not self._has_cppstd_11_supported: + disable_wave() + # Boost.Wave is not built when the compiler is GCC < 5 and uses C++11 + elif self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5": + disable_wave() + + if Version(self.version) >= "1.81.0": + # Starting from 1.81.0, Boost.Locale requires a c++11 capable compiler + # ==> disable it by default for older compilers or c++ standards + + def disable_locale(): + super_modules = self._all_super_modules("locale") + for smod in super_modules: + try: + setattr(self.options, f"without_{smod}", True) + except ConanException: + pass + + if self.settings.compiler.get_safe("cppstd"): + if not valid_min_cppstd(self, 11): + disable_locale() + else: + min_compiler_version = self._min_compiler_version_default_cxx11 + if min_compiler_version is None: + self.output.warning("Assuming the compiler supports c++11 by default") + elif not self._has_cppstd_11_supported: + disable_locale() + # Boost.Locale is not built when the compiler is GCC < 5 and uses C++11 + elif self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5": + disable_locale() + + if Version(self.version) >= "1.84.0": + # Starting from 1.84.0, Boost.Cobalt requires a c++20 capable compiler + # ==> disable it by default for older compilers or c++ standards + + def disable_cobalt(): + super_modules = self._all_super_modules("cobalt") + for smod in super_modules: + try: + setattr(self.options, f"without_{smod}", True) + except ConanException: + pass + + if not self._has_coroutine_supported: + disable_cobalt() + elif self.settings.compiler.get_safe("cppstd"): + if not valid_min_cppstd(self, 20): + disable_cobalt() + else: + min_compiler_version = self._min_compiler_version_default_cxx20 + if min_compiler_version is None: + self.output.warning("Assuming the compiler supports c++20 by default") + elif Version(self.settings.compiler.version) < min_compiler_version: + disable_cobalt() + + # FIXME: Compilation errors on msvc shared build for boost.fiber https://github.com/boostorg/fiber/issues/314 + if is_msvc(self): + self.options.without_fiber = True + + if Version(self.version) >= "1.85.0": + # Starting from 1.85.0, Boost.Math requires a c++14 capable compiler + # https://github.com/boostorg/math/blob/boost-1.85.0/README.md + # ==> disable it by default for older compilers or c++ standards + if self.settings.compiler.get_safe("cppstd"): + if not valid_min_cppstd(self, 14): + disable_math() + else: + min_compiler_version = self._min_compiler_version_default_cxx14 + if min_compiler_version is None: + self.output.warning("Assuming the compiler supports c++14 by default") + elif not self._has_cppstd_14_supported: + disable_math() + + if Version(self.version) >= "1.86.0": + # Boost 1.86.0 updated more components that require C++14 and C++17 + # https://www.boost.org/users/history/version_1_86_0.html + if self.settings.compiler.get_safe("cppstd"): + if not valid_min_cppstd(self, 14): + disable_graph() + else: + min_compiler_version = self._min_compiler_version_default_cxx14 + if min_compiler_version is None: + self.output.warning("Assuming the compiler supports c++14 by default") + elif not self._has_cppstd_14_supported: + disable_graph() + + if self.settings.os == "iOS": + # the process library doesn't build (and doesn't even make sense) on iOS + self.options.without_process = True + + # TODO: Revisit on Boost 1.87.0 + # It's not possible to disable process only when having shared parsed already. + # https://github.com/boostorg/process/issues/408 + # https://github.com/boostorg/process/pull/409 + if Version(self.version) == "1.86.0" and is_msvc(self): + setattr(self.options, "without_process", True) + + @property + def _configure_options(self): + return self._dependencies["configure_options"] + + @property + def _fPIC(self): + return self.options.get_safe("fPIC", self.default_options["fPIC"]) + + @property + def _shared(self): + return self.options.get_safe("shared", self.default_options["shared"]) + + @property + def _stacktrace_addr2line_available(self): + if (self._is_apple_embedded_platform or self.settings.get_safe("os.subsystem") == "catalyst"): + # sandboxed environment - cannot launch external processes (like addr2line), system() function is forbidden + return False + return not self.options.header_only and not self.options.without_stacktrace and self.settings.os != "Windows" + + @property + def _stacktrace_from_exception_available(self): + if Version(self.version) == "1.85.0": + # https://github.com/boostorg/stacktrace/blob/boost-1.85.0/build/Jamfile.v2#L143 + return not self.options.header_only and not self.options.without_stacktrace and self.settings.os != "Windows" + elif Version(self.version) >= "1.86.0": + # https://github.com/boostorg/stacktrace/blob/boost-1.86.0/build/Jamfile.v2#L148 + return not self.options.header_only and not self.options.without_stacktrace and self._b2_architecture == "x86" + + def configure(self): + if self.options.header_only: + self.options.rm_safe("shared") + self.options.rm_safe("fPIC") + elif self.options.shared: + self.options.rm_safe("fPIC") + + if self.options.i18n_backend != "deprecated": + self.output.warning("i18n_backend option is deprecated, do not use anymore.") + if self.options.i18n_backend == "iconv": + self.options.i18n_backend_iconv = "libiconv" + self.options.i18n_backend_icu = False + if self.options.i18n_backend == "icu": + self.options.i18n_backend_iconv = "off" + self.options.i18n_backend_icu = True + if self.options.i18n_backend == "None": + self.options.i18n_backend_iconv = "off" + self.options.i18n_backend_icu = False + if self.options.without_locale: + self.options.rm_safe("i18n_backend_iconv") + self.options.rm_safe("i18n_backend_icu") + + if not self.options.without_python: + if not self.options.python_version: + self.options.python_version = self._detect_python_version() + # ASWF: always query dynamically since it will change + # self.options.python_executable = self._python_executable + else: + self.options.rm_safe("python_buildid") + + if not self._stacktrace_addr2line_available: + self.options.rm_safe("addr2line_location") + + if self.options.get_safe("without_stacktrace", True): + self.options.rm_safe("with_stacktrace_backtrace") + + if self.options.without_fiber: + self.options.rm_safe("numa") + + # Use verbosity from [conf] if specified + verbosity = self.conf.get("tools.build:verbosity", default="quiet") + if verbosity == "verbose" and int(self.options.debug_level) < 2: + self.options.debug_level.value = 2 + def layout(self): basic_layout(self, src_folder="src") - # We want DSOs in lib64 + # ASWF: We want DSOs in lib64 self.cpp.package.libdirs = ["lib64"] - def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) + @property + def _cxx11_boost_libraries(self): + libraries = ["fiber", "json", "nowide", "url"] + libraries.append("math") + if Version(self.version) >= "1.79.0": + libraries.append("wave") + if Version(self.version) >= "1.81.0": + libraries.append("locale") + if Version(self.version) >= "1.84.0": + libraries.append("atomic") + libraries.append("filesystem") + libraries.append("log") + libraries.append("random") + libraries.append("stacktrace") + libraries.append("test") + libraries.append("thread") + if Version(self.version) >= "1.85.0": + libraries.append("system") + libraries.sort() + return list(filter(lambda library: f"without_{library}" in self.options, libraries)) + + @property + def _cxx14_boost_libraries(self): + libraries = [] + if Version(self.version) >= "1.85.0": + # https://github.com/boostorg/math/blob/develop/README.md#boost-math-library + libraries.append("math") + libraries.sort() + return list(filter(lambda library: f"without_{library}" in self.options, libraries)) + + @property + def _cxx20_boost_libraries(self): + libraries = [] + if Version(self.version) >= "1.84.0": + # https://github.com/boostorg/cobalt/blob/boost-1.84.0/build/Jamfile#L54 + libraries.append("cobalt") + libraries.sort() + return list(filter(lambda library: f"without_{library}" in self.options, libraries)) + + def validate(self): + if not self.options.multithreading: + # * For the reason 'thread' is deactivate look at https://stackoverflow.com/a/20991533 + # Look also on the comments of the answer for more details + # * Although the 'context' and 'atomic' library does not mention anything about threading, + # when being build the compiler uses the -pthread flag, which makes it quite dangerous + for lib in ["locale", "coroutine", "wave", "type_erasure", "fiber", "thread", "context", "atomic"]: + if not self.options.get_safe(f"without_{lib}"): + raise ConanInvalidConfiguration(f"Boost '{lib}' library requires multi threading") + + if is_msvc(self) and self._shared and is_msvc_static_runtime(self): + raise ConanInvalidConfiguration("Boost can not be built as shared library with MT runtime.") + + # FIXME: In 1.84.0, there are compilation errors on msvc shared build for boost.fiber. https://github.com/boostorg/fiber/issues/314 + if Version(self.version) >= "1.84.0" and is_msvc(self) and self._shared and not self.options.without_fiber: + raise ConanInvalidConfiguration("Boost.fiber can not be built as shared library on MSVC.") + + if not self.options.without_locale and self.options.i18n_backend_iconv == "off" and \ + not self.options.i18n_backend_icu and not self._is_windows_platform: + raise ConanInvalidConfiguration( + "Boost.Locale library needs either iconv or ICU library to be built on non windows platforms" + ) + + if self._stacktrace_addr2line_available: + if not os.path.isabs(str(self.options.addr2line_location)): + raise ConanInvalidConfiguration("addr2line_location must be an absolute path to addr2line") + + # Check, when a boost module is enabled, whether the boost modules it depends on are enabled as well. + for mod_name, mod_deps in self._dependencies["dependencies"].items(): + if not self.options.get_safe(f"without_{mod_name}", True): + for mod_dep in mod_deps: + if self.options.get_safe(f"without_{mod_dep}", False): + raise ConanInvalidConfiguration(f"{mod_name} requires {mod_deps}: {mod_dep} is disabled") + + if not self.options.get_safe("without_nowide", True): + # nowide require a c++11-able compiler with movable std::fstream + mincompiler_version = self._min_compiler_version_nowide + if mincompiler_version and Version(self.settings.compiler.version) < mincompiler_version: + raise ConanInvalidConfiguration("This compiler is too old to build Boost.nowide.") + + for cxx_standard, boost_libraries, has_cppstd_supported in [ + (11, self._cxx11_boost_libraries, self._has_cppstd_11_supported), + (14, self._cxx14_boost_libraries, self._has_cppstd_14_supported), + (20, self._cxx20_boost_libraries, self._has_cppstd_20_supported)]: + if any([not self.options.get_safe(f"without_{library}", True) for library in boost_libraries]): + if (self.settings.compiler.get_safe("cppstd") and not valid_min_cppstd(self, cxx_standard)) or \ + not has_cppstd_supported: + raise ConanInvalidConfiguration( + f"Boost libraries {', '.join(boost_libraries)} requires a C++{cxx_standard} compiler. " + "Please, set compiler.cppstd or use a newer compiler version or disable from building." + ) + if not self.options.get_safe("without_cobalt", True) and not self._has_coroutine_supported: + raise ConanInvalidConfiguration("Boost.Cobalt requires a C++20 capable compiler. " + "Please, set compiler.cppstd and use a newer compiler version, or disable from building.") + + # TODO: Revisit on Boost 1.87.0. Remove in case Process is fixed. + if Version(self.version) == "1.86.0" and is_msvc(self) and self.options.get_safe("shared") and self.options.get_safe("without_process", None) == False: + raise ConanInvalidConfiguration(f"{self.ref} Boost.Process will fail to be consumed as shared library on MSVC. See https://github.com/boostorg/process/issues/408.") + + def _with_dependency(self, dependency): + """ + Return true when dependency is required according to the dependencies-x.y.z.yml file + """ + for name, reqs in self._dependencies["requirements"].items(): + if dependency in reqs: + if not self.options.get_safe(f"without_{name}", True): + return True + return False + + @property + def _with_zlib(self): + return not self.options.header_only and self._with_dependency("zlib") and self.options.zlib + + @property + def _with_bzip2(self): + return not self.options.header_only and self._with_dependency("bzip2") and self.options.bzip2 + + @property + def _with_lzma(self): + return not self.options.header_only and self._with_dependency("lzma") and self.options.lzma + + @property + def _with_zstd(self): + return not self.options.header_only and self._with_dependency("zstd") and self.options.zstd + + @property + def _with_icu(self): + return not self.options.header_only and self._with_dependency("icu") and self.options.get_safe("i18n_backend_icu") + + @property + def _with_iconv(self): + return not self.options.header_only and self._with_dependency("iconv") and self.options.get_safe("i18n_backend_iconv") == "libiconv" + + @property + def _with_stacktrace_backtrace(self): + return not self.options.header_only and self.options.get_safe("with_stacktrace_backtrace", False) + + def requirements(self): + if self._with_zlib: + self.requires("zlib/[>=1.2.11 <2]") + if self._with_bzip2: + self.requires("bzip2/1.0.8") + if self._with_lzma: + self.requires("xz_utils/[>=5.4.5 <6]") + if self._with_zstd: + self.requires("zstd/[>=1.5 <1.6]") + if self._with_stacktrace_backtrace: + self.requires("libbacktrace/cci.20210118", transitive_headers=True, transitive_libs=True) + + if self._with_icu: + self.requires("icu/74.2") + if self._with_iconv: + self.requires("libiconv/1.17") + + # ASWF: make sure to pick up our own Python + if not self.options.without_python: + self.requires(f"cpython/{os.environ['ASWF_CPYTHON_VERSION']}@{self.user}/{self.channel}", transitive_headers=True, transitive_libs=True) + + def package_id(self): + del self.info.options.i18n_backend + + if self.info.options.header_only: + self.info.clear() + else: + del self.info.options.debug_level + del self.info.options.filesystem_version + del self.info.options.pch + del self.info.options.python_executable # PATH to the interpreter is not important, only version matters + if self.info.options.without_python: + del self.info.options.python_version + + def build_requirements(self): + if not self.options.header_only: + self.tool_requires("b2/[>=5.2 <6]") - def _patch_sources(self): + def source(self): + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder, strip_root=True) apply_conandata_patches(self) + def generate(self): + if not self.options.header_only: + # ASWF: only in validate() has the dependency graph been computed and packages installed + # allowing access to full path of our own python interpreter + pythonInfo = self.dependencies["cpython"] + exe = os.path.join(pythonInfo.package_folder, pythonInfo.cpp_info.bindirs[0], "python") + self.options.python_executable = exe + + env = VirtualBuildEnv(self) + env.generate() + vc = VCVars(self) + vc.generate() + + ##################### BUILDING METHODS ########################### + + def _run_python_script(self, script): + """ + execute python one-liner script and return its output + :param script: string containing python script to be executed + :return: output of the python script execution, or None, if script has failed + """ + output = StringIO() + command = f'"{self._python_executable}" -c "{script}"' + self.output.info(f"running {command}") + try: + self.run(command, output, scope="run") + except ConanException: + self.output.info("(failed)") + return None + output = output.getvalue() + # Conan is broken when run_to_output = True + if "\n-----------------\n" in output: + output = output.split("\n-----------------\n", 1)[1] + output = output.strip() + return output if output != "None" else None + + def _get_python_path(self, name): + """ + obtain path entry for the python installation + :param name: name of the python config entry for path to be queried (such as "include", "platinclude", etc.) + :return: path entry from the sysconfig + """ + # https://docs.python.org/3/library/sysconfig.html + # https://docs.python.org/2.7/library/sysconfig.html + return self._run_python_script("from __future__ import print_function; " + "import sysconfig; " + f"print(sysconfig.get_path('{name}'))") + + def _get_python_sc_var(self, name): + """ + obtain value of python sysconfig variable + :param name: name of variable to be queried (such as LIBRARY or LDLIBRARY) + :return: value of python sysconfig variable + """ + return self._run_python_script("from __future__ import print_function; " + "import sysconfig; " + f"print(sysconfig.get_config_var('{name}'))") + + def _get_python_du_var(self, name): + """ + obtain value of python distutils sysconfig variable + (sometimes sysconfig returns empty values, while python.sysconfig provides correct values) + :param name: name of variable to be queried (such as LIBRARY or LDLIBRARY) + :return: value of python sysconfig variable + """ + return self._run_python_script("from __future__ import print_function; " + "import distutils.sysconfig as du_sysconfig; " + f"print(du_sysconfig.get_config_var('{name}'))") + + def _get_python_var(self, name): + """ + obtain value of python variable, either by sysconfig, or by distutils.sysconfig + :param name: name of variable to be queried (such as LIBRARY or LDLIBRARY) + :return: value of python sysconfig variable + + NOTE: distutils is deprecated and breaks the recipe since Python 3.10 + """ + python_version_parts = str(self.info.options.python_version).split('.') + python_major = int(python_version_parts[0]) + python_minor = int(python_version_parts[1]) + if(python_major >= 3 and python_minor >= 10): + return self._get_python_sc_var(name) + + return self._get_python_sc_var(name) or self._get_python_du_var(name) + + def _detect_python_version(self): + """ + obtain version of python interpreter + :return: python interpreter version, in format major.minor + """ + return self._run_python_script("from __future__ import print_function; " + "import sys; " + "print('{}.{}'.format(sys.version_info[0], sys.version_info[1]))") + + @property + def _python_version(self): + version = self._detect_python_version() + if self.options.python_version and version != self.options.python_version: + raise ConanInvalidConfiguration(f"detected python version {version} doesn't match conan option {self.options.python_version}") + return version + + @property + def _python_inc(self): + """ + obtain the result of the "sysconfig.get_python_inc()" call + :return: result of the "sysconfig.get_python_inc()" execution + """ + return self._run_python_script("from __future__ import print_function; " + "import sysconfig; " + "print(sysconfig.get_python_inc())") + + @property + def _python_abiflags(self): + """ + obtain python ABI flags, see https://www.python.org/dev/peps/pep-3149/ for the details + :return: the value of python ABI flags + """ + return self._run_python_script("from __future__ import print_function; " + "import sys; " + "print(getattr(sys, 'abiflags', ''))") + + @property + def _python_includes(self): + """ + attempt to find directory containing Python.h header file + :return: the directory with python includes + """ + include = self._get_python_path("include") + plat_include = self._get_python_path("platinclude") + include_py = self._get_python_var("INCLUDEPY") + include_dir = self._get_python_var("INCLUDEDIR") + python_inc = self._python_inc + + candidates = [include, + plat_include, + include_py, + include_dir, + python_inc] + for candidate in candidates: + if candidate: + python_h = os.path.join(candidate, 'Python.h') + self.output.info(f"checking {python_h}") + if os.path.isfile(python_h): + self.output.info(f"found Python.h: {python_h}") + return candidate.replace("\\", "/") + raise Exception("couldn't locate Python.h - make sure you have installed python development files") + + @property + def _python_library_dir(self): + """ + attempt to find python development library + :return: the full path to the python library to be linked with + """ + library = self._get_python_var("LIBRARY") + ldlibrary = self._get_python_var("LDLIBRARY") + libdir = self._get_python_var("LIBDIR") + multiarch = self._get_python_var("MULTIARCH") + masd = self._get_python_var("multiarchsubdir") + with_dyld = self._get_python_var("WITH_DYLD") + if libdir and multiarch and masd and not libdir.endswith(masd): + if masd.startswith(os.sep): + masd = masd[len(os.sep):] + self.output.warning(f"Python libdir candidate thingy: {libdir}") + libdir = os.path.join(libdir, masd) + + if not libdir: + libdest = self._get_python_var("LIBDEST") + libdir = os.path.join(os.path.dirname(libdest), "libs") + + candidates = [ldlibrary, library] + library_prefixes = [""] if is_msvc(self) else ["", "lib"] + library_suffixes = [".lib"] if is_msvc(self) else [".so", ".dll.a", ".a"] + if with_dyld: + library_suffixes.insert(0, ".dylib") + + python_version = self._python_version + python_version_no_dot = python_version.replace(".", "") + versions = ["", python_version, python_version_no_dot] + abiflags = self._python_abiflags + + for prefix in library_prefixes: + for suffix in library_suffixes: + for version in versions: + candidates.append(f"{prefix}python{version}{abiflags}{suffix}") + + for candidate in candidates: + if candidate: + python_lib = os.path.join(libdir, candidate) + self.output.info(f"checking {python_lib}") + if os.path.isfile(python_lib): + self.output.info(f"found python library: {python_lib}") + return libdir.replace("\\", "/") + raise ConanInvalidConfiguration("couldn't locate python libraries - make sure you have installed python development files") + + def _clean(self): + clean_dirs = [ + os.path.join(self.build_folder, "bin.v2"), + os.path.join(self.build_folder, "architecture"), + os.path.join(self.source_folder, self._bcp_dir), + os.path.join(self.source_folder, "dist", "bin"), + os.path.join(self.source_folder, "stage"), + os.path.join(self.source_folder, "tools", "build", "src", "engine", "bootstrap"), + os.path.join(self.source_folder, "tools", "build", "src", "engine", "bin.ntx86"), + os.path.join(self.source_folder, "tools", "build", "src", "engine", "bin.ntx86_64"), + ] + for d in clean_dirs: + if os.path.isdir(d): + self.output.warning(f"removing '{d}'") + shutil.rmtree(d) + + @property + def _b2_exe(self): + return "b2" + + @property + def _bcp_exe(self): + folder = os.path.join(self.source_folder, "dist", "bin") + return os.path.join(folder, "bcp") + + @property + def _use_bcp(self): + return self.options.namespace != "boost" + + @property + def _boost_build_dir(self): + return os.path.join(self.source_folder, "tools", "build") + + def _build_bcp(self): + folder = os.path.join(self.source_folder, "tools", "bcp") + with chdir(self, folder): + command = f"{self._b2_exe} -j{build_jobs(self)} --abbreviate-paths toolset={self._toolset}" + command += f" -d{self.options.debug_level}" + self.output.warning(command) + self.run(command) + + def _run_bcp(self): + with chdir(self, self.source_folder): + mkdir(self, self._bcp_dir) + namespace = f"--namespace={self.options.namespace}" + alias = "--namespace-alias" if self.options.namespace_alias else "" + boostdir = f"--boost={self.source_folder}" + libraries = {"build", "boost-build.jam", "boostcpp.jam", "boost_install", "headers"} + for d in os.listdir(os.path.join(self.source_folder, "boost")): + if os.path.isdir(os.path.join(self.source_folder, "boost", d)): + libraries.add(d) + for d in os.listdir(os.path.join(self.source_folder, "libs")): + if os.path.isdir(os.path.join(self.source_folder, "libs", d)): + libraries.add(d) + libraries = " ".join(libraries) + command = f"{self._bcp_exe} {namespace} {alias} {boostdir} {libraries} {self._bcp_dir}" + self.output.warning(command) + self.run(command) + def build(self): - build_args = [ - "./b2", + stacktrace_jamfile = os.path.join(self.source_folder, "libs", "stacktrace", "build", "Jamfile.v2") + if cross_building(self, skip_x64_x86=True): + # When cross building, do not attempt to run the test-executable (assume they work) + replace_in_file(self, stacktrace_jamfile, "$(>) > $(<)", "echo \"\" > $(<)", strict=False) + if self._with_stacktrace_backtrace and self.settings.os != "Windows" and not cross_building(self): + # When libbacktrace is shared, give extra help to the test-executable + linker_var = "DYLD_LIBRARY_PATH" if self.settings.os == "Macos" else "LD_LIBRARY_PATH" + libbacktrace_libdir = self.dependencies["libbacktrace"].cpp_info.aggregated_components().libdirs[0] + patched_run_rule = f"{linker_var}={libbacktrace_libdir} $(>) > $(<)" + replace_in_file(self, stacktrace_jamfile, "$(>) > $(<)", patched_run_rule, strict=False) + if self.dependencies["libbacktrace"].options.shared: + replace_in_file(self, stacktrace_jamfile, "static", "shared", strict=False) + + # Older clang releases require a thread_local variable to be initialized by a constant value + replace_in_file(self, os.path.join(self.source_folder, "boost", "stacktrace", "detail", "libbacktrace_impls.hpp"), + "/* thread_local */", "thread_local", strict=False) + replace_in_file(self, os.path.join(self.source_folder, "boost", "stacktrace", "detail", "libbacktrace_impls.hpp"), + "/* static __thread */", "static __thread", strict=False) + if self.settings.compiler == "apple-clang" or (self.settings.compiler == "clang" and Version(self.settings.compiler.version) < 6): + replace_in_file(self, os.path.join(self.source_folder, "boost", "stacktrace", "detail", "libbacktrace_impls.hpp"), + "thread_local", "/* thread_local */") + replace_in_file(self, os.path.join(self.source_folder, "boost", "stacktrace", "detail", "libbacktrace_impls.hpp"), + "static __thread", "/* static __thread */") + replace_in_file(self, os.path.join(self.source_folder, "tools", "build", "src", "tools", "gcc.jam"), + "local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux ] ;", + "local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux iphone appletv ] ;", + strict=False) + replace_in_file(self, os.path.join(self.source_folder, "tools", "build", "src", "tools", "gcc.jam"), + "local no-threading = android beos haiku sgi darwin vxworks ;", + "local no-threading = android beos haiku sgi darwin vxworks iphone appletv ;", + strict=False) + replace_in_file(self, os.path.join(self.source_folder, "libs", "fiber", "build", "Jamfile.v2"), + " @numa", + " shared:.//boost_fiber : @numa", + strict=False) + if self.settings.os == "Android": + # force versionless soname from boostorg/boost#206 + # this can be applied to all versions and it's easier with a replace + replace_in_file(self, os.path.join(self.source_folder, "boostcpp.jam"), + "! [ $(property-set).get ] in windows cygwin darwin aix &&", + "! [ $(property-set).get ] in windows cygwin darwin aix android &&", + strict=False) + + if self.options.header_only: + self.output.warning("Header only package, skipping build") + return + + self._clean() + + if self._use_bcp: + self._build_bcp() + self._run_bcp() + + self._create_user_config_jam(self._boost_build_dir) + + # JOIN ALL FLAGS + b2_flags = " ".join(self._build_flags) + full_command = f"{self._b2_exe} {b2_flags}" + # -d2 is to print more debug info and avoid travis timing out without output + sources = os.path.join(self.source_folder, self._bcp_dir) if self._use_bcp else self.source_folder + full_command += f' --debug-configuration --build-dir="{self.build_folder}"' + self.output.warning(full_command) + + # If sending a user-specified toolset to B2, setting the vcvars + # interferes with the compiler selection. + with chdir(self, sources): + # To show the libraries *1 + # self.run("%s --show-libraries" % b2_exe) + self.run(full_command) + + @property + def _b2_os(self): + return { + "Windows": "windows", + "WindowsStore": "windows", + "Linux": "linux", + "Android": "android", + "Macos": "darwin", + "iOS": "iphone", + "watchOS": "iphone", + "tvOS": "appletv", + "FreeBSD": "freebsd", + "SunOS": "solaris", + }.get(str(self.settings.os)) + + @property + def _b2_address_model(self): + if self.settings.arch in ("x86_64", "ppc64", "ppc64le", "mips64", "armv8", "armv8.3", "sparcv9", "s390x"): + return "64" + + return "32" + + @property + def _b2_binary_format(self): + return { + "Windows": "pe", + "WindowsStore": "pe", + "Linux": "elf", + "Android": "elf", + "Macos": "mach-o", + "iOS": "mach-o", + "watchOS": "mach-o", + "tvOS": "mach-o", + "FreeBSD": "elf", + "SunOS": "elf", + }.get(str(self.settings.os)) + + @property + def _b2_architecture(self): + if str(self.settings.arch).startswith("x86"): + return "x86" + if str(self.settings.arch).startswith("ppc"): + return "power" + if str(self.settings.arch).startswith("arm"): + return "arm" + if str(self.settings.arch).startswith("sparc"): + return "sparc" + if str(self.settings.arch).startswith("mips64"): + return "mips64" + if str(self.settings.arch).startswith("mips"): + return "mips1" + if str(self.settings.arch).startswith("s390"): + return "s390x" + + return None + + @property + def _b2_abi(self): + if str(self.settings.arch).startswith("x86"): + return "ms" if str(self.settings.os) in ["Windows", "WindowsStore"] else "sysv" + if str(self.settings.arch).startswith("ppc"): + return "sysv" + if str(self.settings.arch).startswith("arm"): + return "aapcs" + if str(self.settings.arch).startswith("mips"): + return "o32" + + return None + + @property + def _gnu_cxx11_abi(self): + """Checks libcxx setting and returns value for the GNU C++11 ABI flag + _GLIBCXX_USE_CXX11_ABI= . Returns None if C++ library cannot be + determined. + """ + try: + if str(self.settings.compiler.libcxx) == "libstdc++": + return "0" + if str(self.settings.compiler.libcxx) == "libstdc++11": + return "1" + except ConanException: + pass + return None + + @property + def _build_flags(self): + flags = self._build_cross_flags + + # Stop at the first error. No need to continue building. + flags.append("-q") + + if self.options.get_safe("numa"): + flags.append("numa=on") + + # https://www.boost.org/doc/libs/1_70_0/libs/context/doc/html/context/architectures.html + if not self._is_apple_embedded_platform and self._b2_os: + flags.append(f"target-os={self._b2_os}") + if self._b2_architecture: + flags.append(f"architecture={self._b2_architecture}") + if self._b2_address_model: + flags.append(f"address-model={self._b2_address_model}") + if self._b2_binary_format: + flags.append(f"binary-format={self._b2_binary_format}") + if self._b2_abi: + flags.append(f"abi={self._b2_abi}") + + flags.append(f"--layout={self.options.layout}") + flags.append(f"--user-config={os.path.join(self._boost_build_dir, 'user-config.jam')}") + flags.append(f"-sNO_ZLIB={'0' if self._with_zlib else '1'}") + flags.append(f"-sNO_BZIP2={'0' if self._with_bzip2 else '1'}") + flags.append(f"-sNO_LZMA={'0' if self._with_lzma else '1'}") + flags.append(f"-sNO_ZSTD={'0' if self._with_zstd else '1'}") + + if self.options.get_safe("i18n_backend_icu"): + flags.append("boost.locale.icu=on") + else: + flags.append("boost.locale.icu=off") + flags.append("--disable-icu") + if self.options.get_safe("i18n_backend_iconv") in ["libc", "libiconv"]: + flags.append("boost.locale.iconv=on") + if self.options.get_safe("i18n_backend_iconv") == "libc": + flags.append("boost.locale.iconv.lib=libc") + else: + flags.append("boost.locale.iconv.lib=libiconv") + else: + flags.append("boost.locale.iconv=off") + flags.append("--disable-iconv") + + def add_defines(library): + for define in self.dependencies[library].cpp_info.aggregated_components().defines: + flags.append(f"define={define}") + + if self._with_zlib: + add_defines("zlib") + if self._with_bzip2: + add_defines("bzip2") + if self._with_lzma: + add_defines("xz_utils") + if self._with_zstd: + add_defines("zstd") + + for define in self.conf.get("tools.build:defines", default=[], check_type=list): + flags.append(f"define={define}") + + if is_msvc(self): + flags.append(f"runtime-link={'static' if is_msvc_static_runtime(self) else 'shared'}") + flags.append(f"runtime-debugging={'on' if 'd' in msvc_runtime_flag(self) else 'off'}") + + # For details https://boostorg.github.io/build/manual/master/index.html + flags.append(f"threading={'single' if not self.options.multithreading else 'multi'}") + flags.append(f"visibility={self.options.visibility}") + + flags.append(f"link={'shared' if self._shared else 'static'}") + if self.settings.build_type == "Debug": + flags.append("variant=debug") + else: + flags.append("variant=release") + + for libname in self._configure_options: + if not getattr(self.options, f"without_{libname}"): + flags.append(f"--with-{libname}") + + flags.append(f"toolset={self._toolset}") + + safe_cppstd = self.settings.get_safe("compiler.cppstd") + if safe_cppstd: + cppstd_version = self._cppstd_flag(safe_cppstd) + flags.append(f"cxxstd={cppstd_version}") + if "gnu" in safe_cppstd: + flags.append("cxxstd-dialect=gnu") + elif Version(self.version) >= "1.85.0" and self._has_cppstd_14_supported: + cppstd_version = self._cppstd_flag("14") + flags.append(f"cxxstd={cppstd_version}") + elif self._has_cppstd_11_supported: + cppstd_version = self._cppstd_flag("11") + flags.append(f"cxxstd={cppstd_version}") + + # LDFLAGS + link_flags = [] + + # CXX FLAGS + cxx_flags = [] + # fPIC DEFINITION + if self._fPIC: + cxx_flags.append("-fPIC") + if self.settings.build_type == "RelWithDebInfo": + if self.settings.compiler == "gcc" or "clang" in str(self.settings.compiler): + cxx_flags.append("-g") + elif is_msvc(self): + cxx_flags.append("/Z7") + + # Standalone toolchain fails when declare the std lib + if self.settings.os not in ("Android", "Emscripten"): + try: + if self._gnu_cxx11_abi: + flags.append(f"define=_GLIBCXX_USE_CXX11_ABI={self._gnu_cxx11_abi}") + + if self.settings.compiler in ("clang", "apple-clang"): + libcxx = { + "libstdc++11": "libstdc++", + }.get(str(self.settings.compiler.libcxx), str(self.settings.compiler.libcxx)) + cxx_flags.append(f"-stdlib={libcxx}") + link_flags.append(f"-stdlib={libcxx}") + except ConanException: + pass + + if self.options.error_code_header_only: + flags.append("define=BOOST_ERROR_CODE_HEADER_ONLY=1") + if self.options.system_no_deprecated: + flags.append("define=BOOST_SYSTEM_NO_DEPRECATED=1") + if self.options.asio_no_deprecated: + flags.append("define=BOOST_ASIO_NO_DEPRECATED=1") + if self.options.filesystem_no_deprecated: + flags.append("define=BOOST_FILESYSTEM_NO_DEPRECATED=1") + if self.options.filesystem_use_std_fs: + flags.append("define=BOOST_DLL_USE_STD_FS=1") + if self.options.system_use_utf8: + flags.append("define=BOOST_SYSTEM_USE_UTF8=1") + if self.options.segmented_stacks: + flags.extend(["segmented-stacks=on", + "define=BOOST_USE_SEGMENTED_STACKS=1", + "define=BOOST_USE_UCONTEXT=1"]) + flags.append("pch=on" if self.options.pch else "pch=off") + + if is_apple_os(self): + apple_min_version_flag = AutotoolsToolchain(self).apple_min_version_flag + if apple_min_version_flag: + cxx_flags.append(apple_min_version_flag) + link_flags.append(apple_min_version_flag) + os_subsystem = self.settings.get_safe("os.subsystem") + if os_subsystem == "catalyst": + cxx_flags.append("--target=arm64-apple-ios-macabi") + link_flags.append("--target=arm64-apple-ios-macabi") + + if self.settings.os == "iOS": + if self.options.multithreading: + cxx_flags.append("-DBOOST_SP_USE_SPINLOCK") + + if self.conf.get("tools.apple:enable_bitcode", check_type=bool): + cxx_flags.append("-fembed-bitcode") + if self._with_stacktrace_backtrace: + flags.append(f"-sLIBBACKTRACE_PATH={self.dependencies['libbacktrace'].package_folder}") + if self._stacktrace_from_exception_available and "x86" not in str(self.settings.arch): + # https://github.com/boostorg/stacktrace/blob/boost-1.85.0/src/from_exception.cpp#L29 + # This feature is guarded by BOOST_STACKTRACE_ALWAYS_STORE_IN_PADDING, but that is only enabled on x86. + flags.append("define=BOOST_STACKTRACE_LIBCXX_RUNTIME_MAY_CAUSE_MEMORY_LEAK=1") + if self._with_iconv: + flags.append(f"-sICONV_PATH={self.dependencies['libiconv'].package_folder}") + if self._with_icu: + flags.append(f"-sICU_PATH={self.dependencies['icu'].package_folder}") + if not self.dependencies["icu"].options.shared: + # Using ICU_OPTS to pass ICU system libraries is not possible due to Boost.Regex disallowing it. + icu_system_libs = self.dependencies["icu"].cpp_info.aggregated_components().system_libs + if is_msvc(self): + icu_ldflags = " ".join(f"{l}.lib" for l in icu_system_libs) + else: + icu_ldflags = " ".join(f"-l{l}" for l in icu_system_libs) + link_flags.append(icu_ldflags) + + link_flags = f'linkflags="{" ".join(link_flags)}"' + flags.append(link_flags) + + if self.options.get_safe("addr2line_location"): + cxx_flags.append(f"-DBOOST_STACKTRACE_ADDR2LINE_LOCATION={self.options.addr2line_location}") + + if not self.options.get_safe('without_cobalt', True) and \ + (self.settings.compiler == "gcc" and Version(self.settings.compiler.version) == "10"): + cxx_flags.append("-fcoroutines") + + cxx_flags = f'cxxflags="{" ".join(cxx_flags)}"' + flags.append(cxx_flags) + + if self.options.buildid: + flags.append(f"--buildid={self.options.buildid}") + if not self.options.without_python and self.options.python_buildid: + flags.append(f"--python-buildid={self.options.python_buildid}") + + if self.options.extra_b2_flags: + flags.extend(shlex.split(str(self.options.extra_b2_flags))) + + flags.extend([ "install", - "-j2", - "variant=release", - "toolset=gcc", - "link=shared", - "-j%s" % tools.cpu_count(), - "--abbreviate-paths", f"--prefix={self.package_folder}", - f"--build-dir={self.build_folder}", - f"--libdir={os.path.join(self.package_folder,'lib64')}", - ] - for comp in CONFIGURE_OPTIONS: - if self._with_component(comp): - build_args.append(f"--with-{comp}") - else: - build_args.append(f"--without-{comp}") - - if self._with_component("python"): - python_version = tools.Version(self.dependencies["python"].ref.version) - major_minor = f"{python_version.major}.{python_version.minor}" - py_jam = os.path.join(self.source_folder, "python-config.jam") - with open(py_jam, "w") as f: - jam = [ - "using python", - major_minor, - f"{self.deps_cpp_info['python'].bin_paths[0]}/{self.deps_user_info['python'].python_interp}", - self.deps_cpp_info["python"].include_paths[0], - self.deps_cpp_info["python"].lib_paths[0], - ] - f.write(" : ".join(jam) + " ;\n") - print("!!! JAM=" + " : ".join(jam) + " ;\n") - - self.run( - f"sh bootstrap.sh --with-python=bin/python{major_minor} --with-python-version={major_minor}", - cwd=self.source_folder, - run_environment=True, - ) - build_args.append(f"--user-config={py_jam}") + f"--libdir={self.package_folder}/lib64", # Override default lib + f"-j{build_jobs(self)}", + "--abbreviate-paths", + f"-d{self.options.debug_level}", + ]) + return flags + + @property + def _build_cross_flags(self): + flags = [] + if not cross_building(self): + return flags + arch = self.settings.get_safe("arch") + self.output.info("Cross building, detecting compiler...") + + if arch.startswith("arm"): + if "hf" in arch: + flags.append("-mfloat-abi=hard") + elif self.settings.os == "Emscripten": + pass + elif arch in ["x86", "x86_64"]: + pass + elif arch.startswith("ppc"): + pass + elif arch.startswith("mips"): + pass else: - self.run("sh bootstrap.sh", cwd=self.source_folder, run_environment=True) - if not self.version.startswith("1.61"): - build_args.append("cxxstd=14") + self.output.warning(f"Unable to detect the appropriate ABI for {arch} architecture.") + self.output.info(f"Cross building flags: {flags}") + + return flags + + @property + def _ar(self): + ar = VirtualBuildEnv(self).vars().get("AR") + if ar: + return ar + if is_apple_os(self) and self.settings.compiler == "apple-clang": + return XCRun(self).ar + return None + + @property + def _ranlib(self): + ranlib = VirtualBuildEnv(self).vars().get("RANLIB") + if ranlib: + return ranlib + if is_apple_os(self) and self.settings.compiler == "apple-clang": + return XCRun(self).ranlib + return None + + @property + def _cxx(self): + compilers_by_conf = self.conf.get("tools.build:compiler_executables", default={}, check_type=dict) + cxx = compilers_by_conf.get("cpp") or VirtualBuildEnv(self).vars().get("CXX") + if cxx: + return cxx + if is_apple_os(self) and self.settings.compiler == "apple-clang": + return XCRun(self).cxx + compiler_version = str(self.settings.compiler.version) + major = compiler_version.split(".", maxsplit=1)[0] + if self.settings.compiler == "gcc": + return shutil.which(f"g++-{compiler_version}") or shutil.which(f"g++-{major}") or shutil.which("g++") or "" + if self.settings.compiler == "clang": + return shutil.which(f"clang++-{compiler_version}") or shutil.which(f"clang++-{major}") or shutil.which("clang++") or "" + return "" + + def _create_user_config_jam(self, folder): + self.output.warning("Patching user-config.jam") + + def create_library_config(deps_name, name): + aggregated_cpp_info = self.dependencies[deps_name].cpp_info.aggregated_components() + if len(aggregated_cpp_info.libs) == 0: + return "" + + includedir = aggregated_cpp_info.includedirs[0].replace("\\", "/") + includedir = f"\"{includedir}\"" + libdir = aggregated_cpp_info.libdirs[0].replace("\\", "/") + libdir = f"\"{libdir}\"" + lib = aggregated_cpp_info.libs[0] + version = self.dependencies[deps_name].ref.version + return f"\nusing {name} : {version} : " \ + f"{includedir} " \ + f"{libdir} " \ + f"{lib} ;" + + contents = "" + + if self._with_zlib: + contents += create_library_config("zlib", "zlib") + if self._with_bzip2: + contents += create_library_config("bzip2", "bzip2") + if self._with_lzma: + contents += create_library_config("xz_utils", "lzma") + if self._with_zstd: + contents += create_library_config("zstd", "zstd") + + if not self.options.without_python: + # https://www.boost.org/doc/libs/1_70_0/libs/python/doc/html/building/configuring_boost_build.html + contents += f'\nusing python : {self._python_version} : "{self._python_executable}" : "{self._python_includes}" : "{self._python_library_dir}" ;' + + if not self.options.without_mpi: + # https://www.boost.org/doc/libs/1_72_0/doc/html/mpi/getting_started.html + contents += "\nusing mpi ;" + + # Specify here the toolset with the binary if present if don't empty parameter : + contents += f'\nusing "{self._toolset}" : {self._toolset_version} : ' + + cxx_fwd_slahes = self._cxx.replace("\\", "/") + if cxx_fwd_slahes: + contents += f" \"{cxx_fwd_slahes}\"" + + if is_apple_os(self): + if self.settings.compiler == "apple-clang": + contents += f" -isysroot {XCRun(self).sdk_path}" + if self.settings.get_safe("arch"): + contents += f" -arch {to_apple_arch(self)}" + + contents += " : \n" + if self._ar: + ar_path = self._ar.replace("\\", "/") + contents += f'"{ar_path}" ' + if self._ranlib: + ranlib_path = self._ranlib.replace("\\", "/") + contents += f'"{ranlib_path}" ' + cxxflags = " ".join(self.conf.get("tools.build:cxxflags", default=[], check_type=list)) + " " + cflags = " ".join(self.conf.get("tools.build:cflags", default=[], check_type=list)) + " " + buildenv_vars = VirtualBuildEnv(self).vars() + cppflags = buildenv_vars.get("CPPFLAGS", "") + " " + ldflags = " ".join(self.conf.get("tools.build:sharedlinkflags", default=[], check_type=list)) + " " + asflags = buildenv_vars.get("ASFLAGS", "") + " " - self.run(" ".join(build_args), cwd=self.source_folder, run_environment=True) + sysroot = self.conf.get("tools.build:sysroot") + if sysroot and not is_msvc(self): + sysroot = sysroot.replace("\\", "/") + sysroot = f'"{sysroot}"' if ' ' in sysroot else sysroot + cppflags += f"--sysroot={sysroot} " + ldflags += f"--sysroot={sysroot} " + + if self._with_stacktrace_backtrace: + backtrace_aggregated_cpp_info = self.dependencies["libbacktrace"].cpp_info.aggregated_components() + cppflags += " ".join(f"-I{p}" for p in backtrace_aggregated_cpp_info.includedirs) + " " + ldflags += " ".join(f"-L{p}" for p in backtrace_aggregated_cpp_info.libdirs) + " " + + if cxxflags.strip(): + contents += f'"{cxxflags.strip()}" ' + if cflags.strip(): + contents += f'"{cflags.strip()}" ' + if cppflags.strip(): + contents += f'"{cppflags.strip()}" ' + if ldflags.strip(): + contents += f'"{ldflags.strip()}" ' + if asflags.strip(): + contents += f'"{asflags.strip()}" ' + + if self._is_apple_embedded_platform: + contents += f'"{self._b2_os}" ' + + contents += " ;" + + self.output.warning(contents) + filename = f"{folder}/user-config.jam" + save(self, filename, contents) + + @property + def _toolset_version(self): + toolset = MSBuildToolchain(self).toolset + if toolset: + match = re.match(r"v(\d+)(\d)$", toolset) + if match: + return f"{match.group(1)}.{match.group(2)}" + return "" + + @property + def _toolset(self): + if is_msvc(self): + return "clang-win" if self.settings.compiler.get_safe("toolset") == "ClangCL" else "msvc" + if self.settings.os == "Windows" and self.settings.compiler == "clang": + return "clang-win" + if self.settings.os == "Emscripten" and self.settings.compiler == "clang": + return "emscripten" + if self.settings.compiler == "gcc" and is_apple_os(self): + return "darwin" + if self.settings.compiler == "apple-clang": + return "clang-darwin" + if self.settings.os == "Android" and self.settings.compiler == "clang": + return "clang-linux" + if self.settings.compiler in ["clang", "gcc"]: + return str(self.settings.compiler) + if self.settings.compiler == "sun-cc": + return "sunpro" + if "intel" in str(self.settings.compiler): + return { + "Macos": "intel-darwin", + "Windows": "intel-win", + "Linux": "intel-linux", + }[str(self.settings.os)] + + return str(self.settings.compiler) + + @property + def _toolset_tag(self): + # compiler | compiler.version | os | toolset_tag | remark + # ---------------+------------------+-------------+----------------+----------------------------- + # apple-clang | 12 | Macos | darwin12 | + # clang | 12 | Macos | clang-darwin12 | + # gcc | 11 | Linux | gcc8 | + # gcc | 8 | Windows | mgw8 | + # Visual Studio | 17 | Windows | vc142 | depends on compiler.toolset + compiler = { + "apple-clang": "", + "Visual Studio": "vc", + "msvc": "vc", + }.get(str(self.settings.compiler), str(self.settings.compiler)) + if (self.settings.compiler, self.settings.os) == ("gcc", "Windows"): + compiler = "mgw" + os_ = "" + if self.settings.os == "Macos": + os_ = "darwin" + if is_msvc(self): + toolset_version = self._toolset_version.replace(".", "") + else: + toolset_version = str(Version(self.settings.compiler.version).major) + + toolset_parts = [compiler, os_] + toolset_tag = "-".join(part for part in toolset_parts if part) + toolset_version + return toolset_tag + + #################################################################### def package(self): - copy( - self, - "LICENSE_1_0.txt", - src=self.source_folder, - dst=os.path.join(self.package_folder, "licenses", self.name), + # This stage/lib is in source_folder... Face palm, looks like it builds in build but then + # copy to source with the good lib name + copy(self, "LICENSE_1_0.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) + if self.options.header_only: + copy(self, "*", src=os.path.join(self.source_folder, "boost"), + dst=os.path.join(self.package_folder, "include", "boost")) + + if self.settings.os == "Emscripten" and not self.options.header_only: + self._create_emscripten_libs() + + if is_msvc(self) and self._shared: + # Some boost releases contain both static and shared variants of some libraries (if shared=True) + all_libs = set(collect_libs(self, "lib")) + static_libs = set(l for l in all_libs if l.startswith("lib")) + shared_libs = all_libs.difference(static_libs) + static_libs = set(l[3:] for l in static_libs) + common_libs = static_libs.intersection(shared_libs) + for common_lib in common_libs: + common_lib_fullname = f"lib{common_lib}.lib" + self.output.info(f'Unlinking static duplicate library: {os.path.join(self.package_folder, "lib", common_lib_fullname)}') + os.unlink(os.path.join(self.package_folder, "lib", common_lib_fullname)) + + dll_pdbs = glob.glob(os.path.join(self.package_folder, "lib", "*.dll")) + \ + glob.glob(os.path.join(self.package_folder, "lib", "*.pdb")) + if dll_pdbs: + mkdir(self, os.path.join(self.package_folder, "bin")) + for bin_file in dll_pdbs: + rename(self, bin_file, os.path.join(self.package_folder, "bin", os.path.basename(bin_file))) + + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + + def _create_emscripten_libs(self): + # Boost Build doesn't create the libraries, but it gets close, + # leaving .bc files where the libraries would be. + staged_libs = os.path.join( + self.package_folder, "lib64" # ASWF DSOs in lib64 ) + if not os.path.exists(staged_libs): + self.output.warning(f"Lib folder doesn't exist, can't collect libraries: {staged_libs}") + return + for bc_file in os.listdir(staged_libs): + if bc_file.startswith("lib64") and bc_file.endswith(".bc"): + a_file = bc_file[:-3] + ".a" + cmd = f"emar q {os.path.join(staged_libs, a_file)} {os.path.join(staged_libs, bc_file)}" + self.output.info(cmd) + self.run(cmd) + + @staticmethod + def _option_to_conan_requirement(name): + return { + "lzma": "xz_utils", + "iconv": "libiconv", + "cpython": None, # FIXME: change to cpython when it becomes available ASWF package now called cpython + }.get(name, name) def package_info(self): self.env_info.BOOST_ROOT = self.package_folder - self.env_info.CMAKE_PREFIX_PATH.append( - os.path.join(self.package_folder, "lib64", "cmake") - ) - + self.cpp_info.set_property("cmake_file_name", "Boost") self.cpp_info.filenames["cmake_find_package"] = "Boost" self.cpp_info.filenames["cmake_find_package_multi"] = "Boost" self.cpp_info.names["cmake_find_package"] = "Boost" @@ -171,131 +1773,349 @@ def package_info(self): # - Use '_libboost' component to attach extra system_libs, ... self.cpp_info.components["headers"].libs = [] + self.cpp_info.components["headers"].libdirs = [] + self.cpp_info.components["headers"].set_property("cmake_target_name", "Boost::headers") self.cpp_info.components["headers"].names["cmake_find_package"] = "headers" - self.cpp_info.components["headers"].names[ - "cmake_find_package_multi" - ] = "headers" + self.cpp_info.components["headers"].names["cmake_find_package_multi"] = "headers" self.cpp_info.components["headers"].names["pkg_config"] = "boost" + if self.options.system_no_deprecated: + self.cpp_info.components["headers"].defines.append("BOOST_SYSTEM_NO_DEPRECATED") + + if self.options.asio_no_deprecated: + self.cpp_info.components["headers"].defines.append("BOOST_ASIO_NO_DEPRECATED") + + if self.options.filesystem_no_deprecated: + self.cpp_info.components["headers"].defines.append("BOOST_FILESYSTEM_NO_DEPRECATED") + + if self.options.filesystem_use_std_fs: + self.cpp_info.components["headers"].defines.append("BOOST_DLL_USE_STD_FS") + + if self.options.filesystem_version: + self.cpp_info.components["headers"].defines.append(f"BOOST_FILESYSTEM_VERSION={self.options.filesystem_version}") + + if self.options.segmented_stacks: + self.cpp_info.components["headers"].defines.extend(["BOOST_USE_SEGMENTED_STACKS", "BOOST_USE_UCONTEXT"]) + + if self.options.system_use_utf8: + self.cpp_info.components["headers"].defines.append("BOOST_SYSTEM_USE_UTF8") + + if self.options.buildid: + # If you built Boost using the --buildid option then set this macro to the same value + # as you passed to bjam. + # For example if you built using bjam address-model=64 --buildid=amd64 then compile your code with + # -DBOOST_LIB_BUILDID=amd64 to ensure the correct libraries are selected at link time. + self.cpp_info.components["headers"].defines.append(f"BOOST_LIB_BUILDID={self.options.buildid}") + + if not self.options.header_only: + if self.options.error_code_header_only: + self.cpp_info.components["headers"].defines.append("BOOST_ERROR_CODE_HEADER_ONLY") + + if self.options.layout == "versioned": + version = Version(self.version) + self.cpp_info.components["headers"].includedirs.append(os.path.join("include", f"boost-{version.major}_{version.minor}")) + # Boost::boost is an alias of Boost::headers self.cpp_info.components["_boost_cmake"].requires = ["headers"] + self.cpp_info.components["_boost_cmake"].set_property("cmake_target_name", "Boost::boost") self.cpp_info.components["_boost_cmake"].names["cmake_find_package"] = "boost" - self.cpp_info.components["_boost_cmake"].names[ - "cmake_find_package_multi" - ] = "boost" - - self.cpp_info.components["_libboost"].requires = ["headers"] - if self.settings.os == "Linux": - # https://github.com/conan-community/community/issues/135 - self.cpp_info.components["_libboost"].system_libs.append("rt") - self.cpp_info.components["_libboost"].system_libs.append("pthread") - - for comp in CONFIGURE_OPTIONS: - if not self._with_component(comp): - continue - self.cpp_info.components[comp].requires = ["headers"] - - if self._with_component("atomic"): - self.cpp_info.components["atomic"].libs = ["boost_atomic"] - if self._with_component("chrono"): - self.cpp_info.components["chrono"].libs = ["boost_chrono"] - self.cpp_info.components["chrono"].requires.append("system") - if self._with_component("container"): - self.cpp_info.components["container"].libs = ["boost_container"] - if self._with_component("context"): - self.cpp_info.components["context"].libs = ["boost_context"] - if self._with_component("coroutine"): - self.cpp_info.components["coroutine"].libs = ["boost_coroutine"] - self.cpp_info.components["coroutine"].requires.append("system") - if self._with_component("date_time"): - self.cpp_info.components["date_time"].libs = ["boost_date_time"] - if self._with_component("filesystem"): - self.cpp_info.components["filesystem"].libs = ["boost_filesystem"] - if self._with_component("graph"): - self.cpp_info.components["graph"].libs = ["boost_graph"] - if self._with_component("iostreams"): - self.cpp_info.components["iostreams"].libs = ["boost_iostreams"] - if self._with_component("locale"): - self.cpp_info.components["locale"].libs = ["boost_locale"] - if self._with_component("log_setup"): - self.cpp_info.components["log_setup"].libs = ["boost_log_setup"] - if self._with_component("log"): - self.cpp_info.components["log"].libs = ["boost_log"] - if self._with_component("math"): - self.cpp_info.components["math"].libs = [ - "boost_math_c99f", - "boost_math_c99l", - "boost_math_c99", - "boost_math_tr1f", - "boost_math_tr1l", - "boost_math_tr1", - ] - if self._with_component("program_options"): - self.cpp_info.components["program_options"].libs = ["boost_program_options"] - if self._with_component("python"): - python_version = tools.Version(self.dependencies["python"].ref.version) - major_minor = f"{python_version.major}{python_version.minor}" - if python_version >= "3": - suffix = major_minor + self.cpp_info.components["_boost_cmake"].names["cmake_find_package_multi"] = "boost" + if self.options.header_only: + self.cpp_info.components["_boost_cmake"].libdirs = [] + + if not self.options.header_only: + self.cpp_info.components["_libboost"].requires = ["headers"] + + self.cpp_info.components["diagnostic_definitions"].libs = [] + self.cpp_info.components["diagnostic_definitions"].set_property("cmake_target_name", "Boost::diagnostic_definitions") + self.cpp_info.components["diagnostic_definitions"].names["cmake_find_package"] = "diagnostic_definitions" + self.cpp_info.components["diagnostic_definitions"].names["cmake_find_package_multi"] = "diagnostic_definitions" + self.cpp_info.components["diagnostic_definitions"].names["pkg_config"] = "boost_diagnostic_definitions" # FIXME: disable on pkg_config + # I would assume headers also need the define BOOST_LIB_DIAGNOSTIC, as a header can trigger an autolink, + # and this definition triggers a print out of the library selected. See notes below on autolink and headers. + self.cpp_info.components["headers"].requires.append("diagnostic_definitions") + if self.options.diagnostic_definitions: + self.cpp_info.components["diagnostic_definitions"].defines = ["BOOST_LIB_DIAGNOSTIC"] + + self.cpp_info.components["disable_autolinking"].libs = [] + self.cpp_info.components["disable_autolinking"].set_property("cmake_target_name", "Boost::disable_autolinking") + self.cpp_info.components["disable_autolinking"].names["cmake_find_package"] = "disable_autolinking" + self.cpp_info.components["disable_autolinking"].names["cmake_find_package_multi"] = "disable_autolinking" + self.cpp_info.components["disable_autolinking"].names["pkg_config"] = "boost_disable_autolinking" # FIXME: disable on pkg_config + + # Even headers needs to know the flags for disabling autolinking ... + # magic_autolink is an option in the recipe, so if a consumer wants this version of boost, + # then they should not get autolinking. + # Note that autolinking can sneak in just by some file #including a header with (eg) boost/atomic.hpp, + # even if it doesn't use any part that requires linking with libboost_atomic in order to compile. + # So a boost-header-only library that links to Boost::headers needs to see BOOST_ALL_NO_LIB + # in order to avoid autolinking to libboost_atomic + + # This define is already imported into all of the _libboost libraries from this recipe anyway, + # so it would be better to be consistent and ensure ANYTHING using boost (headers or libs) has consistent #defines. + + # Same applies for for BOOST_AUTO_LINK_{layout}: + # consumer libs that use headers also need to know what is the layout/filename of the libraries. + # + # eg, if using the "tagged" naming scheme, and a header triggers an autolink, + # then that header's autolink request had better be configured to request the "tagged" library name. + # Otherwise, the linker will be looking for a (eg) "versioned" library name, and there will be a link error. + + # Note that "_libboost" requires "headers" so these defines will be applied to all the libraries too. + self.cpp_info.components["headers"].requires.append("disable_autolinking") + if is_msvc(self) or self._is_clang_cl: + if self.options.magic_autolink: + if self.options.layout == "system": + self.cpp_info.components["headers"].defines.append("BOOST_AUTO_LINK_SYSTEM") + elif self.options.layout == "tagged": + self.cpp_info.components["headers"].defines.append("BOOST_AUTO_LINK_TAGGED") + self.output.info("Enabled magic autolinking (smart and magic decisions)") + else: + # DISABLES AUTO LINKING! NO SMART AND MAGIC DECISIONS THANKS! + self.cpp_info.components["disable_autolinking"].defines = ["BOOST_ALL_NO_LIB"] + self.output.info("Disabled magic autolinking (smart and magic decisions)") + + self.cpp_info.components["dynamic_linking"].libs = [] + self.cpp_info.components["dynamic_linking"].set_property("cmake_target_name", "Boost::dynamic_linking") + self.cpp_info.components["dynamic_linking"].names["cmake_find_package"] = "dynamic_linking" + self.cpp_info.components["dynamic_linking"].names["cmake_find_package_multi"] = "dynamic_linking" + self.cpp_info.components["dynamic_linking"].names["pkg_config"] = "boost_dynamic_linking" # FIXME: disable on pkg_config + # A library that only links to Boost::headers can be linked into another library that links a Boost::library, + # so for this reasons, the header-only library should know the BOOST_ALL_DYN_LINK definition as it will likely + # change some important part of the boost code and cause linking errors downstream. + # This is in the same theme as the notes above, re autolinking. + self.cpp_info.components["headers"].requires.append("dynamic_linking") + if self._shared: + # A Boost::dynamic_linking cmake target does only make sense for a shared boost package + self.cpp_info.components["dynamic_linking"].defines = ["BOOST_ALL_DYN_LINK"] + + # https://www.boost.org/doc/libs/1_73_0/more/getting_started/windows.html#library-naming + # libsuffix for MSVC: + # - system: "" + # - versioned: "-vc142-mt-d-x64-1_74" + # - tagged: "-mt-d-x64" + libsuffix_lut = { + "system": "", + "versioned": "{toolset}{threading}{abi}{arch}{version}", + "tagged": "{threading}{abi}{arch}", + } + libsuffix_data = { + "toolset": f"-{self._toolset_tag}", + "threading": "-mt" if self.options.multithreading else "", + "abi": "", + "ach": "", + "version": "", + } + if is_msvc(self): # FIXME: mingw? + # FIXME: add 'y' when using cpython cci package and when python is built in debug mode + static_runtime_key = "s" if is_msvc_static_runtime(self) else "" + debug_runtime_key = "g" if "d" in msvc_runtime_flag(self) else "" + debug_key = "d" if self.settings.build_type == "Debug" else "" + abi = static_runtime_key + debug_runtime_key + debug_key + if abi: + libsuffix_data["abi"] = f"-{abi}" else: - suffix = "" - self.cpp_info.components["python"].libs = [f"boost_python{suffix}"] - self.cpp_info.components["python"].requires.append("python::PythonLibs") - self.cpp_info.components[f"python{major_minor}"].requires.append("python") - self.cpp_info.components["numpy"].libs = [f"boost_numpy{suffix}"] - self.cpp_info.components["numpy"].requires.append("python") - self.cpp_info.components[f"numpy{major_minor}"].requires.append("numpy") - if self._with_component("random"): - self.cpp_info.components["random"].libs = ["boost_random"] - if self._with_component("regex"): - self.cpp_info.components["regex"].libs = ["boost_regex"] - if self._with_component("serialization"): - self.cpp_info.components["serialization"].libs = [ - "boost_serialization", - "boost_wserialization", - ] - if self._with_component("stacktrace"): - self.cpp_info.components["stacktrace_addr2line"].requires = [ - "headers", - "stacktrace", - ] - self.cpp_info.components["stacktrace_addr2line"].libs = [ - "boost_stacktrace_addr2line" - ] - self.cpp_info.components["stacktrace_basic"].requires = [ - "headers", - "stacktrace", - ] - self.cpp_info.components["stacktrace_basic"].libs = [ - "boost_stacktrace_basic" - ] - self.cpp_info.components["stacktrace_noop"].requires = [ - "headers", - "stacktrace", - ] - self.cpp_info.components["stacktrace_noop"].libs = ["boost_stacktrace_noop"] - if self.settings.os in ("Linux", "FreeBSD"): - self.cpp_info.components["stacktrace_basic"].system_libs.append("dl") - self.cpp_info.components["stacktrace_noop"].system_libs.append("dl") - self.cpp_info.components["stacktrace_addr2line"].system_libs.append( - "dl" - ) - if self._with_component("system"): - self.cpp_info.components["system"].libs = ["boost_system"] - self.cpp_info.components["system"].requires.append("_libboost") - if self._with_component("thread"): - self.cpp_info.components["thread"].libs = ["boost_thread"] - if self._with_component("timer"): - self.cpp_info.components["timer"].libs = ["boost_timer"] - if self._with_component("type_erasure"): - self.cpp_info.components["type_erasure"].libs = ["boost_type_erasure"] - if self._with_component("unit_test_framework"): - self.cpp_info.components["unit_test_framework"].libs = [ - "boost_prg_exec_monitor", - "boost_unit_test_framework", - ] - if self._with_component("wave"): - self.cpp_info.components["wave"].libs = ["boost_wave"] - - def deploy(self): - self.copy("*", symlinks=True) + debug_tag = "d" if self.settings.build_type == "Debug" else "" + abi = debug_tag + if abi: + libsuffix_data["abi"] = f"-{abi}" + + if self._b2_architecture: + libsuffix_data["arch"] = f"-{self._b2_architecture[0]}{self._b2_address_model}" + version = Version(self.version) + if not version.patch or version.patch == "0": + libsuffix_data["version"] = f"-{version.major}_{version.minor}" + else: + libsuffix_data["version"] = f"-{version.major}_{version.minor}_{version.patch}" + libsuffix = libsuffix_lut[str(self.options.layout)].format(**libsuffix_data) + if libsuffix: + self.output.info(f"Library layout suffix: {repr(libsuffix)}") + + libformatdata = {} + if not self.options.without_python: + pyversion = Version(self._python_version) + libformatdata["py_major"] = pyversion.major + libformatdata["py_minor"] = pyversion.minor + + def add_libprefix(n): + """ On MSVC, static libraries are built with a 'lib' prefix. Some libraries do not support shared, so are always built as a static library. """ + libprefix = "" + if is_msvc(self) and (not self._shared or n in self._dependencies["static_only"]): + libprefix = "lib" + elif self._toolset == "clang-win": + libprefix = "lib" + return libprefix + n + + all_detected_libraries = set(l[:-4] if l.endswith(".dll") else l for l in collect_libs(self)) + all_expected_libraries = set() + incomplete_components = [] + + def filter_transform_module_libraries(names): + libs = [] + for name in names: + if name in ("boost_stacktrace_windbg", "boost_stacktrace_windbg_cached") and self.settings.os != "Windows": + continue + if name in ("boost_math_c99l", "boost_math_tr1l") and str(self.settings.arch).startswith("ppc"): + continue + if name in ("boost_stacktrace_addr2line", "boost_stacktrace_backtrace", "boost_stacktrace_basic") and self.settings.os == "Windows": + continue + if name == "boost_stacktrace_from_exception" and not self._stacktrace_from_exception_available: + continue + if name == "boost_stacktrace_addr2line" and not self._stacktrace_addr2line_available: + continue + if name == "boost_stacktrace_backtrace" and self.options.get_safe("with_stacktrace_backtrace") == False: + continue + if not self.options.get_safe("numa") and "_numa" in name: + continue + new_name = add_libprefix(name.format(**libformatdata)) + libsuffix + if self.options.namespace != 'boost': + new_name = new_name.replace("boost_", str(self.options.namespace) + "_") + if name.startswith("boost_python") or name.startswith("boost_numpy"): + if self.options.python_buildid: + new_name += f"-{self.options.python_buildid}" + if self.options.buildid: + new_name += f"-{self.options.buildid}" + libs.append(new_name) + return libs + + for module in self._dependencies["dependencies"].keys(): + missing_depmodules = list(depmodule for depmodule in self._all_dependent_modules(module) if self.options.get_safe(f"without_{depmodule}", False)) + if missing_depmodules: + continue + + module_libraries = filter_transform_module_libraries(self._dependencies["libs"][module]) + + # Don't create components for modules that should have libraries, but don't have (because of filter) + if self._dependencies["libs"][module] and not module_libraries: + continue + + all_expected_libraries = all_expected_libraries.union(module_libraries) + if set(module_libraries).difference(all_detected_libraries): + incomplete_components.append(module) + + # Starting v1.69.0 Boost.System is header-only. A stub library is + # still built for compatibility, but linking to it is no longer + # necessary. + # https://www.boost.org/doc/libs/1_75_0/libs/system/doc/html/system.html#changes_in_boost_1_69 + if module == "system": + module_libraries = [] + + self.cpp_info.components[module].libs = module_libraries + + self.cpp_info.components[module].requires = self._dependencies["dependencies"][module] + ["_libboost"] + self.cpp_info.components[module].set_property("cmake_target_name", "Boost::" + module) + self.cpp_info.components[module].names["cmake_find_package"] = module + self.cpp_info.components[module].names["cmake_find_package_multi"] = module + self.cpp_info.components[module].names["pkg_config"] = f"boost_{module}" + + # extract list of names of direct host dependencies to check for dependencies + # of components that exist in other packages + dependencies = [d.ref.name for d, _ in self.dependencies.direct_host.items()] + + for requirement in self._dependencies.get("requirements", {}).get(module, []): + if self.options.get_safe(requirement, None) == False: + continue + conan_requirement = self._option_to_conan_requirement(requirement) + if conan_requirement not in dependencies: + continue + if module == "locale" and requirement in ("icu", "iconv"): + if requirement == "icu" and not self._with_icu: + continue + if requirement == "iconv" and not self._with_iconv: + continue + self.cpp_info.components[module].requires.append(f"{conan_requirement}::{conan_requirement}") + + for incomplete_component in incomplete_components: + self.output.warning(f"Boost component '{incomplete_component}' is missing libraries. Try building boost with '-o boost:without_{incomplete_component}'. (Option is not guaranteed to exist)") + + non_used = all_detected_libraries.difference(all_expected_libraries) + if non_used: + raise ConanException(f"These libraries were built, but were not used in any boost module: {non_used}") + + non_built = all_expected_libraries.difference(all_detected_libraries) + if non_built: + raise ConanException(f"These libraries were expected to be built, but were not built: {non_built}") + + if not self.options.without_stacktrace: + if self.settings.os in ("Linux", "FreeBSD"): + self.cpp_info.components["stacktrace_basic"].system_libs.append("dl") + if self._stacktrace_addr2line_available: + self.cpp_info.components["stacktrace_addr2line"].system_libs.append("dl") + if self._with_stacktrace_backtrace: + self.cpp_info.components["stacktrace_backtrace"].system_libs.append("dl") + if self._stacktrace_from_exception_available: + self.cpp_info.components["stacktrace_from_exception"].system_libs.append("dl") + + if self._stacktrace_addr2line_available: + self.cpp_info.components["stacktrace_addr2line"].defines.extend([ + f"BOOST_STACKTRACE_ADDR2LINE_LOCATION=\"{self.options.addr2line_location}\"", + "BOOST_STACKTRACE_USE_ADDR2LINE", + ]) + + if self._with_stacktrace_backtrace: + self.cpp_info.components["stacktrace_backtrace"].defines.append("BOOST_STACKTRACE_USE_BACKTRACE") + self.cpp_info.components["stacktrace_backtrace"].requires.append("libbacktrace::libbacktrace") + + self.cpp_info.components["stacktrace_noop"].defines.append("BOOST_STACKTRACE_USE_NOOP") + + if self.settings.os == "Windows": + self.cpp_info.components["stacktrace_windbg"].defines.append("BOOST_STACKTRACE_USE_WINDBG") + self.cpp_info.components["stacktrace_windbg"].system_libs.extend(["ole32", "dbgeng"]) + self.cpp_info.components["stacktrace_windbg_cached"].defines.append("BOOST_STACKTRACE_USE_WINDBG_CACHED") + self.cpp_info.components["stacktrace_windbg_cached"].system_libs.extend(["ole32", "dbgeng"]) + elif is_apple_os(self) or self.settings.os == "FreeBSD": + self.cpp_info.components["stacktrace"].defines.append("BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED") + + if not self.options.without_python: + pyversion = Version(self._python_version) + # ASWF: Python package is called cpython + self.cpp_info.components[f"python{pyversion.major}{pyversion.minor}"].requires = ["cpython::cpython"] + if not self._shared: + self.cpp_info.components["python"].defines.append("BOOST_PYTHON_STATIC_LIB") + + self.cpp_info.components[f"numpy{pyversion.major}{pyversion.minor}"].requires = ["numpy"] + + if not self.options.get_safe("without_process"): + if self.settings.os == "Windows": + self.cpp_info.components["process"].system_libs.extend(["ntdll", "shell32", "advapi32", "user32"]) + if self._shared: + self.cpp_info.components["process"].defines.append("BOOST_PROCESS_DYN_LINK") + + + if is_msvc(self) or self._is_clang_cl: + # https://github.com/conan-community/conan-boost/issues/127#issuecomment-404750974 + self.cpp_info.components["_libboost"].system_libs.append("bcrypt") + elif self.settings.os == "Linux": + # https://github.com/conan-community/community/issues/135 + self.cpp_info.components["_libboost"].system_libs.append("rt") + if self.options.multithreading: + self.cpp_info.components["_libboost"].system_libs.append("pthread") + elif self.settings.os == "Emscripten": + if self.options.multithreading: + arch = str(self.settings.arch) + # https://emscripten.org/docs/porting/pthreads.html + # The documentation mentions that we should be using the "-s USE_PTHREADS=1" + # but it was causing problems with the target based configurations in conan + # So instead we are using the raw compiler flags (that are being activated + # from the aforementioned flag) + if arch.startswith("x86") or arch.startswith("wasm"): + self.cpp_info.components["_libboost"].cxxflags.append("-pthread") + self.cpp_info.components["_libboost"].sharedlinkflags.extend(["-pthread","--shared-memory"]) + self.cpp_info.components["_libboost"].exelinkflags.extend(["-pthread","--shared-memory"]) + elif self.settings.os == "iOS": + if self.options.multithreading: + # https://github.com/conan-io/conan-center-index/issues/3867 + # runtime crashes occur when using the default platform-specific reference counter/atomic + # https://github.com/boostorg/filesystem/issues/147 + # iOS should use spinlocks to avoid filesystem crashes + self.cpp_info.components["headers"].defines.append("BOOST_SP_USE_SPINLOCK") + else: + self.cpp_info.components["headers"].defines.extend(["BOOST_AC_DISABLE_THREADS", "BOOST_SP_DISABLE_THREADS"]) + + if not self.options.get_safe('without_cobalt', True) and \ + (self.settings.compiler == "gcc" and Version(self.settings.compiler.version) == "10"): + self.cpp_info.components["cobalt"].cxxflags.append("-fcoroutines") + + #TODO: remove in the future, user_info deprecated in conan2, but kept for compatibility while recipe is cross-compatible. + self.user_info.stacktrace_addr2line_available = self._stacktrace_addr2line_available + self.conf_info.define("user.boost:stacktrace_addr2line_available", self._stacktrace_addr2line_available) diff --git a/packages/conan/recipes/boost/dependencies/dependencies-1.78.yml b/packages/conan/recipes/boost/dependencies/dependencies-1.78.yml new file mode 100644 index 00000000..dd320729 --- /dev/null +++ b/packages/conan/recipes/boost/dependencies/dependencies-1.78.yml @@ -0,0 +1,276 @@ +configure_options: +- atomic +- chrono +- container +- context +- contract +- coroutine +- date_time +- exception +- fiber +- filesystem +- graph +- graph_parallel +- iostreams +- json +- locale +- log +- math +- mpi +- nowide +- program_options +- python +- random +- regex +- serialization +- stacktrace +- system +- test +- thread +- timer +- type_erasure +- wave +dependencies: + atomic: [] + chrono: + - system + container: [] + context: [] + contract: + - exception + - thread + coroutine: + - context + - exception + - system + date_time: [] + exception: [] + fiber: + - context + - filesystem + fiber_numa: + - fiber + filesystem: + - atomic + - system + graph: + - math + - random + - regex + - serialization + graph_parallel: + - filesystem + - graph + - mpi + - random + - serialization + iostreams: + - random + - regex + json: + - container + - exception + - system + locale: + - thread + log: + - atomic + - container + - date_time + - exception + - filesystem + - random + - regex + - system + - thread + log_setup: + - log + math: [] + math_c99: + - math + math_c99f: + - math + math_c99l: + - math + math_tr1: + - math + math_tr1f: + - math + math_tr1l: + - math + mpi: + - graph + - serialization + mpi_python: + - mpi + - python + nowide: + - filesystem + numpy: + - python + prg_exec_monitor: + - test + program_options: [] + python: [] + random: + - system + regex: [] + serialization: [] + stacktrace: [] + stacktrace_addr2line: + - stacktrace + stacktrace_backtrace: + - stacktrace + stacktrace_basic: + - stacktrace + stacktrace_noop: + - stacktrace + stacktrace_windbg: + - stacktrace + stacktrace_windbg_cached: + - stacktrace + system: [] + test: + - exception + test_exec_monitor: + - test + thread: + - atomic + - chrono + - container + - date_time + - exception + - system + timer: + - chrono + - system + type_erasure: + - thread + unit_test_framework: + - prg_exec_monitor + - test + - test_exec_monitor + wave: + - filesystem + - serialization + wserialization: + - serialization +libs: + atomic: + - boost_atomic + chrono: + - boost_chrono + container: + - boost_container + context: + - boost_context + contract: + - boost_contract + coroutine: + - boost_coroutine + date_time: + - boost_date_time + exception: + - boost_exception + fiber: + - boost_fiber + fiber_numa: + - boost_fiber_numa + filesystem: + - boost_filesystem + graph: + - boost_graph + graph_parallel: + - boost_graph_parallel + iostreams: + - boost_iostreams + json: + - boost_json + locale: + - boost_locale + log: + - boost_log + log_setup: + - boost_log_setup + math: [] + math_c99: + - boost_math_c99 + math_c99f: + - boost_math_c99f + math_c99l: + - boost_math_c99l + math_tr1: + - boost_math_tr1 + math_tr1f: + - boost_math_tr1f + math_tr1l: + - boost_math_tr1l + mpi: + - boost_mpi + mpi_python: + - boost_mpi_python + nowide: + - boost_nowide + numpy: + - boost_numpy{py_major}{py_minor} + prg_exec_monitor: + - boost_prg_exec_monitor + program_options: + - boost_program_options + python: + - boost_python{py_major}{py_minor} + random: + - boost_random + regex: + - boost_regex + serialization: + - boost_serialization + stacktrace: [] + stacktrace_addr2line: + - boost_stacktrace_addr2line + stacktrace_backtrace: + - boost_stacktrace_backtrace + stacktrace_basic: + - boost_stacktrace_basic + stacktrace_noop: + - boost_stacktrace_noop + stacktrace_windbg: + - boost_stacktrace_windbg + stacktrace_windbg_cached: + - boost_stacktrace_windbg_cached + system: + - boost_system + test: [] + test_exec_monitor: + - boost_test_exec_monitor + thread: + - boost_thread + timer: + - boost_timer + type_erasure: + - boost_type_erasure + unit_test_framework: + - boost_unit_test_framework + wave: + - boost_wave + wserialization: + - boost_wserialization +requirements: + iostreams: + - bzip2 + - lzma + - zlib + - zstd + locale: + - iconv + - icu + python: + - python + regex: + - icu + stacktrace: + - backtrace +static_only: +- boost_exception +- boost_test_exec_monitor +version: 1.78.0 diff --git a/packages/conan/recipes/boost/dependencies/dependencies-1.79.yml b/packages/conan/recipes/boost/dependencies/dependencies-1.79.yml new file mode 100644 index 00000000..ddef536e --- /dev/null +++ b/packages/conan/recipes/boost/dependencies/dependencies-1.79.yml @@ -0,0 +1,276 @@ +configure_options: +- atomic +- chrono +- container +- context +- contract +- coroutine +- date_time +- exception +- fiber +- filesystem +- graph +- graph_parallel +- iostreams +- json +- locale +- log +- math +- mpi +- nowide +- program_options +- python +- random +- regex +- serialization +- stacktrace +- system +- test +- thread +- timer +- type_erasure +- wave +dependencies: + atomic: [] + chrono: + - system + container: [] + context: [] + contract: + - exception + - thread + coroutine: + - context + - exception + - system + date_time: [] + exception: [] + fiber: + - context + - filesystem + fiber_numa: + - fiber + filesystem: + - atomic + - system + graph: + - math + - random + - regex + - serialization + graph_parallel: + - filesystem + - graph + - mpi + - random + - serialization + iostreams: + - random + - regex + json: + - container + - exception + - system + locale: + - thread + log: + - atomic + - container + - date_time + - exception + - filesystem + - random + - regex + - system + - thread + log_setup: + - log + math: [] + math_c99: + - math + math_c99f: + - math + math_c99l: + - math + math_tr1: + - math + math_tr1f: + - math + math_tr1l: + - math + mpi: + - graph + - serialization + mpi_python: + - mpi + - python + nowide: + - filesystem + numpy: + - python + prg_exec_monitor: + - test + program_options: [] + python: [] + random: + - system + regex: [] + serialization: [] + stacktrace: [] + stacktrace_addr2line: + - stacktrace + stacktrace_backtrace: + - stacktrace + stacktrace_basic: + - stacktrace + stacktrace_noop: + - stacktrace + stacktrace_windbg: + - stacktrace + stacktrace_windbg_cached: + - stacktrace + system: [] + test: + - exception + test_exec_monitor: + - test + thread: + - atomic + - chrono + - container + - date_time + - exception + - system + timer: + - chrono + - system + type_erasure: + - thread + unit_test_framework: + - prg_exec_monitor + - test + - test_exec_monitor + wave: + - filesystem + - serialization + wserialization: + - serialization +libs: + atomic: + - boost_atomic + chrono: + - boost_chrono + container: + - boost_container + context: + - boost_context + contract: + - boost_contract + coroutine: + - boost_coroutine + date_time: + - boost_date_time + exception: + - boost_exception + fiber: + - boost_fiber + fiber_numa: + - boost_fiber_numa + filesystem: + - boost_filesystem + graph: + - boost_graph + graph_parallel: + - boost_graph_parallel + iostreams: + - boost_iostreams + json: + - boost_json + locale: + - boost_locale + log: + - boost_log + log_setup: + - boost_log_setup + math: [] + math_c99: + - boost_math_c99 + math_c99f: + - boost_math_c99f + math_c99l: + - boost_math_c99l + math_tr1: + - boost_math_tr1 + math_tr1f: + - boost_math_tr1f + math_tr1l: + - boost_math_tr1l + mpi: + - boost_mpi + mpi_python: + - boost_mpi_python + nowide: + - boost_nowide + numpy: + - boost_numpy{py_major}{py_minor} + prg_exec_monitor: + - boost_prg_exec_monitor + program_options: + - boost_program_options + python: + - boost_python{py_major}{py_minor} + random: + - boost_random + regex: + - boost_regex + serialization: + - boost_serialization + stacktrace: [] + stacktrace_addr2line: + - boost_stacktrace_addr2line + stacktrace_backtrace: + - boost_stacktrace_backtrace + stacktrace_basic: + - boost_stacktrace_basic + stacktrace_noop: + - boost_stacktrace_noop + stacktrace_windbg: + - boost_stacktrace_windbg + stacktrace_windbg_cached: + - boost_stacktrace_windbg_cached + system: + - boost_system + test: [] + test_exec_monitor: + - boost_test_exec_monitor + thread: + - boost_thread + timer: + - boost_timer + type_erasure: + - boost_type_erasure + unit_test_framework: + - boost_unit_test_framework + wave: + - boost_wave + wserialization: + - boost_wserialization +requirements: + iostreams: + - bzip2 + - lzma + - zlib + - zstd + locale: + - iconv + - icu + python: + - python + regex: + - icu + stacktrace: + - backtrace +static_only: +- boost_exception +- boost_test_exec_monitor +version: 1.79.0 diff --git a/packages/conan/recipes/boost/dependencies/dependencies-1.80.0.yml b/packages/conan/recipes/boost/dependencies/dependencies-1.80.0.yml new file mode 100644 index 00000000..4cabd8ca --- /dev/null +++ b/packages/conan/recipes/boost/dependencies/dependencies-1.80.0.yml @@ -0,0 +1,275 @@ +configure_options: +- atomic +- chrono +- container +- context +- contract +- coroutine +- date_time +- exception +- fiber +- filesystem +- graph +- graph_parallel +- iostreams +- json +- locale +- log +- math +- mpi +- nowide +- program_options +- python +- random +- regex +- serialization +- stacktrace +- system +- test +- thread +- timer +- type_erasure +- wave +dependencies: + atomic: [] + chrono: + - system + container: [] + context: [] + contract: + - exception + - thread + coroutine: + - context + - exception + - system + date_time: [] + exception: [] + fiber: + - context + - filesystem + fiber_numa: + - fiber + filesystem: + - atomic + - system + graph: + - math + - random + - regex + - serialization + graph_parallel: + - filesystem + - graph + - mpi + - random + - serialization + iostreams: + - random + - regex + json: + - container + - system + locale: + - thread + log: + - atomic + - container + - date_time + - exception + - filesystem + - random + - regex + - system + - thread + log_setup: + - log + math: [] + math_c99: + - math + math_c99f: + - math + math_c99l: + - math + math_tr1: + - math + math_tr1f: + - math + math_tr1l: + - math + mpi: + - graph + - serialization + mpi_python: + - mpi + - python + nowide: + - filesystem + numpy: + - python + prg_exec_monitor: + - test + program_options: [] + python: [] + random: + - system + regex: [] + serialization: [] + stacktrace: [] + stacktrace_addr2line: + - stacktrace + stacktrace_backtrace: + - stacktrace + stacktrace_basic: + - stacktrace + stacktrace_noop: + - stacktrace + stacktrace_windbg: + - stacktrace + stacktrace_windbg_cached: + - stacktrace + system: [] + test: + - exception + test_exec_monitor: + - test + thread: + - atomic + - chrono + - container + - date_time + - exception + - system + timer: + - chrono + - system + type_erasure: + - thread + unit_test_framework: + - prg_exec_monitor + - test + - test_exec_monitor + wave: + - filesystem + - serialization + wserialization: + - serialization +libs: + atomic: + - boost_atomic + chrono: + - boost_chrono + container: + - boost_container + context: + - boost_context + contract: + - boost_contract + coroutine: + - boost_coroutine + date_time: + - boost_date_time + exception: + - boost_exception + fiber: + - boost_fiber + fiber_numa: + - boost_fiber_numa + filesystem: + - boost_filesystem + graph: + - boost_graph + graph_parallel: + - boost_graph_parallel + iostreams: + - boost_iostreams + json: + - boost_json + locale: + - boost_locale + log: + - boost_log + log_setup: + - boost_log_setup + math: [] + math_c99: + - boost_math_c99 + math_c99f: + - boost_math_c99f + math_c99l: + - boost_math_c99l + math_tr1: + - boost_math_tr1 + math_tr1f: + - boost_math_tr1f + math_tr1l: + - boost_math_tr1l + mpi: + - boost_mpi + mpi_python: + - boost_mpi_python + nowide: + - boost_nowide + numpy: + - boost_numpy{py_major}{py_minor} + prg_exec_monitor: + - boost_prg_exec_monitor + program_options: + - boost_program_options + python: + - boost_python{py_major}{py_minor} + random: + - boost_random + regex: + - boost_regex + serialization: + - boost_serialization + stacktrace: [] + stacktrace_addr2line: + - boost_stacktrace_addr2line + stacktrace_backtrace: + - boost_stacktrace_backtrace + stacktrace_basic: + - boost_stacktrace_basic + stacktrace_noop: + - boost_stacktrace_noop + stacktrace_windbg: + - boost_stacktrace_windbg + stacktrace_windbg_cached: + - boost_stacktrace_windbg_cached + system: + - boost_system + test: [] + test_exec_monitor: + - boost_test_exec_monitor + thread: + - boost_thread + timer: + - boost_timer + type_erasure: + - boost_type_erasure + unit_test_framework: + - boost_unit_test_framework + wave: + - boost_wave + wserialization: + - boost_wserialization +requirements: + iostreams: + - bzip2 + - lzma + - zlib + - zstd + locale: + - iconv + - icu + python: + - python + regex: + - icu + stacktrace: + - backtrace +static_only: +- boost_exception +- boost_test_exec_monitor +version: 1.80.0 diff --git a/packages/conan/recipes/boost/dependencies/dependencies-1.81.0.yml b/packages/conan/recipes/boost/dependencies/dependencies-1.81.0.yml new file mode 100644 index 00000000..838c68bc --- /dev/null +++ b/packages/conan/recipes/boost/dependencies/dependencies-1.81.0.yml @@ -0,0 +1,280 @@ +configure_options: +- atomic +- chrono +- container +- context +- contract +- coroutine +- date_time +- exception +- fiber +- filesystem +- graph +- graph_parallel +- iostreams +- json +- locale +- log +- math +- mpi +- nowide +- program_options +- python +- random +- regex +- serialization +- stacktrace +- system +- test +- thread +- timer +- type_erasure +- url +- wave +dependencies: + atomic: [] + chrono: + - system + container: [] + context: [] + contract: + - exception + - thread + coroutine: + - context + - exception + - system + date_time: [] + exception: [] + fiber: + - context + - filesystem + fiber_numa: + - fiber + filesystem: + - atomic + - system + graph: + - math + - random + - regex + - serialization + graph_parallel: + - filesystem + - graph + - mpi + - random + - serialization + iostreams: + - random + - regex + json: + - container + - system + locale: + - thread + log: + - atomic + - container + - date_time + - exception + - filesystem + - random + - regex + - system + - thread + log_setup: + - log + math: [] + math_c99: + - math + math_c99f: + - math + math_c99l: + - math + math_tr1: + - math + math_tr1f: + - math + math_tr1l: + - math + mpi: + - graph + - serialization + mpi_python: + - mpi + - python + nowide: + - filesystem + numpy: + - python + prg_exec_monitor: + - test + program_options: [] + python: [] + random: + - system + regex: [] + serialization: [] + stacktrace: [] + stacktrace_addr2line: + - stacktrace + stacktrace_backtrace: + - stacktrace + stacktrace_basic: + - stacktrace + stacktrace_noop: + - stacktrace + stacktrace_windbg: + - stacktrace + stacktrace_windbg_cached: + - stacktrace + system: [] + test: + - exception + test_exec_monitor: + - test + thread: + - atomic + - chrono + - container + - date_time + - exception + - system + timer: + - chrono + - system + type_erasure: + - thread + unit_test_framework: + - prg_exec_monitor + - test + - test_exec_monitor + url: + - system + wave: + - filesystem + - serialization + wserialization: + - serialization +libs: + atomic: + - boost_atomic + chrono: + - boost_chrono + container: + - boost_container + context: + - boost_context + contract: + - boost_contract + coroutine: + - boost_coroutine + date_time: + - boost_date_time + exception: + - boost_exception + fiber: + - boost_fiber + fiber_numa: + - boost_fiber_numa + filesystem: + - boost_filesystem + graph: + - boost_graph + graph_parallel: + - boost_graph_parallel + iostreams: + - boost_iostreams + json: + - boost_json + locale: + - boost_locale + log: + - boost_log + log_setup: + - boost_log_setup + math: [] + math_c99: + - boost_math_c99 + math_c99f: + - boost_math_c99f + math_c99l: + - boost_math_c99l + math_tr1: + - boost_math_tr1 + math_tr1f: + - boost_math_tr1f + math_tr1l: + - boost_math_tr1l + mpi: + - boost_mpi + mpi_python: + - boost_mpi_python + nowide: + - boost_nowide + numpy: + - boost_numpy{py_major}{py_minor} + prg_exec_monitor: + - boost_prg_exec_monitor + program_options: + - boost_program_options + python: + - boost_python{py_major}{py_minor} + random: + - boost_random + regex: + - boost_regex + serialization: + - boost_serialization + stacktrace: [] + stacktrace_addr2line: + - boost_stacktrace_addr2line + stacktrace_backtrace: + - boost_stacktrace_backtrace + stacktrace_basic: + - boost_stacktrace_basic + stacktrace_noop: + - boost_stacktrace_noop + stacktrace_windbg: + - boost_stacktrace_windbg + stacktrace_windbg_cached: + - boost_stacktrace_windbg_cached + system: + - boost_system + test: [] + test_exec_monitor: + - boost_test_exec_monitor + thread: + - boost_thread + timer: + - boost_timer + type_erasure: + - boost_type_erasure + unit_test_framework: + - boost_unit_test_framework + url: + - boost_url + wave: + - boost_wave + wserialization: + - boost_wserialization +requirements: + iostreams: + - bzip2 + - lzma + - zlib + - zstd + locale: + - iconv + - icu + python: + - python + regex: + - icu + stacktrace: + - backtrace +static_only: +- boost_exception +- boost_test_exec_monitor +version: 1.81.0 diff --git a/packages/conan/recipes/boost/dependencies/dependencies-1.82.0.yml b/packages/conan/recipes/boost/dependencies/dependencies-1.82.0.yml new file mode 100644 index 00000000..21bc4e9c --- /dev/null +++ b/packages/conan/recipes/boost/dependencies/dependencies-1.82.0.yml @@ -0,0 +1,280 @@ +onfigure_options: +- atomic +- chrono +- container +- context +- contract +- coroutine +- date_time +- exception +- fiber +- filesystem +- graph +- graph_parallel +- iostreams +- json +- locale +- log +- math +- mpi +- nowide +- program_options +- python +- random +- regex +- serialization +- stacktrace +- system +- test +- thread +- timer +- type_erasure +- url +- wave +dependencies: + atomic: [] + chrono: + - system + container: [] + context: [] + contract: + - exception + - thread + coroutine: + - context + - exception + - system + date_time: [] + exception: [] + fiber: + - context + - filesystem + fiber_numa: + - fiber + filesystem: + - atomic + - system + graph: + - math + - random + - regex + - serialization + graph_parallel: + - filesystem + - graph + - mpi + - random + - serialization + iostreams: + - random + - regex + json: + - container + - system + locale: + - thread + log: + - atomic + - container + - date_time + - exception + - filesystem + - random + - regex + - system + - thread + log_setup: + - log + math: [] + math_c99: + - math + math_c99f: + - math + math_c99l: + - math + math_tr1: + - math + math_tr1f: + - math + math_tr1l: + - math + mpi: + - graph + - serialization + mpi_python: + - mpi + - python + nowide: + - filesystem + numpy: + - python + prg_exec_monitor: + - test + program_options: [] + python: [] + random: + - system + regex: [] + serialization: [] + stacktrace: [] + stacktrace_addr2line: + - stacktrace + stacktrace_backtrace: + - stacktrace + stacktrace_basic: + - stacktrace + stacktrace_noop: + - stacktrace + stacktrace_windbg: + - stacktrace + stacktrace_windbg_cached: + - stacktrace + system: [] + test: + - exception + test_exec_monitor: + - test + thread: + - atomic + - chrono + - container + - date_time + - exception + - system + timer: + - chrono + - system + type_erasure: + - thread + unit_test_framework: + - prg_exec_monitor + - test + - test_exec_monitor + url: + - system + wave: + - filesystem + - serialization + wserialization: + - serialization +libs: + atomic: + - boost_atomic + chrono: + - boost_chrono + container: + - boost_container + context: + - boost_context + contract: + - boost_contract + coroutine: + - boost_coroutine + date_time: + - boost_date_time + exception: + - boost_exception + fiber: + - boost_fiber + fiber_numa: + - boost_fiber_numa + filesystem: + - boost_filesystem + graph: + - boost_graph + graph_parallel: + - boost_graph_parallel + iostreams: + - boost_iostreams + json: + - boost_json + locale: + - boost_locale + log: + - boost_log + log_setup: + - boost_log_setup + math: [] + math_c99: + - boost_math_c99 + math_c99f: + - boost_math_c99f + math_c99l: + - boost_math_c99l + math_tr1: + - boost_math_tr1 + math_tr1f: + - boost_math_tr1f + math_tr1l: + - boost_math_tr1l + mpi: + - boost_mpi + mpi_python: + - boost_mpi_python + nowide: + - boost_nowide + numpy: + - boost_numpy{py_major}{py_minor} + prg_exec_monitor: + - boost_prg_exec_monitor + program_options: + - boost_program_options + python: + - boost_python{py_major}{py_minor} + random: + - boost_random + regex: + - boost_regex + serialization: + - boost_serialization + stacktrace: [] + stacktrace_addr2line: + - boost_stacktrace_addr2line + stacktrace_backtrace: + - boost_stacktrace_backtrace + stacktrace_basic: + - boost_stacktrace_basic + stacktrace_noop: + - boost_stacktrace_noop + stacktrace_windbg: + - boost_stacktrace_windbg + stacktrace_windbg_cached: + - boost_stacktrace_windbg_cached + system: + - boost_system + test: [] + test_exec_monitor: + - boost_test_exec_monitor + thread: + - boost_thread + timer: + - boost_timer + type_erasure: + - boost_type_erasure + unit_test_framework: + - boost_unit_test_framework + url: + - boost_url + wave: + - boost_wave + wserialization: + - boost_wserialization +requirements: + iostreams: + - bzip2 + - lzma + - zlib + - zstd + locale: + - iconv + - icu + python: + - python + regex: + - icu + stacktrace: + - backtrace +static_only: +- boost_exception +- boost_test_exec_monitor +version: 1.82.0 diff --git a/packages/conan/recipes/boost/dependencies/dependencies-1.83.0.yml b/packages/conan/recipes/boost/dependencies/dependencies-1.83.0.yml new file mode 100644 index 00000000..7200adb0 --- /dev/null +++ b/packages/conan/recipes/boost/dependencies/dependencies-1.83.0.yml @@ -0,0 +1,278 @@ +configure_options: +- atomic +- chrono +- container +- context +- contract +- coroutine +- date_time +- exception +- fiber +- filesystem +- graph +- graph_parallel +- iostreams +- json +- locale +- log +- math +- mpi +- nowide +- program_options +- python +- random +- regex +- serialization +- stacktrace +- system +- test +- thread +- timer +- type_erasure +- url +- wave +dependencies: + atomic: [] + chrono: + - system + container: [] + context: [] + contract: + - exception + - thread + coroutine: + - context + - exception + - system + date_time: [] + exception: [] + fiber: + - context + - filesystem + fiber_numa: + - fiber + filesystem: + - atomic + - system + graph: + - math + - random + - regex + - serialization + graph_parallel: + - filesystem + - graph + - mpi + - random + - serialization + iostreams: + - random + - regex + json: + - container + - system + locale: + - thread + log: + - atomic + - container + - date_time + - exception + - filesystem + - random + - regex + - system + - thread + log_setup: + - log + math: [] + math_c99: + - math + math_c99f: + - math + math_c99l: + - math + math_tr1: + - math + math_tr1f: + - math + math_tr1l: + - math + mpi: + - graph + - serialization + mpi_python: + - mpi + - python + nowide: + - filesystem + numpy: + - python + prg_exec_monitor: + - test + program_options: [] + python: [] + random: + - system + regex: [] + serialization: [] + stacktrace: [] + stacktrace_addr2line: + - stacktrace + stacktrace_backtrace: + - stacktrace + stacktrace_basic: + - stacktrace + stacktrace_noop: + - stacktrace + stacktrace_windbg: + - stacktrace + stacktrace_windbg_cached: + - stacktrace + system: [] + test: + - exception + test_exec_monitor: + - test + thread: + - atomic + - chrono + - container + - date_time + - exception + - system + timer: [] + type_erasure: + - thread + unit_test_framework: + - prg_exec_monitor + - test + - test_exec_monitor + url: + - system + wave: + - filesystem + - serialization + wserialization: + - serialization +libs: + atomic: + - boost_atomic + chrono: + - boost_chrono + container: + - boost_container + context: + - boost_context + contract: + - boost_contract + coroutine: + - boost_coroutine + date_time: + - boost_date_time + exception: + - boost_exception + fiber: + - boost_fiber + fiber_numa: + - boost_fiber_numa + filesystem: + - boost_filesystem + graph: + - boost_graph + graph_parallel: + - boost_graph_parallel + iostreams: + - boost_iostreams + json: + - boost_json + locale: + - boost_locale + log: + - boost_log + log_setup: + - boost_log_setup + math: [] + math_c99: + - boost_math_c99 + math_c99f: + - boost_math_c99f + math_c99l: + - boost_math_c99l + math_tr1: + - boost_math_tr1 + math_tr1f: + - boost_math_tr1f + math_tr1l: + - boost_math_tr1l + mpi: + - boost_mpi + mpi_python: + - boost_mpi_python + nowide: + - boost_nowide + numpy: + - boost_numpy{py_major}{py_minor} + prg_exec_monitor: + - boost_prg_exec_monitor + program_options: + - boost_program_options + python: + - boost_python{py_major}{py_minor} + random: + - boost_random + regex: + - boost_regex + serialization: + - boost_serialization + stacktrace: [] + stacktrace_addr2line: + - boost_stacktrace_addr2line + stacktrace_backtrace: + - boost_stacktrace_backtrace + stacktrace_basic: + - boost_stacktrace_basic + stacktrace_noop: + - boost_stacktrace_noop + stacktrace_windbg: + - boost_stacktrace_windbg + stacktrace_windbg_cached: + - boost_stacktrace_windbg_cached + system: + - boost_system + test: [] + test_exec_monitor: + - boost_test_exec_monitor + thread: + - boost_thread + timer: + - boost_timer + type_erasure: + - boost_type_erasure + unit_test_framework: + - boost_unit_test_framework + url: + - boost_url + wave: + - boost_wave + wserialization: + - boost_wserialization +requirements: + iostreams: + - bzip2 + - lzma + - zlib + - zstd + locale: + - iconv + - icu + python: + - python + regex: + - icu + stacktrace: + - backtrace +static_only: +- boost_exception +- boost_test_exec_monitor +version: 1.83.0 diff --git a/packages/conan/recipes/boost/dependencies/dependencies-1.84.0.yml b/packages/conan/recipes/boost/dependencies/dependencies-1.84.0.yml new file mode 100644 index 00000000..064fb7bc --- /dev/null +++ b/packages/conan/recipes/boost/dependencies/dependencies-1.84.0.yml @@ -0,0 +1,283 @@ +configure_options: +- atomic +- chrono +- cobalt +- container +- context +- contract +- coroutine +- date_time +- exception +- fiber +- filesystem +- graph +- graph_parallel +- iostreams +- json +- locale +- log +- math +- mpi +- nowide +- program_options +- python +- random +- regex +- serialization +- stacktrace +- system +- test +- thread +- timer +- type_erasure +- url +- wave +dependencies: + atomic: [] + chrono: + - system + cobalt: + - container + - system + container: [] + context: [] + contract: + - exception + - thread + coroutine: + - context + - exception + - system + date_time: [] + exception: [] + fiber: + - context + - filesystem + fiber_numa: + - fiber + filesystem: + - atomic + - system + graph: + - math + - random + - regex + - serialization + graph_parallel: + - filesystem + - graph + - mpi + - random + - serialization + iostreams: + - random + - regex + json: + - container + - system + locale: + - thread + log: + - atomic + - date_time + - exception + - filesystem + - random + - regex + - system + - thread + log_setup: + - log + math: [] + math_c99: + - math + math_c99f: + - math + math_c99l: + - math + math_tr1: + - math + math_tr1f: + - math + math_tr1l: + - math + mpi: + - graph + - serialization + mpi_python: + - mpi + - python + nowide: + - filesystem + numpy: + - python + prg_exec_monitor: + - test + program_options: [] + python: [] + random: + - system + regex: [] + serialization: [] + stacktrace: [] + stacktrace_addr2line: + - stacktrace + stacktrace_backtrace: + - stacktrace + stacktrace_basic: + - stacktrace + stacktrace_noop: + - stacktrace + stacktrace_windbg: + - stacktrace + stacktrace_windbg_cached: + - stacktrace + system: [] + test: + - exception + test_exec_monitor: + - test + thread: + - atomic + - chrono + - container + - date_time + - exception + - system + timer: [] + type_erasure: + - thread + unit_test_framework: + - prg_exec_monitor + - test + - test_exec_monitor + url: + - system + wave: + - filesystem + - serialization + wserialization: + - serialization +libs: + atomic: + - boost_atomic + chrono: + - boost_chrono + cobalt: + - boost_cobalt + container: + - boost_container + context: + - boost_context + contract: + - boost_contract + coroutine: + - boost_coroutine + date_time: + - boost_date_time + exception: + - boost_exception + fiber: + - boost_fiber + fiber_numa: + - boost_fiber_numa + filesystem: + - boost_filesystem + graph: + - boost_graph + graph_parallel: + - boost_graph_parallel + iostreams: + - boost_iostreams + json: + - boost_json + locale: + - boost_locale + log: + - boost_log + log_setup: + - boost_log_setup + math: [] + math_c99: + - boost_math_c99 + math_c99f: + - boost_math_c99f + math_c99l: + - boost_math_c99l + math_tr1: + - boost_math_tr1 + math_tr1f: + - boost_math_tr1f + math_tr1l: + - boost_math_tr1l + mpi: + - boost_mpi + mpi_python: + - boost_mpi_python + nowide: + - boost_nowide + numpy: + - boost_numpy{py_major}{py_minor} + prg_exec_monitor: + - boost_prg_exec_monitor + program_options: + - boost_program_options + python: + - boost_python{py_major}{py_minor} + random: + - boost_random + regex: + - boost_regex + serialization: + - boost_serialization + stacktrace: [] + stacktrace_addr2line: + - boost_stacktrace_addr2line + stacktrace_backtrace: + - boost_stacktrace_backtrace + stacktrace_basic: + - boost_stacktrace_basic + stacktrace_noop: + - boost_stacktrace_noop + stacktrace_windbg: + - boost_stacktrace_windbg + stacktrace_windbg_cached: + - boost_stacktrace_windbg_cached + system: + - boost_system + test: [] + test_exec_monitor: + - boost_test_exec_monitor + thread: + - boost_thread + timer: + - boost_timer + type_erasure: + - boost_type_erasure + unit_test_framework: + - boost_unit_test_framework + url: + - boost_url + wave: + - boost_wave + wserialization: + - boost_wserialization +requirements: + iostreams: + - bzip2 + - lzma + - zlib + - zstd + locale: + - iconv + - icu + python: + - python + regex: + - icu + stacktrace: + - backtrace +static_only: +- boost_exception +- boost_test_exec_monitor +version: 1.84.0 diff --git a/packages/conan/recipes/boost/dependencies/dependencies-1.85.0.yml b/packages/conan/recipes/boost/dependencies/dependencies-1.85.0.yml new file mode 100644 index 00000000..2306346f --- /dev/null +++ b/packages/conan/recipes/boost/dependencies/dependencies-1.85.0.yml @@ -0,0 +1,291 @@ +configure_options: +- atomic +- charconv +- chrono +- cobalt +- container +- context +- contract +- coroutine +- date_time +- exception +- fiber +- filesystem +- graph +- graph_parallel +- iostreams +- json +- locale +- log +- math +- mpi +- nowide +- program_options +- python +- random +- regex +- serialization +- stacktrace +- system +- test +- thread +- timer +- type_erasure +- url +- wave +dependencies: + atomic: [] + charconv: [] + chrono: + - system + cobalt: + - container + - system + container: [] + context: [] + contract: + - exception + - thread + coroutine: + - context + - exception + - system + date_time: [] + exception: [] + fiber: + - context + - filesystem + fiber_numa: + - fiber + filesystem: + - atomic + - system + graph: + - math + - random + - regex + - serialization + graph_parallel: + - filesystem + - graph + - mpi + - random + - serialization + iostreams: + - random + - regex + json: + - container + - system + locale: + - thread + log: + - atomic + - date_time + - exception + - filesystem + - random + - regex + - system + - thread + log_setup: + - log + math: [] + math_c99: + - math + math_c99f: + - math + math_c99l: + - math + math_tr1: + - math + math_tr1f: + - math + math_tr1l: + - math + mpi: + - graph + - serialization + mpi_python: + - mpi + - python + nowide: + - filesystem + numpy: + - python + prg_exec_monitor: + - test + program_options: [] + python: [] + random: + - system + regex: [] + serialization: [] + stacktrace: [] + stacktrace_addr2line: + - stacktrace + stacktrace_backtrace: + - stacktrace + stacktrace_basic: + - stacktrace + stacktrace_from_exception: + - stacktrace + stacktrace_noop: + - stacktrace + stacktrace_windbg: + - stacktrace + stacktrace_windbg_cached: + - stacktrace + system: [] + test: + - exception + test_exec_monitor: + - test + thread: + - atomic + - chrono + - container + - date_time + - exception + - system + timer: [] + type_erasure: + - thread + unit_test_framework: + - prg_exec_monitor + - test + - test_exec_monitor + url: + - system + wave: + - filesystem + - serialization + wserialization: + - serialization +libs: + atomic: + - boost_atomic + charconv: + - boost_charconv + chrono: + - boost_chrono + cobalt: + - boost_cobalt + container: + - boost_container + context: + - boost_context + contract: + - boost_contract + coroutine: + - boost_coroutine + date_time: + - boost_date_time + exception: + - boost_exception + fiber: + - boost_fiber + fiber_numa: + - boost_fiber_numa + filesystem: + - boost_filesystem + graph: + - boost_graph + graph_parallel: + - boost_graph_parallel + iostreams: + - boost_iostreams + json: + - boost_json + locale: + - boost_locale + log: + - boost_log + log_setup: + - boost_log_setup + math: [] + math_c99: + - boost_math_c99 + math_c99f: + - boost_math_c99f + math_c99l: + - boost_math_c99l + math_tr1: + - boost_math_tr1 + math_tr1f: + - boost_math_tr1f + math_tr1l: + - boost_math_tr1l + mpi: + - boost_mpi + mpi_python: + - boost_mpi_python + nowide: + - boost_nowide + numpy: + - boost_numpy{py_major}{py_minor} + prg_exec_monitor: + - boost_prg_exec_monitor + program_options: + - boost_program_options + python: + - boost_python{py_major}{py_minor} + random: + - boost_random + regex: + - boost_regex + serialization: + - boost_serialization + stacktrace: [] + stacktrace_addr2line: + - boost_stacktrace_addr2line + stacktrace_backtrace: + - boost_stacktrace_backtrace + stacktrace_basic: + - boost_stacktrace_basic + stacktrace_from_exception: + - boost_stacktrace_from_exception + stacktrace_noop: + - boost_stacktrace_noop + stacktrace_windbg: + - boost_stacktrace_windbg + stacktrace_windbg_cached: + - boost_stacktrace_windbg_cached + system: + - boost_system + test: [] + test_exec_monitor: + - boost_test_exec_monitor + thread: + - boost_thread + timer: + - boost_timer + type_erasure: + - boost_type_erasure + unit_test_framework: + - boost_unit_test_framework + url: + - boost_url + wave: + - boost_wave + wserialization: + - boost_wserialization +requirements: + iostreams: + - bzip2 + - lzma + - zlib + - zstd + locale: + - iconv + - icu + python: + - python + regex: + - icu + stacktrace: + - backtrace +static_only: +- boost_exception +- boost_test_exec_monitor +version: 1.85.0 diff --git a/packages/conan/recipes/boost/dependencies/dependencies-1.86.0.yml b/packages/conan/recipes/boost/dependencies/dependencies-1.86.0.yml new file mode 100644 index 00000000..ae5b6de3 --- /dev/null +++ b/packages/conan/recipes/boost/dependencies/dependencies-1.86.0.yml @@ -0,0 +1,298 @@ +configure_options: +- atomic +- charconv +- chrono +- cobalt +- container +- context +- contract +- coroutine +- date_time +- exception +- fiber +- filesystem +- graph +- graph_parallel +- iostreams +- json +- locale +- log +- math +- mpi +- nowide +- process +- program_options +- python +- random +- regex +- serialization +- stacktrace +- system +- test +- thread +- timer +- type_erasure +- url +- wave +dependencies: + atomic: [] + charconv: [] + chrono: + - system + cobalt: + - container + - context + - system + container: [] + context: [] + contract: + - exception + - thread + coroutine: + - context + - exception + - system + date_time: [] + exception: [] + fiber: + - context + - filesystem + fiber_numa: + - fiber + filesystem: + - atomic + - system + graph: + - math + - random + - regex + - serialization + graph_parallel: + - filesystem + - graph + - mpi + - random + - serialization + iostreams: + - random + - regex + json: + - container + - system + locale: + - thread + log: + - atomic + - date_time + - exception + - filesystem + - random + - regex + - system + - thread + log_setup: + - log + math: [] + math_c99: + - math + math_c99f: + - math + math_c99l: + - math + math_tr1: + - math + math_tr1f: + - math + math_tr1l: + - math + mpi: + - graph + - serialization + mpi_python: + - mpi + - python + nowide: + - filesystem + numpy: + - python + prg_exec_monitor: + - test + process: + - filesystem + - system + program_options: [] + python: [] + random: + - system + regex: [] + serialization: [] + stacktrace: [] + stacktrace_addr2line: + - stacktrace + stacktrace_backtrace: + - stacktrace + stacktrace_basic: + - stacktrace + stacktrace_from_exception: + - stacktrace + stacktrace_noop: + - stacktrace + stacktrace_windbg: + - stacktrace + stacktrace_windbg_cached: + - stacktrace + system: [] + test: + - exception + test_exec_monitor: + - test + thread: + - atomic + - chrono + - container + - date_time + - exception + - system + timer: [] + type_erasure: + - thread + unit_test_framework: + - prg_exec_monitor + - test + - test_exec_monitor + url: + - system + wave: + - filesystem + - serialization + wserialization: + - serialization +libs: + atomic: + - boost_atomic + charconv: + - boost_charconv + chrono: + - boost_chrono + cobalt: + - boost_cobalt + container: + - boost_container + context: + - boost_context + contract: + - boost_contract + coroutine: + - boost_coroutine + date_time: + - boost_date_time + exception: + - boost_exception + fiber: + - boost_fiber + fiber_numa: + - boost_fiber_numa + filesystem: + - boost_filesystem + graph: + - boost_graph + graph_parallel: + - boost_graph_parallel + iostreams: + - boost_iostreams + json: + - boost_json + locale: + - boost_locale + log: + - boost_log + log_setup: + - boost_log_setup + math: [] + math_c99: + - boost_math_c99 + math_c99f: + - boost_math_c99f + math_c99l: + - boost_math_c99l + math_tr1: + - boost_math_tr1 + math_tr1f: + - boost_math_tr1f + math_tr1l: + - boost_math_tr1l + mpi: + - boost_mpi + mpi_python: + - boost_mpi_python + nowide: + - boost_nowide + numpy: + - boost_numpy{py_major}{py_minor} + prg_exec_monitor: + - boost_prg_exec_monitor + process: + - boost_process + program_options: + - boost_program_options + python: + - boost_python{py_major}{py_minor} + random: + - boost_random + regex: + - boost_regex + serialization: + - boost_serialization + stacktrace: [] + stacktrace_addr2line: + - boost_stacktrace_addr2line + stacktrace_backtrace: + - boost_stacktrace_backtrace + stacktrace_basic: + - boost_stacktrace_basic + stacktrace_from_exception: + - boost_stacktrace_from_exception + stacktrace_noop: + - boost_stacktrace_noop + stacktrace_windbg: + - boost_stacktrace_windbg + stacktrace_windbg_cached: + - boost_stacktrace_windbg_cached + system: + - boost_system + test: [] + test_exec_monitor: + - boost_test_exec_monitor + thread: + - boost_thread + timer: + - boost_timer + type_erasure: + - boost_type_erasure + unit_test_framework: + - boost_unit_test_framework + url: + - boost_url + wave: + - boost_wave + wserialization: + - boost_wserialization +requirements: + iostreams: + - bzip2 + - lzma + - zlib + - zstd + locale: + - iconv + - icu + python: + - python + regex: + - icu + stacktrace: + - backtrace +static_only: +- boost_exception +- boost_test_exec_monitor +version: 1.86.0 diff --git a/packages/conan/recipes/boost/patches/1.82.0-locale-iconv-library-option.patch b/packages/conan/recipes/boost/patches/1.82.0-locale-iconv-library-option.patch new file mode 100644 index 00000000..80b22dd5 --- /dev/null +++ b/packages/conan/recipes/boost/patches/1.82.0-locale-iconv-library-option.patch @@ -0,0 +1,12 @@ +diff --git a/libs/locale/build/Jamfile.v2 b/libs/locale/build/Jamfile.v2 +index f1321db3..36899cdc 100644 +--- a/libs/locale/build/Jamfile.v2 ++++ b/libs/locale/build/Jamfile.v2 +@@ -22,6 +22,7 @@ project /boost/locale + # Features + + feature.feature boost.locale.iconv : on off : optional propagated ; ++feature.feature boost.locale.iconv.lib : libc libiconv : optional propagated ; + feature.feature boost.locale.icu : on off : optional propagated ; + feature.feature boost.locale.posix : on off : optional propagated ; + feature.feature boost.locale.std : on off : optional propagated ; diff --git a/packages/conan/recipes/boost/patches/1.85.0-container-aliasing-violation-fix.patch b/packages/conan/recipes/boost/patches/1.85.0-container-aliasing-violation-fix.patch new file mode 100644 index 00000000..39dac9ca --- /dev/null +++ b/packages/conan/recipes/boost/patches/1.85.0-container-aliasing-violation-fix.patch @@ -0,0 +1,416 @@ +From a92131b34b78f7f010881750ecb8b4ce274511d2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= +Date: Sun, 28 Apr 2024 23:29:59 +0200 +Subject: [PATCH 1/1] Remove UB in flat_map implementation when the + implementation has a movable std::pair + +--- + boost/container/allocator_traits.hpp | 144 +++++++++++++++++- + boost/container/detail/construct_in_place.hpp | 36 ++++- + boost/container/flat_map.hpp | 67 ++++++-- + 3 files changed, 229 insertions(+), 18 deletions(-) + +diff --git a/boost/container/allocator_traits.hpp b/boost/container/allocator_traits.hpp +index cdb6683e8..8e2fafa7f 100644 +--- a/boost/container/allocator_traits.hpp ++++ b/boost/container/allocator_traits.hpp +@@ -32,6 +32,8 @@ + #include + #include //is_empty + #include ++#include ++#include + #ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP + #include + #endif +@@ -81,6 +83,144 @@ + + namespace boost { + namespace container { ++namespace dtl { ++ ++#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) ++ ++template ++BOOST_CONTAINER_FORCEINLINE void construct_type(T *p, BOOST_FWD_REF(Args) ...args) ++{ ++ ::new((void*)p, boost_container_new_t()) T(::boost::forward(args)...); ++} ++ ++template < class Pair, class KeyType, class ... Args> ++typename dtl::enable_if< dtl::is_pair, void >::type ++construct_type ++ (Pair* p, try_emplace_t, BOOST_FWD_REF(KeyType) k, BOOST_FWD_REF(Args) ...args) ++{ ++ construct_type(dtl::addressof(p->first), ::boost::forward(k)); ++ BOOST_CONTAINER_TRY{ ++ construct_type(dtl::addressof(p->second), ::boost::forward(args)...); ++ } ++ BOOST_CONTAINER_CATCH(...) { ++ typedef typename Pair::first_type first_type; ++ dtl::addressof(p->first)->~first_type(); ++ BOOST_CONTAINER_RETHROW ++ } ++ BOOST_CONTAINER_CATCH_END ++} ++ ++#else ++ ++#define BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPEJ(N) \ ++template\ ++BOOST_CONTAINER_FORCEINLINE \ ++ typename dtl::disable_if_c::value, void >::type \ ++construct_type(T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ ++{\ ++ ::new((void*)p, boost_container_new_t()) T( BOOST_MOVE_FWD##N );\ ++}\ ++// ++BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPEJ) ++#undef BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPEJ ++ ++#define BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPE(N) \ ++template < class Pair, class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N>\ ++typename dtl::enable_if< dtl::is_pair, void >::type construct_type\ ++ (Pair* p, try_emplace_t, BOOST_FWD_REF(KeyType) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ ++{\ ++ construct_type(dtl::addressof(p->first), ::boost::forward(k));\ ++ BOOST_CONTAINER_TRY{\ ++ construct_type(dtl::addressof(p->second) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ ++ }\ ++ BOOST_CONTAINER_CATCH(...) {\ ++ typedef typename Pair::first_type first_type;\ ++ dtl::addressof(p->first)->~first_type();\ ++ BOOST_CONTAINER_RETHROW\ ++ }\ ++ BOOST_CONTAINER_CATCH_END\ ++}\ ++// ++BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPE) ++#undef BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPE ++ ++#endif ++ ++template ++inline ++typename dtl::enable_if, void >::type ++construct_type(T* p) ++{ ++ dtl::construct_type(dtl::addressof(p->first)); ++ BOOST_CONTAINER_TRY{ ++ dtl::construct_type(dtl::addressof(p->second)); ++ } ++ BOOST_CONTAINER_CATCH(...) { ++ typedef typename T::first_type first_type; ++ dtl::addressof(p->first)->~first_type(); ++ BOOST_CONTAINER_RETHROW ++ } ++ BOOST_CONTAINER_CATCH_END ++} ++ ++ ++template ++inline ++typename dtl::enable_if_c ++ < dtl::is_pair::value ++ , void >::type ++construct_type(T* p, U &u) ++{ ++ dtl::construct_type(dtl::addressof(p->first), u.first); ++ BOOST_CONTAINER_TRY{ ++ dtl::construct_type(dtl::addressof(p->second), u.second); ++ } ++ BOOST_CONTAINER_CATCH(...) { ++ typedef typename T::first_type first_type; ++ dtl::addressof(p->first)->~first_type(); ++ BOOST_CONTAINER_RETHROW ++ } ++ BOOST_CONTAINER_CATCH_END ++} ++ ++template ++inline ++typename dtl::enable_if_c ++ < dtl::is_pair::type>::value && ++ !boost::move_detail::is_reference::value //This is needed for MSVC10 and ambiguous overloads ++ , void >::type ++construct_type(T* p, BOOST_RV_REF(U) u) ++{ ++ dtl::construct_type(dtl::addressof(p->first), ::boost::move(u.first)); ++ BOOST_CONTAINER_TRY{ ++ dtl::construct_type(dtl::addressof(p->second), ::boost::move(u.second)); ++ } ++ BOOST_CONTAINER_CATCH(...) { ++ typedef typename T::first_type first_type; ++ dtl::addressof(p->first)->~first_type(); ++ BOOST_CONTAINER_RETHROW ++ } ++ BOOST_CONTAINER_CATCH_END ++} ++ ++template ++inline ++typename dtl::enable_if, void >::type ++construct_type(T* p, BOOST_FWD_REF(U) x, BOOST_FWD_REF(V) y) ++{ ++ dtl::construct_type(dtl::addressof(p->first), ::boost::forward(x)); ++ BOOST_CONTAINER_TRY{ ++ dtl::construct_type(dtl::addressof(p->second), ::boost::forward(y)); ++ } ++ BOOST_CONTAINER_CATCH(...) { ++ typedef typename T::first_type first_type; ++ dtl::addressof(p->first)->~first_type(); ++ BOOST_CONTAINER_RETHROW ++ } ++ BOOST_CONTAINER_CATCH_END ++} ++ ++} //namespace dtl + + #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + +@@ -419,7 +559,7 @@ struct allocator_traits + + template + inline static void priv_construct(dtl::false_type, Allocator &, T *p, BOOST_FWD_REF(Args) ...args) +- { ::new((void*)p, boost_container_new_t()) T(::boost::forward(args)...); } ++ { dtl::construct_type(p, ::boost::forward(args)...); } + #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + public: + +@@ -450,7 +590,7 @@ struct allocator_traits + \ + template\ + inline static void priv_construct(dtl::false_type, Allocator &, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ +- { ::new((void*)p, boost_container_new_t()) T(BOOST_MOVE_FWD##N); }\ ++ { dtl::construct_type(p BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ + // + BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL) + #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL +diff --git a/boost/container/detail/construct_in_place.hpp b/boost/container/detail/construct_in_place.hpp +index d824d814a..bfdf05c2e 100644 +--- a/boost/container/detail/construct_in_place.hpp ++++ b/boost/container/detail/construct_in_place.hpp +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + namespace boost { + namespace container { +@@ -62,9 +63,42 @@ BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T *dest, empla + + //Assignment + ++template ++BOOST_CONTAINER_FORCEINLINE ++ typename dtl::disable_if_c ++ < dtl::is_pair::type>::value ++ && dtl::is_pair::type>::value ++ , void>::type ++assign_in_place_ref(T &t, BOOST_FWD_REF(U) u) ++{ t = ::boost::forward(u); } ++ ++template ++BOOST_CONTAINER_FORCEINLINE ++ typename dtl::enable_if_c ++ < dtl::is_pair::type>::value ++ && dtl::is_pair::type>::value ++ , void>::type ++assign_in_place_ref(T &t, const U &u) ++{ ++ assign_in_place_ref(t.first, u.first); ++ assign_in_place_ref(t.second, u.second); ++} ++ ++template ++BOOST_CONTAINER_FORCEINLINE ++ typename dtl::enable_if_c ++ < dtl::is_pair::type>::value ++ && dtl::is_pair::type>::value ++ , void>::type ++assign_in_place_ref(T &t, BOOST_RV_REF(U) u) ++{ ++ assign_in_place_ref(t.first, ::boost::move(u.first)); ++ assign_in_place_ref(t.second, ::boost::move(u.second)); ++} ++ + template + BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, InpIt source) +-{ *dest = *source; } ++{ assign_in_place_ref(*dest, *source); } + + template + BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, value_init_construct_iterator) +diff --git a/boost/container/flat_map.hpp b/boost/container/flat_map.hpp +index b092fb212..e4843f566 100644 +--- a/boost/container/flat_map.hpp ++++ b/boost/container/flat_map.hpp +@@ -48,6 +48,11 @@ + #include + #endif + ++#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) ++#define BOOST_CONTAINER_STD_PAIR_IS_MOVABLE ++#endif ++ ++ + namespace boost { + namespace container { + +@@ -58,21 +63,37 @@ class flat_multimap; + + namespace dtl{ + ++#if defined(BOOST_CONTAINER_STD_PAIR_IS_MOVABLE) + template + BOOST_CONTAINER_FORCEINLINE static D &force(S &s) +-{ return *move_detail::force_ptr(&s); } ++{ return s; } + + template + BOOST_CONTAINER_FORCEINLINE static const D &force(const S &s) +-{ return *move_detail::force_ptr(&s); } ++{ return s; } ++ ++template ++BOOST_CONTAINER_FORCEINLINE static D force_copy(D s) ++{ return s; } ++ ++#else //!BOOST_CONTAINER_DOXYGEN_INVOKED ++ ++template ++BOOST_CONTAINER_FORCEINLINE static D &force(S &s) ++{ return *move_detail::launder_cast(&s); } ++ ++template ++BOOST_CONTAINER_FORCEINLINE static const D &force(const S &s) ++{ return *move_detail::launder_cast(&s); } + + template + BOOST_CONTAINER_FORCEINLINE static D force_copy(const S &s) + { +- const D *const vp = move_detail::force_ptr(&s); ++ const D *const vp = move_detail::launder_cast(&s); + D ret_val(*vp); + return ret_val; + } ++#endif //BOOST_CONTAINER_DOXYGEN_INVOKED + + } //namespace dtl{ + +@@ -118,18 +139,27 @@ class flat_map + private: + BOOST_COPYABLE_AND_MOVABLE(flat_map) + //This is the tree that we should store if pair was movable ++ typedef std::pair std_pair_t; + typedef dtl::flat_tree< +- std::pair, ++ std_pair_t, + dtl::select1st, + Compare, + AllocatorOrContainer> tree_t; + + //This is the real tree stored here. It's based on a movable pair ++ typedef dtl::pair dtl_pair_t; ++ ++ #ifdef BOOST_CONTAINER_STD_PAIR_IS_MOVABLE ++ typedef std_pair_t impl_pair_t; ++ #else ++ typedef dtl_pair_t impl_pair_t; ++ #endif ++ + typedef dtl::flat_tree< +- dtl::pair, ++ impl_pair_t, + dtl::select1st, + Compare, +- typename dtl::container_or_allocator_rebind >::type ++ typename dtl::container_or_allocator_rebind::type + > impl_tree_t; + impl_tree_t m_flat_tree; // flat tree representing flat_map + +@@ -851,7 +881,7 @@ class flat_map + //! @copydoc ::boost::container::flat_set::nth(size_type) const + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline + const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW +- { return dtl::force_copy(m_flat_tree.nth(n)); } ++ { return dtl::force_copy(m_flat_tree.nth(n)); } + + //! @copydoc ::boost::container::flat_set::index_of(iterator) + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline +@@ -1099,7 +1129,7 @@ class flat_map + template + inline BOOST_CONTAINER_DOC1ST + ( std::pair +- , typename dtl::enable_if_c::value ++ , typename dtl::enable_if_c::value + BOOST_MOVE_I std::pair >::type) + insert(BOOST_FWD_REF(Pair) x) + { +@@ -1153,7 +1183,7 @@ class flat_map + template + inline BOOST_CONTAINER_DOC1ST + ( iterator +- , typename dtl::enable_if_c::value ++ , typename dtl::enable_if_c::value + BOOST_MOVE_I iterator>::type) + insert(const_iterator p, BOOST_FWD_REF(Pair) x) + { +@@ -1777,17 +1807,24 @@ class flat_multimap + #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + private: + BOOST_COPYABLE_AND_MOVABLE(flat_multimap) ++ typedef std::pair std_pair_t; + typedef dtl::flat_tree< +- std::pair, ++ std_pair_t, + dtl::select1st, + Compare, + AllocatorOrContainer> tree_t; + //This is the real tree stored here. It's based on a movable pair ++ typedef dtl::pair dtl_pair_t; ++ #ifdef BOOST_CONTAINER_STD_PAIR_IS_MOVABLE ++ typedef std_pair_t impl_pair_t; ++ #else ++ typedef dtl_pair_t impl_pair_t; ++ #endif + typedef dtl::flat_tree< +- dtl::pair, ++ impl_pair_t, + dtl::select1st, + Compare, +- typename dtl::container_or_allocator_rebind >::type ++ typename dtl::container_or_allocator_rebind::type + > impl_tree_t; + impl_tree_t m_flat_tree; // flat tree representing flat_map + +@@ -2388,7 +2425,7 @@ class flat_multimap + //! @copydoc ::boost::container::flat_set::nth(size_type) const + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline + const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW +- { return dtl::force_copy(m_flat_tree.nth(n)); } ++ { return dtl::force_copy(m_flat_tree.nth(n)); } + + //! @copydoc ::boost::container::flat_set::index_of(iterator) + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline +@@ -2477,7 +2514,7 @@ class flat_multimap + template + inline BOOST_CONTAINER_DOC1ST + ( iterator +- , typename dtl::enable_if_c::value ++ , typename dtl::enable_if_c::value + BOOST_MOVE_I iterator >::type) + insert(BOOST_FWD_REF(Pair) x) + { return dtl::force_copy(m_flat_tree.emplace_equal(boost::forward(x))); } +@@ -2514,7 +2551,7 @@ class flat_multimap + template + inline BOOST_CONTAINER_DOC1ST + ( iterator +- , typename dtl::enable_if_c::value ++ , typename dtl::enable_if_c::value + BOOST_MOVE_I iterator>::type) + insert(const_iterator p, BOOST_FWD_REF(Pair) x) + { +-- +2.31.1 diff --git a/packages/conan/recipes/boost/patches/dummy.diff b/packages/conan/recipes/boost/patches/dummy.diff deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/conan/recipes/boost/rebuild-dependencies.py b/packages/conan/recipes/boost/rebuild-dependencies.py new file mode 100644 index 00000000..6c1ba56c --- /dev/null +++ b/packages/conan/recipes/boost/rebuild-dependencies.py @@ -0,0 +1,498 @@ +#!/usr/bin/env python3 + +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/boost/all/rebuild-dependencies.py + +import argparse +import dataclasses +import json +import logging +import pprint +import re +import subprocess +import tempfile +from pathlib import Path +from typing import Dict, List, Tuple + +import yaml +from conan.tools.files import chdir + +log = logging.Logger("boost-dependency-builder") +log.parent = logging.root +log.setLevel(logging.WARNING) + + +BOOST_GIT_URL = "https://github.com/boostorg/boost.git" + +# When adding (or removing) an option, also add this option to the list in +# `conanfile.py` and re-run this script. +CONFIGURE_OPTIONS = ( + "atomic", + "charconv", + "chrono", + "cobalt", + "container", + "context", + "contract", + "coroutine", + "date_time", + "exception", + "fiber", + "filesystem", + "graph", + "graph_parallel", + "iostreams", + "json", + "locale", + "log", + "math", + "mpi", + "nowide", + "process", + "program_options", + "python", + "random", + "regex", + "serialization", + "stacktrace", + "system", + "test", + "thread", + "timer", + "type_erasure", + "url", + "wave", +) + + +CONAN_REQUIREMENTS = ( + "backtrace", + "bzip2", + "iconv", + "icu", + "lzma", + "python", + "zlib", + "zstd", +) + + +LINUX_SYSTEM_LIBS = ( + "dl", + "m", + "rt", + "pthread", +) + + +WINDOWS_SYSTEM_LIBS = ( + "bcrypt", + "coredll", + "dbgeng", +) + + +@dataclasses.dataclass +class BoostDependenciesExport(object): + version: str + configure_options: List[str] + dependencies: Dict[str, List[str]] = dataclasses.field(default_factory=dict) + libs: Dict[str, List[str]] = dataclasses.field(default_factory=dict) + requirements: Dict[str, List[str]] = dataclasses.field(default_factory=dict) + static_only: List[str] = dataclasses.field(default_factory=list) + + +@dataclasses.dataclass +class BoostDependencies(object): + buildables: List[str] + export: BoostDependenciesExport + + +class BoostDependencyBuilder(object): + def __init__(self, boost_version: str, boostdep_version: str, tmppath: Path, git_url: str, outputdir: Path, unsafe: bool): + self.boost_version = boost_version + self.boostdep_version = boostdep_version + self.git_url = git_url + self.tmppath = tmppath + self.outputdir = outputdir + self.unsafe = unsafe + self._boostdep = None + + @property + def boost_path(self) -> Path: + return self.tmppath / "boost" + + def do_git_update(self) -> None: + if not self.boost_path.exists(): + with chdir(self, self.tmppath): + print("Cloning boost git") + subprocess.check_call(["git", "clone", "--", self.git_url, "boost"]) + with chdir(self, self.boost_path): + print("Checking out current master") + subprocess.check_call(["git", "checkout", "origin/master"]) + print("Removing master branch") + subprocess.check_call(["git", "branch", "-D", "master"]) + else: + with chdir(self, self.boost_path): + print("Updating git repo") + subprocess.check_call(["git", "fetch", "origin"]) + print("Removing all local changes to git repo") + subprocess.check_call(["git", "reset", "--hard", "HEAD"]) + print("Checking out current master") + subprocess.check_call(["git", "checkout", "origin/master"]) + + def do_git_submodule_update(self): + with chdir(self, self.boost_path): + if not self.unsafe: + # De-init + init to make sure that boostdep won't detect a new or removed boost library + print("De-init git submodules") + subprocess.check_call(["git", "submodule", "deinit", "--all", "-f"]) + + try: + print(f"Checking out version {self.boost_version}") + subprocess.check_call(["git", "checkout", f"boost-{self.boost_version}"]) + except subprocess.CalledProcessError: + print(f"version {self.boost_version} does not exist") + raise + + print("Re-init git submodules") + subprocess.check_call(["git", "submodule", "update", "--init"]) + + print("Removing unknown files/directories") + subprocess.check_call(["git", "clean", "-d", "-f"]) + + def do_install_boostdep(self): + with chdir(self, self.boost_path): + print(f"Installing boostdep/{self.boostdep_version}") + cmd = ["conan", "install", "--tool-requires", f"boostdep/{self.boostdep_version}", "--format", "json", "-vquiet"] + info = json.loads(subprocess.check_output(cmd)) + self._boostdep = Path(info["graph"]["nodes"]["1"]["package_folder"]) / "bin" / "boostdep" + + _GREP_IGNORE_PREFIX = ("#", "\"") + _GREP_IGNORE_PARTS = ("boost", "<", ">") + + @classmethod + def _grep_libs(cls, regex, text): + res = set() + for m in re.finditer(regex, text, flags=re.MULTILINE): + # If text before main capture group contains a string or a comment => ignore + ignore = False + for ign in cls._GREP_IGNORE_PREFIX: + if ign in m.group(1): + ignore = True + if ignore: + continue + l = m.group(2).lower() + ignore = False + for ign in cls._GREP_IGNORE_PARTS: + if ign in l: + ignore = True + if ignore: + continue + res.add(l) + return list(res) + + def _grep_requirements(self, component: str) -> List[str]: + jam = self.boost_path / "libs" / component / "build" / "Jamfile.v2" + if not jam.is_file(): + jam = self.boost_path / "libs" / component / "build" / "Jamfile" + if not jam.is_file(): + log.warning("Can't find Jamfile for %s. Unable to determine dependencies.", component) + return [] + contents = jam.open().read() + + using = self._grep_libs("\n(.*)using\\s+([^ ;:]+)\\s*", contents) + libs = self._grep_libs("\n(.*)\\s(?:searched-)?lib\\s+([^ \t\n;:]+)", contents) + + requirements = using + libs + return requirements + + def _sort_requirements(self, requirements: List[str]) -> Tuple[List[str], Dict[str, List[str]], List[str]]: + conan_requirements = set() + system_libs = {} + unknown_libs = set() + + for req in requirements: + if req in LINUX_SYSTEM_LIBS: + system_libs.setdefault("linux", []).append(req) + continue + if req in WINDOWS_SYSTEM_LIBS: + system_libs.setdefault("windows", []).append(req) + continue + added = False + for conan_req in CONAN_REQUIREMENTS: + if conan_req in req: + conan_requirements.add(conan_req) + added = True + if added: + continue + unknown_libs.add(req) + return list(conan_requirements), system_libs, list(unknown_libs) + + def do_boostdep_collect(self) -> BoostDependencies: + with chdir(self, self.boost_path): + buildables = subprocess.check_output([self._boostdep, "--list-buildable"], text=True) + buildables = buildables.splitlines() + log.debug("`boostdep --list--buildable` returned these buildables: %s", buildables) + + # modules = subprocess.check_output([self._boostdep_path, "--list-modules"]) + # modules = modules.decode().splitlines() + + dependency_tree = {} + buildable_dependencies = subprocess.check_output([self._boostdep, "--list-buildable-dependencies"], text=True) + log.debug("boostdep --list-buildable-dependencies returns: %s", buildable_dependencies) + for line in buildable_dependencies.splitlines(): + if re.match(r"^[\s]*#.*", line): + continue + match = re.match(r"([\S]+)\s*=\s*([^;]+)\s*;\s*", line) + if not match: + continue + master = match.group(1) + dependencies = re.split(r"\s+", match.group(2).strip()) + dependency_tree[master] = dependencies + + log.debug("Using `boostdep --track-sources`, the following dependency tree was calculated:") + log.debug(pprint.pformat(dependency_tree)) + + filtered_dependency_tree = {k: [d for d in v if d in buildables] for k, v in dependency_tree.items() if k in buildables} + + configure_options = [] + for conf_option in CONFIGURE_OPTIONS: + if conf_option in filtered_dependency_tree: + configure_options.append(conf_option) + else: + log.warning("option %s not available in %s", conf_option, self.boost_version) + + log.debug("Following config_options remain: %s", configure_options) + + requirements = {} + for conf_option in configure_options: + reqs = self._grep_requirements(conf_option) + conan_requirements, system_libs, unknown_libs = self._sort_requirements(reqs) + if system_libs: + log.warning("Module '%s' (%s) has system libraries: %s", conf_option, self.boost_version, system_libs) + if unknown_libs: + log.warning("Module '%s' (%s) has unknown libs: %s", conf_option, self.boost_version, unknown_libs) + if conan_requirements: + requirements[conf_option] = conan_requirements + + boost_dependencies = BoostDependencies( + export=BoostDependenciesExport( + version=self.boost_version, + configure_options=configure_options, + dependencies=filtered_dependency_tree, + requirements=requirements, + static_only=[], + ), + buildables=buildables, + ) + + return boost_dependencies + + @staticmethod + def detect_cycles(tree: Dict[str, List[str]]) -> Dict[str, List[str]]: + tree = {k: v[:] for k, v in tree.items()} + while tree: + nodeps = set(k for k, v in tree.items() if not v) + if not nodeps: + return tree + tree = {k: [d for d in v if d not in nodeps] for k, v in tree.items() if k not in nodeps} + return {} + + def _fix_dependencies(self, deptree: Dict[str, List[str]]) -> Dict[str, List[str]]: + try: + # python does not depend on graph + deptree["python"].remove("graph") + except (KeyError, ValueError): + pass + + try: + # graph does not depend on graph_parallel + deptree["graph"].remove("graph_parallel") + except (KeyError, ValueError): + pass + + try: + # mpi does not depend on python + deptree["mpi"].remove("python") + except (KeyError, ValueError): + pass + + if "mpi_python" in deptree and "python" not in deptree["mpi_python"]: + deptree["mpi_python"].append("python") + + # Break random/math dependency cycle + try: + deptree["math"].remove("random") + except ValueError: + pass + + remaining_tree = self.detect_cycles(deptree) + if remaining_tree: + raise Exception(f"Dependency cycle detected. Remaining tree: {remaining_tree}") + return deptree + + @staticmethod + def _boostify_library(lib: str) -> str: + return f"boost_{lib}" + + def do_create_libraries(self, boost_dependencies: BoostDependencies): + libraries = {} + module_provides_extra = {} + + # Look for the names of libraries in Jam build files + for buildable in boost_dependencies.buildables: + construct_jam = lambda jam_ext : self.boost_path / "libs" / buildable / "build" / f"Jamfile{jam_ext}" + try: + buildable_jam = next(construct_jam(jam_ext) for jam_ext in ("", ".v2") if construct_jam(jam_ext).is_file()) + except StopIteration: + raise Exception(f"Cannot find jam build file for {buildable}") + jam_text = buildable_jam.read_text() + buildable_libs = re.findall("[ \n](boost-)?lib ([a-zA-Z0-9_]+)[ \n]", jam_text) + buildable_libs = set(f"boost_{lib}" if lib_prefix else lib for lib_prefix, lib in buildable_libs) + buildable_libs = set(l[len("boost_"):] for l in buildable_libs if l.startswith("boost_")) # list(filter(lambda l: l.startswith("boost"), buildable_libs)) + + if not buildable_libs: + # Some boost releases support multiple python versions + if buildable == "python": + buildable_libs.add("python") + if not buildable_libs: + raise Exception(f"Cannot find any library for buildable {buildable}") + + if buildable in buildable_libs: + libraries[buildable] = [f"boost_{buildable}"] + buildable_libs.remove(buildable) + else: + libraries[buildable] = [] + module_provides_extra[buildable] = buildable_libs + for buildable_dep in buildable_libs: + boost_dependencies.export.dependencies[buildable_dep] = [buildable] + libraries[buildable_dep] = [f"boost_{buildable_dep}"] + + # Boost.Test: unit_test_framework depends on all libraries of Boost.Test + if "unit_test_framework" in boost_dependencies.export.dependencies and "test" in module_provides_extra: + boost_dependencies.export.dependencies["unit_test_framework"].extend(module_provides_extra["test"].difference({"unit_test_framework"})) + + # python and numpy have a version suffix. Add it here. + if "python" in libraries: + if len(libraries["python"]) != 1: + raise Exception("Boost.Python should provide exactly one library") + libraries["python"][0] += "{py_major}{py_minor}" + if "numpy" in libraries: + if len(libraries["numpy"]) != 1: + raise Exception("Boost.Numpy should provide exactly one library") + libraries["numpy"][0] += "{py_major}{py_minor}" + + boost_dependencies.export.libs = libraries + boost_dependencies.export.static_only = [ + "boost_exception", + "boost_test_exec_monitor", + ] + + return boost_dependencies + + @property + def _outputpath(self) -> Path: + return self.outputdir / f"dependencies-{self.boost_version}.yml" + + @classmethod + def _sort_item(cls, item): + if isinstance(item, dict): + items = sorted(item.items()) + new_items = [] + for item in sorted(items): + new_items.append((item[0], cls._sort_item(item[1]))) + return dict(new_items) + elif isinstance(item, tuple): + return tuple(cls._sort_item(e) for e in sorted(item)) + elif isinstance(item, list): + return list(cls._sort_item(e) for e in sorted(item)) + else: + return item + + def do_create_dependency_file(self) -> None: + tree = self.do_boostdep_collect() + tree = self.do_create_libraries(tree) + + tree.export.dependencies = self._fix_dependencies(tree.export.dependencies) + + data = dataclasses.asdict(tree.export) + if self.unsafe: + data["UNSAFE"] = "!DO NOT COMMIT! !THIS FILE IS GENERATED WITH THE UNSAFE OPTION ENABLED!" + + data = self._sort_item(data) + + print(f"Creating {self.outputdir}") + with self._outputpath.open("w") as fout: + yaml.dump(data, fout) + + +def main(args=None) -> int: + parser = argparse.ArgumentParser() + parser.add_argument("--verbose", dest="verbose", action="store_true", help="verbose output") + parser.add_argument("-t", dest="tmppath", help="temporary folder where to clone boost (default is system temporary folder)") + parser.add_argument("-d", dest="boostdep_version", default="1.82.0", type=str, help="boostdep version") + parser.add_argument("-u", dest="git_url", default=BOOST_GIT_URL, help="boost git url") + parser.add_argument("-U", dest="git_update", action="store_true", help="update the git repo") + parser.add_argument("-o", dest="outputdir", default=None, type=Path, help="output dependency dir") + parser.add_argument("-x", dest="unsafe", action="store_true", help="unsafe fast(er) operation") + + version_group = parser.add_mutually_exclusive_group(required=True) + version_group.add_argument("-v", dest="boost_version", help="boost version") + version_group.add_argument("-A", dest="boost_version", action="store_const", const=None, help="All boost versions") + ns = parser.parse_args(args) + + logging.basicConfig(format="[%(levelname)s] %(message)s") + if ns.verbose: + log.setLevel(logging.DEBUG) + + if not ns.tmppath: + ns.tmppath = Path(tempfile.gettempdir()) + print(f"Temporary folder is {ns.tmppath}") + if not ns.outputdir: + ns.outputdir = Path("dependencies") + print(f"Dependencies folder is {ns.outputdir}") + + ns.outputdir.mkdir(exist_ok=True) + + git_update_done = False + + if ns.boost_version is None: + conan_data = yaml.safe_load(Path("conandata.yml").open()) + boost_versions = list(conan_data["sources"].keys()) + else: + boost_versions = [ns.boost_version] + + for boost_version in boost_versions: + print(f"Starting {boost_version}") + boost_collector = BoostDependencyBuilder( + boost_version=boost_version, + boostdep_version=ns.boostdep_version, + git_url=ns.git_url, + outputdir=ns.outputdir, + tmppath=ns.tmppath, + unsafe=ns.unsafe, + ) + + if not ns.git_update and not boost_collector.boost_path.exists(): + log.error("Boost directory does not exist. Re-execute this script with -U to run 'git update'.") + return 1 + + if ns.git_update and not git_update_done: + boost_collector.do_git_update() + git_update_done = True + + boost_collector.do_git_submodule_update() + + boost_collector.do_install_boostdep() + + boost_collector.do_create_dependency_file() + return 0 + + +if __name__ == "__main__": + import sys + sys.exit(main()) diff --git a/packages/conan/recipes/boost/test_package_DISABLE/CMakeLists.txt b/packages/conan/recipes/boost/test_package/CMakeLists.txt similarity index 50% rename from packages/conan/recipes/boost/test_package_DISABLE/CMakeLists.txt rename to packages/conan/recipes/boost/test_package/CMakeLists.txt index d55fa2ea..94ae6d53 100644 --- a/packages/conan/recipes/boost/test_package_DISABLE/CMakeLists.txt +++ b/packages/conan/recipes/boost/test_package/CMakeLists.txt @@ -1,36 +1,71 @@ -cmake_minimum_required(VERSION 3.12) +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/7abb9ee39e6009e3dbc45043307a1098246d4ad7/recipes/boost/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) +if(UNIX AND NOT APPLE) + # use RPATH instead of RUNPATH so that + # transitive dependencies can be located + add_link_options("LINKER:--disable-new-dtags") +endif() + +include(CTest) +enable_testing() + +if(BOOST_NAMESPACE) + add_definitions("-DBOOST_NAMESPACE=${BOOST_NAMESPACE}") +endif() + if(NOT HEADER_ONLY) if(WITH_RANDOM) find_package(Boost COMPONENTS random REQUIRED) add_executable(random_exe random.cpp) target_link_libraries(random_exe PRIVATE Boost::random) + add_test(NAME boost_random COMMAND random_exe) endif() if(WITH_REGEX) find_package(Boost COMPONENTS regex REQUIRED) add_executable(regex_exe regex.cpp) target_link_libraries(regex_exe PRIVATE Boost::regex) + set_property(TARGET regex_exe PROPERTY CXX_STANDARD 11) + add_test(NAME boost_regex COMMAND regex_exe) endif() if(WITH_TEST) find_package(Boost COMPONENTS unit_test_framework REQUIRED) add_executable(test_exe test.cpp) - target_compile_definitions(test_exe PRIVATE -DBOOST_TEST_DYN_LINK) target_link_libraries(test_exe PRIVATE Boost::unit_test_framework) + set_property(TARGET test_exe PROPERTY CXX_STANDARD 11) + add_test(NAME boost_test COMMAND test_exe) endif() if(WITH_COROUTINE) find_package(Boost COMPONENTS coroutine REQUIRED) add_executable(coroutine_exe coroutine.cpp) target_link_libraries(coroutine_exe PRIVATE Boost::coroutine) + set_property(TARGET coroutine_exe PROPERTY CXX_STANDARD 11) + add_test(NAME coroutine_test COMMAND coroutine_exe) endif() if(WITH_CHRONO) find_package(Boost COMPONENTS chrono REQUIRED) add_executable(chrono_exe chrono.cpp) target_link_libraries(chrono_exe PRIVATE Boost::chrono) + set_property(TARGET chrono_exe PROPERTY CXX_STANDARD 11) + add_test(NAME chrono_test COMMAND chrono_exe) + endif() + + if(WITH_FIBER) + find_package(Boost COMPONENTS fiber REQUIRED) + add_executable(fiber_exe fiber.cpp) + target_link_libraries(fiber_exe PRIVATE Boost::fiber) + set_property(TARGET fiber_exe PROPERTY CXX_STANDARD 11) + add_test(NAME boost_fiber COMMAND fiber_exe) endif() if(WITH_JSON) @@ -38,6 +73,7 @@ if(NOT HEADER_ONLY) add_executable(json_exe json.cpp) target_link_libraries(json_exe PRIVATE Boost::json) set_property(TARGET json_exe PROPERTY CXX_STANDARD 11) + add_test(NAME boost_json COMMAND json_exe) endif() if(WITH_NOWIDE) @@ -45,12 +81,15 @@ if(NOT HEADER_ONLY) add_executable(nowide_exe nowide.cpp) target_link_libraries(nowide_exe PRIVATE Boost::nowide) set_property(TARGET nowide_exe PROPERTY CXX_STANDARD 11) + add_test(NAME boost_nowide COMMAND nowide_exe ${CMAKE_CURRENT_SOURCE_DIR}/conanfile.py) endif() if(WITH_LOCALE) find_package(Boost COMPONENTS locale REQUIRED) add_executable(locale_exe locale.cpp) target_link_libraries(locale_exe PRIVATE Boost::locale) + set_property(TARGET locale_exe PROPERTY CXX_STANDARD 11) + add_test(NAME boost_locale COMMAND locale_exe) endif() if(WITH_STACKTRACE_ADDR2LINE) @@ -58,12 +97,16 @@ if(NOT HEADER_ONLY) add_executable(stacktrace_addr2line_exe stacktrace.cpp) target_compile_definitions(stacktrace_addr2line_exe PRIVATE TEST_STACKTRACE_IMPL=1) target_link_libraries(stacktrace_addr2line_exe PRIVATE Boost::stacktrace_addr2line) + set_property(TARGET stacktrace_addr2line_exe PROPERTY CXX_STANDARD 11) + add_test(NAME boost_stacktrace_addr2line COMMAND stacktrace_addr2line_exe) endif() if(WITH_STACKTRACE_BACKTRACE) add_executable(stacktrace_backtrace_exe stacktrace.cpp) target_compile_definitions(stacktrace_backtrace_exe PRIVATE TEST_STACKTRACE_IMPL=2) target_link_libraries(stacktrace_backtrace_exe PRIVATE Boost::stacktrace_backtrace) + set_property(TARGET stacktrace_backtrace_exe PROPERTY CXX_STANDARD 11) + add_test(NAME boost_stacktrace_backtrace COMMAND stacktrace_backtrace_exe) endif() if(WITH_STACKTRACE) @@ -72,42 +115,72 @@ if(NOT HEADER_ONLY) add_executable(stacktrace_noop_exe stacktrace.cpp) target_compile_definitions(stacktrace_noop_exe PRIVATE TEST_STACKTRACE_IMPL=4) target_link_libraries(stacktrace_noop_exe PRIVATE Boost::stacktrace_noop) + set_property(TARGET stacktrace_noop_exe PROPERTY CXX_STANDARD 11) + add_test(NAME boost_stacktrace_noop COMMAND stacktrace_noop_exe) if(WIN32) add_executable(stacktrace_windbg_exe stacktrace.cpp) target_compile_definitions(stacktrace_windbg_exe PRIVATE TEST_STACKTRACE_IMPL=5) target_link_libraries(stacktrace_windbg_exe PRIVATE Boost::stacktrace_windbg) + set_property(TARGET stacktrace_windbg_exe PROPERTY CXX_STANDARD 11) + add_test(NAME boost_stacktrace_windbg COMMAND stacktrace_windbg_exe) add_executable(stacktrace_windbg_cached_exe stacktrace.cpp) target_compile_definitions(stacktrace_windbg_cached_exe PRIVATE TEST_STACKTRACE_IMPL=6) target_link_libraries(stacktrace_windbg_cached_exe PRIVATE Boost::stacktrace_windbg_cached) + set_property(TARGET stacktrace_windbg_cached_exe PROPERTY CXX_STANDARD 11) + add_test(NAME boost_stacktrace_windbg_cached COMMAND stacktrace_windbg_cached_exe) else() add_executable(stacktrace_basic_exe stacktrace.cpp) target_compile_definitions(stacktrace_basic_exe PRIVATE TEST_STACKTRACE_IMPL=3) target_link_libraries(stacktrace_basic_exe PRIVATE Boost::stacktrace_basic) + set_property(TARGET stacktrace_basic_exe PROPERTY CXX_STANDARD 11) + add_test(NAME boost_stacktrace_basic COMMAND stacktrace_basic_exe) endif() endif() + if (WITH_PROCESS) + find_package(Boost COMPONENTS process REQUIRED) + add_executable(process_exe process.cpp) + target_link_libraries(process_exe PRIVATE Boost::process) + set_property(TARGET process_exe PROPERTY CXX_STANDARD 11) + add_test(NAME boost_process COMMAND process_exe) + endif() + if(WITH_PYTHON) find_package(Boost COMPONENTS python REQUIRED) add_library(hello_ext MODULE python.cpp) set_property(TARGET hello_ext PROPERTY PREFIX "") - find_package(Python COMPONENTS REQUIRED Interpreter Development) + find_package(Python3 ${PYTHON_VERSION_TO_SEARCH} COMPONENTS Interpreter Development NumPy REQUIRED) - target_include_directories(hello_ext PRIVATE ${PYTHON_INCLUDE_DIRS}) - target_link_libraries(hello_ext PRIVATE Boost::python${PYTHON_COMPONENT_SUFFIX} ${PYTHON_LIBRARIES}) + target_link_libraries(hello_ext PRIVATE Boost::python Python3::Python) if(WIN32) set_target_properties(hello_ext PROPERTIES SUFFIX ".pyd") endif() + add_test(NAME boost_python COMMAND Python3::Interpreter "${CMAKE_CURRENT_SOURCE_DIR}/python.py") + set_property(TEST boost_python PROPERTY ENVIRONMENT "PYTHONPATH=$") add_executable(numpy_exe numpy.cpp) - target_include_directories(numpy_exe PRIVATE ${PYTHON_INCLUDE_DIRS}) - target_link_libraries(numpy_exe PRIVATE Boost::numpy${PYTHON_COMPONENT_SUFFIX} ${PYTHON_LIBRARIES}) + target_link_libraries(numpy_exe PRIVATE Boost::numpy Python3::Python Python3::NumPy) + add_test(NAME boost_numpy COMMAND numpy_exe) + set_property(TEST boost_numpy PROPERTY ENVIRONMENT "PYTHONPATH=${Python_SITELIB}") + endif() + + if(WITH_URL) + find_package(Boost COMPONENTS url REQUIRED) + add_executable(url_exe url.cpp) + target_link_libraries(url_exe PRIVATE Boost::url) + set_property(TARGET url_exe PROPERTY CXX_STANDARD 11) + add_test(NAME boost_url COMMAND url_exe) endif() + endif() # Test header-only target find_package(Boost REQUIRED) add_executable(lambda_exe lambda.cpp) target_link_libraries(lambda_exe PRIVATE Boost::headers) +add_test(NAME boost_boost COMMAND lambda_exe) + + diff --git a/packages/conan/recipes/boost/test_package_DISABLE/chrono.cpp b/packages/conan/recipes/boost/test_package/chrono.cpp similarity index 100% rename from packages/conan/recipes/boost/test_package_DISABLE/chrono.cpp rename to packages/conan/recipes/boost/test_package/chrono.cpp diff --git a/packages/conan/recipes/boost/test_package/conanfile.py b/packages/conan/recipes/boost/test_package/conanfile.py new file mode 100644 index 00000000..0d42c2fd --- /dev/null +++ b/packages/conan/recipes/boost/test_package/conanfile.py @@ -0,0 +1,126 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT + +from conan import ConanFile +from conan.errors import ConanException +from conan.tools.build import can_run +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import chdir + +import os + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualBuildEnv", "VirtualRunEnv" + test_type = "explicit" + + def _boost_option(self, name, default): + try: + return getattr(self.dependencies["boost"].options, name, default) + except (AttributeError, ConanException): + return default + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(f"cpython/{os.environ['ASWF_CPYTHON_VERSION']}@{self.user}/{self.channel}", transitive_headers=True, transitive_libs=True) + self.requires(self.tested_reference_str) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["HEADER_ONLY"] = self.dependencies[ + "boost" + ].options.header_only + if not self.dependencies["boost"].options.header_only: + tc.cache_variables["Boost_USE_STATIC_LIBS"] = not self.dependencies[ + "boost" + ].options.shared + tc.cache_variables["WITH_PYTHON"] = not self.dependencies[ + "boost" + ].options.without_python + if not self.dependencies["boost"].options.without_python: + pyversion = self.dependencies["boost"].options.python_version + tc.cache_variables["PYTHON_VERSION_TO_SEARCH"] = pyversion + # ASWF: boost package fails to encode path to Python + # get it from cpython package + # tc.cache_variables["Python_EXECUTABLE"] = self.dependencies[ + # "boost" + # ].options.python_executable + pythonInfo = self.dependencies["cpython"] + tc.cache_variables["Python_EXECUTABLE"] = os.path.join(pythonInfo.package_folder, pythonInfo.cpp_info.bindirs[0], "python") + tc.cache_variables["Python_SITELIB"] = os.path.join(pythonInfo.package_folder, pythonInfo.cpp_info.libdirs[0], + "python{os.environ['ASWF_PYTHON_MAJOR_MINOR_VERSION']}","site-packages") + + tc.cache_variables["WITH_RANDOM"] = not self.dependencies[ + "boost" + ].options.without_random + tc.cache_variables["WITH_REGEX"] = not self.dependencies[ + "boost" + ].options.without_regex + tc.cache_variables["WITH_TEST"] = not self.dependencies[ + "boost" + ].options.without_test + tc.cache_variables["WITH_COROUTINE"] = not self.dependencies[ + "boost" + ].options.without_coroutine + tc.cache_variables["WITH_CHRONO"] = not self.dependencies[ + "boost" + ].options.without_chrono + tc.cache_variables["WITH_FIBER"] = not self.dependencies[ + "boost" + ].options.without_fiber + tc.cache_variables["WITH_LOCALE"] = not self.dependencies[ + "boost" + ].options.without_locale + tc.cache_variables["WITH_NOWIDE"] = not self._boost_option( + "without_nowide", True + ) + tc.cache_variables["WITH_JSON"] = not self._boost_option("without_json", True) + tc.cache_variables["WITH_PROCESS"] = not self._boost_option( + "without_process", True + ) + tc.cache_variables["WITH_STACKTRACE"] = not self.dependencies[ + "boost" + ].options.without_stacktrace + tc.cache_variables["WITH_STACKTRACE_ADDR2LINE"] = self.dependencies[ + "boost" + ].conf_info.get("user.boost:stacktrace_addr2line_available") + tc.cache_variables["WITH_STACKTRACE_BACKTRACE"] = self._boost_option( + "with_stacktrace_backtrace", False + ) + tc.cache_variables["WITH_URL"] = not self._boost_option("without_url", True) + if ( + self.dependencies["boost"].options.namespace != "boost" + and not self.dependencies["boost"].options.namespace_alias + ): + tc.cache_variables["BOOST_NAMESPACE"] = self.dependencies[ + "boost" + ].options.namespace + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not can_run(self): + return + with chdir(self, self.folders.build_folder): + # When boost and its dependencies are built as shared libraries, + # the test executables need to locate them. Typically the + # `conanrun` env should be enough, but this may cause problems on macOS + # where the CMake installation has dependencies on Apple-provided + # system libraries that are incompatible with Conan-provided ones. + # When `conanrun` is enabled, DYLD_LIBRARY_PATH will also apply + # to ctest itself. Given that CMake already embeds RPATHs by default, + # we can bypass this by using the `conanbuild` environment on + # non-Windows platforms, while still retaining the correct behaviour. + # env = "conanrun" if self.settings.os == "Windows" else "conanbuild" + # ASWF: our Linux builds want conanrun + env = "conanrun" if self.settings.os != "Windows" else "conanbuild" + self.run( + f"ctest --output-on-failure -C {self.settings.build_type}", env=env + ) diff --git a/packages/conan/recipes/boost/test_package_DISABLE/coroutine.cpp b/packages/conan/recipes/boost/test_package/coroutine.cpp similarity index 81% rename from packages/conan/recipes/boost/test_package_DISABLE/coroutine.cpp rename to packages/conan/recipes/boost/test_package/coroutine.cpp index 85f05a83..06e901c7 100644 --- a/packages/conan/recipes/boost/test_package_DISABLE/coroutine.cpp +++ b/packages/conan/recipes/boost/test_package/coroutine.cpp @@ -1,6 +1,10 @@ #include #include +#if defined(BOOST_NAMESPACE) +namespace boost = BOOST_NAMESPACE; +#endif + using namespace boost::coroutines; void cooperative(coroutine::push_type &sink) diff --git a/packages/conan/recipes/boost/test_package/fiber.cpp b/packages/conan/recipes/boost/test_package/fiber.cpp new file mode 100644 index 00000000..6a0165c1 --- /dev/null +++ b/packages/conan/recipes/boost/test_package/fiber.cpp @@ -0,0 +1,134 @@ +// Copyright Nat Goodspeed + Oliver Kowalke 2015. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include + +#if defined(BOOST_NAMESPACE) +namespace boost = BOOST_NAMESPACE; +#endif + +static std::size_t fiber_count{ 0 }; +static std::mutex mtx_count{}; +static boost::fibers::condition_variable_any cnd_count{}; +typedef std::unique_lock< std::mutex > lock_type; + +/***************************************************************************** + * example fiber function + *****************************************************************************/ +//[fiber_fn_ws +void whatevah( char me) { + try { + std::thread::id my_thread = std::this_thread::get_id(); /**< get ID of initial thread >*/ + { + std::ostringstream buffer; + buffer << "fiber " << me << " started on thread " << my_thread << '\n'; + std::cout << buffer.str() << std::flush; + } + for ( unsigned i = 0; i < 10; ++i) { /**< loop ten times >*/ + boost::this_fiber::yield(); /**< yield to other fibers >*/ + std::thread::id new_thread = std::this_thread::get_id(); /**< get ID of current thread >*/ + if ( new_thread != my_thread) { /**< test if fiber was migrated to another thread >*/ + my_thread = new_thread; + std::ostringstream buffer; + buffer << "fiber " << me << " switched to thread " << my_thread << '\n'; + std::cout << buffer.str() << std::flush; + } + } + } catch ( ... ) { + } + lock_type lk( mtx_count); + if ( 0 == --fiber_count) { /**< Decrement fiber counter for each completed fiber. >*/ + lk.unlock(); + cnd_count.notify_all(); /**< Notify all fibers waiting on `cnd_count`. >*/ + } +} +//] + +/***************************************************************************** + * example thread function + *****************************************************************************/ +//[thread_fn_ws +void thread( boost::fibers::detail::thread_barrier * b) { + std::ostringstream buffer; + buffer << "thread started " << std::this_thread::get_id() << std::endl; + std::cout << buffer.str() << std::flush; + boost::fibers::use_scheduling_algorithm< boost::fibers::algo::shared_work >(); /**< + Install the scheduling algorithm `boost::fibers::algo::shared_work` in order to + join the work sharing. + >*/ + b->wait(); /**< sync with other threads: allow them to start processing >*/ + lock_type lk( mtx_count); + cnd_count.wait( lk, [](){ return 0 == fiber_count; } ); /**< + Suspend main fiber and resume worker fibers in the meanwhile. + Main fiber gets resumed (e.g returns from `condition_variable_any::wait()`) + if all worker fibers are complete. + >*/ + BOOST_ASSERT( 0 == fiber_count); +} +//] + +/***************************************************************************** + * main() + *****************************************************************************/ +int main( int argc, char *argv[]) { + std::cout << "main thread started " << std::this_thread::get_id() << std::endl; + //[main_ws + boost::fibers::use_scheduling_algorithm< boost::fibers::algo::shared_work >(); /*< + Install the scheduling algorithm `boost::fibers::algo::shared_work` in the main thread + too, so each new fiber gets launched into the shared pool. + >*/ + + for ( char c : std::string("abcdefghijklmnopqrstuvwxyz")) { /*< + Launch a number of worker fibers; each worker fiber picks up a character + that is passed as parameter to fiber-function `whatevah`. + Each worker fiber gets detached. + >*/ + boost::fibers::fiber([c](){ whatevah( c); }).detach(); + ++fiber_count; /*< Increment fiber counter for each new fiber. >*/ + } + boost::fibers::detail::thread_barrier b( 4); + std::thread threads[] = { /*< + Launch a couple of threads that join the work sharing. + >*/ + std::thread( thread, & b), + std::thread( thread, & b), + std::thread( thread, & b) + }; + b.wait(); /*< sync with other threads: allow them to start processing >*/ + { + lock_type/*< `lock_type` is typedef'ed as __unique_lock__< [@http://en.cppreference.com/w/cpp/thread/mutex `std::mutex`] > >*/ lk( mtx_count); + cnd_count.wait( lk, [](){ return 0 == fiber_count; } ); /*< + Suspend main fiber and resume worker fibers in the meanwhile. + Main fiber gets resumed (e.g returns from `condition_variable_any::wait()`) + if all worker fibers are complete. + >*/ + } /*< + Releasing lock of mtx_count is required before joining the threads, otherwise + the other threads would be blocked inside condition_variable::wait() and + would never return (deadlock). + >*/ + BOOST_ASSERT( 0 == fiber_count); + for ( std::thread & t : threads) { /*< wait for threads to terminate >*/ + t.join(); + } + //] + std::cout << "done." << std::endl; + return EXIT_SUCCESS; +} diff --git a/packages/conan/recipes/boost/test_package_DISABLE/json.cpp b/packages/conan/recipes/boost/test_package/json.cpp similarity index 86% rename from packages/conan/recipes/boost/test_package_DISABLE/json.cpp rename to packages/conan/recipes/boost/test_package/json.cpp index f74f69c4..3670a3dd 100644 --- a/packages/conan/recipes/boost/test_package_DISABLE/json.cpp +++ b/packages/conan/recipes/boost/test_package/json.cpp @@ -1,4 +1,9 @@ #include + +#if defined(BOOST_NAMESPACE) +namespace boost = BOOST_NAMESPACE; +#endif + using namespace boost::json; #include diff --git a/packages/conan/recipes/boost/test_package_DISABLE/lambda.cpp b/packages/conan/recipes/boost/test_package/lambda.cpp similarity index 84% rename from packages/conan/recipes/boost/test_package_DISABLE/lambda.cpp rename to packages/conan/recipes/boost/test_package/lambda.cpp index 471be397..0b35eec2 100644 --- a/packages/conan/recipes/boost/test_package_DISABLE/lambda.cpp +++ b/packages/conan/recipes/boost/test_package/lambda.cpp @@ -3,6 +3,10 @@ #include #include +#if defined(BOOST_NAMESPACE) +namespace boost = BOOST_NAMESPACE; +#endif + int main(int argc, const char * const argv[]) { using namespace boost::lambda; diff --git a/packages/conan/recipes/boost/test_package_DISABLE/locale.cpp b/packages/conan/recipes/boost/test_package/locale.cpp similarity index 96% rename from packages/conan/recipes/boost/test_package_DISABLE/locale.cpp rename to packages/conan/recipes/boost/test_package/locale.cpp index 4722b702..b21f1624 100644 --- a/packages/conan/recipes/boost/test_package_DISABLE/locale.cpp +++ b/packages/conan/recipes/boost/test_package/locale.cpp @@ -9,6 +9,11 @@ #include #include #include + +#if defined(BOOST_NAMESPACE) +namespace boost = BOOST_NAMESPACE; +#endif + int main() { using namespace boost::locale; diff --git a/packages/conan/recipes/boost/test_package_DISABLE/nowide.cpp b/packages/conan/recipes/boost/test_package/nowide.cpp similarity index 93% rename from packages/conan/recipes/boost/test_package_DISABLE/nowide.cpp rename to packages/conan/recipes/boost/test_package/nowide.cpp index 516a345a..10a3495f 100644 --- a/packages/conan/recipes/boost/test_package_DISABLE/nowide.cpp +++ b/packages/conan/recipes/boost/test_package/nowide.cpp @@ -5,6 +5,11 @@ #include #include #include + +#if defined(BOOST_NAMESPACE) +namespace boost = BOOST_NAMESPACE; +#endif + int main(int argc,char **argv) { boost::nowide::args a(argc,argv); // Fix arguments - make them UTF-8 diff --git a/packages/conan/recipes/boost/test_package_DISABLE/numpy.cpp b/packages/conan/recipes/boost/test_package/numpy.cpp similarity index 90% rename from packages/conan/recipes/boost/test_package_DISABLE/numpy.cpp rename to packages/conan/recipes/boost/test_package/numpy.cpp index 361342c7..184d107a 100644 --- a/packages/conan/recipes/boost/test_package_DISABLE/numpy.cpp +++ b/packages/conan/recipes/boost/test_package/numpy.cpp @@ -1,6 +1,10 @@ #include #include +#if defined(BOOST_NAMESPACE) +namespace boost = BOOST_NAMESPACE; +#endif + namespace p = boost::python; namespace np = boost::python::numpy; diff --git a/packages/conan/recipes/boost/test_package/process.cpp b/packages/conan/recipes/boost/test_package/process.cpp new file mode 100644 index 00000000..fa89afeb --- /dev/null +++ b/packages/conan/recipes/boost/test_package/process.cpp @@ -0,0 +1,44 @@ +// Copyright (c) 2022 Klemens Morgenstern +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// This comes from the following Boost example: +// https://github.com/boostorg/process/blob/boost-1.86.0/example/v2/intro.cpp + +// clang-format: off +#include +#include +// clang-format: on + +#include +#include + +#include +#include + +#if defined(BOOST_NAMESPACE) +namespace boost = BOOST_NAMESPACE; +#endif + +namespace proc = boost::process::v2; +namespace asio = boost::asio; + +int main() +{ + asio::io_context ctx; + asio::readable_pipe p{ctx}; + + const auto exe = proc::environment::find_executable("cmake"); + + proc::process c{ctx, exe, {"--version"}, proc::process_stdio{nullptr, p}}; + + std::string line; + boost::system::error_code ec; + + auto sz = asio::read(p, asio::dynamic_buffer(line), ec); + + std::cout << "CMake version: '" << line << "'" << std::endl; + + c.wait(); +} diff --git a/packages/conan/recipes/boost/test_package_DISABLE/python.cpp b/packages/conan/recipes/boost/test_package/python.cpp similarity index 71% rename from packages/conan/recipes/boost/test_package_DISABLE/python.cpp rename to packages/conan/recipes/boost/test_package/python.cpp index 753aa189..f10411c1 100644 --- a/packages/conan/recipes/boost/test_package_DISABLE/python.cpp +++ b/packages/conan/recipes/boost/test_package/python.cpp @@ -1,5 +1,9 @@ #include +#if defined(BOOST_NAMESPACE) +namespace boost = BOOST_NAMESPACE; +#endif + char const* greet() { return "hello, world!!!!!"; diff --git a/packages/conan/recipes/boost/test_package_DISABLE/python.py b/packages/conan/recipes/boost/test_package/python.py similarity index 100% rename from packages/conan/recipes/boost/test_package_DISABLE/python.py rename to packages/conan/recipes/boost/test_package/python.py diff --git a/packages/conan/recipes/boost/test_package_DISABLE/random.cpp b/packages/conan/recipes/boost/test_package/random.cpp similarity index 90% rename from packages/conan/recipes/boost/test_package_DISABLE/random.cpp rename to packages/conan/recipes/boost/test_package/random.cpp index c00a15c0..c78d082b 100644 --- a/packages/conan/recipes/boost/test_package_DISABLE/random.cpp +++ b/packages/conan/recipes/boost/test_package/random.cpp @@ -4,6 +4,10 @@ #include #include +#if defined(BOOST_NAMESPACE) +namespace boost = BOOST_NAMESPACE; +#endif + int main() { std::string chars( "abcdefghijklmnopqrstuvwxyz" diff --git a/packages/conan/recipes/boost/test_package_DISABLE/regex.cpp b/packages/conan/recipes/boost/test_package/regex.cpp similarity index 85% rename from packages/conan/recipes/boost/test_package_DISABLE/regex.cpp rename to packages/conan/recipes/boost/test_package/regex.cpp index 93a5d66b..416c10ba 100644 --- a/packages/conan/recipes/boost/test_package_DISABLE/regex.cpp +++ b/packages/conan/recipes/boost/test_package/regex.cpp @@ -1,6 +1,10 @@ #include #include +#if defined(BOOST_NAMESPACE) +namespace boost = BOOST_NAMESPACE; +#endif + int main(int argc, const char * const argv[]) { std::string line; diff --git a/packages/conan/recipes/boost/test_package_DISABLE/stacktrace.cpp b/packages/conan/recipes/boost/test_package/stacktrace.cpp similarity index 96% rename from packages/conan/recipes/boost/test_package_DISABLE/stacktrace.cpp rename to packages/conan/recipes/boost/test_package/stacktrace.cpp index d5867648..da8310b8 100644 --- a/packages/conan/recipes/boost/test_package_DISABLE/stacktrace.cpp +++ b/packages/conan/recipes/boost/test_package/stacktrace.cpp @@ -2,6 +2,10 @@ #include +#if defined(BOOST_NAMESPACE) +namespace boost = BOOST_NAMESPACE; +#endif + void f3() { std::cout << "==start stacktrace==\n" << boost::stacktrace::stacktrace() << "==end stacktrace==\n"; } diff --git a/packages/conan/recipes/boost/test_package_DISABLE/test.cpp b/packages/conan/recipes/boost/test_package/test.cpp similarity index 100% rename from packages/conan/recipes/boost/test_package_DISABLE/test.cpp rename to packages/conan/recipes/boost/test_package/test.cpp diff --git a/packages/conan/recipes/boost/test_package/url.cpp b/packages/conan/recipes/boost/test_package/url.cpp new file mode 100644 index 00000000..dd65390f --- /dev/null +++ b/packages/conan/recipes/boost/test_package/url.cpp @@ -0,0 +1,14 @@ +// +// Copyright (c) 2022 alandefreitas (alandefreitas@gmail.com) +// +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt +// + +#include +#include + +int main() { + assert(sizeof(boost::urls::url) > 0); + return 0; +} diff --git a/packages/conan/recipes/boost/test_package_DISABLE/conanfile.py b/packages/conan/recipes/boost/test_package_DISABLE/conanfile.py deleted file mode 100644 index 437d2478..00000000 --- a/packages/conan/recipes/boost/test_package_DISABLE/conanfile.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. -# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. -# SPDX-License-Identifier: MIT - -from conan import ConanFile -from conan.errors import ConanException -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conans import tools, RunEnvironment -import os - - -class TestPackageConan(ConanFile): - settings = "os", "compiler", "arch", "build_type", "python" - generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" - - def _boost_option(self, name, default): - try: - return getattr(self.options["boost"], name, default) - except (AttributeError, ConanException): - return default - - def layout(self): - cmake_layout(self) - - def generate(self): - tc = CMakeToolchain(self) - tc.cache_variables["WITH_PYTHON"] = not self.options["boost"].without_python - if not self.options["boost"].without_python: - pyversion = tools.Version(self.settings.python) - tc.cache_variables["Python_ADDITIONAL_VERSIONS"] = "{}.{}".format( - pyversion.major, pyversion.minor - ) - tc.cache_variables["PYTHON_COMPONENT_SUFFIX"] = "{}{}".format( - pyversion.major, pyversion.minor - ) - tc.cache_variables["WITH_RANDOM"] = not self.options["boost"].without_random - tc.cache_variables["WITH_REGEX"] = not self.options["boost"].without_regex - tc.cache_variables["WITH_TEST"] = not self.options["boost"].without_test - tc.cache_variables["WITH_COROUTINE"] = not self.options[ - "boost" - ].without_coroutine - tc.cache_variables["WITH_CHRONO"] = not self.options["boost"].without_chrono - tc.cache_variables["WITH_LOCALE"] = not self.options["boost"].without_locale - tc.cache_variables["WITH_NOWIDE"] = not self._boost_option( - "without_nowide", True - ) - tc.cache_variables["WITH_JSON"] = not self._boost_option("without_json", True) - if not self.options["boost"].without_stacktrace: - tc.cache_variables["WITH_STACKTRACE"] = True - tc.cache_variables["WITH_STACKTRACE_ADDR2LINE"] = True - tc.generate() - - def build(self): - env_build = RunEnvironment(self) - with tools.environment_append(env_build.vars): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if tools.cross_building(self.settings): - return - self.run(os.path.join("bin", "lambda_exe"), run_environment=True) - if not self.options["boost"].without_random: - self.run(os.path.join("bin", "random_exe"), run_environment=True) - if not self.options["boost"].without_regex: - self.run(os.path.join("bin", "regex_exe"), run_environment=True) - if not self.options["boost"].without_test: - self.run(os.path.join("bin", "test_exe"), run_environment=True) - if not self.options["boost"].without_coroutine: - self.run(os.path.join("bin", "coroutine_exe"), run_environment=True) - if not self.options["boost"].without_chrono: - self.run(os.path.join("bin", "chrono_exe"), run_environment=True) - if not self.options["boost"].without_locale: - self.run(os.path.join("bin", "locale_exe"), run_environment=True) - if not self._boost_option("without_nowide", True): - self.run( - "{} {}".format( - os.path.join("bin", "nowide_exe"), - os.path.join(self.source_folder, "conanfile.py"), - ), - run_environment=True, - ) - if not self._boost_option("without_json", True): - self.run(os.path.join("bin", "json_exe"), run_environment=True) - if not self.options["boost"].without_python: - with tools.environment_append({"PYTHONPATH": "{}:{}".format("bin", "lib")}): - pyversion = tools.Version(self.settings.python) - self.run( - f"python{pyversion.major}.{pyversion.minor} {os.path.join(self.source_folder, 'python.py')}", - run_environment=True, - ) - self.run(os.path.join("bin", "numpy_exe"), run_environment=True) - if not self.options["boost"].without_stacktrace: - self.run(os.path.join("bin", "stacktrace_noop_exe"), run_environment=True) - self.run( - os.path.join("bin", "stacktrace_addr2line_exe"), run_environment=True - ) - if self.settings.os == "Windows": - self.run( - os.path.join("bin", "stacktrace_windbg_exe"), run_environment=True - ) - self.run( - os.path.join("bin", "stacktrace_windbg_cached_exe"), - run_environment=True, - ) - else: - self.run( - os.path.join("bin", "stacktrace_basic_exe"), run_environment=True - ) - if self._boost_option("with_stacktrace_backtrace", False): - self.run( - os.path.join("bin", "stacktrace_backtrace_exe"), - run_environment=True, - ) diff --git a/packages/conan/recipes/brotli/conanfile.py b/packages/conan/recipes/brotli/conanfile.py new file mode 100644 index 00000000..d63ec062 --- /dev/null +++ b/packages/conan/recipes/brotli/conanfile.py @@ -0,0 +1,41 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/brotli/all/conanfile.py + +from conan import ConanFile + +class SystemBrotliConan(ConanFile): + name = "brotli" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + includedir = "/usr/include/brotli" + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.includedirs = [includedir] + + self.cpp_info.set_property("cmake_file_name", "brotli") + self.cpp_info.set_property("cmake_target_name", "brotli::brotli") + + # brotlicommon + self.cpp_info.components["brotlicommon"].libdirs = ["/usr/lib64"] + self.cpp_info.components["brotlicommon"].includedirs = [includedir] + self.cpp_info.components["brotlicommon"].libs = ["brotlicommon"] + + # brotlidec + self.cpp_info.components["brotlidec"].libdirs = ["/usr/lib64"] + self.cpp_info.components["brotlidec"].includedirs = [includedir] + self.cpp_info.components["brotlidec"].libs = ["brotlidec"] + self.cpp_info.components["brotlidec"].requires = ["brotlicommon"] + + # brotlienc + self.cpp_info.components["brotlienc"].libdirs = ["/usr/lib64"] + self.cpp_info.components["brotlienc"].includedirs = [includedir] + self.cpp_info.components["brotlienc"].libs = ["brotlienc"] + self.cpp_info.components["brotlienc"].requires = ["brotlicommon"] + + + diff --git a/packages/conan/recipes/bzip2/CMakeLists.txt b/packages/conan/recipes/bzip2/CMakeLists.txt new file mode 100644 index 00000000..c5fdbc06 --- /dev/null +++ b/packages/conan/recipes/bzip2/CMakeLists.txt @@ -0,0 +1,47 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/5fecff85282c68fae05e776fb330779bdb94a6e8/recipes/bzip2/all/CMakeLists.txt + +cmake_minimum_required(VERSION 3.4) +project(bzip2 LANGUAGES C) + +include(GNUInstallDirs) + +option(BZ2_BUILD_EXE "Build bzip2 command-line utility" ON) + +add_library( + bz2 + ${BZ2_SRC_DIR}/blocksort.c + ${BZ2_SRC_DIR}/bzlib.c + ${BZ2_SRC_DIR}/compress.c + ${BZ2_SRC_DIR}/crctable.c + ${BZ2_SRC_DIR}/decompress.c + ${BZ2_SRC_DIR}/huffman.c + ${BZ2_SRC_DIR}/randtable.c +) + +target_include_directories(bz2 PUBLIC ${BZ2_SRC_DIR}) +set_target_properties( + bz2 + PROPERTIES + PUBLIC_HEADER "${BZ2_SRC_DIR}/bzlib.h" + SOVERSION ${BZ2_VERSION_MAJOR} + VERSION ${BZ2_VERSION_STRING} + WINDOWS_EXPORT_ALL_SYMBOLS ON +) + +install( + TARGETS bz2 + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) + +if(BZ2_BUILD_EXE) + add_executable(bzip2 ${BZ2_SRC_DIR}/bzip2.c) + target_link_libraries(bzip2 PRIVATE bz2) + install(TARGETS bzip2 DESTINATION ${CMAKE_INSTALL_BINDIR}) +endif() diff --git a/packages/conan/recipes/bzip2/conandata.yml b/packages/conan/recipes/bzip2/conandata.yml new file mode 100644 index 00000000..8056822f --- /dev/null +++ b/packages/conan/recipes/bzip2/conandata.yml @@ -0,0 +1,16 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/5fecff85282c68fae05e776fb330779bdb94a6e8/recipes/bzip2/all/conandata.yml + +sources: + "1.0.8": + url: "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz" + sha256: "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269" + "1.0.6": + url: "https://sourceware.org/pub/bzip2/bzip2-1.0.6.tar.gz" + sha256: "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd" +patches: + "1.0.6": + - patch_file: "patches/0001-fix-sys-stat-include.patch" diff --git a/packages/conan/recipes/bzip2/conanfile.py b/packages/conan/recipes/bzip2/conanfile.py new file mode 100644 index 00000000..08990899 --- /dev/null +++ b/packages/conan/recipes/bzip2/conanfile.py @@ -0,0 +1,116 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/5fecff85282c68fae05e776fb330779bdb94a6e8/recipes/bzip2/all/conanfile.py + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, save +from conan.tools.scm import Version +import os +import textwrap + +required_conan_version = ">=1.53.0" + + +class Bzip2Conan(ConanFile): + name = "bzip2" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://sourceware.org/bzip2" + license = "bzip2-1.0.6" + description = "bzip2 is a free and open-source file compression program that uses the Burrows Wheeler algorithm." + topics = ("data-compressor", "file-compression") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "build_executable": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "build_executable": True, + } + + def export_sources(self): + copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + self.license = f"bzip2-{self.version}" + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.compiler.rm_safe("libcxx") + self.settings.compiler.rm_safe("cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BZ2_BUILD_EXE"] = self.options.build_executable + tc.variables["BZ2_SRC_DIR"] = self.source_folder.replace("\\", "/") + tc.variables["BZ2_VERSION_MAJOR"] = Version(self.version).major + tc.variables["BZ2_VERSION_STRING"] = self.version + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + cmake.build() + + def package(self): + # ASWF: license files in package subdirs + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + cmake = CMake(self) + cmake.install() + self._create_cmake_module_variables( + os.path.join(self.package_folder, self._module_file_rel_path) + ) + + def _create_cmake_module_variables(self, module_file): + content = textwrap.dedent(f"""\ + set(BZIP2_NEED_PREFIX TRUE) + set(BZIP2_FOUND TRUE) + if(NOT DEFINED BZIP2_INCLUDE_DIRS AND DEFINED BZip2_INCLUDE_DIRS) + set(BZIP2_INCLUDE_DIRS ${{BZip2_INCLUDE_DIRS}}) + endif() + if(NOT DEFINED BZIP2_INCLUDE_DIR AND DEFINED BZip2_INCLUDE_DIR) + set(BZIP2_INCLUDE_DIR ${{BZip2_INCLUDE_DIR}}) + endif() + if(NOT DEFINED BZIP2_LIBRARIES AND DEFINED BZip2_LIBRARIES) + set(BZIP2_LIBRARIES ${{BZip2_LIBRARIES}}) + endif() + set(BZIP2_VERSION_STRING "{self.version}") + """) + save(self, module_file, content) + + @property + def _module_file_rel_path(self): + # ASWF: cmake modules in lib64 + return os.path.join("lib64", "cmake", f"conan-official-{self.name}-variables.cmake") + + def package_info(self): + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "BZip2") + self.cpp_info.set_property("cmake_target_name", "BZip2::BZip2") + self.cpp_info.set_property("cmake_build_modules", [self._module_file_rel_path]) + self.cpp_info.libs = ["bz2"] + + self.cpp_info.names["cmake_find_package"] = "BZip2" + self.cpp_info.names["cmake_find_package_multi"] = "BZip2" + self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] + if self.options.build_executable: + self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) diff --git a/packages/conan/recipes/bzip2/patches/0001-fix-sys-stat-include.patch b/packages/conan/recipes/bzip2/patches/0001-fix-sys-stat-include.patch new file mode 100644 index 00000000..6c79502b --- /dev/null +++ b/packages/conan/recipes/bzip2/patches/0001-fix-sys-stat-include.patch @@ -0,0 +1,11 @@ +--- a/bzip2.c ++++ b/bzip2.c +@@ -128,7 +128,7 @@ + #if BZ_LCCWIN32 + # include + # include +-# include ++# include + + # define NORETURN /**/ + # define PATH_SEP '\\' diff --git a/packages/conan/recipes/bzip2/test_package/CMakeLists.txt b/packages/conan/recipes/bzip2/test_package/CMakeLists.txt new file mode 100644 index 00000000..20e85801 --- /dev/null +++ b/packages/conan/recipes/bzip2/test_package/CMakeLists.txt @@ -0,0 +1,30 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/5fecff85282c68fae05e776fb330779bdb94a6e8/recipes/bzip2/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(BZip2 REQUIRED) + +add_executable(test_package test_package.c) +target_link_libraries(test_package PRIVATE BZip2::BZip2) + +# Test whether variables from https://cmake.org/cmake/help/latest/module/FindBZip2.html are properly defined +set(_custom_vars + BZIP2_FOUND + BZIP2_NEED_PREFIX + BZIP2_INCLUDE_DIRS + BZIP2_INCLUDE_DIR + BZIP2_LIBRARIES + BZIP2_VERSION_STRING +) +foreach(_custom_var ${_custom_vars}) + if(DEFINED ${_custom_var}) + message(STATUS "${_custom_var}: ${${_custom_var}}") + else() + message(FATAL_ERROR "${_custom_var} not defined") + endif() +endforeach() diff --git a/packages/conan/recipes/bzip2/test_package/conanfile.py b/packages/conan/recipes/bzip2/test_package/conanfile.py new file mode 100644 index 00000000..227bf5ea --- /dev/null +++ b/packages/conan/recipes/bzip2/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/master/recipes/bzip2/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/bzip2/test_package/test_package.c b/packages/conan/recipes/bzip2/test_package/test_package.c new file mode 100644 index 00000000..f2aa7915 --- /dev/null +++ b/packages/conan/recipes/bzip2/test_package/test_package.c @@ -0,0 +1,22 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/5fecff85282c68fae05e776fb330779bdb94a6e8/recipes/bzip2/all/test_package/test_package.c +*/ + +#include +#include +#include "bzlib.h" + + +int main(void) { + char buffer [256] = {0}; + unsigned int size = 256; + const char* version = BZ2_bzlibVersion(); + printf("Bzip2 version: %s\n", version); + BZ2_bzBuffToBuffCompress(buffer, &size, "conan-package-manager", 21, 1, 0, 1); + printf("Bzip2 compressed: %s\n", buffer); + return EXIT_SUCCESS; +} diff --git a/packages/conan/recipes/clang/conandata.yml b/packages/conan/recipes/clang/conandata.yml index 853289cd..4621eb51 100644 --- a/packages/conan/recipes/clang/conandata.yml +++ b/packages/conan/recipes/clang/conandata.yml @@ -11,4 +11,13 @@ sources: "17.0.6": url: "https://github.com/llvm/llvm-project/archive/llvmorg-17.0.6.tar.gz" sha256: "81494d32e6f12ea6f73d6d25424dbd2364646011bb8f7e345ca870750aa27de1" + "18.1.8": + url: "https://github.com/llvm/llvm-project/archive/llvmorg-18.1.8.tar.gz" + sha256: "09c08693a9afd6236f27a2ebae62cda656eba19021ef3f94d59e931d662d4856" + "19.1.0": + url: "https://github.com/llvm/llvm-project/archive/llvmorg-19.1.0.tar.gz" + sha256: "0a08341036ca99a106786f50f9c5cb3fbe458b3b74cab6089fd368d0edb2edfe" + "19.1.1": + url: "https://github.com/llvm/llvm-project/archive/llvmorg-19.1.1.tar.gz" + sha256: "115dfd98a353d05bffdab3f80db22f159da48aca0124e8c416f437adcd54b77f" patches: diff --git a/packages/conan/recipes/clang/conanfile.py b/packages/conan/recipes/clang/conanfile.py index 77b660f5..39a0d2b9 100644 --- a/packages/conan/recipes/clang/conanfile.py +++ b/packages/conan/recipes/clang/conanfile.py @@ -1,20 +1,62 @@ # Copyright (c) Contributors to the conan-center-index Project. All rights reserved. # Copyright (c) Contributors to the aswf-docker Project. All rights reserved. # SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/1f8a9d826fdf0c0e3cedf798b44a10dadb3223fe/recipes/llvm-core/all/conanfile.py from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import check_min_cppstd, cross_building from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import ( apply_conandata_patches, collect_libs, - copy, - export_conandata_patches, get, rmdir, + save, + copy, + export_conandata_patches, + rm, + rename, + replace_in_file ) -from conan.tools.microsoft import is_msvc -from conans import tools +from conan.tools.microsoft import is_msvc, msvc_runtime_flag +from conan.tools.scm import Version + +import json import os +from pathlib import Path +import re +import textwrap + + +required_conan_version = ">=1.62.0" + +# LLVM's default config is to enable all targets, but end users can significantly reduce +# build times for the package by specifying only the targets they need as a +# semi-colon delimited string in the value of the 'targets' option +LLVM_TARGETS = { + "AArch64", + "AMDGPU", + "ARM", + "AVR", + "BPF", + "Hexagon", + "Lanai", + "LoongArch", + "Mips", + "MSP430", + "NVPTX", + "PowerPC", + "RISCV", + "Sparc", + "SystemZ", + "VE", + "WebAssembly", + "X86", + "XCore" +} class ClangConan(ConanFile): @@ -24,151 +66,429 @@ class ClangConan(ConanFile): "optimizers, and runtime environments." ) license = "Apache-2.0 WITH LLVM-exception" - topics = ("conan", "llvm", "clang") - homepage = "https://github.com/llvm/llvm-project/tree/master/llvm" - url = "https://github.com/AcademySoftwareFoundation/aswf-docker" - + topics = ("llvm", "compiler") + homepage = "https://llvm.org" + url = "https://github.com/conan-io/conan-center-index" settings = "os", "arch", "compiler", "build_type" options = { - "components": "ANY", - "targets": "ANY", + "shared": [True, False], + "fPIC": [True, False], + "components": ["ANY"], + "targets": ["ANY"], + "exceptions": [True, False], + "rtti": [True, False], + "threads": [True, False], + "lto": ["On", "Off", "Full", "Thin"], + "static_stdlib": [True, False], + "unwind_tables": [True, False], + "expensive_checks": [True, False], + "use_perf": [True, False], + "use_sanitizer": [ + "Address", + "Memory", + "MemoryWithOrigins", + "Undefined", + "Thread", + "DataFlow", + "Address;Undefined", + "None" + ], + "with_ffi": [True, False], + "with_libedit": [True, False], + "with_terminfo": [True, False], + "with_zlib": [True, False], + "with_xml2": [True, False], + "with_z3": [True, False], } default_options = { - "components": "clang;clang-tools-extra;lld", + "shared": False, + "fPIC": True, + "components": "all", "targets": "host;NVPTX", + "exceptions": True, + "rtti": True, + "threads": True, + "lto": "Off", + "static_stdlib": False, + "unwind_tables": True, + "expensive_checks": False, + "use_perf": False, + "use_sanitizer": "None", + "with_libedit": False, + "with_ffi": False, + "with_terminfo": False, # differs from LLVM default + "with_xml2": False, + "with_z3": False, + "with_zlib": False, } + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } + def export_sources(self): export_conandata_patches(self) + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + del self.options.with_libedit # not supported on windows + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + def layout(self): cmake_layout(self, src_folder="src") # We want DSOs in lib64 self.cpp.package.libdirs = ["lib64"] + def requirements(self): + if self.options.with_ffi: + self.requires("libffi/3.4.4") + if self.options.get_safe("with_libedit"): + self.requires("editline/3.1") + if self.options.with_zlib: + self.requires("zlib/[>=1.2.11 <2]") + if self.options.with_xml2: + self.requires("libxml2/[>=2.12.5 <3]") + if self.options.with_z3: + self.requires("z3/4.13.0") + def build_requirements(self): - self.build_requires( - f"ninja/{os.environ['ASWF_NINJA_VERSION']}@{self.user}/ci_common{os.environ['CI_COMMON_VERSION']}" - ) - # if tools.Version(self.version) > "11": - # We can't use our python package for a few reasons: - # - it introduces a circular dependency between the clang package build, in ci_commonX context - # and vfx20XX context - # - the Package ID won't match: the vfx20XX profile adds a python=3.x setting which the ci_commonX - # doesn't have, and if you don't define ASWF_NUMPY_VERSION, the conanfile.py for the python package - # sets the option with_numpy=False, which also invalidates the Package ID - # - # Also the process which installed Conan in our build container built a Python in /tmp/pyconan, but - # it cleans up up once Conan has been installed and turned into an executable with pyinstaller. - # - # As of VFX 2023 we can assume a reasonably recent Python 3 in the base image. - # - # self.build_requires(f"python/3.9.7@{self.user}/vfx2022") + self.tool_requires(f"ninja/{os.environ['ASWF_NINJA_VERSION']}@{self.user}/ci_common{os.environ['CI_COMMON_VERSION']}") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + if self.options.shared: + if self.settings.os == "Windows": + raise ConanInvalidConfiguration("Shared builds are currently not supported on Windows") + if is_apple_os(self): + # FIXME iconv contains duplicate symbols in the libiconv and libcharset libraries (both of which are + # provided by libiconv). This may be an issue with how conan packages libiconv + iconv_dep = self.dependencies.get("libiconv") + if iconv_dep and not iconv_dep.options.shared: + raise ConanInvalidConfiguration("Static iconv cannot be linked into a shared library on macos " + "due to duplicate symbols. Use libxml2/*:iconv=False.") + + if self.options.exceptions and not self.options.rtti: + raise ConanInvalidConfiguration("Cannot enable exceptions without rtti support") + + if cross_building(self): + # FIXME support cross compilation + # For Cross Building, LLVM builds a "native" toolchain in a subdirectory of the main build directory. + # This subdirectory would need to have the conan cmake configuration files for the build platform + # installed into it for a cross build to be successful. + # see also https://llvm.org/docs/HowToCrossCompileLLVM.html + raise ConanInvalidConfiguration("Cross compilation is not supported. Contributions are welcome!") + + def validate_build(self): + if os.getenv("CONAN_CENTER_BUILD_SERVICE") and self.settings.build_type == "Debug": + if self.settings.os == "Linux": + raise ConanInvalidConfiguration("Debug build is not supported on CCI due to resource limitations") + elif self.options.shared: + raise ConanInvalidConfiguration("Shared Debug build is not supported on CCI due to resource limitations") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def generate(self): - tc = CMakeToolchain(self) - tc.variables["GCC_INSTALL_PREFIX"] = tools.get_env("GCC_INSTALL_PREFIX") - tc.variables["LLVM_BUILD_LLVM_DYLIB"] = True - tc.variables["CLANG_INCLUDE_DOCS"] = False - tc.variables["LIBCXX_INCLUDE_DOCS"] = False - tc.variables["LLVM_BUILD_TESTS"] = False - tc.variables["LLVM_INCLUDE_TESTS"] = False - tc.variables["LLVM_INCLUDE_TOOLS"] = True - tc.variables["LLVM_BUILD_TOOLS"] = True - tc.variables["LLVM_TOOL_LLVM_AR_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_AS_BUILD"] = True - tc.variables["LLVM_TOOL_LLVM_AS_FUZZER_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_BCANALYZER_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_COV_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_CXXDUMP_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_DIS_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_EXTRACT_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_C_TEST_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_DIFF_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_GO_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_JITLISTENER_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_LTO_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_MC_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_NM_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_OBJDUMP_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_PROFDATA_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_RTDYLD_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_SIZE_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_SPLIT_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_STRESS_BUILD"] = False - tc.variables["LLVM_TOOL_LLVM_SYMBOLIZER_BUILD"] = True - tc.variables["LLVM_INCLUDE_EXAMPLES"] = False - tc.variables["CMAKE_SKIP_RPATH"] = True - tc.variables["LLVM_ENABLE_PROJECTS"] = self.options.components - tc.variables["LLVM_TARGETS_TO_BUILD"] = self.options.targets - compiler = self.settings.compiler.value - version = tools.Version(self.settings.compiler.version) - if ( - tools.Version(self.version) >= "13" - and compiler == "gcc" - and int(version.major) >= 9 - ): - # llvm-13 / gcc9 fails to build (mostly unused) libc++ - # see https://www.mail-archive.com/llvm-bugs@lists.llvm.org/msg53136.html - tc.variables["LLVM_ENABLE_RUNTIMES"] = "compiler-rt" - tc.variables["LLVM_TOOL_LIBCXX_BUILD"] = "OFF" - tc.variables["LLVM_TOOL_LIBCXXABI_BUILD"] = "OFF" + def _apply_resource_limits(self, cmake_definitions): + if os.getenv("CONAN_CENTER_BUILD_SERVICE"): + self.output.info("Applying CCI Resource Limits") + default_ram_per_compile_job = 16384 + default_ram_per_link_job = 2048 else: - tc.variables["LLVM_ENABLE_RUNTIMES"] = "libcxx;libcxxabi;compiler-rt" - tc.variables["LLVM_TOOL_LIBCXX_BUILD"] = "ON" - tc.variables["LLVM_TOOL_LIBCXXABI_BUILD"] = "ON" - tc.variables["LLVM_ENABLE_LIBXML2"] = "OFF" - if self.settings.compiler == "Visual Studio": + default_ram_per_compile_job = None + default_ram_per_link_job = None + + ram_per_compile_job = self.conf.get("user.llvm-core:ram_per_compile_job", default_ram_per_compile_job) + if ram_per_compile_job: + cmake_definitions["LLVM_RAM_PER_COMPILE_JOB"] = ram_per_compile_job + + ram_per_link_job = self.conf.get("user.llvm-core:ram_per_link_job", default_ram_per_link_job) + if ram_per_link_job: + cmake_definitions["LLVM_RAM_PER_LINK_JOB"] = ram_per_link_job + + @property + def _targets_to_build(self): + return self.options.targets if self.options.targets != "all" else self._all_targets + + @property + def _all_targets(self): + targets = LLVM_TARGETS if Version(self.version) >= 14 else LLVM_TARGETS - {"LoongArch", "VE"} + return ";".join(targets) + + def generate(self): + tc = CMakeToolchain(self, generator="Ninja") + # https://releases.llvm.org/12.0.0/docs/CMake.html + # https://releases.llvm.org/13.0.0/docs/CMake.html + cmake_variables = { + # Enables LLVM to find conan libraries during try_compile + "CMAKE_TRY_COMPILE_CONFIGURATION": str(self.settings.build_type), + # LLVM has two separate concepts of a "shared library build". + # "BUILD_SHARED_LIBS" builds shared versions of all the static components + # "LLVM_BUILD_LLVM_DYLIB" builds a single shared library containing all components. + # It is likely the latter that the user expects by a "shared library" build. + "BUILD_SHARED_LIBS": False, + "LLVM_ENABLE_PROJECTS": "clang;clang-tools-extra;lld", + "LLVM_BUILD_LLVM_DYLIB": self.options.shared, + "LLVM_LINK_LLVM_DYLIB": self.options.shared, + "LLVM_DYLIB_COMPONENTS": self.options.components, + "LLVM_ABI_BREAKING_CHECKS": "WITH_ASSERTS", + "LLVM_INCLUDE_TOOLS": True, + "LLVM_INCLUDE_EXAMPLES": False, + "LLVM_INCLUDE_TESTS": False, + "LLVM_ENABLE_IDE": False, + "LLVM_ENABLE_EH": self.options.exceptions, + "LLVM_ENABLE_RTTI": self.options.rtti, + "LLVM_ENABLE_THREADS": self.options.threads, + "LLVM_ENABLE_LTO": self.options.lto, + "LLVM_STATIC_LINK_CXX_STDLIB": self.options.static_stdlib, + "LLVM_ENABLE_UNWIND_TABLES": self.options.unwind_tables, + "LLVM_ENABLE_EXPENSIVE_CHECKS": self.options.expensive_checks, + "LLVM_ENABLE_ASSERTIONS": str(self.settings.build_type), + "LLVM_USE_PERF": self.options.use_perf, + "LLVM_ENABLE_LIBEDIT": self.options.get_safe("with_libedit", False), + "LLVM_ENABLE_Z3_SOLVER": self.options.with_z3, + "LLVM_ENABLE_FFI": self.options.with_ffi, + "LLVM_ENABLE_ZLIB": "FORCE_ON" if self.options.with_zlib else False, + "LLVM_ENABLE_LIBXML2": "FORCE_ON" if self.options.with_xml2 else False, + "LLVM_ENABLE_TERMINFO": self.options.with_terminfo, + "LLVM_ENABLE_ZSTD": False # ASWF: remove zstd dependency + } + if self.options.targets != "all": + cmake_variables["LLVM_TARGETS_TO_BUILD"] = self.options.targets + + self._apply_resource_limits(cmake_variables) + + if is_msvc(self): build_type = str(self.settings.build_type).upper() - tc.variables[ - "LLVM_USE_CRT_{}".format(build_type) - ] = self.settings.compiler.runtime + cmake_variables[f"LLVM_USE_CRT_{build_type}"] = msvc_runtime_flag(self) + + if not self.options.shared: + cmake_variables.update({ + "DISABLE_LLVM_LINK_LLVM_DYLIB": True, + "LLVM_ENABLE_PIC": self.options.get_safe("fPIC", default=True), + }) + + if self.options.use_sanitizer == "None": + cmake_variables["LLVM_USE_SANITIZER"] = "" + else: + cmake_variables["LLVM_USE_SANITIZER"] = self.options.use_sanitizer + + if self.settings.os == "Linux": + # ASWF: Older LLVM versions need to know where DTS gcc is installed. But clang 19 deprecates GCC_INSTALL_DIR + if Version(self.version) < "18" and compiler == "gcc": + cmake_variables["GCC_INSTALL_PREFIX"] = os.environ["GCC_INSTALL_PREFIX"] + # Workaround for: https://github.com/conan-io/conan/issues/13560 + libdirs_host = [l for dependency in self.dependencies.host.values() for l in dependency.cpp_info.aggregated_components().libdirs] + tc.variables["CMAKE_BUILD_RPATH"] = ";".join(libdirs_host) + + tc.cache_variables.update(cmake_variables) + # Libraries go to lib64 tc.variables["LLVM_LIBDIR_SUFFIX"] = "64" tc.generate() - deps = CMakeDeps(self) - deps.generate() - - def _patch_sources(self): - apply_conandata_patches(self) + tc = CMakeDeps(self) + tc.generate() def build(self): - self._patch_sources() + apply_conandata_patches(self) cmake = CMake(self) cmake.configure(build_script_folder="llvm") cmake.build() + @property + def _package_folder_path(self): + return Path(self.package_folder) + + def _update_component_dependencies(self, components): + def _sanitized_components(deps_list): + match_genex = re.compile(r"""\\\$""") + replacements = { + "LibXml2::LibXml2": "libxml2::libxml2", + "ZLIB::ZLIB": "zlib::zlib" + } + for dep in deps_list.split(";"): + match = match_genex.search(dep) + if match: + yield match.group(1) + else: + replacement = replacements.get(dep) + if replacement: + yield replacement + elif dep.startswith("-l"): + yield dep[2:] + else: + yield dep + + def _parse_deps(deps_list): + data = { + "requires": [], + "system_libs": [] + } + windows_system_libs = [ + "ole32", + "delayimp", + "shell32", + "advapi32", + "-delayload:shell32.dll", + "uuid", + "psapi", + "-delayload:ole32.dll" + ] + for component in _sanitized_components(deps_list): + if component in windows_system_libs: + continue + if component in ["rt", "m", "dl", "pthread"]: + data["system_libs"].append(component) + else: + data["requires"].append(component) + return data + + # Can't use tools.files.load due to CRLF endings on Windows causing issues with Regular Expressions + cmake_exports = (self._package_folder_path / "lib64" / "cmake" / "llvm" / "LLVMExports.cmake").read_text("utf-8") + match_dependencies = re.compile( + r'''^set_target_properties\((\w+).*\n?\s*INTERFACE_LINK_LIBRARIES\s+"(\S+)"''', re.MULTILINE) + + for llvm_lib, dependencies in match_dependencies.findall(cmake_exports): + if llvm_lib in components: + components[llvm_lib].update(_parse_deps(dependencies)) + + def _llvm_build_info(self): + cmake_config = (self._package_folder_path / "lib64" / "cmake" / "llvm" / "LLVMConfig.cmake").read_text("utf-8") + + match_cmake_var = re.compile(r"""^set\(LLVM_AVAILABLE_LIBS (?P.*)\)$""", re.MULTILINE) + match = match_cmake_var.search(cmake_config) + if match is None: + self.output.warning("Could not find components in LLVMConfig.cmake") + return None + + components = {component: {} for component in match.groupdict()["components"].split(";")} + self._update_component_dependencies(components) + + return { + "components": components, + "native_arch": re.search(r"""^set\(LLVM_NATIVE_ARCH (\S*)\)$""", cmake_config, re.MULTILINE).group(1) + } + + @property + def _cmake_module_path(self): + return Path("lib64") / "cmake" / "llvm" + + @property + def _build_info_file(self): + return self._package_folder_path / self._cmake_module_path / "conan_llvm_build_info.json" + + @property + def _build_module_file_rel_path(self): + return self._cmake_module_path / f"conan-official-{self.name}-variables.cmake" + + def _create_cmake_build_module(self, build_info, module_file): + targets_with_jit = ["X86", "PowerPC", "AArch64", "ARM", "Mips", "SystemZ"] + content = textwrap.dedent(f"""\ + set(LLVM_TOOLS_BINARY_DIR "${{CMAKE_CURRENT_LIST_DIR}}/../../../bin") + cmake_path(NORMAL_PATH LLVM_TOOLS_BINARY_DIR) + set(LLVM_PACKAGE_VERSION "{self.version}") + set(LLVM_AVAILABLE_LIBS "{';'.join(build_info['components'].keys())}") + set(LLVM_BUILD_TYPE "{self.settings.build_type}") + set(LLVM_CMAKE_DIR "${{CMAKE_CURRENT_LIST_DIR}}") + set(LLVM_ALL_TARGETS "{self._all_targets}") + set(LLVM_TARGETS_TO_BUILD "{self._targets_to_build}") + set(LLVM_TARGETS_WITH_JIT "{';'.join(targets_with_jit)}") + set(LLVM_NATIVE_ARCH "{build_info['native_arch']}") + set_property(GLOBAL PROPERTY LLVM_TARGETS_CONFIGURED On) + set_property(GLOBAL PROPERTY LLVM_COMPONENT_LIBS ${{LLVM_AVAILABLE_LIBS}}) + if (NOT TARGET intrinsics_gen) + add_custom_target(intrinsics_gen) + endif() + if (NOT TARGET omp_gen) + add_custom_target(omp_gen) + endif() + if (NOT TARGET acc_gen) + add_custom_target(acc_gen) + endif() + """) + save(self, module_file, content) + + def _write_build_info(self): + build_info = self._llvm_build_info() + with open(self._build_info_file, "w", encoding="utf-8") as fp: + json.dump(build_info, fp, indent=2) + + return build_info + + def _read_build_info(self) -> dict: + with open(self._build_info_file, encoding="utf-8") as fp: + return json.load(fp) + def package(self): - copy( - self, - "LICENSE.TXT", - src=self.source_folder, - dst=os.path.join(self.package_folder, "licenses", self.name), - ) + copy(self, "LICENSE.TXT", self.source_folder, (self._package_folder_path / "licenses" / self.name).as_posix()) cmake = CMake(self) cmake.install() - rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + + build_info = self._write_build_info() + + cmake_folder = self._package_folder_path / "lib64" / "cmake" / "llvm" + cmake_folder_posix = cmake_folder.as_posix() + # rm(self, "LLVMConfig.cmake", cmake_folder_posix) + # rm(self, "LLVMExports*", cmake_folder_posix) + # rm(self, "Find*", cmake_folder_posix) + rm(self, "*.pdb", (self._package_folder_path / "lib64").as_posix()) + rm(self, "*.pdb", (self._package_folder_path / "bin").as_posix()) + # need to rename this as Conan will flag it, but it's not actually a Config file and is needed by + # downstream packages + rename(self, (cmake_folder / "LLVM-Config.cmake").as_posix(), (cmake_folder / "LLVM-ConfigInternal.cmake").as_posix()) + replace_in_file(self, (cmake_folder / "AddLLVM.cmake").as_posix(), "LLVM-Config", "LLVM-ConfigInternal") + replace_in_file(self, (cmake_folder / "LLVMConfig.cmake").as_posix(), "LLVM-Config", "LLVM-ConfigInternal") + rmdir(self, (self._package_folder_path / "share").as_posix()) + if self.options.shared: + rm(self, "*.a", (self._package_folder_path / "lib64").as_posix()) + + self._create_cmake_build_module( + build_info, + (self._package_folder_path / self._build_module_file_rel_path).as_posix() + ) def package_info(self): - self.cpp_info.libs = tools.collect_libs(self) - try: - self.cpp_info.libs.remove("LLVMHello") - except ValueError: - pass - try: - self.cpp_info.libs.remove("BugpointPasses") - except ValueError: - pass - if self.settings.os == "Linux": - self.cpp_info.system_libs = ["pthread", "rt", "dl", "m", "curses"] - elif self.settings.os == "Macos": - self.cpp_info.system_libs = ["m"] - self.env_info.LLVM_INSTALL_DIR = self.package_folder - self.env_info.CLANG_INSTALL_DIR = self.package_folder - - def deploy(self): - self.copy("*", symlinks=True) + self.cpp_info.set_property("cmake_file_name", "LLVM") + self.cpp_info.set_property("cmake_build_modules", + [self._build_module_file_rel_path, + (self._cmake_module_path / "LLVM-ConfigInternal.cmake").as_posix()] + ) + self.cpp_info.builddirs.append(self._cmake_module_path) + + if not self.options.shared: + build_info = self._read_build_info() + components = build_info["components"] + + for component_name, data in components.items(): + self.cpp_info.components[component_name].set_property("cmake_target_name", component_name) + self.cpp_info.components[component_name].libs = [component_name] + requires = data.get("requires") + if requires is not None: + self.cpp_info.components[component_name].requires += requires + system_libs = data.get("system_libs") + if system_libs is not None: + self.cpp_info.components[component_name].system_libs += system_libs + else: + self.cpp_info.set_property("cmake_target_name", "LLVM") + self.cpp_info.libs = collect_libs(self) diff --git a/packages/conan/recipes/clang/test_package/CMakeLists.txt b/packages/conan/recipes/clang/test_package/CMakeLists.txt index 994b50ff..4de38102 100644 --- a/packages/conan/recipes/clang/test_package/CMakeLists.txt +++ b/packages/conan/recipes/clang/test_package/CMakeLists.txt @@ -1,12 +1,31 @@ -cmake_minimum_required(VERSION 3.12) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -find_package(clang) +macro(test_llvm_cmake_variable VARIABLE) + if(NOT DEFINED ${VARIABLE}) + message(FATAL_ERROR "${VARIABLE} is not defined") + endif() + message(STATUS "${VARIABLE}: ${${VARIABLE}}") +endmacro() +set(CMAKE_CXX_STANDARD 17) add_executable(${PROJECT_NAME} test_package.cpp) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) -target_link_libraries(${PROJECT_NAME} clang::clang) +if (LLVM_SHARED) + find_package(LLVM REQUIRED) + target_link_libraries(${PROJECT_NAME} PRIVATE LLVM) +else() + find_package(LLVM REQUIRED) + llvm_map_components_to_libnames(llvm_libs interpreter nativecodegen irreader) + target_link_libraries(${PROJECT_NAME} PRIVATE ${llvm_libs}) +endif() + +message(STATUS "Testing LLVM Build Module Variables") +test_llvm_cmake_variable(LLVM_PACKAGE_VERSION) +test_llvm_cmake_variable(LLVM_BUILD_TYPE) +test_llvm_cmake_variable(LLVM_CMAKE_DIR) +test_llvm_cmake_variable(LLVM_TOOLS_BINARY_DIR) +test_llvm_cmake_variable(LLVM_ALL_TARGETS) +test_llvm_cmake_variable(LLVM_TARGETS_TO_BUILD) +test_llvm_cmake_variable(LLVM_TARGETS_WITH_JIT) +test_llvm_cmake_variable(LLVM_NATIVE_ARCH) diff --git a/packages/conan/recipes/clang/test_package/conanfile.py b/packages/conan/recipes/clang/test_package/conanfile.py index eb18eccc..5ae2ff91 100644 --- a/packages/conan/recipes/clang/test_package/conanfile.py +++ b/packages/conan/recipes/clang/test_package/conanfile.py @@ -1,40 +1,43 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.cmake import cmake_layout, CMakeDeps, CMakeToolchain, CMake +from conan.tools.env import VirtualRunEnv +from conan.tools.build import can_run -import os.path +import os -class LLVMCoreTestPackageConan(ConanFile): - settings = ("os", "arch", "compiler", "build_type") - generators = ("cmake", "cmake_find_package") +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build_requirements(self): + # required for cmake_path support + self.tool_requires("cmake/[>=3.20 <4]") + + def generate(self): + deps = CMakeDeps(self) + deps.check_components_exist = True + deps.generate() + + tc = CMakeToolchain(self) + if self.dependencies[self.tested_reference_str].options.shared: + tc.variables["LLVM_SHARED"] = True + tc.generate() + + VirtualRunEnv(self).generate() def build(self): - build_system = CMake(self) - build_system.verbose = True - build_system.configure() - build_system.build() + cmake = CMake(self) + cmake.configure() + cmake.build() def test(self): - test_package = not tools.cross_building(self.settings) - if "x86" not in str(self.settings.arch).lower(): - test_package = False - elif str(self.options["clang"].targets) not in ["all", "X86"]: - test_package = False - else: - if self.options["clang"].components != "all": - requirements = ["interpreter", "irreader", "x86codegen"] - targets = str(self.options["clang"].components) - if self.settings.os == "Windows": - requirements.append("demangle") - if not all([target in targets for target in requirements]): - test_package = False - - if test_package: - command = [ - os.path.join("bin", "test_package"), - os.path.join(os.path.dirname(__file__), "test_function.ll"), - ] - self.run(command, run_environment=True) - - llvm_path = self.deps_cpp_info["clang"].rootpath - license_path = os.path.join(llvm_path, "licenses", "clang", "LICENSE.TXT") - assert os.path.exists(license_path) + if can_run(self): + cmd = os.path.join(self.cpp.build.bindir, "test_package") + args = os.path.join(os.path.dirname(__file__), "test_function.ll") + self.run(f"{cmd} {args}", env="conanrun") diff --git a/packages/conan/recipes/cmake/conandata.yml b/packages/conan/recipes/cmake/conandata.yml new file mode 100644 index 00000000..587c7ac7 --- /dev/null +++ b/packages/conan/recipes/cmake/conandata.yml @@ -0,0 +1,61 @@ +sources: + "3.12.4": + url: "https://github.com/Kitware/CMake/releases/download/v3.12.4/cmake-3.12.4.tar.gz" + sha256: "5255584bfd043eb717562cff8942d472f1c0e4679c4941d84baadaa9b28e3194" + "3.18.4": + url: "https://github.com/Kitware/CMake/releases/download/v3.18.4/cmake-3.18.4.tar.gz" + sha256: "597c61358e6a92ecbfad42a9b5321ddd801fc7e7eca08441307c9138382d4f77" + "3.19.3": + url: "https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3.tar.gz" + sha256: "3faca7c131494a1e34d66e9f8972ff5369e48d419ea8ceaa3dc15b4c11367732" + "3.19.8": + url: "https://github.com/Kitware/CMake/releases/download/v3.19.8/cmake-3.19.8.tar.gz" + sha256: 09b4fa4837aae55c75fb170f6a6e2b44818deba48335d1969deddfbb34e30369 + "3.20.6": + url: "https://github.com/Kitware/CMake/releases/download/v3.20.6/cmake-3.20.6.tar.gz" + sha256: a0bd485e1a38dd13c0baec89d5f4adbf61c7fd32fddb38eabc69a75bc0b65d72 + "3.21.7": + url: "https://github.com/Kitware/CMake/releases/download/v3.21.7/cmake-3.21.7.tar.gz" + sha256: "3523c4a5afc61ac3d7c92835301cdf092129c9b672a6ee17e68c92e928c1375a" + "3.22.0": + url: "https://github.com/Kitware/CMake/releases/download/v3.22.0/cmake-3.22.0.tar.gz" + sha256: "998c7ba34778d2dfdb3df8a695469e24b11e2bfa21fbe41b361a3f45e1c9345e" + "3.22.6": + url: "https://github.com/Kitware/CMake/releases/download/v3.22.6/cmake-3.22.6.tar.gz" + sha256: "73933163670ea4ea95c231549007b0c7243282293506a2cf4443714826ad5ec3" + "3.23.5": + url: "https://github.com/Kitware/CMake/releases/download/v3.23.5/cmake-3.23.5.tar.gz" + sha256: "f2944cde7a140b992ba5ccea2009a987a92413762250de22ebbace2319a0f47d" + "3.24.3": + url: "https://github.com/Kitware/CMake/releases/download/v3.24.3/cmake-3.24.3.tar.gz" + sha256: "b53aa10fa82bff84ccdb59065927b72d3bee49f4d86261249fc0984b3b367291" + "3.25.2": + url: "https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2.tar.gz" + sha256: "c026f22cb931dd532f648f087d587f07a1843c6e66a3dfca4fb0ea21944ed33c" + "3.26.4": + url: "https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4.tar.gz" + sha256: "313b6880c291bd4fe31c0aa51d6e62659282a521e695f30d5cc0d25abbd5c208" + "3.27.2": + url: "https://github.com/Kitware/CMake/releases/download/v3.27.2/cmake-3.27.2.tar.gz" + sha256: "798e50085d423816fe96c9ef8bee5e50002c9eca09fed13e300de8a91d35c211" + "3.27.9": + url: "https://github.com/Kitware/CMake/releases/download/v3.27.9/cmake-3.27.9.tar.gz" + sha256: "609a9b98572a6a5ea477f912cffb973109ed4d0a6a6b3f9e2353d2cdc048708e" + "3.30.4": + url: "https://github.com/Kitware/CMake/releases/download/v3.30.4/cmake-3.30.4.tar.gz" + sha256: "c759c97274f1e7aaaafcb1f0d261f9de9bf3a5d6ecb7e2df616324a46fe704b2" + "3.30.5": + url: "https://github.com/Kitware/CMake/releases/download/v3.30.5/cmake-3.30.5.tar.gz" + sha256: "9f55e1a40508f2f29b7e065fa08c29f82c402fa0402da839fffe64a25755a86d" + "3.30.6": + url: "https://github.com/Kitware/CMake/releases/download/v3.30.6/cmake-3.30.6.tar.gz" + sha256: "a7aa25cdd8545156fe0fec95ebbd53cb2b5173a8717e227f6e8a755185c168cf" + "3.31.1": + url: "https://github.com/Kitware/CMake/releases/download/v3.31.1/cmake-3.31.1.tar.gz" + sha256: "c4fc2a9bd0cd5f899ccb2fb81ec422e175090bc0de5d90e906dd453b53065719" + "3.31.2": + url: "https://github.com/Kitware/CMake/releases/download/v3.31.2/cmake-3.31.2.tar.gz" + sha256: "42abb3f48f37dbd739cdfeb19d3712db0c5935ed5c2aef6c340f9ae9114238a2" + "3.31.6": + url: "https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6.tar.gz" + sha256: 653427f0f5014750aafff22727fb2aa60c6c732ca91808cfb78ce22ddd9e55f0 diff --git a/packages/conan/recipes/cmake/conanfile.py b/packages/conan/recipes/cmake/conanfile.py index e43bbb69..d01c35ae 100644 --- a/packages/conan/recipes/cmake/conanfile.py +++ b/packages/conan/recipes/cmake/conanfile.py @@ -1,131 +1,174 @@ -import os -from conans import tools, ConanFile, CMake -from conans.errors import ConanInvalidConfiguration, ConanException +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/8dbbe997462102561ce6abce440263b73b9f8cd1/recipes/cmake/3.x.x/conanfile.py + +from conan import ConanFile +from conan.tools.files import chdir, copy, rmdir, get, save, load +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout, CMakeDeps +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout +from conan.tools.build import build_jobs, cross_building, check_min_cppstd +from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc +from conan.errors import ConanInvalidConfiguration -required_conan_version = ">=1.38.0" +import os +import json +required_conan_version = ">=1.51.0" class CMakeConan(ConanFile): name = "cmake" + package_type = "application" description = "Conan installer for CMake" - topics = ("conan", "cmake", "build", "installer") - url = "https://github.com/AcademySoftwareFoundation/aswf-docker" + topics = ("cmake", "build", "installer") + url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/Kitware/CMake" license = "BSD-3-Clause" - generators = "cmake" settings = "os", "arch", "compiler", "build_type" - options = {} - default_options = {} + options = { + "with_openssl": [True, False], + "bootstrap": [True, False], + } + default_options = { + "with_openssl": False, # ASWF: Avoid bringing in OpenSSL dependency + "bootstrap": False, + } - _source_subfolder = "source_subfolder" - _cmake = None + def config_options(self): + if self.settings.os == "Windows": + self.options.with_openssl = False - def _minor_version(self): - return ".".join(str(self.version).split(".")[:2]) + def requirements(self): + if self.options.get_safe("with_openssl", default=False): + self.requires("openssl/[>=1.1 <4]") - def configure(self): - if self.settings.os == "Macos" and self.settings.arch == "x86": - raise ConanInvalidConfiguration("CMake does not support x86 for macOS") + def validate_build(self): + if self.settings.os == "Windows" and self.options.bootstrap: + raise ConanInvalidConfiguration("CMake does not support bootstrapping on Windows") minimal_cpp_standard = "11" - if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, minimal_cpp_standard) + if self.settings.get_safe("compiler.cppstd"): + check_min_cppstd(self, minimal_cpp_standard) minimal_version = { "gcc": "4.8", "clang": "3.3", "apple-clang": "9", "Visual Studio": "14", + "msvc": "190", } compiler = str(self.settings.compiler) if compiler not in minimal_version: - self.output.warn( - "{} recipe lacks information about the {} compiler standard version support".format( - self.name, compiler - ) - ) - self.output.warn( - "{} requires a compiler that supports at least C++{}".format( - self.name, minimal_cpp_standard - ) - ) + self.output.warning( + f"{self.name} recipe lacks information about the {compiler} compiler standard version support") + self.output.warning( + f"{self.name} requires a compiler that supports at least C++{minimal_cpp_standard}") return - version = tools.Version(self.settings.compiler.version) + version = Version(self.settings.compiler.version) if version < minimal_version[compiler]: raise ConanInvalidConfiguration( - "{} requires a compiler that supports at least C++{}".format( - self.name, minimal_cpp_standard - ) - ) + f"{self.name} requires a compiler that supports at least C++{minimal_cpp_standard}") + + def validate(self): + if self.settings.os == "Macos" and self.settings.arch == "x86": + raise ConanInvalidConfiguration("CMake does not support x86 for macOS") + + def layout(self): + if self.options.bootstrap: + basic_layout(self, src_folder="src") + else: + cmake_layout(self, src_folder="src") + # ASWF: We want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] def source(self): - tools.get( - f"https://github.com/Kitware/CMake/releases/download/v{self.version}/cmake-{self.version}.tar.gz", - strip_root=True, - destination=self._source_subfolder, - ) - - def _configure_cmake(self): - if not self._cmake: - self._cmake = CMake(self) + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder, strip_root=True) + rmdir(self, os.path.join(self.source_folder, "Tests", "RunCMake", "find_package")) + + def generate(self): + if self.options.bootstrap: + tc = AutotoolsToolchain(self) + tc.generate() + tc = AutotoolsDeps(self) + tc.generate() + bootstrap_cmake_options = ["--"] + bootstrap_cmake_options.append(f'-DCMAKE_CXX_STANDARD={"11" if not self.settings.compiler.cppstd else self.settings.compiler.cppstd}') + if self.settings.os == "Linux": + if self.options.with_openssl: + openssl = self.dependencies["openssl"] + bootstrap_cmake_options.append("-DCMAKE_USE_OPENSSL=ON") + bootstrap_cmake_options.append(f'-DOPENSSL_USE_STATIC_LIBS={"FALSE" if openssl.options.shared else "TRUE"}') + bootstrap_cmake_options.append(f'-DOPENSSL_ROOT_DIR={openssl.package_path}') + else: + bootstrap_cmake_options.append("-DCMAKE_USE_OPENSSL=OFF") + save(self, "bootstrap_args", json.dumps({"bootstrap_cmake_options": ' '.join(arg for arg in bootstrap_cmake_options)})) + else: + tc = CMakeToolchain(self) + # Disabling testing because CMake tests build can fail in Windows in some cases + tc.variables["BUILD_TESTING"] = False if not self.settings.compiler.cppstd: - self._cmake.definitions["CMAKE_CXX_STANDARD"] = 11 - self._cmake.definitions["CMAKE_BOOTSTRAP"] = False - if tools.cross_building(self): - self._cmake.definitions["HAVE_POLL_FINE_EXITCODE"] = "" - self._cmake.definitions["HAVE_POLL_FINE_EXITCODE__TRYRUN_OUTPUT"] = "" - self._cmake.configure(source_folder=self._source_subfolder) - return self._cmake + tc.variables["CMAKE_CXX_STANDARD"] = 11 + tc.variables["CMAKE_BOOTSTRAP"] = False + if self.settings.os == "Linux": + tc.variables["CMAKE_USE_OPENSSL"] = self.options.with_openssl + if self.options.with_openssl: + openssl = self.dependencies["openssl"] + tc.variables["OPENSSL_USE_STATIC_LIBS"] = not openssl.options.shared + if cross_building(self): + tc.variables["HAVE_POLL_FINE_EXITCODE"] = '' + tc.variables["HAVE_POLL_FINE_EXITCODE__TRYRUN_OUTPUT"] = '' + # TODO: Remove after fixing https://github.com/conan-io/conan-center-index/issues/13159 + # C3I workaround to force CMake to choose the highest version of + # the windows SDK available in the system + if is_msvc(self) and not self.conf.get("tools.cmake.cmaketoolchain:system_version"): + tc.variables["CMAKE_SYSTEM_VERSION"] = "10.0" + tc.generate() + tc = CMakeDeps(self) + # CMake try_compile failure: https://github.com/conan-io/conan-center-index/pull/16073#discussion_r1110037534 + tc.set_property("openssl", "cmake_find_mode", "module") + tc.generate() + def build(self): - tools.replace_in_file( - os.path.join(self._source_subfolder, "CMakeLists.txt"), - "project(CMake)", - 'project(CMake)\ninclude("{}/conanbuildinfo.cmake")\nconan_basic_setup(NO_OUTPUT_DIRS)'.format( - self.install_folder.replace("\\", "/") - ), - ) - if self.settings.os == "Linux": - tools.replace_in_file( - os.path.join( - self._source_subfolder, "Utilities", "cmcurl", "CMakeLists.txt" - ), - "list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES})", - "list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES} ${CMAKE_DL_LIBS} pthread)", - ) - cmake = self._configure_cmake() - cmake.build() + if self.options.bootstrap: + toolchain_file_content = json.loads(load(self, os.path.join(self.generators_folder, "bootstrap_args"))) + bootstrap_cmake_options = toolchain_file_content.get("bootstrap_cmake_options") + with chdir(self, self.source_folder): + self.run(f'./bootstrap --prefix="" --parallel={build_jobs(self)} {bootstrap_cmake_options}') + autotools = Autotools(self) + autotools.make() + else: + cmake = CMake(self) + cmake.configure() + cmake.build() def package(self): - self.copy( - "Copyright.txt", - dst=os.path.join("licenses", self.name), - src=self._source_subfolder, - ) - cmake = self._configure_cmake() - cmake.install() - tools.rmdir(os.path.join(self.package_folder, "doc")) + copy(self, "Copyright.txt", src=self.source_folder, dst=os.path.join("licenses", self.name)) + if self.options.bootstrap: + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.install() + else: + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "doc")) def package_id(self): del self.info.settings.compiler + del self.info.options.bootstrap def package_info(self): - minor = self._minor_version() + self.cpp_info.includedirs = [] + self.cpp_info.libdirs = [] + # Needed for compatibility with v1.x - Remove when 2.0 becomes the default bindir = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bindir)) + self.output.info(f"Appending PATH environment variable: {bindir}") self.env_info.PATH.append(bindir) - - self.env_info.CMAKE_ROOT = self.package_folder - mod_path = os.path.join( - self.package_folder, "share", "cmake-%s" % minor, "Modules" - ) - self.env_info.CMAKE_MODULE_PATH = mod_path - if not os.path.exists(mod_path): - raise ConanException("Module path not found: %s" % mod_path) - - def deploy(self): - self.copy("*", symlinks=True) diff --git a/packages/conan/recipes/cmake/test_package/conanfile.py b/packages/conan/recipes/cmake/test_package/conanfile.py index 5154eb9e..8d623fe6 100644 --- a/packages/conan/recipes/cmake/test_package/conanfile.py +++ b/packages/conan/recipes/cmake/test_package/conanfile.py @@ -1,18 +1,24 @@ -import os from six import StringIO -from conans import ConanFile, tools +from conan import ConanFile +import re class TestPackageConan(ConanFile): - settings = "os" + settings = "os", "arch", "compiler", "build_type" + generators = "VirtualBuildEnv" + test_type = "explicit" + + def build_requirements(self): + self.tool_requires(self.tested_reference_str) def test(self): - if not tools.cross_building(self.settings): - output = StringIO() - self.run("cmake --version", output=output, run_environment=True) - output_str = str(output.getvalue()) - self.output.info("Installed version: {}".format(output_str)) - require_version = str(self.deps_cpp_info["cmake"].version) - self.output.info("Expected version: {}".format(require_version)) - assert_cmake_version = "cmake version %s" % require_version - assert assert_cmake_version in output_str + output = StringIO() + # Third arg to self.run renamed "stdout" in Conan 2.0 but 1.x linter doesn't like it + self.run("cmake --version", output) + output_str = str(output.getvalue()) + self.output.info("Installed version: {}".format(output_str)) + tokens = re.split("[@#]", self.tested_reference_str) + require_version = tokens[0].split("/", 1)[1] + self.output.info("Expected version: {}".format(require_version)) + assert_cmake_version = "cmake version %s" % require_version + assert assert_cmake_version in output_str diff --git a/packages/conan/recipes/cppunit/conandata.yml b/packages/conan/recipes/cppunit/conandata.yml new file mode 100644 index 00000000..3219d18f --- /dev/null +++ b/packages/conan/recipes/cppunit/conandata.yml @@ -0,0 +1,10 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/cppunit/all/conandata.yml + +sources: + "1.15.1": + url: "http://dev-www.libreoffice.org/src/cppunit-1.15.1.tar.gz" + sha256: "89c5c6665337f56fd2db36bc3805a5619709d51fb136e51937072f63fcc717a7" diff --git a/packages/conan/recipes/cppunit/conanfile.py b/packages/conan/recipes/cppunit/conanfile.py index f15f3444..53bfde2d 100644 --- a/packages/conan/recipes/cppunit/conanfile.py +++ b/packages/conan/recipes/cppunit/conanfile.py @@ -1,15 +1,33 @@ -from conans import AutoToolsBuildEnvironment, ConanFile, tools -from contextlib import contextmanager +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/cppunit/all/conanfile.py + +from conan import ConanFile +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.build import stdcpp_library +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rename, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import check_min_vs, is_msvc, unix_path import os +required_conan_version = ">=1.57.0" + class CppunitConan(ConanFile): name = "cppunit" - description = "CppUnit is the C++ port of the famous JUnit framework for unit testing. Test output is in XML for automatic testing and GUI based for supervised tests." - topics = ("conan", "cppunit", "unit-test", "tdd") + description = ( + "CppUnit is the C++ port of the famous JUnit framework for unit testing. " + "Test output is in XML for automatic testing and GUI based for supervised tests." + ) + topics = ("unit-test", "tdd") license = " LGPL-2.1-or-later" homepage = "https://freedesktop.org/wiki/Software/cppunit/" - url = "https://github.com/AcademySoftwareFoundation/aswf-docker" + url = "https://github.com/conan-io/conan-center-index" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -19,13 +37,10 @@ class CppunitConan(ConanFile): "shared": False, "fPIC": True, } - generators = "pkg_config" - - _autotools = None @property - def _source_subfolder(self): - return "source_subfolder" + def _settings_build(self): + return getattr(self, "settings_build", self.settings) def config_options(self): if self.settings.os == "Windows": @@ -33,102 +48,88 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + + def layout(self): + basic_layout(self, src_folder="src") + # ASWF: we want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] def build_requirements(self): - if tools.os_info.is_windows and not tools.get_env("CONAN_BASH_PATH"): - self.build_requires("msys2/20200517") - if self.settings.compiler == "Visual Studio": - self.build_requires("automake/1.16.2") + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + if is_msvc(self): + self.tool_requires("automake/1.16.5") def source(self): - tools.get(f"http://dev-www.libreoffice.org/src/cppunit-{self.version}.tar.gz") - os.rename("{}-{}".format(self.name, self.version), self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - @contextmanager - def _build_context(self): - if self.settings.compiler == "Visual Studio": - with tools.vcvars(self.settings): - env = { - "AR": "{} lib".format( - tools.unix_path(self.deps_user_info["automake"].ar_lib) - ), - "CC": "{} cl -nologo".format( - tools.unix_path(self.deps_user_info["automake"].compile) - ), - "CXX": "{} cl -nologo".format( - tools.unix_path(self.deps_user_info["automake"].compile) - ), - "NM": "dumpbin -symbols", - "OBJDUMP": ":", - "RANLIB": ":", - "STRIP": ":", - } - with tools.environment_append(env): - yield - else: - yield + def generate(self): + env = VirtualBuildEnv(self) + env.generate() - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment( - self, win_bash=tools.os_info.is_windows - ) + tc = AutotoolsToolchain(self) if self.settings.os == "Windows" and self.options.shared: - self._autotools.defines.append("CPPUNIT_BUILD_DLL") - if self.settings.compiler == "Visual Studio": - self._autotools.flags.append("-FS") - self._autotools.cxx_flags.append("-EHsc") + tc.extra_defines.append("CPPUNIT_BUILD_DLL") + if is_msvc(self): + tc.extra_cxxflags.append("-EHsc") + if check_min_vs(self, "180", raise_invalid=False): + tc.extra_cflags.append("-FS") + tc.extra_cxxflags.append("-FS") + if is_apple_os(self): + # https://github.com/conan-io/conan-center-index/pull/15759#issuecomment-1419046535 + tc.extra_ldflags.append("-headerpad_max_install_names") yes_no = lambda v: "yes" if v else "no" - conf_args = [ - "--enable-shared={}".format(yes_no(self.options.shared)), - "--enable-static={}".format(yes_no(not self.options.shared)), + tc.configure_args.extend([ "--enable-debug={}".format(yes_no(self.settings.build_type == "Debug")), "--enable-doxygen=no", "--enable-dot=no", "--enable-werror=no", "--enable-html-docs=no", - ] - self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) - return self._autotools + ]) + env = tc.environment() + if is_msvc(self): + compile_wrapper = unix_path(self, self.conf.get("user.automake:compile-wrapper", check_type=str)) + ar_wrapper = unix_path(self, self.conf.get("user.automake:lib-wrapper", check_type=str)) + env.define("CC", f"{compile_wrapper} cl -nologo") + env.define("CXX", f"{compile_wrapper} cl -nologo") + env.define("LD", "link -nologo") + env.define("AR", f"{ar_wrapper} \"lib -nologo\"") + env.define("NM", "dumpbin -symbols") + env.define("OBJDUMP", ":") + env.define("RANLIB", ":") + env.define("STRIP", ":") + tc.generate(env) def build(self): - with self._build_context(): - autotools = self._configure_autotools() - autotools.make() + autotools = Autotools(self) + autotools.configure() + autotools.make() def package(self): - self.copy( - "COPYING", - src=self._source_subfolder, - dst=os.path.join("licenses", self.name), - ) - with self._build_context(): - autotools = self._configure_autotools() - autotools.install() - - if self.settings.compiler == "Visual Studio" and self.options.shared: - os.rename( - os.path.join(self.package_folder, "lib", "cppunit.dll.lib"), - os.path.join(self.package_folder, "lib", "cppunit.lib"), - ) - - os.unlink(os.path.join(self.package_folder, "lib", "libcppunit.la")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.rmdir(os.path.join(self.package_folder, "share")) + # ASWF: separate licenses from multiple package installs + copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + autotools = Autotools(self) + autotools.install() + if is_msvc(self) and self.options.shared: + rename(self, os.path.join(self.package_folder, "lib", "cppunit.dll.lib"), + os.path.join(self.package_folder, "lib", "cppunit.lib")) + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + # ASWF: lib64 on RHEL derived distro + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + fix_apple_shared_install_name(self) def package_info(self): + self.cpp_info.set_property("pkg_config_name", "cppunit") self.cpp_info.libs = ["cppunit"] if not self.options.shared: - stdlib = tools.stdcpp_library(self) - if stdlib: - self.cpp_info.system_libs.append(stdlib) - if self.settings.os == "Linux": - self.cpp_info.system_libs.append("dl") + libcxx = stdcpp_library(self) + if libcxx: + self.cpp_info.system_libs.append(libcxx) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["dl", "m"]) if self.options.shared and self.settings.os == "Windows": self.cpp_info.defines.append("CPPUNIT_DLL") - self.cpp_info.filenames["pkg_config"] = "cppunit" - - def deploy(self): - self.copy("*", symlinks=True) diff --git a/packages/conan/recipes/cppunit/conanfile.py_NEW b/packages/conan/recipes/cppunit/conanfile.py_NEW new file mode 100644 index 00000000..37927a93 --- /dev/null +++ b/packages/conan/recipes/cppunit/conanfile.py_NEW @@ -0,0 +1,125 @@ +from conan import ConanFile +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.build import stdcpp_library +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rename, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import check_min_vs, is_msvc, unix_path +import os + +required_conan_version = ">=1.57.0" + + +class CppunitConan(ConanFile): + name = "cppunit" + description = ( + "CppUnit is the C++ port of the famous JUnit framework for unit testing. " + "Test output is in XML for automatic testing and GUI based for supervised tests." + ) + topics = ("unit-test", "tdd") + license = " LGPL-2.1-or-later" + homepage = "https://freedesktop.org/wiki/Software/cppunit/" + url = "https://github.com/conan-io/conan-center-index" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + basic_layout(self, src_folder="src") + + def build_requirements(self): + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + if is_msvc(self): + self.tool_requires("automake/1.16.5") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + + tc = AutotoolsToolchain(self) + if self.settings.os == "Windows" and self.options.shared: + tc.extra_defines.append("CPPUNIT_BUILD_DLL") + if is_msvc(self): + tc.extra_cxxflags.append("-EHsc") + if check_min_vs(self, "180", raise_invalid=False): + tc.extra_cflags.append("-FS") + tc.extra_cxxflags.append("-FS") + if is_apple_os(self): + # https://github.com/conan-io/conan-center-index/pull/15759#issuecomment-1419046535 + tc.extra_ldflags.append("-headerpad_max_install_names") + yes_no = lambda v: "yes" if v else "no" + tc.configure_args.extend([ + "--enable-debug={}".format(yes_no(self.settings.build_type == "Debug")), + "--enable-doxygen=no", + "--enable-dot=no", + "--enable-werror=no", + "--enable-html-docs=no", + ]) + env = tc.environment() + if is_msvc(self): + compile_wrapper = unix_path(self, self.conf.get("user.automake:compile-wrapper", check_type=str)) + ar_wrapper = unix_path(self, self.conf.get("user.automake:lib-wrapper", check_type=str)) + env.define("CC", f"{compile_wrapper} cl -nologo") + env.define("CXX", f"{compile_wrapper} cl -nologo") + env.define("LD", "link -nologo") + env.define("AR", f"{ar_wrapper} \"lib -nologo\"") + env.define("NM", "dumpbin -symbols") + env.define("OBJDUMP", ":") + env.define("RANLIB", ":") + env.define("STRIP", ":") + tc.generate(env) + + def build(self): + autotools = Autotools(self) + autotools.configure() + autotools.make() + + def package(self): + copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) + autotools.install() + if is_msvc(self) and self.options.shared: + rename(self, os.path.join(self.package_folder, "lib", "cppunit.dll.lib"), + os.path.join(self.package_folder, "lib", "cppunit.lib")) + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + fix_apple_shared_install_name(self) + + def package_info(self): + self.cpp_info.set_property("pkg_config_name", "cppunit") + self.cpp_info.libs = ["cppunit"] + if not self.options.shared: + libcxx = stdcpp_library(self) + if libcxx: + self.cpp_info.system_libs.append(libcxx) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["dl", "m"]) + if self.options.shared and self.settings.os == "Windows": + self.cpp_info.defines.append("CPPUNIT_DLL") diff --git a/packages/conan/recipes/cppunit/conanfile.py_OLD b/packages/conan/recipes/cppunit/conanfile.py_OLD new file mode 100644 index 00000000..98dda1fc --- /dev/null +++ b/packages/conan/recipes/cppunit/conanfile.py_OLD @@ -0,0 +1,135 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT + +from conans import AutoToolsBuildEnvironment, ConanFile, tools +from contextlib import contextmanager +import os + + +class CppunitConan(ConanFile): + name = "cppunit" + description = "CppUnit is the C++ port of the famous JUnit framework for unit testing. Test output is in XML for automatic testing and GUI based for supervised tests." + topics = ("conan", "cppunit", "unit-test", "tdd") + license = " LGPL-2.1-or-later" + homepage = "https://freedesktop.org/wiki/Software/cppunit/" + url = "https://github.com/AcademySoftwareFoundation/aswf-docker" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + generators = "pkg_config" + + _autotools = None + + @property + def _source_subfolder(self): + return "source_subfolder" + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + del self.options.fPIC + + def build_requirements(self): + if tools.os_info.is_windows and not tools.get_env("CONAN_BASH_PATH"): + self.build_requires("msys2/20200517") + if self.settings.compiler == "Visual Studio": + self.build_requires("automake/1.16.2") + + def source(self): + tools.get(f"http://dev-www.libreoffice.org/src/cppunit-{self.version}.tar.gz") + os.rename("{}-{}".format(self.name, self.version), self._source_subfolder) + + @contextmanager + def _build_context(self): + if self.settings.compiler == "Visual Studio": + with tools.vcvars(self.settings): + env = { + "AR": "{} lib".format( + tools.unix_path(self.deps_user_info["automake"].ar_lib) + ), + "CC": "{} cl -nologo".format( + tools.unix_path(self.deps_user_info["automake"].compile) + ), + "CXX": "{} cl -nologo".format( + tools.unix_path(self.deps_user_info["automake"].compile) + ), + "NM": "dumpbin -symbols", + "OBJDUMP": ":", + "RANLIB": ":", + "STRIP": ":", + } + with tools.environment_append(env): + yield + else: + yield + + def _configure_autotools(self): + if self._autotools: + return self._autotools + self._autotools = AutoToolsBuildEnvironment( + self, win_bash=tools.os_info.is_windows + ) + if self.settings.os == "Windows" and self.options.shared: + self._autotools.defines.append("CPPUNIT_BUILD_DLL") + if self.settings.compiler == "Visual Studio": + self._autotools.flags.append("-FS") + self._autotools.cxx_flags.append("-EHsc") + yes_no = lambda v: "yes" if v else "no" + conf_args = [ + "--enable-shared={}".format(yes_no(self.options.shared)), + "--enable-static={}".format(yes_no(not self.options.shared)), + "--enable-debug={}".format(yes_no(self.settings.build_type == "Debug")), + "--enable-doxygen=no", + "--enable-dot=no", + "--enable-werror=no", + "--enable-html-docs=no", + ] + self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) + return self._autotools + + def build(self): + with self._build_context(): + autotools = self._configure_autotools() + autotools.make() + + def package(self): + self.copy( + "COPYING", + src=self._source_subfolder, + dst=os.path.join("licenses", self.name), + ) + with self._build_context(): + autotools = self._configure_autotools() + autotools.install() + + if self.settings.compiler == "Visual Studio" and self.options.shared: + os.rename( + os.path.join(self.package_folder, "lib", "cppunit.dll.lib"), + os.path.join(self.package_folder, "lib", "cppunit.lib"), + ) + + os.unlink(os.path.join(self.package_folder, "lib", "libcppunit.la")) + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + tools.rmdir(os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.libs = ["cppunit"] + if not self.options.shared: + stdlib = tools.stdcpp_library(self) + if stdlib: + self.cpp_info.system_libs.append(stdlib) + if self.settings.os == "Linux": + self.cpp_info.system_libs.append("dl") + if self.options.shared and self.settings.os == "Windows": + self.cpp_info.defines.append("CPPUNIT_DLL") + self.cpp_info.filenames["pkg_config"] = "cppunit" diff --git a/packages/conan/recipes/cppunit/test_package/CMakeLists.txt b/packages/conan/recipes/cppunit/test_package/CMakeLists.txt index c5705e3c..451c41e4 100644 --- a/packages/conan/recipes/cppunit/test_package/CMakeLists.txt +++ b/packages/conan/recipes/cppunit/test_package/CMakeLists.txt @@ -1,12 +1,14 @@ -cmake_minimum_required(VERSION 3.12) -project(test_package C CXX) +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/cppunit/all/test_package/CMakeLists.txt -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup() +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(cppunit REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -if(CPPUNIT_TEST_FIXTURE_AVAILABLE) - target_compile_definitions(${PROJECT_NAME} "-DCPPUNIT_TEST_FIXTURE_AVAILABLE") -endif() -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) +target_link_libraries(${PROJECT_NAME} PRIVATE cppunit::cppunit) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/packages/conan/recipes/cppunit/test_package/conanfile.py b/packages/conan/recipes/cppunit/test_package/conanfile.py index 27b75d21..a4336cdb 100644 --- a/packages/conan/recipes/cppunit/test_package/conanfile.py +++ b/packages/conan/recipes/cppunit/test_package/conanfile.py @@ -1,19 +1,32 @@ -from conans import ConanFile, CMake, tools +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/cppunit/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) def build(self): cmake = CMake(self) cmake.configure() - if tools.Version(self.deps_cpp_info["cppunit"].version) >= "1.15": - cmake.definitions["CPPUNIT_TEST_FIXTURE_AVAILABLE"] = True cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/cppunit/test_package/test_package.cpp b/packages/conan/recipes/cppunit/test_package/test_package.cpp index c0bfbece..9f63427f 100644 --- a/packages/conan/recipes/cppunit/test_package/test_package.cpp +++ b/packages/conan/recipes/cppunit/test_package/test_package.cpp @@ -1,3 +1,11 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/cppunit/all/test_package/test_package.cpp +*/ + #include "cppunit/BriefTestProgressListener.h" #include "cppunit/CompilerOutputter.h" #include "cppunit/extensions/TestFactoryRegistry.h" @@ -118,7 +126,6 @@ void ExampleTestCase::testEquals() CPPUNIT_ASSERT_DOUBLES_EQUAL( 12.0, 11.99, 0.5 ); } -#ifdef CPPUNIT_TEST_FIXTURE_AVAILABLE class FixtureTest : public CPPUNIT_NS::TestFixture { }; @@ -133,4 +140,3 @@ CPPUNIT_TEST_FIXTURE(FixtureTest, testAdd) double result = 2.0 + 2.0; CPPUNIT_ASSERT( result == 4.0 ); } -#endif diff --git a/packages/conan/recipes/python/PythonConfig.cmake b/packages/conan/recipes/cpython/PythonConfig.cmake similarity index 100% rename from packages/conan/recipes/python/PythonConfig.cmake rename to packages/conan/recipes/cpython/PythonConfig.cmake diff --git a/packages/conan/recipes/python/PythonConfigVersion.cmake b/packages/conan/recipes/cpython/PythonConfigVersion.cmake similarity index 100% rename from packages/conan/recipes/python/PythonConfigVersion.cmake rename to packages/conan/recipes/cpython/PythonConfigVersion.cmake diff --git a/packages/conan/recipes/python/Python_DevelopmentTargets.cmake b/packages/conan/recipes/cpython/Python_DevelopmentTargets.cmake similarity index 100% rename from packages/conan/recipes/python/Python_DevelopmentTargets.cmake rename to packages/conan/recipes/cpython/Python_DevelopmentTargets.cmake diff --git a/packages/conan/recipes/python/Python_InterpreterTargets.cmake b/packages/conan/recipes/cpython/Python_InterpreterTargets.cmake similarity index 100% rename from packages/conan/recipes/python/Python_InterpreterTargets.cmake rename to packages/conan/recipes/cpython/Python_InterpreterTargets.cmake diff --git a/packages/conan/recipes/python/Python_Macros.cmake b/packages/conan/recipes/cpython/Python_Macros.cmake similarity index 100% rename from packages/conan/recipes/python/Python_Macros.cmake rename to packages/conan/recipes/cpython/Python_Macros.cmake diff --git a/packages/conan/recipes/cpython/conandata.yml b/packages/conan/recipes/cpython/conandata.yml new file mode 100644 index 00000000..eeb346d0 --- /dev/null +++ b/packages/conan/recipes/cpython/conandata.yml @@ -0,0 +1,179 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/cpython/all/conandata.yml + +sources: + 3.11.10: + url: "https://www.python.org/ftp/python/3.11.10/Python-3.11.10.tgz" + sha256: "92f2faf242681bfa406d53a51e17d42c5373affe23a130cd9697e132ef574706" + +sources: + "3.12.7": + url: "https://www.python.org/ftp/python/3.12.7/Python-3.12.7.tgz" + sha256: "73ac8fe780227bf371add8373c3079f42a0dc62deff8d612cd15a618082ab623" + "3.12.2": + url: "https://www.python.org/ftp/python/3.12.2/Python-3.12.2.tgz" + sha256: "a7c4f6a9dc423d8c328003254ab0c9338b83037bd787d680826a5bf84308116e" + "3.11.11": + url: "https://www.python.org/ftp/python/3.11.11/Python-3.11.11.tgz" + sha256: "883bddee3c92fcb91cf9c09c5343196953cbb9ced826213545849693970868ed" + "3.11.10": + url: "https://www.python.org/ftp/python/3.11.10/Python-3.11.10.tgz" + sha256: "92f2faf242681bfa406d53a51e17d42c5373affe23a130cd9697e132ef574706" + "3.11.9": + url: "https://www.python.org/ftp/python/3.11.9/Python-3.11.9.tgz" + sha256: "e7de3240a8bc2b1e1ba5c81bf943f06861ff494b69fda990ce2722a504c6153d" + "3.11.8": + url: "https://www.python.org/ftp/python/3.11.8/Python-3.11.8.tgz" + sha256: "d3019a613b9e8761d260d9ebe3bd4df63976de30464e5c0189566e1ae3f61889" + "3.10.14": + url: "https://www.python.org/ftp/python/3.10.14/Python-3.10.14.tgz" + sha256: "cefea32d3be89c02436711c95a45c7f8e880105514b78680c14fe76f5709a0f6" + "3.10.11": + url: "https://www.python.org/ftp/python/3.10.11/Python-3.10.11.tgz" + sha256: "f3db31b668efa983508bd67b5712898aa4247899a346f2eb745734699ccd3859" + "3.9.19": + url: "https://www.python.org/ftp/python/3.9.19/Python-3.9.19.tgz" + sha256: "f5f9ec8088abca9e399c3b62fd8ef31dbd2e1472c0ccb35070d4d136821aaf71" + "3.9.15": + url: "https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz" + sha256: "48d1ccb29d5fbaf1fb8f912271d09f7450e426d4dfe95978ef6aaada70ece4d8" + "3.8.19": + url: "https://www.python.org/ftp/python/3.8.19/Python-3.8.19.tgz" + sha256: "c7fa55a36e5c7a19ec37d8f90f60a2197548908c9ac8b31e7c0dbffdd470eeac" + "3.7.9": + url: "https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tgz" + sha256: "39b018bc7d8a165e59aa827d9ae45c45901739b0bbb13721e4f973f3521c166a" + "3.7.3": + url: "https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz" + sha256: "d62e3015f2f89c970ac52343976b406694931742fbde2fed8d1ce8ebb4e1f8ff" +patches: + "3.12.7": + - patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch" + patch_description: "Fix ARM/ARM64 mismatch in project file" + patch_type: "bugfix" + - patch_file: "patches/3.12/3.12.1-0001-_ctypes-ffi.patch" + patch_description: "Support shared libffi" + patch_type: "portability" + - patch_file: "patches/3.x-0001-relocatable-python-config.patch" + patch_description: "Allow package to be relocatable" + patch_type: "conan" + - patch_file: "patches/3.12/3.12.1-0002-remove-module-deps.patch" + patch_description: "Remove section of solution file forcing projects to be built that might not be used for this recipe" + patch_type: "conan" + "3.12.2": + - patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch" + patch_description: "Fix ARM/ARM64 mismatch in project file" + patch_type: "bugfix" + - patch_file: "patches/3.12/3.12.1-0001-_ctypes-ffi.patch" + patch_description: "Support shared libffi" + patch_type: "portability" + - patch_file: "patches/3.x-0001-relocatable-python-config.patch" + patch_description: "Allow package to be relocatable" + patch_type: "conan" + - patch_file: "patches/3.12/3.12.1-0002-remove-module-deps.patch" + patch_description: "Remove section of solution file forcing projects to be built that might not be used for this recipe" + patch_type: "conan" + "3.11.10": + - patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch" + patch_description: "Fix ARM/ARM64 mismatch in project file" + patch_type: "bugfix" + - patch_file: "patches/3.11/3.11.7-0001-_ctypes-ffi.patch" + patch_description: "Support shared libffi" + patch_type: "portability" + - patch_file: "patches/3.x-0001-relocatable-python-config.patch" + patch_description: "Allow package to be relocatable" + patch_type: "conan" + - patch_file: "patches/3.x-0002-remove-module-deps.patch" + patch_description: "Remove section of solution file forcing projects to be built that might not be used for this recipe" + patch_type: "conan" + "3.11.9": + - patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch" + patch_description: "Fix ARM/ARM64 mismatch in project file" + patch_type: "bugfix" + - patch_file: "patches/3.11/3.11.7-0001-_ctypes-ffi.patch" + patch_description: "Support shared libffi" + patch_type: "portability" + - patch_file: "patches/3.x-0001-relocatable-python-config.patch" + patch_description: "Allow package to be relocatable" + patch_type: "conan" + - patch_file: "patches/3.x-0002-remove-module-deps.patch" + patch_description: "Remove section of solution file forcing projects to be built that might not be used for this recipe" + patch_type: "conan" + "3.11.8": + - patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch" + patch_description: "Fix ARM/ARM64 mismatch in project file" + patch_type: "bugfix" + - patch_file: "patches/3.11/3.11.7-0001-_ctypes-ffi.patch" + patch_description: "Support shared libffi" + patch_type: "portability" + - patch_file: "patches/3.x-0001-relocatable-python-config.patch" + patch_description: "Allow package to be relocatable" + patch_type: "conan" + - patch_file: "patches/3.x-0002-remove-module-deps.patch" + patch_description: "Remove section of solution file forcing projects to be built that might not be used for this recipe" + patch_type: "conan" + "3.10.14": + - patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch" + patch_description: "Fix ARM/ARM64 mismatch in project file" + patch_type: "bugfix" + - patch_file: "patches/3.10/3.10.0-0003-_ctypes-ffi.patch" + patch_description: "Remove duplicate libffi symbols and support shared libffi" + patch_type: "portability" + - patch_file: "patches/3.x-0001-relocatable-python-config.patch" + patch_description: "Allow package to be relocatable" + patch_type: "conan" + - patch_file: "patches/3.x-0002-remove-module-deps.patch" + patch_description: "Remove section of solution file forcing projects to be built that might not be used for this recipe" + patch_type: "conan" + "3.10.11": + - patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch" + patch_description: "Fix ARM/ARM64 mismatch in project file" + patch_type: "bugfix" + - patch_file: "patches/3.10/3.10.0-0003-_ctypes-ffi.patch" + patch_description: "Remove duplicate libffi symbols and support shared libffi" + patch_type: "portability" + - patch_file: "patches/3.x-0001-relocatable-python-config.patch" + patch_description: "Allow package to be relocatable" + patch_type: "conan" + - patch_file: "patches/3.x-0002-remove-module-deps.patch" + patch_description: "Remove section of solution file forcing projects to be built that might not be used for this recipe" + patch_type: "conan" + "3.9.19": + - patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch" + patch_description: "Fix ARM/ARM64 mismatch in project file" + patch_type: "bugfix" + - patch_file: "patches/3.9/3.9.7-0003-_ctypes-ffi.patch" + patch_description: "Remove duplicate libffi symbols and support shared libffi" + patch_type: "portability" + - patch_file: "patches/3.x-0001-relocatable-python-config.patch" + patch_description: "Allow package to be relocatable" + patch_type: "conan" + - patch_file: "patches/3.x-0002-remove-module-deps.patch" + patch_description: "Remove section of solution file forcing projects to be built that might not be used for this recipe" + patch_type: "conan" + "3.9.15": + - patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch" + patch_description: "Fix ARM/ARM64 mismatch in project file" + patch_type: "bugfix" + - patch_file: "patches/3.9/3.9.7-0003-_ctypes-ffi.patch" + patch_description: "Remove duplicate libffi symbols and support shared libffi" + patch_type: "portability" + - patch_file: "patches/3.x-0001-relocatable-python-config.patch" + patch_description: "Allow package to be relocatable" + patch_type: "conan" + - patch_file: "patches/3.x-0002-remove-module-deps.patch" + patch_description: "Remove section of solution file forcing projects to be built that might not be used for this recipe" + patch_type: "conan" + "3.8.19": + - patch_file: "patches/3.8/3.8.12-0002-_ctypes-ffi.patch" + patch_description: "Remove duplicate libffi symbols and support shared libffi" + patch_type: "portability" + - patch_file: "patches/3.x-0001-relocatable-python-config.patch" + patch_description: "Allow package to be relocatable" + patch_type: "conan" + - patch_file: "patches/3.x-0002-remove-module-deps.patch" + patch_description: "Remove section of solution file forcing projects to be built that might not be used for this recipe" + path_type: "conan" diff --git a/packages/conan/recipes/cpython/conanfile.py b/packages/conan/recipes/cpython/conanfile.py new file mode 100644 index 00000000..3c1d0bae --- /dev/null +++ b/packages/conan/recipes/cpython/conanfile.py @@ -0,0 +1,988 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/cpython/all/conanfile.py + +import os +import re +import textwrap + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.env import VirtualRunEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, load, mkdir, replace_in_file, rm, rmdir, save, unzip, download +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps, PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.microsoft import MSBuildDeps, MSBuildToolchain, MSBuild, is_msvc, is_msvc_static_runtime, msvc_runtime_flag, msvs_toolset +from conan.tools.scm import Version + +required_conan_version = ">=1.58.0" + + +class CPythonConan(ConanFile): + name = "cpython" + description = "Python is a programming language that lets you work quickly and integrate systems more effectively." + license = "Python-2.0 and numpy (BSD-3-Clause license)" # ASWF: bundle numpy + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.python.org" + topics = ("python", "cpython", "language", "script") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "optimizations": [True, False], + "lto": [True, False], + "docstrings": [True, False], + "pymalloc": [True, False], + "with_bz2": [True, False], + "with_gdbm": [True, False], + "with_nis": [True, False], + "with_sqlite3": [True, False], + "with_tkinter": [True, False], + "with_curses": [True, False], + "with_lzma": [True, False], + "with_numpy": [True, False], # ASWF: bundle numpy + + # options that don't change package id + "env_vars": [True, False], # set environment variables + } + default_options = { + "shared": False, + "fPIC": True, + "optimizations": False, + "lto": False, + "docstrings": True, + "pymalloc": True, + "with_bz2": True, + "with_gdbm": True, + "with_nis": False, + "with_sqlite3": True, + "with_tkinter": True, + "with_curses": True, + "with_lzma": True, + "with_numpy": True, # ASWF: bundle numpy + + # options that don't change package id + "env_vars": True, + } + short_paths = True + + @property + def _supports_modules(self): + return not is_msvc(self) or self.options.shared + + @property + def _version_suffix(self): + v = Version(self.version) + joiner = "" if is_msvc(self) else "." + return f"{v.major}{joiner}{v.minor}" + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + if is_msvc(self): + del self.options.lto + del self.options.docstrings + del self.options.pymalloc + del self.options.with_curses + del self.options.with_gdbm + del self.options.with_nis + + self.settings.compiler.rm_safe("libcxx") + self.settings.compiler.rm_safe("cppstd") + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + if not self._supports_modules: + self.options.rm_safe("with_bz2") + self.options.rm_safe("with_sqlite3") + self.options.rm_safe("with_tkinter") + self.options.rm_safe("with_lzma") + + def layout(self): + basic_layout(self, src_folder="src") + # ASWF We want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def build_requirements(self): + if Version(self.version) >= "3.11" and not is_msvc(self) and not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/2.1.0") + + def requirements(self): + self.requires("zlib/[>=1.2.11 <2]") + if self._supports_modules: + self.requires("openssl/[>=1.1 <4]") + self.requires("expat/[>=2.6.2 <3]") + self.requires("libffi/3.4.4") + if Version(self.version) < "3.10" or is_apple_os(self): + # FIXME: mpdecimal > 2.5.0 on MacOS causes the _decimal module to not be importable + self.requires("mpdecimal/2.5.0") + else: + self.requires("mpdecimal/2.5.1") + if self.settings.os != "Windows": + if not is_apple_os(self): + self.requires("util-linux-libuuid/2.39.2") + # In <3.9 and lower patch versions of 3.9/10/11, crypt.h was exposed in Python.h + # This was removed in 3.11 and backported: https://github.com/python/cpython/issues/88914 + # For the sake of this recipe, we only have later patch versions, so this version check + # may be slightly inaccurate if a lower patch version is desired. + transitive_crypt = Version(self.version) < "3.9" + self.requires("libxcrypt/4.4.36", transitive_headers=transitive_crypt, transitive_libs=transitive_crypt) + if self.options.get_safe("with_bz2"): + self.requires("bzip2/1.0.8") + if self.options.get_safe("with_gdbm", False): + self.requires("gdbm/1.23") + if self.options.get_safe("with_nis", False): + # TODO: Add nis when available. + raise ConanInvalidConfiguration("nis is not available on CCI (yet)") + if self.options.get_safe("with_sqlite3"): + self.requires("sqlite3/3.45.2") + if self.options.get_safe("with_tkinter"): + self.requires("tk/8.6.10") + # ASWF: ncurses as Conan wrapper isn't working + # if self.options.get_safe("with_curses", False): + # # Used in a public header + # # https://github.com/python/cpython/blob/v3.10.13/Include/py_curses.h#L34 + # self.requires("ncurses/6.4", transitive_headers=True, transitive_libs=True) + if self.options.get_safe("with_lzma", False): + self.requires("xz_utils/5.4.5") + + def package_id(self): + del self.info.options.env_vars + + def validate(self): + if self.options.shared: + if is_msvc_static_runtime(self): + raise ConanInvalidConfiguration( + "cpython does not support MT(d) runtime when building a shared cpython library" + ) + if is_msvc(self): + if self.options.optimizations: + raise ConanInvalidConfiguration( + "This recipe does not support optimized MSVC cpython builds (yet)" + ) + # FIXME: should probably throw when cross building + # FIXME: optimizations for Visual Studio, before building the final `build_type`: + # 1. build the MSVC PGInstrument build_type, + # 2. run the instrumented binaries, (PGInstrument should have created a `python.bat` file in the PCbuild folder) + # 3. build the MSVC PGUpdate build_type + if self.settings.build_type == "Debug" and "d" not in msvc_runtime_flag(self): + raise ConanInvalidConfiguration( + "Building debug cpython requires a debug runtime (Debug cpython requires _CrtReportMode" + " symbol, which only debug runtimes define)" + ) + if str(self.settings.arch) not in self._msvc_archs: + raise ConanInvalidConfiguration("Visual Studio does not support this architecture") + if not self.options.shared and Version(self.version) >= "3.10": + # Static CPython on Windows is only loosely supported, see https://github.com/python/cpython/issues/110234 + # 3.10 fails during the test, 3.11 fails during the build (missing symbol that seems to be DLL specific: PyWin_DLLhModule) + raise ConanInvalidConfiguration("Static msvc build disabled (>=3.10) due to \"AttributeError: module 'sys' has no attribute 'winver'\"") + + # ASWF: ncurses not a Conan package + # if self.options.get_safe("with_curses", False) and not self.dependencies["ncurses"].options.with_widec: + # raise ConanInvalidConfiguration("cpython requires ncurses with wide character support") + + if self._supports_modules: + if Version(self.version) >= "3.9.0": + if self.dependencies["mpdecimal"].ref.version < Version("2.5.0"): + raise ConanInvalidConfiguration("cpython 3.9.0 (and newer) requires (at least) mpdecimal 2.5.0") + + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version).major == 9 and Version(self.version) >= "3.12": + raise ConanInvalidConfiguration("FIXME: GCC 9 produces an internal compiler error locally, and a link error in CCI") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def _generate_autotools(self): + tc = AutotoolsToolchain(self, prefix=self.package_folder) + # Not necessary, just cleans up the output + tc.update_configure_args({"--enable-static": None, "--disable-static": None}) + yes_no = lambda v: "yes" if v else "no" + # ASWF: build with system openssl + tc.configure_args += [ + "--with-doc-strings={}".format(yes_no(self.options.docstrings)), + "--with-pymalloc={}".format(yes_no(self.options.pymalloc)), + "--with-system-expat", + "--enable-optimizations={}".format(yes_no(self.options.optimizations)), + "--with-lto={}".format(yes_no(self.options.lto)), + "--with-pydebug={}".format(yes_no(self.settings.build_type == "Debug")), + "--with-system-libmpdec", + # ASWF: our openssl wrapper can still get in the way, force /usr + # "--with-openssl={}".format(self.dependencies["openssl"].package_folder), + "--with-openssl=/usr", + "--with-platlibdir=lib64", # ASWF use lib64 on RHEL distros + "--libdir=${prefix}/lib64", # ASWF use lib64 on RHEL distros + ] + if Version(self.version) < "3.12": + tc.configure_args.append("--with-system-ffi") + if Version(self.version) >= "3.10": + tc.configure_args.append("--disable-test-modules") + if self.options.get_safe("with_sqlite3"): + tc.configure_args.append("--enable-loadable-sqlite-extensions={}".format( + yes_no(not self.dependencies["sqlite3"].options.omit_load_extension) + )) + if self.options.with_tkinter and Version(self.version) < "3.11": + tcltk_includes = [] + tcltk_libs = [] + # FIXME: collect using some conan util (https://github.com/conan-io/conan/issues/7656) + for dep in ("tcl", "tk", "zlib"): + cpp_info = self.dependencies[dep].cpp_info.aggregated_components() + tcltk_includes += [f"-I{d}" for d in cpp_info.includedirs] + tcltk_libs += [f"-L{lib}" for lib in cpp_info.libdirs] + tcltk_libs += [f"-l{lib}" for lib in cpp_info.libs] + if self.settings.os in ["Linux", "FreeBSD"] and not self.dependencies["tk"].options.shared: + # FIXME: use info from xorg.components (x11, xscrnsaver) + tcltk_libs.extend([f"-l{lib}" for lib in ("X11", "Xss")]) + tc.configure_args += [ + "--with-tcltk-includes={}".format(" ".join(tcltk_includes)), + "--with-tcltk-libs={}".format(" ".join(tcltk_libs)), + ] + if not is_apple_os(self): + tc.extra_ldflags.append('-Wl,--as-needed') + + # ASWF: as per https://github.com/python/cpython/issues/95957 starting with + # version 3.11 options --with-tcltk-libs and --with-tcltk-includes are no longer + # recognized and configure relies on pkgconf to find those. Our Tcl/Tk wrapper + # packages don't provide those, inject them via TCLTK_LIBS env var + if Version(self.version) >= "3.11": + os.environ["TCLTK_LIBS"] = "-ltcl -ltk" + + tc.generate() + + deps = AutotoolsDeps(self) + deps.generate() + if Version(self.version) >= "3.11": + pkgdeps = PkgConfigDeps(self) + pkgdeps.generate() + + def generate(self): + VirtualRunEnv(self).generate(scope="build") + + if is_msvc(self): + # The msbuild generator only works with Visual Studio + deps = MSBuildDeps(self) + deps.generate() + # The toolchain.props is not injected yet, but it also generates VCVars + toolchain = MSBuildToolchain(self) + toolchain.properties["IncludeExternals"] = "true" + toolchain.generate() + else: + self._generate_autotools() + + def _msvc_project_path(self, name): + return os.path.join(self.source_folder, "PCBuild", f"{name}.vcxproj") + + def _regex_replace_in_file(self, filename, pattern, replacement): + content = load(self, filename) + content = re.sub(pattern, replacement, content) + save(self, filename, content) + + def _inject_conan_props_file(self, project_basename, dep_name, condition=True): + if condition: + search = '' + replace_in_file(self, + self._msvc_project_path(project_basename), + search, + search + f'') + + def _patch_setup_py(self): + setup_py = os.path.join(self.source_folder, "setup.py") + if Version(self.version) < "3.10": + replace_in_file(self, setup_py, ":libmpdec.so.2", "mpdec") + + if self.options.get_safe("with_curses", False): + # ASWF: ncurses not a Conan package + # libcurses = self.dependencies["ncurses"].cpp_info.components["libcurses"] + # tinfo = self.dependencies["ncurses"].cpp_info.components["tinfo"] + # libs = libcurses.libs + libcurses.system_libs + tinfo.libs + tinfo.system_libs + # replace_in_file(self, setup_py, + # "curses_libs = ", + # "curses_libs = {} #".format(repr(libs))) + replace_in_file(self, setup_py, + "curses_libs =", + "curses_libs = ['ncursesw'] #") + + if self._supports_modules: + # ASWF: using system openssl, can't query dependencies + openssl = self.dependencies["openssl"].cpp_info.aggregated_components() + zlib = self.dependencies["zlib"].cpp_info.aggregated_components() + if Version(self.version) < "3.11": + replace_in_file(self, setup_py, + "openssl_includes = ", + f"openssl_includes = {openssl.includedirs + zlib.includedirs} #") + replace_in_file(self, setup_py, + "openssl_libdirs = ", + f"openssl_libdirs = {openssl.libdirs + zlib.libdirs} #") + replace_in_file(self, setup_py, + "openssl_libs = ", + f"openssl_libs = {openssl.libs + zlib.libs} #") + + if Version(self.version) < "3.11": + replace_in_file(self, setup_py, "if (MACOS and self.detect_tkinter_darwin())", "if (False)") + + def _patch_msvc_projects(self): + # Don't build vendored bz2 + self._regex_replace_in_file(self._msvc_project_path("_bz2"), r'.*Include=\"\$\(bz2Dir\).*', "") + + if self._supports_modules: + # Don't import vendored libffi + replace_in_file(self, self._msvc_project_path("_ctypes"), '', "") + if Version(self.version) < "3.11": + # Don't add this define, it should be added conditionally by the libffi package + replace_in_file(self, self._msvc_project_path("_ctypes"), "FFI_BUILDING;", "") + + # Don't import vendored openssl + replace_in_file(self, self._msvc_project_path("_hashlib"), '', "") + replace_in_file(self, self._msvc_project_path("_ssl"), '', "") + + # For mpdecimal, we need to remove all headers and all c files *except* the main module file, _decimal.c + self._regex_replace_in_file(self._msvc_project_path("_decimal"), r'.*Include=\"\.\.\\Modules\\_decimal\\.*\.h.*', "") + self._regex_replace_in_file(self._msvc_project_path("_decimal"), r'.*Include=\"\.\.\\Modules\\_decimal\\libmpdec\\.*\.c.*', "") + # There is also an assembly file with a complicated build step as part of the mpdecimal build + replace_in_file(self, self._msvc_project_path("_decimal"), "", "-->") + # Remove extra include directory + replace_in_file(self, self._msvc_project_path("_decimal"), r"..\Modules\_decimal\libmpdec;", "") + + # Don't include vendored sqlite3 + replace_in_file(self, self._msvc_project_path("_sqlite3"), + '', + '') + + # Remove hardcoded reference to lzma library + replace_in_file(self, self._msvc_project_path("_lzma"), "$(OutDir)liblzma$(PyDebugExt).lib;", "") + # Don't include vendored lzma + replace_in_file(self, self._msvc_project_path("_lzma"), + '', + '') + + # Don't include vendored expat project + replace_in_file(self, self._msvc_project_path("pyexpat"), + r"$(PySourcePath)Modules\expat;", + "") + # Remove XML_STATIC, this should conditionally be set by the expat library. + # TODO: Why HAVE_EXPAT_H? (It is at least removed in later versions) + replace_in_file(self, self._msvc_project_path("pyexpat"), ("HAVE_EXPAT_H;" if Version(self.version) < "3.11" else "") + "XML_STATIC;", "") + self._regex_replace_in_file(self._msvc_project_path("pyexpat"), r'.*Include=\"\.\.\\Modules\\expat\\.*" />', "") + + # Don't include vendored expat headers + replace_in_file(self, self._msvc_project_path("_elementtree"), + r"..\Modules\expat;", + "") + # Remove XML_STATIC, this should conditionally be set by the expat library. + replace_in_file(self, self._msvc_project_path("_elementtree"), "XML_STATIC;", "") + # Remove vendored expat + self._regex_replace_in_file(self._msvc_project_path("_elementtree"), r'.*Include=\"\.\.\\Modules\\expat\\.*" />', "") + + if Version(self.version) >= "3.9": + # deflate.c has warning 4244 disabled, need special patching else it breaks the regex below + # Add an extra space to avoid being picked up by the regex + replace_in_file(self, self._msvc_project_path("pythoncore"), + r'', + r'') + # Don't use vendored zlib + self._regex_replace_in_file(self._msvc_project_path("pythoncore"), r'.*Include=\"\$\(zlibDir\).*', "") + + # Don't use vendored tcl/tk include dir + replace_in_file(self, self._msvc_project_path("_tkinter"), "$(tcltkDir)include;", "") + # Don't use hardcoded tcl/tk library + replace_in_file(self, self._msvc_project_path("_tkinter"), "$(tcltkLib);", "") + # TODO: Why? + replace_in_file(self, self._msvc_project_path("_tkinter"), + "", + "") + # Don't use vendored tcl/tk + self._regex_replace_in_file(self._msvc_project_path("_tkinter"), r'.*Include=\"\$\(tcltkdir\).*', "") + + # Disable "ValidateUcrtbase" target (TODO: Why?) + replace_in_file(self, self._msvc_project_path("python"), "$(Configuration) != 'PGInstrument'", "False") + + if Version(self.version) < "3.11": + # TODO: Why? + replace_in_file(self, self._msvc_project_path("_freeze_importlib"), + "', + r'') + + self._inject_conan_props_file("_bz2", "bzip2", self.options.get_safe("with_bz2")) + self._inject_conan_props_file("_elementtree", "expat", self._supports_modules) + self._inject_conan_props_file("pyexpat", "expat", self._supports_modules) + self._inject_conan_props_file("_hashlib", "openssl", self._supports_modules) + self._inject_conan_props_file("_ssl", "openssl", self._supports_modules) + self._inject_conan_props_file("_sqlite3", "sqlite3", self.options.get_safe("with_sqlite3")) + self._inject_conan_props_file("_tkinter", "tk", self.options.get_safe("with_tkinter")) + self._inject_conan_props_file("pythoncore", "zlib") + self._inject_conan_props_file("python", "zlib") + self._inject_conan_props_file("pythonw", "zlib") + self._inject_conan_props_file("_ctypes", "libffi", self._supports_modules) + self._inject_conan_props_file("_decimal", "mpdecimal", self._supports_modules) + self._inject_conan_props_file("_lzma", "xz_utils", self.options.get_safe("with_lzma")) + self._inject_conan_props_file("_bsddb", "libdb", self.options.get_safe("with_bsddb")) + + def _patch_sources(self): + apply_conandata_patches(self) + # <=3.10 requires a lot of manual injection of dependencies through setup.py + # 3.12 removes setup.py completely, and uses pkgconfig dependencies + # 3.11 is an in awkward transition state where some dependencies use pkgconfig, and others use setup.py + if Version(self.version) < "3.12": + self._patch_setup_py() + if Version(self.version) >= "3.11": + replace_in_file(self, os.path.join(self.source_folder, "configure"), + 'OPENSSL_LIBS="-lssl -lcrypto"', + 'OPENSSL_LIBS="-lssl -lcrypto -lz"') + if is_msvc(self): + runtime_library = { + "MT": "MultiThreaded", + "MTd": "MultiThreadedDebug", + "MD": "MultiThreadedDLL", + "MDd": "MultiThreadedDebugDLL", + }[msvc_runtime_flag(self)] + self.output.info("Patching runtime") + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pyproject.props"), + "MultiThreadedDLL", runtime_library) + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pyproject.props"), + "MultiThreadedDebugDLL", runtime_library) + + # Remove vendored packages + rmdir(self, os.path.join(self.source_folder, "Modules", "_decimal", "libmpdec")) + rmdir(self, os.path.join(self.source_folder, "Modules", "expat")) + + if Version(self.version) < "3.12": + replace_in_file(self, os.path.join(self.source_folder, "Makefile.pre.in"), + "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)'", + "$(RUNSHARED) CC='$(CC) $(CONFIGURE_CFLAGS) $(CONFIGURE_CPPFLAGS)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)'") + + # Enable static MSVC cpython + if not self.options.shared: + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pythoncore.vcxproj"), + "", + "Py_NO_BUILD_SHARED;") + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pythoncore.vcxproj"), + "Py_ENABLE_SHARED", + "Py_NO_ENABLE_SHARED") + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pythoncore.vcxproj"), + "DynamicLibrary", + "StaticLibrary") + + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "python.vcxproj"), + "", + "shlwapi.lib;ws2_32.lib;pathcch.lib;version.lib;%(AdditionalDependencies)") + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "python.vcxproj"), + "", + "Py_NO_ENABLE_SHARED;") + + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pythonw.vcxproj"), + "", + "shlwapi.lib;ws2_32.lib;pathcch.lib;version.lib;%(AdditionalDependencies)") + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pythonw.vcxproj"), + "", + "Py_NO_ENABLE_SHARED;%(PreprocessorDefinitions)") + + conantoolchain_props = os.path.join(self.generators_folder, MSBuildToolchain.filename) + replace_in_file( + self, os.path.join(self.source_folder, "PCbuild", "pythoncore.vcxproj"), + '', + f'', + ) + + if is_msvc(self): + self._patch_msvc_projects() + + @property + def _solution_projects(self): + if self.options.shared: + solution_path = os.path.join(self.source_folder, "PCbuild", "pcbuild.sln") + projects = set(m.group(1) for m in re.finditer('"([^"]+)\\.vcxproj"', open(solution_path).read())) + + def project_build(name): + if os.path.basename(name) in self._msvc_discarded_projects: + return False + if "test" in name: + return False + return True + + projects = list(filter(project_build, projects)) + return projects + else: + return ["pythoncore", "python", "pythonw"] + + @property + def _msvc_discarded_projects(self): + discarded = { + "python_uwp", + "pythonw_uwp", + "_freeze_importlib", + "sqlite3", + "bdist_wininst", + "liblzma", + "openssl", + "xxlimited", + } + if not self.options.with_bz2: + discarded.add("bz2") + if not self.options.with_sqlite3: + discarded.add("_sqlite3") + if not self.options.with_tkinter: + discarded.add("_tkinter") + if not self.options.with_lzma: + discarded.add("_lzma") + return discarded + + @property + def _msvc_archs(self): + archs = { + "x86": "Win32", + "x86_64": "x64", + "armv7": "ARM", + "armv8_32": "ARM", + "armv8": "ARM64", + } + return archs + + def _msvc_build(self): + msbuild = MSBuild(self) + msbuild.platform = self._msvc_archs[str(self.settings.arch)] + + projects = self._solution_projects + self.output.info(f"Building {len(projects)} Visual Studio projects: {projects}") + + sln = os.path.join(self.source_folder, "PCbuild", "pcbuild.sln") + # FIXME: Solution files do not pick up the toolset automatically. + cmd = msbuild.command(sln, targets=projects) + self.run(f"{cmd} /p:PlatformToolset={msvs_toolset(self)}") + + def build(self): + self._patch_sources() + if is_msvc(self): + self._msvc_build() + else: + autotools = Autotools(self) + autotools.configure() + autotools.make() + + @property + def _msvc_artifacts_path(self): + build_subdir_lut = { + "x86_64": "amd64", + "x86": "win32", + "armv7": "arm32", + "armv8_32": "arm32", + "armv8": "arm64", + } + return os.path.join(self.source_folder, "PCbuild", build_subdir_lut[str(self.settings.arch)]) + + @property + def _msvc_install_subprefix(self): + return "bin" + + def _copy_essential_dlls(self): + if is_msvc(self): + # Until MSVC builds support cross building, copy dll's of essential (shared) dependencies to python binary location. + # These dll's are required when running the layout tool using the newly built python executable. + dest_path = os.path.join(self.build_folder, self._msvc_artifacts_path) + for bin_path in self.dependencies["libffi"].cpp_info.bindirs: + copy(self, "*.dll", src=bin_path, dst=dest_path) + for bin_path in self.dependencies["expat"].cpp_info.bindirs: + copy(self, "*.dll", src=bin_path, dst=dest_path) + for bin_path in self.dependencies["zlib"].cpp_info.bindirs: + copy(self, "*.dll", src=bin_path, dst=dest_path) + + def _msvc_package_layout(self): + self._copy_essential_dlls() + install_prefix = os.path.join(self.package_folder, self._msvc_install_subprefix) + mkdir(self, install_prefix) + build_path = self._msvc_artifacts_path + infix = "_d" if self.settings.build_type == "Debug" else "" + # FIXME: if cross building, use a build python executable here + python_built = os.path.join(build_path, f"python{infix}.exe") + layout_args = [ + os.path.join(self.source_folder, "PC", "layout", "main.py"), + "-v", + "-s", self.source_folder, + "-b", build_path, + "--copy", install_prefix, + "-p", + "--include-pip", + "--include-venv", + "--include-dev", + ] + if self.options.with_tkinter: + layout_args.append("--include-tcltk") + if self.settings.build_type == "Debug": + layout_args.append("-d") + python_args = " ".join(f'"{a}"' for a in layout_args) + self.run(f"{python_built} {python_args}") + + rmdir(self, os.path.join(self.package_folder, "bin", "tcl")) + + rm(self, "LICENSE.txt", install_prefix) + for file in os.listdir(os.path.join(install_prefix, "libs")): + if not re.match("python.*", file): + os.unlink(os.path.join(install_prefix, "libs", file)) + + def _msvc_package_copy(self): + build_path = self._msvc_artifacts_path + infix = "_d" if self.settings.build_type == "Debug" else "" + copy(self, "*.exe", + src=build_path, + dst=os.path.join(self.package_folder, self._msvc_install_subprefix)) + copy(self, "*.dll", + src=build_path, + dst=os.path.join(self.package_folder, self._msvc_install_subprefix)) + copy(self, "*.pyd", + src=build_path, + dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "DLLs")) + copy(self, f"python{self._version_suffix}{infix}.lib", + src=build_path, + dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "libs")) + copy(self, "*", + src=os.path.join(self.source_folder, "Include"), + dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "include")) + copy(self, "pyconfig.h", + src=os.path.join(self.source_folder, "PC"), + dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "include")) + copy(self, "*.py", + src=os.path.join(self.source_folder, "lib"), + dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "Lib")) + rmdir(self, os.path.join(self.package_folder, self._msvc_install_subprefix, "Lib", "test")) + + packages = {} + get_name_version = lambda fn: fn.split(".", 2)[:2] + whldir = os.path.join(self.source_folder, "Lib", "ensurepip", "_bundled") + for fn in filter(lambda n: n.endswith(".whl"), os.listdir(whldir)): + name, version = get_name_version(fn) + add = True + if name in packages: + pname, pversion = get_name_version(packages[name]) + add = Version(version) > Version(pversion) + if add: + packages[name] = fn + for fname in packages.values(): + unzip(self, filename=os.path.join(whldir, fname), + destination=os.path.join(self.package_folder, "bin", "Lib", "site-packages")) + + interpreter_path = os.path.join(build_path, self._cpython_interpreter_name) + lib_dir_path = os.path.join(self.package_folder, self._msvc_install_subprefix, "Lib").replace("\\", "/") + self.run(f"{interpreter_path} -c \"import compileall; compileall.compile_dir('{lib_dir_path}')\"") + + @property + def _exact_lib_name(self): + prefix = "" if self.settings.os == "Windows" else "lib" + if self.settings.os == "Windows": + extension = "lib" + elif not self.options.shared: + extension = "a" + elif is_apple_os(self): + extension = "dylib" + else: + extension = "so" + return f"{prefix}{self._lib_name}.{extension}" + + @property + def _cmake_module_path(self): + if is_msvc(self): + # On Windows, `lib` is for Python modules, `libs` is for compiled objects. + # Usually CMake modules are packaged with the latter. + return os.path.join(self._msvc_install_subprefix, "libs", "cmake") + else: + # ASWF: lib64 on RHEL derived distro + return os.path.join("lib64", "cmake") + + def _write_cmake_findpython_wrapper_file(self): + template = textwrap.dedent(""" + if (DEFINED Python3_VERSION_STRING) + set(_CONAN_PYTHON_SUFFIX "3") + else() + set(_CONAN_PYTHON_SUFFIX "") + endif() + set(Python${_CONAN_PYTHON_SUFFIX}_EXECUTABLE @PYTHON_EXECUTABLE@) + set(Python${_CONAN_PYTHON_SUFFIX}_LIBRARY @PYTHON_LIBRARY@) + + # Fails if these are set beforehand + unset(Python${_CONAN_PYTHON_SUFFIX}_INCLUDE_DIRS) + unset(Python${_CONAN_PYTHON_SUFFIX}_INCLUDE_DIR) + + include(${CMAKE_ROOT}/Modules/FindPython${_CONAN_PYTHON_SUFFIX}.cmake) + + # Sanity check: The former comes from FindPython(3), the latter comes from the injected find module + if(NOT Python${_CONAN_PYTHON_SUFFIX}_VERSION STREQUAL Python${_CONAN_PYTHON_SUFFIX}_VERSION_STRING) + message(FATAL_ERROR "CMake detected wrong cpython version - this is likely a bug with the cpython Conan package") + endif() + + if (TARGET Python${_CONAN_PYTHON_SUFFIX}::Module) + set_target_properties(Python${_CONAN_PYTHON_SUFFIX}::Module PROPERTIES INTERFACE_LINK_LIBRARIES cpython::python) + endif() + if (TARGET Python${_CONAN_PYTHON_SUFFIX}::SABIModule) + set_target_properties(Python${_CONAN_PYTHON_SUFFIX}::SABIModule PROPERTIES INTERFACE_LINK_LIBRARIES cpython::python) + endif() + if (TARGET Python${_CONAN_PYTHON_SUFFIX}::Python) + set_target_properties(Python${_CONAN_PYTHON_SUFFIX}::Python PROPERTIES INTERFACE_LINK_LIBRARIES cpython::embed) + endif() + """) + + # In order for the package to be relocatable, these variables must be relative to the installed CMake file + if is_msvc(self): + python_exe = "${CMAKE_CURRENT_LIST_DIR}/../../" + self._cpython_interpreter_name + python_library = "${CMAKE_CURRENT_LIST_DIR}/../" + self._exact_lib_name + else: + python_exe = "${CMAKE_CURRENT_LIST_DIR}/../../bin/" + self._cpython_interpreter_name + python_library = "${CMAKE_CURRENT_LIST_DIR}/../" + self._exact_lib_name + + cmake_file = os.path.join(self.package_folder, self._cmake_module_path, "use_conan_python.cmake") + content = template.replace("@PYTHON_EXECUTABLE@", python_exe).replace("@PYTHON_LIBRARY@", python_library) + save(self, cmake_file, content) + + def package(self): + # ASWF: separate licenses from multiple package installs + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + if is_msvc(self): + if self.options.shared: + self._msvc_package_layout() + else: + self._msvc_package_copy() + rm(self, "vcruntime*", os.path.join(self.package_folder, "bin"), recursive=True) + else: + autotools = Autotools(self) + if is_apple_os(self): + # FIXME: See https://github.com/python/cpython/issues/109796, this workaround is mentioned there + autotools.make(target="sharedinstall", args=["DESTDIR="]) + autotools.install(args=["DESTDIR="]) + # ASWF: lib64 on RHEL derived distro + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + + # Rewrite shebangs of python scripts + for filename in os.listdir(os.path.join(self.package_folder, "bin")): + filepath = os.path.join(self.package_folder, "bin", filename) + if not os.path.isfile(filepath): + continue + if os.path.islink(filepath): + continue + with open(filepath, "rb") as fn: + firstline = fn.readline(1024) + if not(firstline.startswith(b"#!") and b"/python" in firstline and b"/bin/sh" not in firstline): + continue + text = fn.read() + self.output.info(f"Rewriting shebang of {filename}") + with open(filepath, "wb") as fn: + fn.write(textwrap.dedent(f"""\ + #!/bin/sh + ''':' + __file__="$0" + while [ -L "$__file__" ]; do + __file__="$(dirname "$__file__")/$(readlink "$__file__")" + done + exec "$(dirname "$__file__")/python{self._version_suffix}" "$0" "$@" + ''' + """).encode()) + fn.write(text) + + if not os.path.exists(self._cpython_symlink): + os.symlink(f"python{self._version_suffix}", self._cpython_symlink) + + # ASWF: bundle numpy + # ASWF: how do you convince pip to write to lib64 instead of lib? + py_version = Version(self.version) + py_exe = os.path.join(self.package_folder, "bin", f"python{py_version.major}.{py_version.minor}") + self.run(f"{py_exe} -m pip install nose coverage docutils epydoc") + if self.options.get_safe("with_numpy"): + self.run(f"{py_exe} -m pip install numpy=={os.environ['ASWF_NUMPY_VERSION']}") + + fix_apple_shared_install_name(self) + + self._write_cmake_findpython_wrapper_file() + + @property + def _cpython_symlink(self): + symlink = os.path.join(self.package_folder, "bin", "python") + if self.settings.os == "Windows": + symlink += ".exe" + return symlink + + @property + def _cpython_interpreter_name(self): + python = "python" + if is_msvc(self): + if self.settings.build_type == "Debug": + python += "_d" + else: + python += self._version_suffix + if self.settings.os == "Windows": + python += ".exe" + return python + + @property + def _cpython_interpreter_path(self): + return os.path.join(self.package_folder, "bin", self._cpython_interpreter_name) + + @property + def _abi_suffix(self): + res = "" + if self.settings.build_type == "Debug": + res += "d" + return res + + @property + def _lib_name(self): + if is_msvc(self): + if self.settings.build_type == "Debug": + lib_ext = "_d" + else: + lib_ext = "" + else: + lib_ext = self._abi_suffix + return f"python{self._version_suffix}{lib_ext}" + + def package_info(self): + py_version = Version(self.version) + # python component: "Build a C extension for Python" + if is_msvc(self): + self.cpp_info.components["python"].includedirs = [os.path.join(self._msvc_install_subprefix, "include")] + libdir = os.path.join(self._msvc_install_subprefix, "libs") + else: + self.cpp_info.components["python"].includedirs.append( + os.path.join("include", f"python{self._version_suffix}{self._abi_suffix}") + ) + # ASWF: lib64 on RHEL derived distro + # libdir = "lib" + libdir = "lib64" + if self.options.shared: + self.cpp_info.components["python"].defines.append("Py_ENABLE_SHARED") + else: + self.cpp_info.components["python"].defines.append("Py_NO_ENABLE_SHARED") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["python"].system_libs.extend(["dl", "m", "pthread", "util"]) + elif self.settings.os == "Windows": + self.cpp_info.components["python"].system_libs.extend( + ["pathcch", "shlwapi", "version", "ws2_32"] + ) + self.cpp_info.components["python"].requires = ["zlib::zlib"] + if self.settings.os != "Windows": + self.cpp_info.components["python"].requires.append("libxcrypt::libxcrypt") + self.cpp_info.components["python"].set_property( + "pkg_config_name", f"python-{py_version.major}.{py_version.minor}" + ) + self.cpp_info.components["python"].set_property( + "pkg_config_aliases", [f"python{py_version.major}"] + ) + self.cpp_info.components["python"].libdirs = [] + + # embed component: "Embed Python into an application" + self.cpp_info.components["embed"].libs = [self._lib_name] + self.cpp_info.components["embed"].libdirs = [libdir] + self.cpp_info.components["embed"].includedirs = [] + self.cpp_info.components["embed"].set_property( + "pkg_config_name", f"python-{py_version.major}.{py_version.minor}-embed" + ) + self.cpp_info.components["embed"].set_property( + "pkg_config_aliases", [f"python{py_version.major}-embed"] + ) + self.cpp_info.components["embed"].requires = ["python"] + + # Transparent integration with CMake's FindPython(3) + self.cpp_info.set_property("cmake_file_name", "Python3") + self.cpp_info.set_property("cmake_module_file_name", "Python") + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_build_modules", [os.path.join(self._cmake_module_path, "use_conan_python.cmake")]) + self.cpp_info.builddirs = [self._cmake_module_path] + + if self._supports_modules: + # hidden components: the C extensions of python are built as dynamically loaded shared libraries. + # C extensions or applications with an embedded Python should not need to link to them.. + self.cpp_info.components["_hidden"].requires = [ + "openssl::openssl", + "expat::expat", + "mpdecimal::mpdecimal", + "libffi::libffi", + ] + if self.settings.os != "Windows": + if not is_apple_os(self): + self.cpp_info.components["_hidden"].requires.append("util-linux-libuuid::util-linux-libuuid") + self.cpp_info.components["_hidden"].requires.append("libxcrypt::libxcrypt") + if self.options.with_bz2: + self.cpp_info.components["_hidden"].requires.append("bzip2::bzip2") + if self.options.get_safe("with_gdbm", False): + self.cpp_info.components["_hidden"].requires.append("gdbm::gdbm") + if self.options.with_sqlite3: + self.cpp_info.components["_hidden"].requires.append("sqlite3::sqlite3") + # ASWF: ncurses not a Conan package + # if self.options.get_safe("with_curses", False): + # self.cpp_info.components["_hidden"].requires.append("ncurses::ncurses") + if self.options.get_safe("with_lzma"): + self.cpp_info.components["_hidden"].requires.append("xz_utils::xz_utils") + if self.options.get_safe("with_tkinter"): + self.cpp_info.components["_hidden"].requires.append("tk::tk") + self.cpp_info.components["_hidden"].includedirs = [] + self.cpp_info.components["_hidden"].libdirs = [] + # ASWF: don't want -lnsl + # if self.settings.os in ["Linux", "FreeBSD"]: + # self.cpp_info.components["_hidden"].system_libs.append("nsl") + + if self.options.env_vars: + bindir = os.path.join(self.package_folder, "bin") + self.runenv_info.append_path("PATH", bindir) + self.buildenv_info.append_path("PATH", bindir) + + # TODO remove once Conan 1.x is no longer supported + self.output.info(f"Appending PATH environment variable: {bindir}") + self.env_info.PATH.append(bindir) + + python = self._cpython_interpreter_path + self.conf_info.define("user.cpython:python", python) + self.user_info.python = python + if self.options.env_vars: + self.runenv_info.append_path("PYTHON", python) + self.buildenv_info.append_path("PYTHON", python) + + # TODO remove once Conan 1.x is no longer supported + self.output.info(f"Appending PYTHON environment variable: {python}") + self.env_info.PYTHON = python + + if is_msvc(self): + pythonhome = os.path.join(self.package_folder, "bin") + else: + pythonhome = self.package_folder + self.conf_info.define("user.cpython:pythonhome", pythonhome) + self.user_info.pythonhome = pythonhome + + pythonhome_required = is_msvc(self) or is_apple_os(self) + self.conf_info.define("user.cpython:module_requires_pythonhome", pythonhome_required) + self.user_info.module_requires_pythonhome = pythonhome_required + + if is_msvc(self): + if self.options.env_vars: + # FIXME: On Windows, defining this breaks the packaged Python executable, but fixes + # separately built executables with an embedded interpreter trying to run standard Python + # modules. However, NOT defining this reverses the situation, normal Python executables + #work, but embedded interpreters break. + # The docs at https://python.readthedocs.io/en/latest/using/cmdline.html#envvar-PYTHONHOME + # seem to not be accurate to Windows (https://discuss.python.org/t/the-document-on-pythonhome-might-be-wrong/19614/5) + #self.runenv_info.append_path("PYTHONHOME", pythonhome) + #self.buildenv_info.append_path("PYTHONHOME", pythonhome) + + # TODO remove once Conan 1.x is no longer supported + self.output.info(f"Setting PYTHONHOME environment variable: {pythonhome}") + self.env_info.PYTHONHOME = pythonhome + + python_root = self.package_folder + if self.options.env_vars: + self.runenv_info.append_path("PYTHON_ROOT", python_root) + self.buildenv_info.append_path("PYTHON_ROOT", python_root) + + # TODO remove once Conan 1.x is no longer supported + self.output.info(f"Setting PYTHON_ROOT environment variable: {python_root}") + self.env_info.PYTHON_ROOT = python_root + self.conf_info.define("user.cpython:python_root", python_root) + self.user_info.python_root = python_root diff --git a/packages/conan/recipes/cpython/patches/3.10/3.10.0-0003-_ctypes-ffi.patch b/packages/conan/recipes/cpython/patches/3.10/3.10.0-0003-_ctypes-ffi.patch new file mode 100644 index 00000000..4bc35cf9 --- /dev/null +++ b/packages/conan/recipes/cpython/patches/3.10/3.10.0-0003-_ctypes-ffi.patch @@ -0,0 +1,50 @@ +--- Modules/_ctypes/cfield.c ++++ Modules/_ctypes/cfield.c +@@ -1472,7 +1472,11 @@ + return PyLong_FromVoidPtr(*(void **)ptr); + } + +-static struct fielddesc formattable[] = { ++#define FORMATTABLE_SIZE 30 ++static struct fielddesc formattable[FORMATTABLE_SIZE]; ++ ++static void formattable_init(void) { ++struct fielddesc my_formattable[] = { + { 's', s_set, s_get, &ffi_type_pointer}, + { 'b', b_set, b_get, &ffi_type_schar}, + { 'B', B_set, B_get, &ffi_type_uchar}, +@@ -1524,6 +1528,11 @@ + { 'O', O_set, O_get, &ffi_type_pointer}, + { 0, NULL, NULL, NULL}, + }; ++ size_t nb = 1; ++ for (struct fielddesc *pos = my_formattable; pos->code; ++pos, ++nb); ++ if (FORMATTABLE_SIZE < nb) abort(); ++ memcpy(formattable, my_formattable, nb * sizeof(struct fielddesc)); ++} + + /* + Ideas: Implement VARIANT in this table, using 'V' code. +@@ -1538,5 +1547,6 @@ + + if (!initialized) { + initialized = 1; ++ formattable_init(); + if (sizeof(wchar_t) == sizeof(short)) + _ctypes_get_fielddesc("u")->pffi_type = &ffi_type_sshort; +@@ -1598,7 +1608,7 @@ typedef struct _ffi_type + struct _ffi_type **elements; + } ffi_type; + */ +- ++#if 0 + /* align and size are bogus for void, but they must not be zero */ + ffi_type ffi_type_void = { 1, 1, FFI_TYPE_VOID }; + +@@ -1625,5 +1635,5 @@ + FFI_TYPE_LONGDOUBLE }; + + ffi_type ffi_type_pointer = { sizeof(void *), VOID_P_ALIGN, FFI_TYPE_POINTER }; +- ++#endif + /*---------------- EOF ----------------*/ diff --git a/packages/conan/recipes/cpython/patches/3.11/3.11.7-0001-_ctypes-ffi.patch b/packages/conan/recipes/cpython/patches/3.11/3.11.7-0001-_ctypes-ffi.patch new file mode 100644 index 00000000..65027b60 --- /dev/null +++ b/packages/conan/recipes/cpython/patches/3.11/3.11.7-0001-_ctypes-ffi.patch @@ -0,0 +1,37 @@ +diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c +index 9bdf1db856..799f99e809 100644 +--- a/Modules/_ctypes/cfield.c ++++ b/Modules/_ctypes/cfield.c +@@ -1473,7 +1473,11 @@ P_get(void *ptr, Py_ssize_t size) + return PyLong_FromVoidPtr(*(void **)ptr); + } + +-static struct fielddesc formattable[] = { ++#define FORMATTABLE_SIZE 30 ++static struct fielddesc formattable[FORMATTABLE_SIZE]; ++ ++static void formattable_init(void) { ++struct fielddesc my_formattable[] = { + { 's', s_set, s_get, NULL}, + { 'b', b_set, b_get, NULL}, + { 'B', B_set, B_get, NULL}, +@@ -1510,6 +1514,11 @@ static struct fielddesc formattable[] = { + { 'O', O_set, O_get, NULL}, + { 0, NULL, NULL, NULL}, + }; ++ size_t nb = 1; ++ for (struct fielddesc *pos = my_formattable; pos->code; ++pos, ++nb); ++ if (FORMATTABLE_SIZE < nb) abort(); ++ memcpy(formattable, my_formattable, nb * sizeof(struct fielddesc)); ++} + + /* + Ideas: Implement VARIANT in this table, using 'V' code. +@@ -1597,6 +1606,7 @@ _ctypes_get_fielddesc(const char *fmt) + + if (!initialized) { + initialized = 1; ++ formattable_init(); + _ctypes_init_fielddesc(); + } + diff --git a/packages/conan/recipes/cpython/patches/3.12/3.12.1-0001-_ctypes-ffi.patch b/packages/conan/recipes/cpython/patches/3.12/3.12.1-0001-_ctypes-ffi.patch new file mode 100644 index 00000000..06bb62c5 --- /dev/null +++ b/packages/conan/recipes/cpython/patches/3.12/3.12.1-0001-_ctypes-ffi.patch @@ -0,0 +1,37 @@ +diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c +index 128506a9ee..ee9ade67b8 100644 +--- a/Modules/_ctypes/cfield.c ++++ b/Modules/_ctypes/cfield.c +@@ -1448,7 +1448,11 @@ P_get(void *ptr, Py_ssize_t size) + return PyLong_FromVoidPtr(*(void **)ptr); + } + +-static struct fielddesc formattable[] = { ++#define FORMATTABLE_SIZE 30 ++static struct fielddesc formattable[FORMATTABLE_SIZE]; ++ ++static void formattable_init(void) { ++struct fielddesc my_formattable[] = { + { 's', s_set, s_get, NULL}, + { 'b', b_set, b_get, NULL}, + { 'B', B_set, B_get, NULL}, +@@ -1485,6 +1489,11 @@ static struct fielddesc formattable[] = { + { 'O', O_set, O_get, NULL}, + { 0, NULL, NULL, NULL}, + }; ++ size_t nb = 1; ++ for (struct fielddesc *pos = my_formattable; pos->code; ++pos, ++nb); ++ if (FORMATTABLE_SIZE < nb) abort(); ++ memcpy(formattable, my_formattable, nb * sizeof(struct fielddesc)); ++} + + /* + Ideas: Implement VARIANT in this table, using 'V' code. +@@ -1572,6 +1581,7 @@ _ctypes_get_fielddesc(const char *fmt) + + if (!initialized) { + initialized = 1; ++ formattable_init(); + _ctypes_init_fielddesc(); + } + diff --git a/packages/conan/recipes/cpython/patches/3.12/3.12.1-0002-remove-module-deps.patch b/packages/conan/recipes/cpython/patches/3.12/3.12.1-0002-remove-module-deps.patch new file mode 100644 index 00000000..1d9d31f0 --- /dev/null +++ b/packages/conan/recipes/cpython/patches/3.12/3.12.1-0002-remove-module-deps.patch @@ -0,0 +1,50 @@ +diff --git a/PCbuild/pcbuild.sln b/PCbuild/pcbuild.sln +index bdddec60da..f6a30955bf 100644 +--- a/PCbuild/pcbuild.sln ++++ b/PCbuild/pcbuild.sln +@@ -9,45 +9,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution + EndProjectSection + EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcxproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" +- ProjectSection(ProjectDependencies) = postProject +- {9E48B300-37D1-11DD-8C41-005056C00008} = {9E48B300-37D1-11DD-8C41-005056C00008} +- {9EC7190A-249F-4180-A900-548FDCF3055F} = {9EC7190A-249F-4180-A900-548FDCF3055F} +- {78D80A15-BD8C-44E2-B49E-1F05B0A0A687} = {78D80A15-BD8C-44E2-B49E-1F05B0A0A687} +- {6901D91C-6E48-4BB7-9FEC-700C8131DF1D} = {6901D91C-6E48-4BB7-9FEC-700C8131DF1D} +- {54B1431F-B86B-4ACB-B28C-88BCF93191D8} = {54B1431F-B86B-4ACB-B28C-88BCF93191D8} +- {F749B822-B489-4CA5-A3AD-CE078F5F338A} = {F749B822-B489-4CA5-A3AD-CE078F5F338A} +- {D06B6426-4762-44CC-8BAD-D79052507F2F} = {D06B6426-4762-44CC-8BAD-D79052507F2F} +- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781} = {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781} +- {CB435430-EBB1-478B-8F4E-C256F6838F55} = {CB435430-EBB1-478B-8F4E-C256F6838F55} +- {17E1E049-C309-4D79-843F-AE483C264AEA} = {17E1E049-C309-4D79-843F-AE483C264AEA} +- {384C224A-7474-476E-A01B-750EA7DE918C} = {384C224A-7474-476E-A01B-750EA7DE918C} +- {12728250-16EC-4DC6-94D7-E21DD88947F8} = {12728250-16EC-4DC6-94D7-E21DD88947F8} +- {86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480} +- {28B5D777-DDF2-4B6B-B34F-31D938813856} = {28B5D777-DDF2-4B6B-B34F-31D938813856} +- {31FFC478-7B4A-43E8-9954-8D03E2187E9C} = {31FFC478-7B4A-43E8-9954-8D03E2187E9C} +- {F9D71780-F393-11E0-BE50-0800200C9A66} = {F9D71780-F393-11E0-BE50-0800200C9A66} +- {494BAC80-A60C-43A9-99E7-ACB691CE2C4D} = {494BAC80-A60C-43A9-99E7-ACB691CE2C4D} +- {C6E20F84-3247-4AD6-B051-B073268F73BA} = {C6E20F84-3247-4AD6-B051-B073268F73BA} +- {B244E787-C445-441C-BDF4-5A4F1A3A1E51} = {B244E787-C445-441C-BDF4-5A4F1A3A1E51} +- {18CAE28C-B454-46C1-87A0-493D91D97F03} = {18CAE28C-B454-46C1-87A0-493D91D97F03} +- {13CECB97-4119-4316-9D42-8534019A5A44} = {13CECB97-4119-4316-9D42-8534019A5A44} +- {885D4898-D08D-4091-9C40-C700CFE3FC5A} = {885D4898-D08D-4091-9C40-C700CFE3FC5A} +- {447F05A8-F581-4CAC-A466-5AC7936E207E} = {447F05A8-F581-4CAC-A466-5AC7936E207E} +- {ECC7CEAC-A5E5-458E-BB9E-2413CC847881} = {ECC7CEAC-A5E5-458E-BB9E-2413CC847881} +- {4946ECAC-2E69-4BF8-A90A-F5136F5094DF} = {4946ECAC-2E69-4BF8-A90A-F5136F5094DF} +- {FDB84CBB-2FB6-47C8-A2D6-091E0833239D} = {FDB84CBB-2FB6-47C8-A2D6-091E0833239D} +- {73FCD2BD-F133-46B7-8EC1-144CD82A59D5} = {73FCD2BD-F133-46B7-8EC1-144CD82A59D5} +- {2097F1C1-597C-4167-93E3-656A7D6339B2} = {2097F1C1-597C-4167-93E3-656A7D6339B2} +- {A2697BD3-28C1-4AEC-9106-8B748639FD16} = {A2697BD3-28C1-4AEC-9106-8B748639FD16} +- {900342D7-516A-4469-B1AD-59A66E49A25F} = {900342D7-516A-4469-B1AD-59A66E49A25F} +- {6DAC66D9-E703-4624-BE03-49112AB5AA62} = {6DAC66D9-E703-4624-BE03-49112AB5AA62} +- {0E9791DB-593A-465F-98BC-681011311617} = {0E9791DB-593A-465F-98BC-681011311617} +- {0E9791DB-593A-465F-98BC-681011311618} = {0E9791DB-593A-465F-98BC-681011311618} +- {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E} = {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E} +- {16BFE6F0-22EF-40B5-B831-7E937119EF10} = {16BFE6F0-22EF-40B5-B831-7E937119EF10} +- {FCBE1EF2-E0F0-40B1-88B5-00A35D378742} = {FCBE1EF2-E0F0-40B1-88B5-00A35D378742} +- {A840DDFB-ED50-484B-B527-B32E7CF90FD5} = {A840DDFB-ED50-484B-B527-B32E7CF90FD5} +- EndProjectSection + EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcxproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" + ProjectSection(ProjectDependencies) = postProject diff --git a/packages/conan/recipes/cpython/patches/3.8/3.8.12-0002-_ctypes-ffi.patch b/packages/conan/recipes/cpython/patches/3.8/3.8.12-0002-_ctypes-ffi.patch new file mode 100644 index 00000000..04b87052 --- /dev/null +++ b/packages/conan/recipes/cpython/patches/3.8/3.8.12-0002-_ctypes-ffi.patch @@ -0,0 +1,67 @@ +comments --- Modules/_ctypes/malloc_closure.c +comments +++ Modules/_ctypes/malloc_closure.c +comments @@ -87,7 +87,7 @@ +comments } +comments +comments /******************************************************************/ +comments - +comments +#if 0 +comments /* put the item back into the free list */ +comments void ffi_closure_free(void *p) +comments { +comments @@ -114,3 +114,4 @@ +comments #endif +comments return (void *)item; +comments } +comments +#endif +--- Modules/_ctypes/cfield.c ++++ Modules/_ctypes/cfield.c +@@ -1510,7 +1510,11 @@ + return PyLong_FromVoidPtr(*(void **)ptr); + } + +-static struct fielddesc formattable[] = { ++#define FORMATTABLE_SIZE 30 ++static struct fielddesc formattable[FORMATTABLE_SIZE]; ++ ++static void formattable_init(void) { ++struct fielddesc my_formattable[] = { + { 's', s_set, s_get, &ffi_type_pointer}, + { 'b', b_set, b_get, &ffi_type_schar}, + { 'B', B_set, B_get, &ffi_type_uchar}, +@@ -1564,6 +1568,11 @@ + { 'O', O_set, O_get, &ffi_type_pointer}, + { 0, NULL, NULL, NULL}, + }; ++ size_t nb = 1; ++ for (struct fielddesc *pos = my_formattable; pos->code; ++pos, ++nb); ++ if (FORMATTABLE_SIZE < nb) abort(); ++ memcpy(formattable, my_formattable, nb * sizeof(struct fielddesc)); ++} + + /* + Ideas: Implement VARIANT in this table, using 'V' code. +@@ -1578,6 +1587,7 @@ + + if (!initialized) { + initialized = 1; ++ formattable_init(); + #ifdef CTYPES_UNICODE + if (sizeof(wchar_t) == sizeof(short)) + _ctypes_get_fielddesc("u")->pffi_type = &ffi_type_sshort; +@@ -1640,7 +1650,7 @@ + struct _ffi_type **elements; + } ffi_type; + */ +- ++#if 0 + /* align and size are bogus for void, but they must not be zero */ + ffi_type ffi_type_void = { 1, 1, FFI_TYPE_VOID }; + +@@ -1667,5 +1677,5 @@ + FFI_TYPE_LONGDOUBLE }; + + ffi_type ffi_type_pointer = { sizeof(void *), VOID_P_ALIGN, FFI_TYPE_POINTER }; +- ++#endif + /*---------------- EOF ----------------*/ diff --git a/packages/conan/recipes/cpython/patches/3.9/3.9.7-0002-_msi-vcxproj.patch b/packages/conan/recipes/cpython/patches/3.9/3.9.7-0002-_msi-vcxproj.patch new file mode 100644 index 00000000..0dd36511 --- /dev/null +++ b/packages/conan/recipes/cpython/patches/3.9/3.9.7-0002-_msi-vcxproj.patch @@ -0,0 +1,11 @@ +--- PCbuild/_msi.vcxproj ++++ PCbuild/_msi.vcxproj +@@ -23,7 +23,7 @@ + + + PGInstrument +- ARM4 ++ ARM64 + + + PGInstrument diff --git a/packages/conan/recipes/cpython/patches/3.9/3.9.7-0003-_ctypes-ffi.patch b/packages/conan/recipes/cpython/patches/3.9/3.9.7-0003-_ctypes-ffi.patch new file mode 100644 index 00000000..aecf32f4 --- /dev/null +++ b/packages/conan/recipes/cpython/patches/3.9/3.9.7-0003-_ctypes-ffi.patch @@ -0,0 +1,51 @@ +--- Modules/_ctypes/cfield.c ++++ Modules/_ctypes/cfield.c +@@ -1504,7 +1504,11 @@ + return PyLong_FromVoidPtr(*(void **)ptr); + } + +-static struct fielddesc formattable[] = { ++#define FORMATTABLE_SIZE 30 ++static struct fielddesc formattable[FORMATTABLE_SIZE]; ++ ++static void formattable_init(void) { ++struct fielddesc my_formattable[] = { + { 's', s_set, s_get, &ffi_type_pointer}, + { 'b', b_set, b_get, &ffi_type_schar}, + { 'B', B_set, B_get, &ffi_type_uchar}, +@@ -1558,6 +1562,11 @@ + { 'O', O_set, O_get, &ffi_type_pointer}, + { 0, NULL, NULL, NULL}, + }; ++ size_t nb = 1; ++ for (struct fielddesc *pos = my_formattable; pos->code; ++pos, ++nb); ++ if (FORMATTABLE_SIZE < nb) abort(); ++ memcpy(formattable, my_formattable, nb * sizeof(struct fielddesc)); ++} + + /* + Ideas: Implement VARIANT in this table, using 'V' code. +@@ -1572,6 +1581,7 @@ + + if (!initialized) { + initialized = 1; ++ formattable_init(); + #ifdef CTYPES_UNICODE + if (sizeof(wchar_t) == sizeof(short)) + _ctypes_get_fielddesc("u")->pffi_type = &ffi_type_sshort; +@@ -1634,7 +1644,7 @@ + struct _ffi_type **elements; + } ffi_type; + */ +- ++#if 0 + /* align and size are bogus for void, but they must not be zero */ + ffi_type ffi_type_void = { 1, 1, FFI_TYPE_VOID }; + +@@ -1661,5 +1671,5 @@ + FFI_TYPE_LONGDOUBLE }; + + ffi_type ffi_type_pointer = { sizeof(void *), VOID_P_ALIGN, FFI_TYPE_POINTER }; +- ++#endif + /*---------------- EOF ----------------*/ diff --git a/packages/conan/recipes/cpython/patches/3.x-0001-relocatable-python-config.patch b/packages/conan/recipes/cpython/patches/3.x-0001-relocatable-python-config.patch new file mode 100644 index 00000000..113aa210 --- /dev/null +++ b/packages/conan/recipes/cpython/patches/3.x-0001-relocatable-python-config.patch @@ -0,0 +1,11 @@ +--- Misc/python-config.sh.in ++++ Misc/python-config.sh.in +@@ -30,7 +30,7 @@ + # locations. Keep prefix & exec_prefix using their original values in case + # they are referenced in other configure variables, to prevent double + # substitution, issue #22140. +-prefix="@prefix@" ++prefix="$PYTHON_ROOT" + exec_prefix="@exec_prefix@" + exec_prefix_real=${prefix_real} + includedir=$(echo "@includedir@" | sed "s#$prefix#$prefix_real#") diff --git a/packages/conan/recipes/cpython/patches/3.x-0002-remove-module-deps.patch b/packages/conan/recipes/cpython/patches/3.x-0002-remove-module-deps.patch new file mode 100644 index 00000000..38a64252 --- /dev/null +++ b/packages/conan/recipes/cpython/patches/3.x-0002-remove-module-deps.patch @@ -0,0 +1,10 @@ +--- PCbuild/pcbuild.sln ++++ PCbuild/pcbuild.sln +@@ -9,7 +9,4 @@ + EndProjectSection + EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcxproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" +- ProjectSection(ProjectDependencies) = postProject +- {0E9791DB-593A-465F-98BC-681011311618} = {0E9791DB-593A-465F-98BC-681011311618} +- EndProjectSection + EndProject diff --git a/packages/conan/recipes/python/run-with-system-python b/packages/conan/recipes/cpython/run-with-system-python similarity index 100% rename from packages/conan/recipes/python/run-with-system-python rename to packages/conan/recipes/cpython/run-with-system-python diff --git a/packages/conan/recipes/cpython/test_package/CMakeLists.txt b/packages/conan/recipes/cpython/test_package/CMakeLists.txt new file mode 100644 index 00000000..467c32cd --- /dev/null +++ b/packages/conan/recipes/cpython/test_package/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/cpython/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.15) +project(test_package C) + +find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module Development.Embed) + +message("Python3_EXECUTABLE: ${Python3_EXECUTABLE}") +message("Python3_INTERPRETER_ID: ${Python3_INTERPRETER_ID}") +message("Python3_VERSION: ${Python3_VERSION}") +message("Python3_INCLUDE_DIRS: ${Python3_INCLUDE_DIRS}") +message("Python3_LIBRARIES: ${Python3_LIBRARIES}") + +option(BUILD_MODULE "Build python module") +if(BUILD_MODULE) + python3_add_library(spam "test_module.c") + if(MSVC) + set_target_properties(spam PROPERTIES DEBUG_POSTFIX "_d") + endif() +endif() + +add_executable(${PROJECT_NAME} "test_package.c") +target_link_libraries(${PROJECT_NAME} PRIVATE Python3::Python) diff --git a/packages/conan/recipes/cpython/test_package/conanfile.py b/packages/conan/recipes/cpython/test_package/conanfile.py new file mode 100644 index 00000000..afceade2 --- /dev/null +++ b/packages/conan/recipes/cpython/test_package/conanfile.py @@ -0,0 +1,191 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/cpython/all/test_package/conanfile.py + +import os +from io import StringIO + +from conan import ConanFile, conan_version +from conan.errors import ConanException +from conan.tools.apple import is_apple_os +from conan.tools.build import can_run +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import Environment, VirtualRunEnv +from conan.tools.gnu import AutotoolsDeps +from conan.tools.microsoft import is_msvc, VCVars +from conan.tools.scm import Version + +conan2 = conan_version.major >= 2 + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def build_requirements(self): + # The main recipe does not require CMake, but we test with it. + # The interesting problem that arises here is if you have CMake installed + # with your global pip, then it will fail to run in this test package. + # To avoid that, just add a requirement on CMake. + self.tool_requires("cmake/[>=3.16 <4]") + + def layout(self): + cmake_layout(self) + + @property + def _python(self): + if conan2: + return self.dependencies["cpython"].conf_info.get("user.cpython:python", check_type=str) + else: + return self.deps_user_info["cpython"].python + + def _cpython_option(self, name): + if conan2: + return self.dependencies["cpython"].options.get_safe(name, False) + else: + try: + return getattr(self.options["cpython"], name, False) + except ConanException: + return False + + @property + def _py_version(self): + if conan2: + return Version(self.dependencies["cpython"].ref.version) + else: + return Version(self.deps_cpp_info["cpython"].version) + + @property + def _test_setuptools(self): + # TODO Should we still try to test this? + # https://github.com/python/cpython/pull/101039 + return can_run(self) and self._supports_modules and self._py_version < "3.12" + + @property + def _supports_modules(self): + return not is_msvc(self) or self._cpython_option("shared") + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["BUILD_MODULE"] = self._supports_modules + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + try: + # CMakeToolchain might generate VCVars, but we need it + # unconditionally for the setuptools build. + VCVars(self).generate() + except ConanException: + pass + + # The build also needs access to the run environment to run the python executable + VirtualRunEnv(self).generate(scope="run") + VirtualRunEnv(self).generate(scope="build") + + if self._test_setuptools: + # Just for the distutils build + AutotoolsDeps(self).generate(scope="build") + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + if self._test_setuptools: + os.environ["DISTUTILS_USE_SDK"] = "1" + os.environ["MSSdk"] = "1" + setup_args = [ + os.path.join(self.source_folder, "setup.py"), + "build", + "--build-base", self.build_folder, + "--build-platlib", os.path.join(self.build_folder, "lib_setuptools"), + # Bandaid fix: setuptools places temporary files in a subdirectory of the build folder where the + # entirety of the absolute path up to this folder is appended (with seemingly no way to stop this), + # essentially doubling the path length. This may run into Windows max path lengths, so we give ourselves + # a little bit of wiggle room by making this directory name as short as possible. One of the directory + # names goes from (for example) "temp.win-amd64-3.10-pydebug" to "t", saving us roughly 25 characters. + "--build-temp", "t", + ] + if self.settings.build_type == "Debug": + setup_args.append("--debug") + args = " ".join(f'"{a}"' for a in setup_args) + self.run(f"{self._python} {args}") + + def _test_module(self, module, should_work): + try: + self.run(f"{self._python} \"{self.source_folder}/test_package.py\" -b \"{self.build_folder}\" -t {module}", env="conanrun") + except ConanException: + if should_work: + self.output.warning(f"Module '{module}' does not work, but should have worked") + raise + self.output.info("Module failed as expected") + return + if not should_work: + raise ConanException(f"Module '{module}' works, but should not have worked") + self.output.info("Module worked as expected") + + def test(self): + if can_run(self): + self.run(f"{self._python} --version", env="conanrun") + + self.run(f"{self._python} -c \"print('hello world')\"", env="conanrun") + + buffer = StringIO() + self.run(f"{self._python} -c \"import sys; print('.'.join(str(s) for s in sys.version_info[:3]))\"", buffer, env="conanrun") + self.output.info(buffer.getvalue()) + version_detected = buffer.getvalue().splitlines()[-1].strip() + if self._py_version != version_detected: + raise ConanException( + f"python reported wrong version. Expected {self._py_version}. Got {version_detected}." + ) + + if self._supports_modules: + self._test_module("gdbm", self._cpython_option("with_gdbm")) + self._test_module("bz2", self._cpython_option("with_bz2")) + self._test_module("lzma", self._cpython_option("with_lzma")) + self._test_module("tkinter", self._cpython_option("with_tkinter")) + os.environ["TERM"] = "ansi" + self._test_module("curses", self._cpython_option("with_curses")) + self._test_module("expat", True) + self._test_module("sqlite3", self._cpython_option("with_sqlite3")) + self._test_module("decimal", True) + self._test_module("ctypes", True) + env = Environment() + if self.settings.os != "Windows": + env.define_path("OPENSSL_CONF", os.path.join(os.sep, "dev", "null")) + with env.vars(self).apply(): + self._test_module("ssl", True) + + if is_apple_os(self) and not self._cpython_option("shared"): + self.output.info( + "Not testing the module, because these seem not to work on apple when cpython is built as" + " a static library" + ) + # FIXME: find out why cpython on apple does not allow to use modules linked against a static python + else: + if self._supports_modules: + os.environ["PYTHONPATH"] = os.path.join(self.build_folder, self.cpp.build.libdirs[0]) + self.output.info("Testing module (spam) using cmake built module") + self._test_module("spam", True) + + if self._test_setuptools: + os.environ["PYTHONPATH"] = os.path.join(self.build_folder, "lib_setuptools") + self.output.info("Testing module (spam) using setup.py built module") + self._test_module("spam", True) + + del os.environ["PYTHONPATH"] + + # MSVC builds need PYTHONHOME set. Linux and Mac don't require it to be set if tested after building, + # but if the package is relocated then it needs to be set. + if conan2: + os.environ["PYTHONHOME"] = self.dependencies["cpython"].conf_info.get("user.cpython:pythonhome", check_type=str) + else: + os.environ["PYTHONHOME"] = self.deps_user_info["cpython"].pythonhome + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/cpython/test_package/setup.py b/packages/conan/recipes/cpython/test_package/setup.py new file mode 100644 index 00000000..784545ab --- /dev/null +++ b/packages/conan/recipes/cpython/test_package/setup.py @@ -0,0 +1,26 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/cpython/all/test_package/setup.py + +import os + +# Hack to work around Python 3.8+ secure dll loading: +# see https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew +if hasattr(os, "add_dll_directory"): + for directory in os.environ.get("PATH", "").split(os.pathsep): + if os.path.isdir(directory): + os.add_dll_directory(directory) + +from setuptools import setup, Extension + +script_dir = os.path.dirname(os.path.realpath(__file__)) + +setup( + name="test_package", + version="1.0", + ext_modules=[ + Extension("spam", [os.path.join(script_dir, "test_module.c")]), + ], +) diff --git a/packages/conan/recipes/cpython/test_package/test_module.c b/packages/conan/recipes/cpython/test_package/test_module.c new file mode 100644 index 00000000..a4cbbeac --- /dev/null +++ b/packages/conan/recipes/cpython/test_package/test_module.c @@ -0,0 +1,60 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/cpython/all/test_package/test_module.c +*/ + +#include + +#include + +static PyObject *SpamError; + +static PyObject * +spam_system(PyObject *self, PyObject *args) +{ + const char *command; + int sts; + + if (!PyArg_ParseTuple(args, "s", &command)) + return NULL; + sts = system(command); + if (sts < 0) { + PyErr_SetString(SpamError, "System command failed"); + return NULL; + } + return PyLong_FromLong(sts); +} + +const char spam_doc[] = "This is an example spam doc."; + +static PyMethodDef SpamMethods[] = { + {"system", spam_system, METH_VARARGS, "Execute a shell command."}, + {NULL, NULL, 0, NULL} /* Sentinel */ +}; + +static struct PyModuleDef spammodule = { + PyModuleDef_HEAD_INIT, + "spam", /* name of module */ + spam_doc, /* module documentation, may be NULL */ + -1, /* size of per-interpreter state of the module, + or -1 if the module keeps state in global variables. */ + SpamMethods +}; + +PyMODINIT_FUNC +PyInit_spam(void) +{ + PyObject *m; + + m = PyModule_Create(&spammodule); + if (m == NULL) + return NULL; + + SpamError = PyErr_NewException("spam.error", NULL, NULL); + Py_INCREF(SpamError); + PyModule_AddObject(m, "error", SpamError); + return m; +} diff --git a/packages/conan/recipes/cpython/test_package/test_package.c b/packages/conan/recipes/cpython/test_package/test_package.c new file mode 100644 index 00000000..a3b241fa --- /dev/null +++ b/packages/conan/recipes/cpython/test_package/test_package.c @@ -0,0 +1,28 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/cpython/all/test_package/test_package.c +*/ + +#define PY_SSIZE_T_CLEAN +#include + +int +main(int argc, char *argv[]) +{ + wchar_t *program = Py_DecodeLocale(argv[0], NULL); + if (program == NULL) { + fprintf(stderr, "Fatal error: cannot decode argv[0]\n"); + exit(1); + } + Py_Initialize(); + PyRun_SimpleString("from time import time, ctime\n" + "print('Today is', ctime(time()))\n"); + if (Py_FinalizeEx() < 0) { + exit(120); + } + PyMem_RawFree(program); + return 0; +} diff --git a/packages/conan/recipes/cpython/test_package/test_package.py b/packages/conan/recipes/cpython/test_package/test_package.py new file mode 100644 index 00000000..3e9ebfce --- /dev/null +++ b/packages/conan/recipes/cpython/test_package/test_package.py @@ -0,0 +1,209 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/cpython/all/test_package/test_package.py + +import argparse +import os +import sys + +# Hack to work around Python 3.8+ secure dll loading +# See https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew +if hasattr(os, "add_dll_directory"): + for directory in os.environ.get("PATH", "").split(os.pathsep): + if os.path.isdir(directory): + os.add_dll_directory(directory) + +ALL_TESTS = dict() + + +def add_test(fn): + global ALL_TESTS + name = fn.__name__[fn.__name__.find("_") + 1 :] + + def inner_fn(): + print("testing {}".format(name)) + sys.stdout.flush() + fn() + + ALL_TESTS[name] = inner_fn + return fn + + +@add_test +def test_expat(): + import xml.parsers.expat + + # 3 handler functions + def start_element(name, attrs): + print("Start element:", name, attrs) + + def end_element(name): + print("End element:", name) + + def char_data(data): + print("Character data:", repr(data)) + + p = xml.parsers.expat.ParserCreate() + + p.StartElementHandler = start_element + p.EndElementHandler = end_element + p.CharacterDataHandler = char_data + + p.Parse( + """ + Text goes here + More text + """, + 1, + ) + + +@add_test +def test_gdbm(): + import dbm.gnu as gdbm + + dbfile = "gdbm.db" + + db = gdbm.open(dbfile, "c") + db["key1"] = "data1" + db["key2"] = "data2" + db.close() + + db = gdbm.open(dbfile, "r") + print("keys read from", dbfile, "are", db.keys()) + if len(db.keys()) != 2: + raise Exception("Wrong length") + if b"key1" not in db.keys(): + raise Exception("key1 not present") + if b"key2" not in db.keys(): + raise Exception("key2 not present") + + +@add_test +def test_spam(): + import platform + + print("About to import spam") + sys.stdout.flush() + import spam + + if "This is an example spam doc." not in spam.__doc__: + raise Exception("spam.__doc__ does not contain the expected text") + + cmd = {"Windows": "dir"}.get(platform.system(), "ls") + print('About to run spam.system("{}")'.format(cmd)) + sys.stdout.flush() + + spam.system(cmd) + + +@add_test +def test_bz2(): + import bz2 + + compressed = bz2.compress(b"hellow world") + if compressed is None: + raise Exception("bz2.compress returned no data") + + +@add_test +def test_lzma(): + import lzma + + data = lzma.compress(b"hello world") + if data is None: + raise Exception("lzma.compress returned no data") + + +@add_test +def test_sqlite3(): + import sqlite3 + + conn = sqlite3.connect("sqlite3.db") + + c = conn.cursor() + c.execute("""CREATE TABLE stocks + (date text, trans text, symbol text, qty real, price real)""") + c.execute("INSERT INTO stocks VALUES ('2006-01-05','BUY','RHAT',100,35.14)") + conn.commit() + + t = ("RHAT",) + c.execute("SELECT * FROM stocks WHERE symbol=?", t) + + # Larger example that inserts many records at a time + purchases = [ + ("2006-03-28", "BUY", "IBM", 1000, 45.00), + ("2006-04-05", "BUY", "MSFT", 1000, 72.00), + ("2006-04-06", "SELL", "IBM", 500, 53.00), + ] + c.executemany("INSERT INTO stocks VALUES (?,?,?,?,?)", purchases) + conn.commit() + conn.close() + conn = sqlite3.connect("sqlite3.db") + c = conn.cursor() + c.execute("SELECT * from stocks") + data = c.fetchall() + if len(data) != 4: + raise Exception("Need 4 stocks") + print(data) + conn.close() + # Remove the file so subsequent tests don't fail + os.remove("sqlite3.db") + + +@add_test +def test_decimal(): + # Check whether the _decimal package was built successfully + import _decimal as decimal + + decimal.getcontext().prec = 6 + print("1/7 =", decimal.Decimal(1) / decimal.Decimal(7)) + decimal.getcontext().prec = 40 + print("1/7 =", decimal.Decimal(1) / decimal.Decimal(7)) + + +@add_test +def test_curses(): + import _curses + + print("Using _curses version {}".format(_curses.version)) + + +@add_test +def test_ctypes(): + import _ctypes + + errno = _ctypes.get_errno() + print("errno={}".format(errno)) + + +@add_test +def test_tkinter(): + import _tkinter + + print("tcl version: {}".format(_tkinter.TCL_VERSION)) + print("tk version: {}".format(_tkinter.TK_VERSION)) + + +@add_test +def test_ssl(): + import ssl + + default_context = ssl.create_default_context() + print("default_context.options={}".format(default_context.options)) + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("-b", dest="build_folder", help="build_folder", required=True) + parser.add_argument("-t", dest="test_module", help="test python module") + ns = parser.parse_args() + + os.chdir(ns.build_folder) + ALL_TESTS[ns.test_module]() + + +if __name__ == "__main__": + main() diff --git a/packages/conan/recipes/dbus/conanfile.py b/packages/conan/recipes/dbus/conanfile.py new file mode 100644 index 00000000..71ada26d --- /dev/null +++ b/packages/conan/recipes/dbus/conanfile.py @@ -0,0 +1,21 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/dbus/all/conanfile.py + +from conan import ConanFile + +class SystemDbusConan(ConanFile): + name = "dbus" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include/dbus-1.0"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["dbus-1"] + + self.cpp_info.set_property("cmake_file_name", "DBus1") + self.cpp_info.set_property("cmake_target_name", "dbus-1") diff --git a/packages/conan/recipes/double-conversion/conanfile.py b/packages/conan/recipes/double-conversion/conanfile.py new file mode 100644 index 00000000..021e4517 --- /dev/null +++ b/packages/conan/recipes/double-conversion/conanfile.py @@ -0,0 +1,21 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/double-conversion/all/conanfile.py + +from conan import ConanFile + +class SystemDoubleConversionConan(ConanFile): + name = "double-conversion" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["double-conversion"] + + self.cpp_info.set_property("cmake_file_name", "double-conversion") + self.cpp_info.set_property("cmake_target_name", "double-conversion::double-conversion") diff --git a/packages/conan/recipes/expat/conandata.yml b/packages/conan/recipes/expat/conandata.yml index 70a83597..70605fb1 100644 --- a/packages/conan/recipes/expat/conandata.yml +++ b/packages/conan/recipes/expat/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.6.4": + url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_4/expat-2.6.4.tar.xz" + sha256: "a695629dae047055b37d50a0ff4776d1d45d0a4c842cf4ccee158441f55ff7ee" "2.6.3": url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_3/expat-2.6.3.tar.xz" sha256: "274db254a6979bde5aad404763a704956940e465843f2a9bd9ed7af22e2c0efc" diff --git a/packages/conan/recipes/expat/conanfile.py b/packages/conan/recipes/expat/conanfile.py index a8baf824..d9ada5ec 100644 --- a/packages/conan/recipes/expat/conanfile.py +++ b/packages/conan/recipes/expat/conanfile.py @@ -1,3 +1,7 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT + from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import ( diff --git a/packages/conan/recipes/fmt/conandata.yml b/packages/conan/recipes/fmt/conandata.yml new file mode 100644 index 00000000..fbb4ff80 --- /dev/null +++ b/packages/conan/recipes/fmt/conandata.yml @@ -0,0 +1,64 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b96b04ffad873992cbcfb98f0d84f6f44beb169d/recipes/fmt/all/conandata.yml + +sources: + "11.1.4": + url: "https://github.com/fmtlib/fmt/releases/download/11.1.4/fmt-11.1.4.zip" + sha256: "49b039601196e1a765e81c5c9a05a61ed3d33f23b3961323d7322e4fe213d3e6" + "11.1.3": + url: "https://github.com/fmtlib/fmt/releases/download/11.1.3/fmt-11.1.3.zip" + sha256: "7df2fd3426b18d552840c071c977dc891efe274051d2e7c47e2c83c3918ba6df" + "11.1.1": + url: "https://github.com/fmtlib/fmt/releases/download/11.1.1/fmt-11.1.1.zip" + sha256: "a25124e41c15c290b214c4dec588385153c91b47198dbacda6babce27edc4b45" + "11.0.2": + url: "https://github.com/fmtlib/fmt/releases/download/11.0.2/fmt-11.0.2.zip" + sha256: "40fc58bebcf38c759e11a7bd8fdc163507d2423ef5058bba7f26280c5b9c5465" + "11.0.1": + url: "https://github.com/fmtlib/fmt/releases/download/11.0.1/fmt-11.0.1.zip" + sha256: "62ca45531814109b5d6cef0cf2fd17db92c32a30dd23012976e768c685534814" + "11.0.0": + url: "https://github.com/fmtlib/fmt/releases/download/11.0.0/fmt-11.0.0.zip" + sha256: "583ce480ef07fad76ef86e1e2a639fc231c3daa86c4aa6bcba524ce908f30699" + "10.2.1": + url: "https://github.com/fmtlib/fmt/releases/download/10.2.1/fmt-10.2.1.zip" + sha256: "312151a2d13c8327f5c9c586ac6cf7cddc1658e8f53edae0ec56509c8fa516c9" + "10.2.0": + url: "https://github.com/fmtlib/fmt/releases/download/10.2.0/fmt-10.2.0.zip" + sha256: "8a942861a94f8461a280f823041cde8f620a6d8b0e0aacc98c15bb5a9dd92399" + "10.1.1": + url: "https://github.com/fmtlib/fmt/releases/download/10.1.1/fmt-10.1.1.zip" + sha256: "b84e58a310c9b50196cda48d5678d5fa0849bca19e5fdba6b684f0ee93ed9d1b" + "10.1.0": + url: "https://github.com/fmtlib/fmt/releases/download/10.1.0/fmt-10.1.0.zip" + sha256: "d725fa83a8b57a3cedf238828fa6b167f963041e8f9f7327649bddc68ae316f4" + "10.0.0": + url: "https://github.com/fmtlib/fmt/releases/download/10.0.0/fmt-10.0.0.zip" + sha256: "4943cb165f3f587f26da834d3056ee8733c397e024145ca7d2a8a96bb71ac281" + "9.1.0": + url: "https://github.com/fmtlib/fmt/releases/download/9.1.0/fmt-9.1.0.zip" + sha256: "cceb4cb9366e18a5742128cb3524ce5f50e88b476f1e54737a47ffdf4df4c996" + "9.0.0": + url: "https://github.com/fmtlib/fmt/releases/download/9.0.0/fmt-9.0.0.zip" + sha256: "fc96dd2d2fdf2bded630787adba892c23cb9e35c6fd3273c136b0c57d4651ad6" + "8.1.1": + url: "https://github.com/fmtlib/fmt/releases/download/8.1.1/fmt-8.1.1.zip" + sha256: "23778bad8edba12d76e4075da06db591f3b0e3c6c04928ced4a7282ca3400e5d" + "8.0.1": + url: "https://github.com/fmtlib/fmt/releases/download/8.0.1/fmt-8.0.1.zip" + sha256: "a627a56eab9554fc1e5dd9a623d0768583b3a383ff70a4312ba68f94c9d415bf" + "7.1.3": + url: "https://github.com/fmtlib/fmt/releases/download/7.1.3/fmt-7.1.3.zip" + sha256: "5d98c504d0205f912e22449ecdea776b78ce0bb096927334f80781e720084c9f" + "6.2.1": + url: "https://github.com/fmtlib/fmt/releases/download/6.2.1/fmt-6.2.1.zip" + sha256: "94fea742ddcccab6607b517f6e608b1e5d63d712ddbc5982e44bafec5279881a" + "5.3.0": + url: "https://github.com/fmtlib/fmt/releases/download/5.3.0/fmt-5.3.0.zip" + sha256: "4c0741e10183f75d7d6f730b8708a99b329b2f942dad5a9da3385ab92bb4a15c" +patches: + "5.3.0": + - patch_file: "patches/fix-install-5.3.0.patch" diff --git a/packages/conan/recipes/fmt/conanfile.py b/packages/conan/recipes/fmt/conanfile.py new file mode 100644 index 00000000..e92fadac --- /dev/null +++ b/packages/conan/recipes/fmt/conanfile.py @@ -0,0 +1,168 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/fmt/all/conanfile.py + +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.layout import basic_layout +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=2.1" + + +class FmtConan(ConanFile): + name = "fmt" + description = "A safe and fast alternative to printf and IOStreams." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/fmtlib/fmt" + topics = ("format", "iostream", "printf") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "header_only": [True, False], + "shared": [True, False], + "fPIC": [True, False], + "with_fmt_alias": [True, False], + "with_os_api": [True, False], + "with_unicode": [True, False], + } + default_options = { + "header_only": False, + "shared": False, + "fPIC": True, + "with_fmt_alias": False, + "with_os_api": True, + "with_unicode": True, + } + + @property + def _has_with_os_api_option(self): + return Version(self.version) >= "7.0.0" + + @property + def _has_with_unicode_option(self): + return Version(self.version) >= "11.0.0" + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + if not self._has_with_os_api_option: + del self.options.with_os_api + elif str(self.settings.os) == "baremetal": + self.options.with_os_api = False + if not self._has_with_unicode_option: + del self.options.with_unicode + + def configure(self): + if self.options.header_only: + self.options.rm_safe("fPIC") + self.options.rm_safe("shared") + self.options.rm_safe("with_os_api") + elif self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + if self.options.header_only: + basic_layout(self, src_folder="src") + else: + cmake_layout(self, src_folder="src") + # ASWF: we want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def package_id(self): + if self.info.options.header_only: + self.info.clear() + else: + del self.info.options.with_fmt_alias + + def validate(self): + if self.settings.get_safe("compiler.cppstd"): + check_min_cppstd(self, 11) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + if not self.options.header_only: + tc = CMakeToolchain(self) + tc.cache_variables["FMT_DOC"] = False + tc.cache_variables["FMT_TEST"] = False + tc.cache_variables["FMT_INSTALL"] = True + tc.cache_variables["FMT_LIB_DIR"] = "lib64" # ASWF: libraries in lib64 + if self._has_with_os_api_option: + tc.cache_variables["FMT_OS"] = bool(self.options.with_os_api) + if self._has_with_unicode_option: + tc.cache_variables["FMT_UNICODE"] = bool(self.options.with_unicode) + tc.generate() + + def build(self): + apply_conandata_patches(self) + if not self.options.header_only: + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + # ASWF: separate licenses from multiple package installs + if Version(self.version) < "10.2.0": + copy(self, pattern="*LICENSE.rst", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + else: + copy(self, pattern="LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + if self.options.header_only: + copy(self, pattern="*.h", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + else: + cmake = CMake(self) + cmake.install() + # ASWF: libraries in lib64, keep cmake + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "res")) + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + target = "fmt-header-only" if self.options.header_only else "fmt" + self.cpp_info.set_property("cmake_file_name", "fmt") + self.cpp_info.set_property("cmake_target_name", f"fmt::{target}") + + # Mirror upstream find package version policy: + # https://github.com/fmtlib/fmt/blob/11.1.1/CMakeLists.txt#L403-L407 + self.cpp_info.set_property("cmake_config_version_compat", "AnyNewerVersion") + self.cpp_info.set_property("pkg_config_name", "fmt") + + if is_msvc(self): + if self.options.get_safe("with_unicode"): + self.cpp_info.components["_fmt"].cxxflags.append("/utf-8") + else: + # Set the FMT_UNICODE=0, as defined publicly upstream + # https://github.com/fmtlib/fmt/blob/11.1.1/CMakeLists.txt#L371 + self.cpp_info.components["_fmt"].defines.append("FMT_UNICODE=0") + + # TODO: back to global scope in conan v2 once cmake_find_package* generators removed + if self.options.with_fmt_alias: + self.cpp_info.components["_fmt"].defines.append("FMT_STRING_ALIAS=1") + + if self.options.header_only: + self.cpp_info.components["_fmt"].defines.append("FMT_HEADER_ONLY=1") + self.cpp_info.components["_fmt"].libdirs = [] + self.cpp_info.components["_fmt"].bindirs = [] + else: + postfix = "d" if self.settings.build_type == "Debug" else "" + libname = "fmt" + postfix + self.cpp_info.components["_fmt"].libs = [libname] + if self.settings.os == "Linux": + self.cpp_info.components["_fmt"].system_libs.extend(["m"]) + if self.options.shared: + self.cpp_info.components["_fmt"].defines.append("FMT_SHARED") + + self.cpp_info.components["_fmt"].set_property("cmake_target_name", f"fmt::{target}") diff --git a/packages/conan/recipes/fmt/patches/fix-install-5.3.0.patch b/packages/conan/recipes/fmt/patches/fix-install-5.3.0.patch new file mode 100644 index 00000000..b478cc07 --- /dev/null +++ b/packages/conan/recipes/fmt/patches/fix-install-5.3.0.patch @@ -0,0 +1,13 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -235,7 +235,9 @@ if (FMT_INSTALL) + + # Install the library and headers. + install(TARGETS ${INSTALL_TARGETS} EXPORT ${targets_export_name} +- DESTINATION ${FMT_LIB_DIR}) ++ LIBRARY DESTINATION ${FMT_LIB_DIR} ++ ARCHIVE DESTINATION ${FMT_LIB_DIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + install(FILES $ DESTINATION ${FMT_LIB_DIR} OPTIONAL) + install(FILES ${FMT_HEADERS} DESTINATION ${FMT_INC_DIR}) diff --git a/packages/conan/recipes/fmt/test_package/CMakeLists.txt b/packages/conan/recipes/fmt/test_package/CMakeLists.txt new file mode 100644 index 00000000..51396b6a --- /dev/null +++ b/packages/conan/recipes/fmt/test_package/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/tree/b96b04ffad873992cbcfb98f0d84f6f44beb169d/recipes/fmt/all/test_package + +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(fmt REQUIRED CONFIG) + +add_executable(test_package test_package.cpp) +target_compile_features(test_package PRIVATE cxx_std_14) +if(FMT_HEADER_ONLY) + target_link_libraries(test_package PRIVATE fmt::fmt-header-only) +else() + target_link_libraries(test_package PRIVATE fmt::fmt) +endif() + +add_executable(test_ranges test_ranges.cpp) +target_compile_features(test_ranges PRIVATE cxx_std_14) +if(FMT_HEADER_ONLY) + target_link_libraries(test_ranges PRIVATE fmt::fmt-header-only) +else() + target_link_libraries(test_ranges PRIVATE fmt::fmt) +endif() diff --git a/packages/conan/recipes/fmt/test_package/conanfile.py b/packages/conan/recipes/fmt/test_package/conanfile.py new file mode 100644 index 00000000..50ff3f1d --- /dev/null +++ b/packages/conan/recipes/fmt/test_package/conanfile.py @@ -0,0 +1,37 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b96b04ffad873992cbcfb98f0d84f6f44beb169d/recipes/fmt/all/test_package/conanfile.py + +import os +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["FMT_HEADER_ONLY"] = self.dependencies[self.tested_reference_str].options.header_only + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + self.run(os.path.join(self.cpp.build.bindirs[0], "test_package"), env="conanrun") + self.run(os.path.join(self.cpp.build.bindirs[0], "test_ranges"), env="conanrun") diff --git a/packages/conan/recipes/fmt/test_package/test_package.cpp b/packages/conan/recipes/fmt/test_package/test_package.cpp new file mode 100644 index 00000000..a44259fb --- /dev/null +++ b/packages/conan/recipes/fmt/test_package/test_package.cpp @@ -0,0 +1,68 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b96b04ffad873992cbcfb98f0d84f6f44beb169d/recipes/fmt/all/test_package/test_package.cpp +*/ + +#include +#include +#include +#include +#include +#include + + +#include +#include +#include +#include + + +void vreport(const char *format, fmt::format_args args) { + fmt::vprint(format, args); +} + +template +void report(const char *format, const Args & ... args) { + vreport(format, fmt::make_format_args(args...)); +} + +class Date { + int year_, month_, day_; + public: + Date(int year, int month, int day) : year_(year), month_(month), day_(day) {} + + friend std::ostream &operator<<(std::ostream &os, const Date &d) { + return os << d.year_ << '-' << d.month_ << '-' << d.day_; + } +}; + +#if FMT_VERSION >= 90000 +namespace fmt { + template <> struct formatter : ostream_formatter {}; +} +#endif + +int main() { + const std::string thing("World"); + fmt::print("PRINT: Hello {}!\n", thing); + + const std::string formatted = fmt::format("{0}{1}{0}", "abra", "cad"); + fmt::print("{}\n", formatted); + + fmt::memory_buffer buf; + fmt::format_to(std::back_inserter(buf), "{}", 2.7182818); + fmt::print("Euler number: {}\n", fmt::to_string(buf)); + + fmt::print("The date is {}\n", Date(2012, 12, 9)); + + report("{} {} {}\n", "Conan", 42, 3.14159); + + fmt::print(std::cout, "{} {}\n", "Magic number", 42); + + fmt::print(fg(fmt::color::aqua), "Bincrafters\n"); + + return EXIT_SUCCESS; +} diff --git a/packages/conan/recipes/fmt/test_package/test_ranges.cpp b/packages/conan/recipes/fmt/test_package/test_ranges.cpp new file mode 100644 index 00000000..a59d0876 --- /dev/null +++ b/packages/conan/recipes/fmt/test_package/test_ranges.cpp @@ -0,0 +1,19 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b96b04ffad873992cbcfb98f0d84f6f44beb169d/recipes/fmt/all/test_package/test_ranges.cpp +*/ + +#include +#include +#include "fmt/ranges.h" + +int main() { + std::vector numbers; + fmt::format_to(std::back_inserter(numbers), "{}{}{}", 1, 2, 3); + const std::string str_numbers = fmt::format("{}", numbers); + fmt::print("numbers: {}\n", str_numbers); + return EXIT_SUCCESS; +} diff --git a/packages/conan/recipes/fontconfig/conanfile.py b/packages/conan/recipes/fontconfig/conanfile.py new file mode 100644 index 00000000..1802afd3 --- /dev/null +++ b/packages/conan/recipes/fontconfig/conanfile.py @@ -0,0 +1,21 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/fontconfig/all/conanfile.py + +from conan import ConanFile + +class SystemFontconfigConan(ConanFile): + name = "fontconfig" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["fontconfig"] + + self.cpp_info.set_property("cmake_file_name", "Fontconfig") + self.cpp_info.set_property("cmake_target_name", "Fontconfig::Fontconfig") diff --git a/packages/conan/recipes/freetype/conandata.yml b/packages/conan/recipes/freetype/conandata.yml new file mode 100644 index 00000000..173d6f6d --- /dev/null +++ b/packages/conan/recipes/freetype/conandata.yml @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f2c56e90ae28fef1ee1a392adf59f96199ee1277/recipes/freetype/all/conandata.yml + +sources: + "2.13.3": + url: + - "https://download.savannah.gnu.org/releases/freetype/freetype-2.13.3.tar.xz" + - "https://sourceforge.net/projects/freetype/files/freetype2/2.13.3/freetype-2.13.3.tar.xz" + sha256: "0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289" + "2.13.2": + url: + - "https://download.savannah.gnu.org/releases/freetype/freetype-2.13.2.tar.xz" + - "https://sourceforge.net/projects/freetype/files/freetype2/2.13.2/freetype-2.13.2.tar.xz" + sha256: "12991c4e55c506dd7f9b765933e62fd2be2e06d421505d7950a132e4f1bb484d" + "2.12.1": + url: + - "https://download.savannah.gnu.org/releases/freetype/freetype-2.12.1.tar.xz" + - "https://sourceforge.net/projects/freetype/files/freetype2/2.12.1/freetype-2.12.1.tar.xz" + sha256: "4766f20157cc4cf0cd292f80bf917f92d1c439b243ac3018debf6b9140c41a7f" + "2.11.1": + url: + - "https://download.savannah.gnu.org/releases/freetype/freetype-2.11.1.tar.xz" + - "https://sourceforge.net/projects/freetype/files/freetype2/2.11.1/freetype-2.11.1.tar.xz" + sha256: "3333ae7cfda88429c97a7ae63b7d01ab398076c3b67182e960e5684050f2c5c8" + "2.10.4": + url: + - "https://download.savannah.gnu.org/releases/freetype/freetype-2.10.4.tar.xz" + - "https://sourceforge.net/projects/freetype/files/freetype2/2.10.4/freetype-2.10.4.tar.xz" + sha256: "86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75784" diff --git a/packages/conan/recipes/freetype/conanfile.py b/packages/conan/recipes/freetype/conanfile.py new file mode 100644 index 00000000..b497c195 --- /dev/null +++ b/packages/conan/recipes/freetype/conanfile.py @@ -0,0 +1,261 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f2c56e90ae28fef1ee1a392adf59f96199ee1277/recipes/freetype/all/conanfile.py + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout +from conan.tools.files import ( + collect_libs, copy, load, + get, rename, replace_in_file, rmdir, save +) +from conan.tools.scm import Version +import os +import re +import textwrap + +required_conan_version = ">=2.1" + + +class FreetypeConan(ConanFile): + name = "freetype" + description = "FreeType is a freely available software library to render fonts." + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.freetype.org" + license = "FTL" + topics = ("freetype", "fonts") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_png": [True, False], + "with_zlib": [True, False], + "with_bzip2": [True, False], + "with_brotli": [True, False], + "subpixel": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_png": True, + "with_zlib": True, + "with_bzip2": True, + "with_brotli": True, + "subpixel": False, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: we want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def requirements(self): + if self.options.with_png: + self.requires("libpng/[>=1.6 <2]") + if self.options.with_zlib: + self.requires("zlib/[>=1.2.10 <2]") + if self.options.with_bzip2: + self.requires("bzip2/1.0.8") + if self.options.with_brotli: + self.requires("brotli/1.1.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + deps = CMakeDeps(self) + deps.generate() + + tc = CMakeToolchain(self) + if Version(self.version) >= "2.11.0": + tc.variables["FT_REQUIRE_ZLIB"] = self.options.with_zlib + tc.variables["FT_DISABLE_ZLIB"] = not self.options.with_zlib + tc.variables["FT_REQUIRE_PNG"] = self.options.with_png + tc.variables["FT_DISABLE_PNG"] = not self.options.with_png + tc.variables["FT_REQUIRE_BZIP2"] = self.options.with_bzip2 + tc.variables["FT_DISABLE_BZIP2"] = not self.options.with_bzip2 + # TODO: Harfbuzz can be added as an option as soon as it is available. + tc.variables["FT_REQUIRE_HARFBUZZ"] = False + tc.variables["FT_DISABLE_HARFBUZZ"] = True + tc.variables["FT_REQUIRE_BROTLI"] = self.options.with_brotli + tc.variables["FT_DISABLE_BROTLI"] = not self.options.with_brotli + else: + tc.variables["FT_WITH_ZLIB"] = self.options.with_zlib + tc.variables["FT_WITH_PNG"] = self.options.with_png + tc.variables["FT_WITH_BZIP2"] = self.options.with_bzip2 + # TODO: Harfbuzz can be added as an option as soon as it is available. + tc.variables["FT_WITH_HARFBUZZ"] = False + tc.variables["FT_WITH_BROTLI"] = self.options.with_brotli + # Generate a relocatable shared lib on Macos + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" + if Version(self.version) < "2.13.3": # pylint: disable=conan-condition-evals-to-constant + tc.cache_variables["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" # CMake 4 support + tc.generate() + + def _patch_sources(self): + # Do not accidentally enable dependencies we have disabled + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") + if_harfbuzz_found = "if ({})".format("HARFBUZZ_FOUND" if Version(self.version) < "2.11.0" else "HarfBuzz_FOUND") + replace_in_file(self, cmakelists, "find_package(HarfBuzz ${HARFBUZZ_MIN_VERSION})", "") + replace_in_file(self, cmakelists, if_harfbuzz_found, "if(0)") + if not self.options.with_png: + replace_in_file(self, cmakelists, "find_package(PNG)", "") + replace_in_file(self, cmakelists, "if (PNG_FOUND)", "if(0)") + if not self.options.with_zlib: + replace_in_file(self, cmakelists, "find_package(ZLIB)", "") + replace_in_file(self, cmakelists, "if (ZLIB_FOUND)", "if(0)") + if not self.options.with_bzip2: + replace_in_file(self, cmakelists, "find_package(BZip2)", "") + replace_in_file(self, cmakelists, "if (BZIP2_FOUND)", "if(0)") + # the custom FindBrotliDec of upstream is too fragile + replace_in_file(self, cmakelists, + "find_package(BrotliDec REQUIRED)", + "find_package(Brotli REQUIRED)\n" + "set(BROTLIDEC_FOUND 1)\n" + "set(BROTLIDEC_LIBRARIES \"brotli::brotli\")") + if not self.options.with_brotli: + replace_in_file(self, cmakelists, "find_package(BrotliDec)", "") + replace_in_file(self, cmakelists, "if (BROTLIDEC_FOUND)", "if(0)") + + config_h = os.path.join(self.source_folder, "include", "freetype", "config", "ftoption.h") + if self.options.subpixel: + replace_in_file(self, config_h, "/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */", "#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def _make_freetype_config(self, version): + freetype_config_in = os.path.join(self.source_folder, "builds", "unix", "freetype-config.in") + if not os.path.isdir(os.path.join(self.package_folder, "bin")): + os.makedirs(os.path.join(self.package_folder, "bin")) + freetype_config = os.path.join(self.package_folder, "bin", "freetype-config") + rename(self, freetype_config_in, freetype_config) + libs = "-lfreetyped" if self.settings.build_type == "Debug" else "-lfreetype" + staticlibs = f"-lm {libs}" if self.settings.os == "Linux" else libs + replace_in_file(self, freetype_config, r"%PKG_CONFIG%", r"/bin/false") # never use pkg-config + replace_in_file(self, freetype_config, r"%prefix%", r"$conan_prefix") + replace_in_file(self, freetype_config, r"%exec_prefix%", r"$conan_exec_prefix") + replace_in_file(self, freetype_config, r"%includedir%", r"$conan_includedir") + replace_in_file(self, freetype_config, r"%libdir%", r"$conan_libdir") + replace_in_file(self, freetype_config, r"%ft_version%", r"$conan_ftversion") + replace_in_file(self, freetype_config, r"%LIBSSTATIC_CONFIG%", r"$conan_staticlibs") + replace_in_file(self, freetype_config, r"-lfreetype", libs) + replace_in_file(self, freetype_config, r"export LC_ALL", textwrap.dedent("""\ + export LC_ALL + BINDIR=$(dirname $0) + conan_prefix=$(dirname $BINDIR) + conan_exec_prefix=${{conan_prefix}}/bin + conan_includedir=${{conan_prefix}}/include + conan_libdir=${{conan_prefix}}/lib + conan_ftversion={version} + conan_staticlibs="{staticlibs}" + """).format(version=version, staticlibs=staticlibs)) + + def _extract_libtool_version(self): + conf_raw = load(self, os.path.join(self.source_folder, "builds", "unix", "configure.raw")) + return next(re.finditer(r"^version_info='([0-9:]+)'", conf_raw, flags=re.M)).group(1).replace(":", ".") + + @property + def _libtool_version_txt(self): + return os.path.join(self.package_folder, "res", "freetype-libtool-version.txt") + + def package(self): + cmake = CMake(self) + cmake.install() + + libtool_version = self._extract_libtool_version() + save(self, self._libtool_version_txt, libtool_version) + self._make_freetype_config(libtool_version) + + doc_folder = os.path.join(self.source_folder, "docs") + # ASWF: separate licenses from multiple package installs + license_folder = os.path.join(self.package_folder, "licenses", self.name) + copy(self, "FTL.TXT", doc_folder, license_folder) + copy(self, "GPLv2.TXT", doc_folder, license_folder) + copy(self, "LICENSE.TXT", doc_folder, license_folder) + + # ASWF: libraries in lib64, keep cmake files + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + self._create_cmake_module_variables( + os.path.join(self.package_folder, self._module_vars_rel_path) + ) + self._create_cmake_module_alias_targets( + os.path.join(self.package_folder, self._module_target_rel_path), + {"freetype": "Freetype::Freetype"} + ) + + def _create_cmake_module_variables(self, module_file): + content = textwrap.dedent(f"""\ + set(FREETYPE_FOUND TRUE) + if(DEFINED Freetype_INCLUDE_DIRS) + set(FREETYPE_INCLUDE_DIRS ${{Freetype_INCLUDE_DIRS}}) + endif() + if(DEFINED Freetype_LIBRARIES) + set(FREETYPE_LIBRARIES ${{Freetype_LIBRARIES}}) + endif() + set(FREETYPE_VERSION_STRING "{self.version}") + """) + save(self, module_file, content) + + def _create_cmake_module_alias_targets(self, module_file, targets): + content = "" + for alias, aliased in targets.items(): + content += textwrap.dedent("""\ + if(TARGET {aliased} AND NOT TARGET {alias}) + add_library({alias} INTERFACE IMPORTED) + set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) + endif() + """.format(alias=alias, aliased=aliased)) + save(self, module_file, content) + + @property + def _module_vars_rel_path(self): + # ASWF: cmake files in lib64 + return os.path.join("lib64", "cmake", f"conan-official-{self.name}-variables.cmake") + + @property + def _module_target_rel_path(self): + # ASWF: cmake files in lib64 + return os.path.join("lib64", "cmake", f"conan-official-{self.name}-targets.cmake") + + @staticmethod + def _chmod_plus_x(filename): + if os.name == "posix" and (os.stat(filename).st_mode & 0o111) != 0o111: + os.chmod(filename, os.stat(filename).st_mode | 0o111) + + def package_info(self): + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_module_file_name", "Freetype") + self.cpp_info.set_property("cmake_file_name", "freetype") + self.cpp_info.set_property("cmake_target_name", "Freetype::Freetype") + self.cpp_info.set_property("cmake_target_aliases", ["freetype"]) # other possible target name in upstream config file + self.cpp_info.set_property("cmake_build_modules", [self._module_vars_rel_path]) + self.cpp_info.set_property("pkg_config_name", "freetype2") + self.cpp_info.libs = collect_libs(self) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + self.cpp_info.includedirs.append(os.path.join("include", "freetype2")) + + libtool_version = load(self, self._libtool_version_txt).strip() + self.conf_info.define("user.freetype:libtool_version", libtool_version) + self.cpp_info.set_property("system_package_version", libtool_version) + + self.cpp_info.set_property("component_version", libtool_version) + freetype_config = os.path.join(self.package_folder, "bin", "freetype-config") + self._chmod_plus_x(freetype_config) diff --git a/packages/conan/recipes/freetype/test_package/CMakeLists.txt b/packages/conan/recipes/freetype/test_package/CMakeLists.txt new file mode 100644 index 00000000..4fbdef29 --- /dev/null +++ b/packages/conan/recipes/freetype/test_package/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f2c56e90ae28fef1ee1a392adf59f96199ee1277/recipes/freetype/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(freetype REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE freetype) diff --git a/packages/conan/recipes/freetype/test_package/OpenSans-Bold.ttf b/packages/conan/recipes/freetype/test_package/OpenSans-Bold.ttf new file mode 100644 index 00000000..1588c2ce Binary files /dev/null and b/packages/conan/recipes/freetype/test_package/OpenSans-Bold.ttf differ diff --git a/packages/conan/recipes/freetype/test_package/conanfile.py b/packages/conan/recipes/freetype/test_package/conanfile.py new file mode 100644 index 00000000..75b773d6 --- /dev/null +++ b/packages/conan/recipes/freetype/test_package/conanfile.py @@ -0,0 +1,34 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f2c56e90ae28fef1ee1a392adf59f96199ee1277/recipes/freetype/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + license = "OFL-1.1-no-RFN" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + font_path = os.path.join(self.source_folder, "OpenSans-Bold.ttf") + self.run(f"{bin_path} {font_path}", env="conanrun") diff --git a/packages/conan/recipes/freetype/test_package/test_package.c b/packages/conan/recipes/freetype/test_package/test_package.c new file mode 100644 index 00000000..673dfae5 --- /dev/null +++ b/packages/conan/recipes/freetype/test_package/test_package.c @@ -0,0 +1,150 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f2c56e90ae28fef1ee1a392adf59f96199ee1277/recipes/freetype/all/test_package/test_package.c +*/ + +/* example1.c */ +/* */ +/* This small program shows how to print a rotated string with the */ +/* FreeType 2 library. */ + +#include "ft2build.h" +#include FT_FREETYPE_H + +#include +#include +#include +#include + + + +#define WIDTH 640 +#define HEIGHT 480 + + +/* origin is the upper left corner */ +unsigned char image[HEIGHT][WIDTH]; + + +/* Replace this function with something useful. */ + +void +draw_bitmap( FT_Bitmap* bitmap, + FT_Int x, + FT_Int y) +{ + FT_Int i, j, p, q; + FT_Int x_max = x + bitmap->width; + FT_Int y_max = y + bitmap->rows; + + + /* for simplicity, we assume that `bitmap->pixel_mode' */ + /* is `FT_PIXEL_MODE_GRAY' (i.e., not a bitmap font) */ + + for ( i = x, p = 0; i < x_max; i++, p++ ) + { + for ( j = y, q = 0; j < y_max; j++, q++ ) + { + if ( i < 0 || j < 0 || + i >= WIDTH || j >= HEIGHT ) + continue; + + image[j][i] |= bitmap->buffer[q * bitmap->width + p]; + } + } +} + + +int +main( int argc, + char** argv ) +{ + FT_Library library; + FT_Face face; + + FT_GlyphSlot slot; + FT_Matrix matrix; /* transformation matrix */ + FT_Vector pen; /* untransformed origin */ + FT_Error error; + + char* filename; + char* text; + + double angle; + int target_height; + size_t n, num_chars; + + if (argc < 2) { + fprintf(stderr, "Usage: %s FONT\n", argv[0]); + return EXIT_FAILURE; + } + + filename = argv[1]; + text = "conan-center-index"; + num_chars = strlen( text ); + angle = ( 25.0 / 360 ) * 3.14159 * 2; /* use 25 degrees */ + target_height = HEIGHT; + + error = FT_Init_FreeType( &library ); /* initialize library */ + if (error) { + exit(EXIT_FAILURE); + } + + error = FT_New_Face( library, filename, 0, &face );/* create face object */ + if (error) { + exit(EXIT_FAILURE); + } + + /* use 50pt at 100dpi */ + error = FT_Set_Char_Size( face, 50 * 64, 0, 100, 0 ); + if (error) { + exit(EXIT_FAILURE); + } + + /* cmap selection omitted; */ + /* for simplicity we assume that the font contains a Unicode cmap */ + + slot = face->glyph; + + /* set up matrix */ + matrix.xx = (FT_Fixed)( cos( angle ) * 0x10000L ); + matrix.xy = (FT_Fixed)(-sin( angle ) * 0x10000L ); + matrix.yx = (FT_Fixed)( sin( angle ) * 0x10000L ); + matrix.yy = (FT_Fixed)( cos( angle ) * 0x10000L ); + + /* the pen position in 26.6 cartesian space coordinates; */ + /* start at (300,200) relative to the upper left corner */ + pen.x = 300 * 64; + pen.y = ( target_height - 200 ) * 64; + + for ( n = 0; n < num_chars; n++ ) + { + /* set transformation */ + FT_Set_Transform( face, &matrix, &pen ); + + /* load glyph image into the slot (erase previous one) */ + error = FT_Load_Char( face, text[n], FT_LOAD_RENDER); + if (error) { + exit(EXIT_FAILURE); + } + + /* now, draw to our target surface (convert position) */ + draw_bitmap( &slot->bitmap, + slot->bitmap_left, + target_height - slot->bitmap_top ); + + /* increment pen position */ + pen.x += slot->advance.x; + pen.y += slot->advance.y; + } + + FT_Done_Face ( face ); + FT_Done_FreeType( library ); + + return EXIT_SUCCESS; +} + +/* EOF */ diff --git a/packages/conan/recipes/freetype/test_package_module/CMakeLists.txt b/packages/conan/recipes/freetype/test_package_module/CMakeLists.txt new file mode 100644 index 00000000..c846be8a --- /dev/null +++ b/packages/conan/recipes/freetype/test_package_module/CMakeLists.txt @@ -0,0 +1,29 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f2c56e90ae28fef1ee1a392adf59f96199ee1277/recipes/freetype/all/test_package_module/CMakeLists.txt + +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(Freetype REQUIRED MODULE) + +add_executable(${PROJECT_NAME} ../test_package/test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE Freetype::Freetype) + +# Test whether variables from https://cmake.org/cmake/help/latest/module/FindFreetype.html +# are properly defined in conan generators +set(_custom_vars + FREETYPE_FOUND + FREETYPE_INCLUDE_DIRS + FREETYPE_LIBRARIES + FREETYPE_VERSION_STRING +) +foreach(_custom_var ${_custom_vars}) + if(DEFINED ${_custom_var}) + message(STATUS "${_custom_var}: ${${_custom_var}}") + else() + message(FATAL_ERROR "${_custom_var} not defined") + endif() +endforeach() diff --git a/packages/conan/recipes/freetype/test_package_module/conanfile.py b/packages/conan/recipes/freetype/test_package_module/conanfile.py new file mode 100644 index 00000000..d800e499 --- /dev/null +++ b/packages/conan/recipes/freetype/test_package_module/conanfile.py @@ -0,0 +1,34 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f2c56e90ae28fef1ee1a392adf59f96199ee1277/recipes/freetype/all/test_package_module/conanfile.py + +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + license = "OFL-1.1-no-RFN" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + font_path = os.path.join(self.source_folder, os.pardir, "test_package", "OpenSans-Bold.ttf") + self.run(f"{bin_path} {font_path}", env="conanrun") diff --git a/packages/conan/recipes/gdbm/conanfile.py b/packages/conan/recipes/gdbm/conanfile.py new file mode 100644 index 00000000..22ddd621 --- /dev/null +++ b/packages/conan/recipes/gdbm/conanfile.py @@ -0,0 +1,18 @@ +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT + +from conan import ConanFile + +class SystemGdbmConan(ConanFile): + name = "gdbm" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["gdbm", "gdbm_compat"] + + self.cpp_info.set_property("cmake_file_name", "gdbm") + self.cpp_info.set_property("cmake_target_name", "gdbm::gdbm") diff --git a/packages/conan/recipes/giflib/conanfile.py b/packages/conan/recipes/giflib/conanfile.py new file mode 100644 index 00000000..9b28ae27 --- /dev/null +++ b/packages/conan/recipes/giflib/conanfile.py @@ -0,0 +1,21 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/giflib/5.1.x/conanfile.py + +from conan import ConanFile + +class SystemGiflibConan(ConanFile): + name = "giflib" + version = "5.1.4" # For oiio recipe + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["gif"] + + self.cpp_info.set_property("cmake_file_name", "GIF") + self.cpp_info.set_property("cmake_target_name", "GIF::GIF") diff --git a/packages/conan/recipes/glew/conandata.yml b/packages/conan/recipes/glew/conandata.yml index c4c27b1a..91de5e65 100644 --- a/packages/conan/recipes/glew/conandata.yml +++ b/packages/conan/recipes/glew/conandata.yml @@ -1,3 +1,9 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/glew/all/conandata.yml + sources: "2.2.0": sha256: "d4fc82893cfb00109578d0a1a2337fb8ca335b3ceccf97b97e5cc7f08e4353e1" diff --git a/packages/conan/recipes/glew/conanfile.py b/packages/conan/recipes/glew/conanfile.py index 3fc32ea2..4e9a72b8 100644 --- a/packages/conan/recipes/glew/conanfile.py +++ b/packages/conan/recipes/glew/conanfile.py @@ -1,18 +1,13 @@ # Copyright (c) Contributors to the conan-center-index Project. All rights reserved. # Copyright (c) Contributors to the aswf-docker Project. All rights reserved. # SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/glew/all/conanfile.py from conan import ConanFile from conan.tools.apple import is_apple_os -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import ( - apply_conandata_patches, - copy, - export_conandata_patches, - get, - rm, - rmdir, -) +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir import os required_conan_version = ">=1.53.0" @@ -21,9 +16,9 @@ class GlewConan(ConanFile): name = "glew" description = "The GLEW library" - url = "https://github.com/AcademySoftwareFoundation/aswf-docker" + url = "https://github.com/conan-io/conan-center-index" homepage = "http://github.com/nigels-com/glew" - topics = ("conan", "glew", "opengl", "wrangler", "loader", "binding") + topics = ("glew", "opengl", "wrangler", "loader", "binding") license = "MIT" package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -32,7 +27,11 @@ class GlewConan(ConanFile): "fPIC": [True, False], "with_egl": [True, False], } - default_options = {"shared": True, "fPIC": True, "with_egl": False} + default_options = { + "shared": False, + "fPIC": True, + "with_egl": False, + } def export_sources(self): export_conandata_patches(self) @@ -50,7 +49,7 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") - # We want DSOs in lib64 + # ASWF: DSOs in lib64 self.cpp.package.libdirs = ["lib64"] def requirements(self): @@ -60,7 +59,7 @@ def requirements(self): self.requires("glu/system", transitive_headers=True) else: # Don't depend on external GLU recipe - # self.requires("mesa-glu/9.0.3", transitive_headers=True) + # self.requires("mesa-glu/9.0.0", transitive_headers=True) self.requires("glu/system", transitive_headers=True) def source(self): @@ -75,23 +74,18 @@ def generate(self): def build(self): apply_conandata_patches(self) cmake = CMake(self) - cmake.configure( - build_script_folder=os.path.join(self.source_folder, "build", "cmake") - ) + cmake.configure(build_script_folder=os.path.join(self.source_folder, "build", "cmake")) cmake.build() def package(self): - copy( - self, - "LICENSE.txt", - src=self.source_folder, - dst=os.path.join(self.package_folder, "licenses", self.name), - ) + # ASWF: licenses in package subdirs + copy(self, "LICENSE.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) cmake = CMake(self) cmake.install() + # ASWF: libraries and cmake modules in lib64 rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) - # Keep CMake files to package can be consumed outside Conan + # ASWF: Keep CMake files to package can be consumed outside Conan # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) rm(self, "*.pdb", os.path.join(self.package_folder, "lib64")) @@ -102,12 +96,8 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "glew") self.cpp_info.set_property("cmake_target_name", "GLEW::GLEW") self.cpp_info.set_property("pkg_config_name", "glew") - self.cpp_info.components["glewlib"].set_property( - "cmake_module_target_name", "GLEW::GLEW" - ) - self.cpp_info.components["glewlib"].set_property( - "cmake_target_name", f"GLEW::{glewlib_target_name}" - ) + self.cpp_info.components["glewlib"].set_property("cmake_module_target_name", "GLEW::GLEW") + self.cpp_info.components["glewlib"].set_property("cmake_target_name", f"GLEW::{glewlib_target_name}") self.cpp_info.components["glewlib"].set_property("pkg_config_name", "glew") if self.settings.os == "Windows": @@ -120,11 +110,13 @@ def package_info(self): if self.settings.os == "Windows" and not self.options.shared: self.cpp_info.components["glewlib"].defines.append("GLEW_STATIC") self.cpp_info.components["glewlib"].requires = ["opengl::opengl"] - # We dont' want to depend on self installed GLU, and no cmake module for system GLU - # if is_apple_os(self) or self.settings.os == "Windows": - # self.cpp_info.components["glewlib"].requires.append("glu::glu") - # else: - # self.cpp_info.components["glewlib"].requires.append("mesa-glu::mesa-glu") + + if is_apple_os(self) or self.settings.os == "Windows": + self.cpp_info.components["glewlib"].requires.append("glu::glu") + else: + # Use system GLU + # self.cpp_info.components["glewlib"].requires.append("mesa-glu::mesa-glu") + self.cpp_info.components["glewlib"].requires.append("glu::glu") # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "GLEW" @@ -132,13 +124,8 @@ def package_info(self): self.cpp_info.names["cmake_find_package"] = "GLEW" self.cpp_info.names["cmake_find_package_multi"] = "GLEW" self.cpp_info.components["glewlib"].names["cmake_find_package"] = "GLEW" - self.cpp_info.components["glewlib"].names[ - "cmake_find_package_multi" - ] = glewlib_target_name + self.cpp_info.components["glewlib"].names["cmake_find_package_multi"] = glewlib_target_name self.env_info.CMAKE_PREFIX_PATH.append( os.path.join(self.package_folder, "lib64", "cmake") ) - - def deploy(self): - self.copy("*", symlinks=True) diff --git a/packages/conan/recipes/glew/test_package/CMakeLists.txt b/packages/conan/recipes/glew/test_package/CMakeLists.txt index 11669408..27ee0294 100644 --- a/packages/conan/recipes/glew/test_package/CMakeLists.txt +++ b/packages/conan/recipes/glew/test_package/CMakeLists.txt @@ -1,3 +1,9 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/glew/all/test_package/CMakeLists.txt + cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) diff --git a/packages/conan/recipes/glew/test_package/conanfile.py b/packages/conan/recipes/glew/test_package/conanfile.py index 3dbee5f3..2b1558c8 100644 --- a/packages/conan/recipes/glew/test_package/conanfile.py +++ b/packages/conan/recipes/glew/test_package/conanfile.py @@ -1,3 +1,9 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/glew/all/test_package/conanfile.py + from conan import ConanFile from conan.tools.build import can_run from conan.tools.cmake import CMake, cmake_layout @@ -5,7 +11,7 @@ class TestPackageConan(ConanFile): - settings = "os", "compiler", "arch", "build_type" + settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" test_type = "explicit" diff --git a/packages/conan/recipes/glew/test_package/test_package.c b/packages/conan/recipes/glew/test_package/test_package.c index 07557b08..8d66ac17 100644 --- a/packages/conan/recipes/glew/test_package/test_package.c +++ b/packages/conan/recipes/glew/test_package/test_package.c @@ -1,3 +1,11 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/glew/all/test_package/test_package.c +*/ + #include #include diff --git a/packages/conan/recipes/glfw/CMakeLists.txt b/packages/conan/recipes/glfw/CMakeLists.txt deleted file mode 100644 index 6a26d2a6..00000000 --- a/packages/conan/recipes/glfw/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.12) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory(source_subfolder) diff --git a/packages/conan/recipes/glfw/conandata.yml b/packages/conan/recipes/glfw/conandata.yml index 91c03ba3..8b82a666 100644 --- a/packages/conan/recipes/glfw/conandata.yml +++ b/packages/conan/recipes/glfw/conandata.yml @@ -1,3 +1,9 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/glfw/all/conandata.yml + sources: "3.4": url: "https://github.com/glfw/glfw/releases/download/3.4/glfw-3.4.zip" diff --git a/packages/conan/recipes/glfw/conanfile.py b/packages/conan/recipes/glfw/conanfile.py index 63118f9c..f4f8a41f 100644 --- a/packages/conan/recipes/glfw/conanfile.py +++ b/packages/conan/recipes/glfw/conanfile.py @@ -1,40 +1,32 @@ # Copyright (c) Contributors to the conan-center-index Project. All rights reserved. # Copyright (c) Contributors to the aswf-docker Project. All rights reserved. # SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/glfw/all/conanfile.py from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv, VirtualRunEnv -from conan.tools.files import ( - apply_conandata_patches, - copy, - export_conandata_patches, - get, - replace_in_file, - rmdir, - save, -) +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir, save from conan.tools.gnu import PkgConfigDeps from conan.tools.microsoft import is_msvc, is_msvc_static_runtime from conan.tools.scm import Version import os import textwrap -required_conan_version = ">=1.60.0 <2 || >= 2.0.5" +required_conan_version = ">=1.60.0 <2 || >=2.0.5" class GlfwConan(ConanFile): name = "glfw" - description = ( - "GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan" - "application development. It provides a simple, platform-independent API for creating" - "windows, contexts and surfaces, reading input, handling events, etc." - ) + description = "GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan" \ + "application development. It provides a simple, platform-independent API for creating" \ + "windows, contexts and surfaces, reading input, handling events, etc." license = "Zlib" - url = "https://github.com/AcademySoftwareFoundation/aswf-docker" + url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/glfw/glfw" - topics = ("conan", "gflw", "opengl", "vulkan", "opengl-es") + topics = ("graphics", "opengl", "vulkan", "opengl-es") package_type = "library" settings = "os", "arch", "build_type", "compiler" options = { @@ -45,7 +37,7 @@ class GlfwConan(ConanFile): "with_wayland": [True, False], } default_options = { - "shared": True, + "shared": False, "fPIC": True, "vulkan_static": False, "with_x11": True, @@ -64,24 +56,21 @@ def config_options(self): self.options.rm_safe("fPIC") if self.settings.os != "Linux": self.options.rm_safe("with_wayland") - if ( - self.settings.os not in ["Linux", "FreeBSD"] - or Version(self.version) <= "3.3.8" - ): + if self.settings.os not in ["Linux", "FreeBSD"] or Version(self.version) <= "3.3.8": self.options.rm_safe("with_x11") def configure(self): if self.options.shared: self.options.rm_safe("fPIC") self.settings.rm_safe("compiler.cppstd") - self.settings.rm_safe("libcxx") + self.settings.rm_safe("compiler.libcxx") if self.options.get_safe("with_wayland"): self.options["xkbcommon"].with_wayland = True def layout(self): cmake_layout(self, src_folder="src") - # We want DSOs in lib64 + # ASWF: DSOs in lib64 self.cpp.package.libdirs = ["lib64"] def requirements(self): @@ -96,13 +85,8 @@ def requirements(self): self.requires("xkbcommon/1.6.0") def validate(self): - if ( - self.options.get_safe("with_wayland") - and not self.dependencies["xkbcommon"].options.with_wayland - ): - raise ConanInvalidConfiguration( - f"{self.ref} requires the with_wayland option in xkbcommon to be enabled when the with_wayland option is enabled" - ) + if self.options.get_safe("with_wayland") and not self.dependencies["xkbcommon"].options.with_wayland: + raise ConanInvalidConfiguration(f"{self.ref} requires the with_wayland option in xkbcommon to be enabled when the with_wayland option is enabled") def build_requirements(self): if self.options.get_safe("with_wayland"): @@ -128,21 +112,13 @@ def generate(self): tc.cache_variables["GLFW_BUILD_TESTS"] = False tc.cache_variables["GLFW_INSTALL"] = True if Version(self.version) > "3.3.8": - tc.cache_variables["GLFW_BUILD_X11"] = self.options.get_safe( - "with_x11", False - ) - tc.cache_variables["GLFW_BUILD_WAYLAND"] = self.options.get_safe( - "with_wayland", False - ) + tc.cache_variables["GLFW_BUILD_X11"] = self.options.get_safe("with_x11", False) + tc.cache_variables["GLFW_BUILD_WAYLAND"] = self.options.get_safe("with_wayland", False) else: - tc.cache_variables["GLFW_USE_WAYLAND"] = self.options.get_safe( - "with_wayland", False - ) + tc.cache_variables["GLFW_USE_WAYLAND"] = self.options.get_safe("with_wayland", False) tc.variables["GLFW_VULKAN_STATIC"] = self.options.vulkan_static if is_msvc(self): - tc.cache_variables[ - "USE_MSVC_RUNTIME_LIBRARY_DLL" - ] = not is_msvc_static_runtime(self) + tc.cache_variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) tc.generate() cmake_deps = CMakeDeps(self) if self.options.get_safe("with_wayland"): @@ -157,39 +133,25 @@ def generate(self): # PkgConfigDeps.build_context_activated can't work with legacy 1 profile wp_prefix = self.dependencies.build["wayland-protocols"].package_folder wp_version = self.dependencies.build["wayland-protocols"].ref.version - wp_pkg_content = textwrap.dedent( - f"""\ + wp_pkg_content = textwrap.dedent(f"""\ prefix={wp_prefix} datarootdir=${{prefix}}/res pkgdatadir=${{datarootdir}}/wayland-protocols Name: Wayland Protocols Description: Wayland protocol files Version: {wp_version} - """ - ) - save( - self, - os.path.join(self.generators_folder, "wayland-protocols.pc"), - wp_pkg_content, - ) - pkg_config_deps.generate() + """) + save( self, os.path.join(self.generators_folder, "wayland-protocols.pc"), wp_pkg_content) + pkg_config_deps.generate() def _patch_sources(self): apply_conandata_patches(self) # don't force PIC - replace_in_file( - self, - os.path.join(self.source_folder, "src", "CMakeLists.txt"), - "POSITION_INDEPENDENT_CODE ON", - "", - ) + replace_in_file(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), + "POSITION_INDEPENDENT_CODE ON", "") # don't force static link to libgcc if MinGW - replace_in_file( - self, - os.path.join(self.source_folder, "src", "CMakeLists.txt"), - 'target_link_libraries(glfw PRIVATE "-static-libgcc")', - "", - ) + replace_in_file(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), + "target_link_libraries(glfw PRIVATE \"-static-libgcc\")", "") # Allow to link vulkan-loader into shared glfw if self.options.vulkan_static: @@ -215,12 +177,7 @@ def build(self): cmake.build() def package(self): - copy( - self, - "LICENSE*", - self.source_folder, - os.path.join(self.package_folder, "licenses", self.name), - ) + copy(self, "LICENSE*", self.source_folder, os.path.join(self.package_folder, "licenses", self.name)) cmake = CMake(self) cmake.install() # We do not want to delete these, package can be consumed outside Conan @@ -228,27 +185,23 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) self._create_cmake_module_alias_targets( os.path.join(self.package_folder, self._module_file_rel_path), - {"glfw": "glfw::glfw"}, + {"glfw": "glfw::glfw"} ) def _create_cmake_module_alias_targets(self, module_file, targets): content = "" for alias, aliased in targets.items(): - content += textwrap.dedent( - f"""\ + content += textwrap.dedent(f"""\ if(TARGET {aliased} AND NOT TARGET {alias}) add_library({alias} INTERFACE IMPORTED) set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) endif() - """ - ) + """) save(self, module_file, content) @property def _module_file_rel_path(self): - return os.path.join( - "lib64", "cmake", f"conan-official-{self.name}-targets.cmake" - ) + return os.path.join("lib64", "cmake", f"conan-official-{self.name}-targets.cmake") def package_info(self): self.cpp_info.set_property("cmake_file_name", "glfw3") @@ -266,17 +219,33 @@ def package_info(self): elif self.settings.os == "Windows": self.cpp_info.system_libs.append("gdi32") elif self.settings.os == "Macos": - self.cpp_info.frameworks.extend( - [ - "AppKit", - "Cocoa", - "CoreFoundation", - "CoreGraphics", - "CoreServices", - "Foundation", - "IOKit", - ] - ) + self.cpp_info.frameworks.extend([ + "AppKit", "Cocoa", "CoreFoundation", "CoreGraphics", + "CoreServices", "Foundation", "IOKit", + ]) + + self.cpp_info.requires = ["opengl::opengl"] + if self.options.vulkan_static: + self.cpp_info.requires.append("vulkan-loader::vulkan-loader") + if self.settings.os in ["Linux", "FreeBSD"]: + if self.options.get_safe("with_x11", True): + # https://github.com/glfw/glfw/blob/3.4/src/CMakeLists.txt#L181-L218 + # https://github.com/glfw/glfw/blob/3.3.2/CMakeLists.txt#L196-L233 + self.cpp_info.requires.extend([ + "xorg::x11", # Also includes Xkb and Xshape + "xorg::xrandr", + "xorg::xinerama", + "xorg::xcursor", + "xorg::xi", + ]) + if self.options.get_safe("with_wayland"): + # https://github.com/glfw/glfw/blob/3.4/src/CMakeLists.txt#L163-L167 + self.cpp_info.requires.extend([ + "wayland::wayland-client", + "wayland::wayland-cursor", + "wayland::wayland-egl", + "xkbcommon::xkbcommon" + ]) # backward support of cmake_find_package, cmake_find_package_multi & pkg_config generators self.cpp_info.filenames["cmake_find_package"] = "glfw3" @@ -284,14 +253,9 @@ def package_info(self): self.cpp_info.names["cmake_find_package"] = "glfw" self.cpp_info.names["cmake_find_package_multi"] = "glfw" self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] - self.cpp_info.build_modules["cmake_find_package_multi"] = [ - self._module_file_rel_path - ] + self.cpp_info.build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] self.cpp_info.names["pkg_config"] = "glfw3" self.env_info.CMAKE_PREFIX_PATH.append( os.path.join(self.package_folder, "lib64", "cmake") ) - - def deploy(self): - self.copy("*", symlinks=True) diff --git a/packages/conan/recipes/glfw/test_package/CMakeLists.txt b/packages/conan/recipes/glfw/test_package/CMakeLists.txt index 3eb4e726..119bd863 100644 --- a/packages/conan/recipes/glfw/test_package/CMakeLists.txt +++ b/packages/conan/recipes/glfw/test_package/CMakeLists.txt @@ -1,4 +1,10 @@ -cmake_minimum_required(VERSION 3.12) +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/glfw/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.1) project(test_package LANGUAGES C) find_package(glfw3 REQUIRED CONFIG) diff --git a/packages/conan/recipes/glfw/test_package/conanfile.py b/packages/conan/recipes/glfw/test_package/conanfile.py index 0a6bc687..5e9f37b1 100644 --- a/packages/conan/recipes/glfw/test_package/conanfile.py +++ b/packages/conan/recipes/glfw/test_package/conanfile.py @@ -1,3 +1,9 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/glfw/all/test_package/conanfile.py + from conan import ConanFile from conan.tools.build import can_run from conan.tools.cmake import CMake, cmake_layout diff --git a/packages/conan/recipes/glfw/test_package/test_package.c b/packages/conan/recipes/glfw/test_package/test_package.c index 6b172dc9..8bbeb3c0 100644 --- a/packages/conan/recipes/glfw/test_package/test_package.c +++ b/packages/conan/recipes/glfw/test_package/test_package.c @@ -1,3 +1,11 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/glfw/all/test_package/test_package.c +*/ + #include int main (void) diff --git a/packages/conan/recipes/glib/conanfile.py b/packages/conan/recipes/glib/conanfile.py new file mode 100644 index 00000000..45453fa2 --- /dev/null +++ b/packages/conan/recipes/glib/conanfile.py @@ -0,0 +1,116 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/glib/all/conanfile.py + +from conan import ConanFile + +import os + +class SystemGLibConan(ConanFile): + name = "glib" + version = "2.78.3" # For Qt conan recipe + + settings = "os", "arch", "compiler", "build_type" + + def requirements(self): + self.requires("zlib/[>=1.2.11 <2]") + self.requires("libffi/3.4.4") + self.requires("pcre2/10.42") + + def package_info(self): + self.cpp_info.components["glib-2.0"].set_property("pkg_config_name", "glib-2.0") + self.cpp_info.components["glib-2.0"].libs = ["glib-2.0"] + self.cpp_info.components["glib-2.0"].includedirs += [ + os.path.join("include", "glib-2.0"), + os.path.join("lib", "glib-2.0", "include") + ] + self.cpp_info.components["glib-2.0"].resdirs = ["res"] + + self.cpp_info.components["gmodule-no-export-2.0"].set_property("pkg_config_name", "gmodule-no-export-2.0") + self.cpp_info.components["gmodule-no-export-2.0"].libs = ["gmodule-2.0"] + self.cpp_info.components["gmodule-no-export-2.0"].resdirs = ["res"] + self.cpp_info.components["gmodule-no-export-2.0"].requires.append("glib-2.0") + + self.cpp_info.components["gmodule-export-2.0"].set_property("pkg_config_name", "gmodule-export-2.0") + self.cpp_info.components["gmodule-export-2.0"].requires += ["gmodule-no-export-2.0", "glib-2.0"] + + self.cpp_info.components["gmodule-2.0"].set_property("pkg_config_name", "gmodule-2.0") + self.cpp_info.components["gmodule-2.0"].requires += ["gmodule-no-export-2.0", "glib-2.0"] + + self.cpp_info.components["gobject-2.0"].set_property("pkg_config_name", "gobject-2.0") + self.cpp_info.components["gobject-2.0"].libs = ["gobject-2.0"] + self.cpp_info.components["gobject-2.0"].resdirs = ["res"] + self.cpp_info.components["gobject-2.0"].requires += ["glib-2.0", "libffi::libffi"] + + self.cpp_info.components["gthread-2.0"].set_property("pkg_config_name", "gthread-2.0") + self.cpp_info.components["gthread-2.0"].libs = ["gthread-2.0"] + self.cpp_info.components["gthread-2.0"].resdirs = ["res"] + self.cpp_info.components["gthread-2.0"].requires.append("glib-2.0") + + self.cpp_info.components["gio-2.0"].set_property("pkg_config_name", "gio-2.0") + self.cpp_info.components["gio-2.0"].libs = ["gio-2.0"] + self.cpp_info.components["gio-2.0"].resdirs = ["res"] + self.cpp_info.components["gio-2.0"].requires += ["glib-2.0", "gobject-2.0", "gmodule-2.0", "zlib::zlib"] + + self.cpp_info.components["gresource"].set_property("pkg_config_name", "gresource") + self.cpp_info.components["gresource"].libs = [] # this is actually an executable + + self.cpp_info.components["glib-2.0"].system_libs.append("pthread") + self.cpp_info.components["gmodule-no-export-2.0"].system_libs.append("pthread") + self.cpp_info.components["gmodule-no-export-2.0"].system_libs.append("dl") + self.cpp_info.components["gmodule-export-2.0"].sharedlinkflags.append("-Wl,--export-dynamic") + self.cpp_info.components["gmodule-2.0"].sharedlinkflags.append("-Wl,--export-dynamic") + self.cpp_info.components["gthread-2.0"].system_libs.append("pthread") + self.cpp_info.components["gio-2.0"].system_libs.append("dl") + + self.cpp_info.components["gio-unix-2.0"].set_property("pkg_config_name", "gio-unix-2.0") + self.cpp_info.components["gio-unix-2.0"].requires += ["gobject-2.0", "gio-2.0"] + self.cpp_info.components["gio-unix-2.0"].includedirs = [os.path.join("include", "gio-unix-2.0")] + + self.cpp_info.components["glib-2.0"].requires.append("pcre2::pcre2") + + self.cpp_info.components["gio-2.0"].system_libs.append("resolv") + + # if self.options.get_safe("with_mount"): + # self.cpp_info.components["gio-2.0"].requires.append("libmount::libmount") + + # if self.options.get_safe("with_selinux"): + # self.cpp_info.components["gio-2.0"].requires.append("libselinux::libselinux") + + # if self.options.get_safe("with_elf"): + # self.cpp_info.components["gresource"].requires.append("libelf::libelf") # this is actually an executable + + self.env_info.GLIB_COMPILE_SCHEMAS = os.path.join(self.package_folder, "bin", "glib-compile-schemas") + self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) + + pkgconfig_variables = { + 'datadir': '${prefix}/res', + 'schemasdir': '${datadir}/glib-2.0/schemas', + 'bindir': '${prefix}/bin', + # Can't use libdir here as it is libdir1 when using the PkgConfigDeps generator. + 'giomoduledir': '${prefix}/lib/gio/modules', + 'gio': '${bindir}/gio', + 'gio_querymodules': '${bindir}/gio-querymodules', + 'glib_compile_schemas': '${bindir}/glib-compile-schemas', + 'glib_compile_resources': '${bindir}/glib-compile-resources', + 'gdbus': '${bindir}/gdbus', + 'gdbus_codegen': '${bindir}/gdbus-codegen', + 'gresource': '${bindir}/gresource', + 'gsettings': '${bindir}/gsettings' + } + self.cpp_info.components["gio-2.0"].set_property( + "pkg_config_custom_content", + "\n".join(f"{key}={value}" for key,value in pkgconfig_variables.items())) + + pkgconfig_variables = { + 'bindir': '${prefix}/bin', + 'glib_genmarshal': '${bindir}/glib-genmarshal', + 'gobject_query': '${bindir}/gobject-query', + 'glib_mkenums': '${bindir}/glib-mkenums' + } + self.cpp_info.components["glib-2.0"].set_property( + "pkg_config_custom_content", + "\n".join(f"{key}={value}" for key, value in pkgconfig_variables.items())) + diff --git a/packages/conan/recipes/gtest/CMakeLists.txt b/packages/conan/recipes/gtest/CMakeLists.txt deleted file mode 100644 index 936997bc..00000000 --- a/packages/conan/recipes/gtest/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -cmake_minimum_required(VERSION 2.8.11) -project(cmake_wrapper) - -include("conanbuildinfo.cmake") -conan_basic_setup() - -if(MSVC) - if(MSVC_VERSION AND (MSVC_VERSION EQUAL 1910 OR MSVC_VERSION GREATER 1910)) - add_definitions(-DGTEST_LANG_CXX11=1 -DGTEST_HAS_TR1_TUPLE=0) - endif(MSVC_VERSION AND (MSVC_VERSION EQUAL 1910 OR MSVC_VERSION GREATER 1910)) -endif(MSVC) - -add_subdirectory("source_subfolder") diff --git a/packages/conan/recipes/gtest/conandata.yml b/packages/conan/recipes/gtest/conandata.yml index 72e8666c..1c99b66d 100644 --- a/packages/conan/recipes/gtest/conandata.yml +++ b/packages/conan/recipes/gtest/conandata.yml @@ -1,28 +1,41 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/gtest/all/conandata.yml + sources: - "1.8.1": - url: "https://github.com/google/googletest/archive/release-1.8.1.tar.gz" - sha256: "9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c" - "1.10.0": - url: "https://github.com/google/googletest/archive/release-1.10.0.tar.gz" - sha256: "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb" - "cci.20210126": - url: "https://github.com/google/googletest/archive/273f8cb059a4e7b089731036392422b5ef489791.tar.gz" - sha256: "2937e96827aa44b291d42c4f0ffaa6a7637445822cf873d0fa6a889df84b8628" - "1.11.0": - url: "https://github.com/google/googletest/archive/release-1.11.0.tar.gz" - sha256: "b4870bf121ff7795ba20d20bcdd8627b8e088f2d1dab299a031c1034eddc93d5" + "1.15.2": + url: "https://github.com/google/googletest/archive/refs/tags/v1.15.2.tar.gz" + sha256: "7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926" + "1.15.0": + url: "https://github.com/google/googletest/releases/download/v1.15.0/googletest-1.15.0.tar.gz" + sha256: "7315acb6bf10e99f332c8a43f00d5fbb1ee6ca48c52f6b936991b216c586aaad" "1.14.0": url: "https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz" sha256: "8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7" -patches: + "1.13.0": + url: "https://github.com/google/googletest/archive/refs/tags/v1.13.0.tar.gz" + sha256: "ad7fdba11ea011c1d925b3289cf4af2c66a352e18d4c7264392fead75e919363" + "1.12.1": + url: "https://github.com/google/googletest/archive/release-1.12.1.tar.gz" + sha256: "81964fe578e9bd7c94dfdb09c8e4d6e6759e19967e397dbea48d1c10e45d0df2" + "1.10.0": + url: "https://github.com/google/googletest/archive/release-1.10.0.tar.gz" + sha256: "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb" "1.8.1": - - patch_file: "patches/gtest-1.8.1.patch" - base_path: "source_subfolder" + url: "https://github.com/google/googletest/archive/release-1.8.1.tar.gz" + sha256: "9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c" +patches: "1.10.0": - patch_file: "patches/gtest-1.10.0.patch" - base_path: "source_subfolder" + patch_description: "add CUSTOM_DEBUG_POSTFIX option" + patch_type: "conan" - patch_file: "patches/gtest-1.10.0-override.patch" - base_path: "source_subfolder" - "cci.20210126": - - patch_file: "patches/gtest-1.10.0.patch" - base_path: "source_subfolder" + patch_description: "prevent compiler from complaining while compiling" + patch_type: "bugfix" + patch_source: "https://github.com/google/googletest/pull/2507" + "1.8.1": + - patch_file: "patches/gtest-1.8.1.patch" + patch_description: "add CUSTOM_DEBUG_POSTFIX option" + patch_type: "conan" diff --git a/packages/conan/recipes/gtest/conanfile.py b/packages/conan/recipes/gtest/conanfile.py index 63623c0a..68680455 100644 --- a/packages/conan/recipes/gtest/conanfile.py +++ b/packages/conan/recipes/gtest/conanfile.py @@ -1,202 +1,208 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/gtest/all/conanfile.py +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir +from conan.tools.microsoft import is_msvc_static_runtime, msvc_runtime_flag +from conan.tools.scm import Version import os -required_conan_version = ">=1.33.0" +required_conan_version = ">=1.54.0" class GTestConan(ConanFile): name = "gtest" description = "Google's C++ test framework" + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/google/googletest" - license = "BSD-3-Clause" - topics = ("gtest", "testing", "google-testing", "unit-test") - exports_sources = ["CMakeLists.txt", "patches/*"] - generators = "cmake" - settings = "cppstd", "os", "arch", "compiler", "build_type" + topics = ("testing", "google-testing", "unit-test") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], - "build_gmock": [True, False], "fPIC": [True, False], + "build_gmock": [True, False], "no_main": [True, False], - "debug_postfix": "ANY", "hide_symbols": [True, False], + "debug_postfix": ["ANY"], + "disable_pthreads": [True, False], } default_options = { "shared": False, - "build_gmock": True, "fPIC": True, + "build_gmock": True, "no_main": False, - "debug_postfix": "d", "hide_symbols": False, + "debug_postfix": "d", + "disable_pthreads": False, } - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" + # disallow cppstd compatibility, as it affects the ABI in this library + # see https://github.com/conan-io/conan-center-index/issues/23854 + # Requires Conan >=1.53.0 <2 || >=2.1.0 to work + extension_properties = {"compatibility_cppstd": False} @property - def _build_subfolder(self): - return "build_subfolder" - - @property - def _minimum_cpp_standard(self): - if self.version == "1.8.1": - return 98 - else: - return 11 + def _min_cppstd(self): + return "11" if Version(self.version) < "1.13.0" else "14" @property def _minimum_compilers_version(self): - if self.version == "1.8.1": - return {"Visual Studio": "14"} - elif self.version == "1.10.0": - return { - "Visual Studio": "14", - "gcc": "4.8.1", - "clang": "3.3", - "apple-clang": "5.0", - } - else: - return { + return { + "11": { "Visual Studio": "14", - "gcc": "5", - "clang": "5", - "apple-clang": "9.1", - } - - @property - def _postfix(self): - return self.options.debug_postfix if self.settings.build_type == "Debug" else "" + "msvc": "190", + "gcc": "4.8.1" if Version(self.version) < "1.11.0" else "5", + "clang": "3.3" if Version(self.version) < "1.11.0" else "5", + "apple-clang": "5.0" if Version(self.version) < "1.11.0" else "9.1", + }, + # Sinse 1.13.0, gtest requires C++14 and Google's Foundational C++ Support Policy + # https://github.com/google/oss-policies-info/blob/603a042ce2ee8f165fac46721a651d796ce59cb6/foundational-cxx-support-matrix.md + "14": { + "Visual Studio": "15", + "msvc": "191", + "gcc": "7.3.1", + "clang": "6", + "apple-clang": "12", + }, + }.get(self._min_cppstd, {}) + + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if self.settings.build_type != "Debug": + if Version(self.version) >= "1.12.0" or self.settings.build_type != "Debug": del self.options.debug_postfix def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: we want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def package_id(self): + del self.info.options.no_main # Only used to expose more targets def validate(self): + if self.options.shared and is_msvc_static_runtime(self): + raise ConanInvalidConfiguration("gtest shared is not compatible with static vc runtime") + if self.settings.get_safe("compiler.cppstd"): - tools.check_min_cppstd(self, self._minimum_cpp_standard) - min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) + check_min_cppstd(self, self._min_cppstd) - def lazy_lt_semver(v1, v2): + def loose_lt_semver(v1, v2): lv1 = [int(v) for v in v1.split(".")] lv2 = [int(v) for v in v2.split(".")] min_length = min(len(lv1), len(lv2)) return lv1[:min_length] < lv2[:min_length] - if not min_version: - self.output.warn( - "{} recipe lacks information about {} compiler support.".format( - self.name, self.settings.compiler - ) + compiler = self.settings.compiler + min_version = self._minimum_compilers_version.get(str(compiler)) + if min_version and loose_lt_semver(str(compiler.version), min_version): + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) - else: - if lazy_lt_semver(str(self.settings.compiler.version), min_version): - raise ConanInvalidConfiguration( - "{0} requires {1} {2}. The current compiler is {1} {3}.".format( - self.name, - self.settings.compiler, - min_version, - self.settings.compiler.version, - ) - ) def source(self): - tools.get( - **self.conan_data["sources"][self.version], - destination=self._source_subfolder, - strip_root=True, - ) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - if self.settings.build_type == "Debug": - self._cmake.definitions["CUSTOM_DEBUG_POSTFIX"] = self.options.debug_postfix - if self.settings.os == "Windows" and self.settings.get_safe("compiler.runtime"): - self._cmake.definitions["gtest_force_shared_crt"] = "MD" in str( - self.settings.compiler.runtime - ) - self._cmake.definitions["BUILD_GMOCK"] = self.options.build_gmock - if self.settings.os == "Windows" and self.settings.compiler == "gcc": - self._cmake.definitions["gtest_disable_pthreads"] = True - self._cmake.definitions[ - "gtest_hide_internal_symbols" - ] = self.options.hide_symbols - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_GMOCK"] = bool(self.options.build_gmock) + tc.variables["gtest_hide_internal_symbols"] = bool(self.options.hide_symbols) + + if self.settings.build_type == "Debug" and Version(self.version) < "1.12.0": + tc.cache_variables["CUSTOM_DEBUG_POSTFIX"] = str(self.options.debug_postfix) + + if self.settings.compiler.get_safe("runtime"): + tc.variables["gtest_force_shared_crt"] = "MD" in msvc_runtime_flag(self) + tc.variables["gtest_disable_pthreads"] = self.options.disable_pthreads + if Version(self.version) < "1.12.0": + # Relocatable shared lib on Macos + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" + tc.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + # No warnings as errors + internal_utils = os.path.join(self.source_folder, "googletest", "cmake", "internal_utils.cmake") + replace_in_file(self, internal_utils, "-WX", "") + if Version(self.version) < "1.12.0": + replace_in_file(self, internal_utils, "-Werror", "") def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + self._patch_sources() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy( - "LICENSE", - dst=os.path.join("licenses", self.name), - src=self._source_subfolder, - ) - cmake = self._configure_cmake() + # ASWF: separate licenses from multiple package installs + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses", self.name)) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - # tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.pdb") + # ASWF: lib64 on RHEL derived distro + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + # ASWF: keep cmake files for non-Conan clients + # rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) - def package_id(self): - del self.info.options.no_main + @property + def _postfix(self): + return self.options.get_safe("debug_postfix", "") def package_info(self): - self.cpp_info.names["cmake_find_package"] = "GTest" - self.cpp_info.names["cmake_find_package_multi"] = "GTest" - self.cpp_info.components["libgtest"].names["cmake_find_package"] = "gtest" - self.cpp_info.components["libgtest"].names["cmake_find_package_multi"] = "gtest" - self.cpp_info.components["libgtest"].libs = ["gtest{}".format(self._postfix)] - if self.settings.os == "Linux": - self.cpp_info.components["libgtest"].system_libs.append("pthread") - + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "GTest") + + # gtest + self.cpp_info.components["libgtest"].set_property("cmake_target_name", "GTest::gtest") + self.cpp_info.components["libgtest"].set_property("cmake_target_aliases", ["GTest::GTest"]) + self.cpp_info.components["libgtest"].set_property("pkg_config_name", "gtest") + self.cpp_info.components["libgtest"].libs = [f"gtest{self._postfix}"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["libgtest"].system_libs.append("m") + if not self.options.disable_pthreads: + self.cpp_info.components["libgtest"].system_libs.append("pthread") if self.settings.os == "Neutrino" and self.settings.os.version == "7.1": self.cpp_info.components["libgtest"].system_libs.append("regex") - if self.options.shared: - self.cpp_info.components["libgtest"].defines.append( - "GTEST_LINKED_AS_SHARED_LIBRARY=1" - ) - - if self.version == "1.8.1": - if self.settings.compiler == "Visual Studio": - if tools.Version(self.settings.compiler.version) >= "15": - self.cpp_info.components["libgtest"].defines.append( - "GTEST_LANG_CXX11=1" - ) - self.cpp_info.components["libgtest"].defines.append( - "GTEST_HAS_TR1_TUPLE=0" - ) + self.cpp_info.components["libgtest"].defines.append("GTEST_LINKED_AS_SHARED_LIBRARY=1") + # gtest_main if not self.options.no_main: - self.cpp_info.components["gtest_main"].libs = [ - "gtest_main{}".format(self._postfix) - ] + self.cpp_info.components["gtest_main"].set_property("cmake_target_name", "GTest::gtest_main") + self.cpp_info.components["gtest_main"].set_property("cmake_target_aliases", ["GTest::Main"]) + self.cpp_info.components["gtest_main"].set_property("pkg_config_name", "gtest_main") + self.cpp_info.components["gtest_main"].libs = [f"gtest_main{self._postfix}"] self.cpp_info.components["gtest_main"].requires = ["libgtest"] + # gmock if self.options.build_gmock: - self.cpp_info.components["gmock"].libs = ["gmock{}".format(self._postfix)] + self.cpp_info.components["gmock"].set_property("cmake_target_name", "GTest::gmock") + self.cpp_info.components["gmock"].set_property("pkg_config_name", "gmock") + self.cpp_info.components["gmock"].libs = [f"gmock{self._postfix}"] self.cpp_info.components["gmock"].requires = ["libgtest"] + + # gmock_main if not self.options.no_main: - self.cpp_info.components["gmock_main"].libs = [ - "gmock_main{}".format(self._postfix) - ] + self.cpp_info.components["gmock_main"].set_property("cmake_target_name", "GTest::gmock_main") + self.cpp_info.components["gmock_main"].set_property("pkg_config_name", "gmock_main") + self.cpp_info.components["gmock_main"].libs = [f"gmock_main{self._postfix}"] self.cpp_info.components["gmock_main"].requires = ["gmock"] - def deploy(self): - self.copy("*", symlinks=True) + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.names["cmake_find_package"] = "GTest" + self.cpp_info.names["cmake_find_package_multi"] = "GTest" + self.cpp_info.components["libgtest"].names["cmake_find_package"] = "gtest" + self.cpp_info.components["libgtest"].names["cmake_find_package_multi"] = "gtest" diff --git a/packages/conan/recipes/gtest/test_package/CMakeLists.txt b/packages/conan/recipes/gtest/test_package/CMakeLists.txt index 5e369144..599da1c7 100644 --- a/packages/conan/recipes/gtest/test_package/CMakeLists.txt +++ b/packages/conan/recipes/gtest/test_package/CMakeLists.txt @@ -1,17 +1,16 @@ -cmake_minimum_required(VERSION 3.1.2) -project(test_package CXX) +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/gtest/all/test_package/CMakeLists.txt -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) find_package(GTest REQUIRED) -if(WITH_MAIN) - add_executable(${PROJECT_NAME} test_package.cpp) -else() - add_executable(${PROJECT_NAME} main.cpp test_package.cpp) -endif() - +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE GTest::gtest) if(GTest_VERSION VERSION_LESS "1.13.0") target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) else() @@ -19,18 +18,15 @@ else() endif() if(WITH_MAIN) - target_link_libraries(${PROJECT_NAME} GTest::gtest GTest::gtest_main ) + target_link_libraries(${PROJECT_NAME} PRIVATE GTest::gtest_main) if(WITH_GMOCK) - target_link_libraries(${PROJECT_NAME} GTest::gmock GTest::gmock_main) + target_link_libraries(${PROJECT_NAME} PRIVATE GTest::gmock_main) endif() else() - target_link_libraries(${PROJECT_NAME} GTest::gtest) - if(WITH_GMOCK) - target_link_libraries(${PROJECT_NAME} GTest::gmock) - endif() + target_sources(${PROJECT_NAME} PRIVATE main.cpp) endif() -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) if(WITH_GMOCK) + target_link_libraries(${PROJECT_NAME} PRIVATE GTest::gmock) target_compile_definitions(${PROJECT_NAME} PRIVATE WITH_GMOCK) endif() diff --git a/packages/conan/recipes/gtest/test_package/conanfile.py b/packages/conan/recipes/gtest/test_package/conanfile.py index 9019c9a3..bf99558c 100644 --- a/packages/conan/recipes/gtest/test_package/conanfile.py +++ b/packages/conan/recipes/gtest/test_package/conanfile.py @@ -1,26 +1,44 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/gtest/all/test_package/conanfile.py + import os -from conans import ConanFile, CMake, tools + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout class TestPackageConan(ConanFile): - settings = "cppstd", "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + tc = CMakeToolchain(self) + + with_gmock = bool(self.dependencies[self.tested_reference_str].options.build_gmock) + tc.cache_variables['WITH_GMOCK'] = with_gmock + if with_gmock: + tc.preprocessor_definitions['WITH_GMOCK'] = 1 + + tc.variables['WITH_MAIN'] = not bool(self.dependencies[self.tested_reference_str].options.no_main) + tc.generate() def build(self): cmake = CMake(self) - cmake.definitions["WITH_GMOCK"] = self.options["gtest"].build_gmock - cmake.definitions["WITH_MAIN"] = not self.options["gtest"].no_main cmake.configure() cmake.build() def test(self): - assert os.path.isfile( - os.path.join( - self.deps_cpp_info["gtest"].rootpath, "licenses", "gtest", "LICENSE" - ) - ) - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/gtest/test_package/main.cpp b/packages/conan/recipes/gtest/test_package/main.cpp index 4483c91a..2524ea4f 100644 --- a/packages/conan/recipes/gtest/test_package/main.cpp +++ b/packages/conan/recipes/gtest/test_package/main.cpp @@ -1,3 +1,11 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/gtest/all/test_package/main.cpp +*/ + #include "gtest/gtest.h" int main(int argc, char **argv) { diff --git a/packages/conan/recipes/gtest/test_package/prime_tables.h b/packages/conan/recipes/gtest/test_package/prime_tables.h deleted file mode 100644 index 55a3b44e..00000000 --- a/packages/conan/recipes/gtest/test_package/prime_tables.h +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright 2008 Google Inc. -// All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// Author: vladl@google.com (Vlad Losev) - -// This provides interface PrimeTable that determines whether a number is a -// prime and determines a next prime number. This interface is used -// in Google Test samples demonstrating use of parameterized tests. - -#ifndef GTEST_SAMPLES_PRIME_TABLES_H_ -#define GTEST_SAMPLES_PRIME_TABLES_H_ - -#include - -// The prime table interface. -class PrimeTable { - public: - virtual ~PrimeTable() {} - - // Returns true iff n is a prime number. - virtual bool IsPrime(int n) const = 0; - - // Returns the smallest prime number greater than p; or returns -1 - // if the next prime is beyond the capacity of the table. - virtual int GetNextPrime(int p) const = 0; -}; - -// Implementation #1 calculates the primes on-the-fly. -class OnTheFlyPrimeTable : public PrimeTable { - public: - virtual bool IsPrime(int n) const { - if (n <= 1) return false; - - for (int i = 2; i*i <= n; i++) { - // n is divisible by an integer other than 1 and itself. - if ((n % i) == 0) return false; - } - - return true; - } - - virtual int GetNextPrime(int p) const { - for (int n = p + 1; n > 0; n++) { - if (IsPrime(n)) return n; - } - - return -1; - } -}; - -// Implementation #2 pre-calculates the primes and stores the result -// in an array. -class PreCalculatedPrimeTable : public PrimeTable { - public: - // 'max' specifies the maximum number the prime table holds. - explicit PreCalculatedPrimeTable(int max) - : is_prime_size_(max + 1), is_prime_(new bool[max + 1]) { - CalculatePrimesUpTo(max); - } - virtual ~PreCalculatedPrimeTable() { delete[] is_prime_; } - - virtual bool IsPrime(int n) const { - return 0 <= n && n < is_prime_size_ && is_prime_[n]; - } - - virtual int GetNextPrime(int p) const { - for (int n = p + 1; n < is_prime_size_; n++) { - if (is_prime_[n]) return n; - } - - return -1; - } - - private: - void CalculatePrimesUpTo(int max) { - ::std::fill(is_prime_, is_prime_ + is_prime_size_, true); - is_prime_[0] = is_prime_[1] = false; - - // Checks every candidate for prime number (we know that 2 is the only even - // prime). - for (int i = 2; i*i <= max; i += i%2+1) { - if (!is_prime_[i]) continue; - - // Marks all multiples of i (except i itself) as non-prime. - // We are starting here from i-th multiplier, because all smaller - // complex numbers were already marked. - for (int j = i*i; j <= max; j += i) { - is_prime_[j] = false; - } - } - } - - const int is_prime_size_; - bool* const is_prime_; - - // Disables compiler warning "assignment operator could not be generated." - void operator=(const PreCalculatedPrimeTable& rhs); -}; - -#endif // GTEST_SAMPLES_PRIME_TABLES_H_ diff --git a/packages/conan/recipes/gtest/test_package/test_package.cpp b/packages/conan/recipes/gtest/test_package/test_package.cpp index 4a1f9d2a..3d33d2ee 100644 --- a/packages/conan/recipes/gtest/test_package/test_package.cpp +++ b/packages/conan/recipes/gtest/test_package/test_package.cpp @@ -1,3 +1,11 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/gtest/all/test_package/test_package.cpp +*/ + // Thanks to http://joeyates.info/2010/05/26/googletest-hello-world/ for the example! ///////////////////////////// @@ -50,138 +58,3 @@ TEST(SalutationTest, Static) { EXPECT_EQ(string("Hello World!"), Salutation::greet("World")); } - -#if GTEST_HAS_COMBINE -#include "prime_tables.h" - -// Suppose we want to introduce a new, improved implementation of PrimeTable -// which combines speed of PrecalcPrimeTable and versatility of -// OnTheFlyPrimeTable (see prime_tables.h). Inside it instantiates both -// PrecalcPrimeTable and OnTheFlyPrimeTable and uses the one that is more -// appropriate under the circumstances. But in low memory conditions, it can be -// told to instantiate without PrecalcPrimeTable instance at all and use only -// OnTheFlyPrimeTable. -class HybridPrimeTable : public PrimeTable { - public: - HybridPrimeTable(bool force_on_the_fly, int max_precalculated) - : on_the_fly_impl_(new OnTheFlyPrimeTable), - precalc_impl_(force_on_the_fly ? NULL : - new PreCalculatedPrimeTable(max_precalculated)), - max_precalculated_(max_precalculated) {} - virtual ~HybridPrimeTable() { - delete on_the_fly_impl_; - delete precalc_impl_; - } - - virtual bool IsPrime(int n) const { - if (precalc_impl_ != NULL && n < max_precalculated_) - return precalc_impl_->IsPrime(n); - else - return on_the_fly_impl_->IsPrime(n); - } - - virtual int GetNextPrime(int p) const { - int next_prime = -1; - if (precalc_impl_ != NULL && p < max_precalculated_) - next_prime = precalc_impl_->GetNextPrime(p); - - return next_prime != -1 ? next_prime : on_the_fly_impl_->GetNextPrime(p); - } - - private: - OnTheFlyPrimeTable* on_the_fly_impl_; - PreCalculatedPrimeTable* precalc_impl_; - int max_precalculated_; -}; - -using ::testing::TestWithParam; -using ::testing::Bool; -using ::testing::Values; -using ::testing::Combine; - -// To test all code paths for HybridPrimeTable we must test it with numbers -// both within and outside PreCalculatedPrimeTable's capacity and also with -// PreCalculatedPrimeTable disabled. We do this by defining fixture which will -// accept different combinations of parameters for instantiating a -// HybridPrimeTable instance. -class PrimeTableTest : public TestWithParam< ::testing::tuple > { - protected: - virtual void SetUp() { - // This can be written as - // - // bool force_on_the_fly; - // int max_precalculated; - // tie(force_on_the_fly, max_precalculated) = GetParam(); - // - // once the Google C++ Style Guide allows use of ::std::tr1::tie. - // - bool force_on_the_fly = ::testing::get<0>(GetParam()); - int max_precalculated = ::testing::get<1>(GetParam()); - table_ = new HybridPrimeTable(force_on_the_fly, max_precalculated); - } - virtual void TearDown() { - delete table_; - table_ = NULL; - } - HybridPrimeTable* table_; -}; - -TEST_P(PrimeTableTest, ReturnsFalseForNonPrimes) { - // Inside the test body, you can refer to the test parameter by GetParam(). - // In this case, the test parameter is a PrimeTable interface pointer which - // we can use directly. - // Please note that you can also save it in the fixture's SetUp() method - // or constructor and use saved copy in the tests. - - EXPECT_FALSE(table_->IsPrime(-5)); - EXPECT_FALSE(table_->IsPrime(0)); - EXPECT_FALSE(table_->IsPrime(1)); - EXPECT_FALSE(table_->IsPrime(4)); - EXPECT_FALSE(table_->IsPrime(6)); - EXPECT_FALSE(table_->IsPrime(100)); -} - -TEST_P(PrimeTableTest, ReturnsTrueForPrimes) { - EXPECT_TRUE(table_->IsPrime(2)); - EXPECT_TRUE(table_->IsPrime(3)); - EXPECT_TRUE(table_->IsPrime(5)); - EXPECT_TRUE(table_->IsPrime(7)); - EXPECT_TRUE(table_->IsPrime(11)); - EXPECT_TRUE(table_->IsPrime(131)); -} - -TEST_P(PrimeTableTest, CanGetNextPrime) { - EXPECT_EQ(2, table_->GetNextPrime(0)); - EXPECT_EQ(3, table_->GetNextPrime(2)); - EXPECT_EQ(5, table_->GetNextPrime(3)); - EXPECT_EQ(7, table_->GetNextPrime(5)); - EXPECT_EQ(11, table_->GetNextPrime(7)); - EXPECT_EQ(131, table_->GetNextPrime(128)); -} - -// In order to run value-parameterized tests, you need to instantiate them, -// or bind them to a list of values which will be used as test parameters. -// You can instantiate them in a different translation module, or even -// instantiate them several times. -// -// Here, we instantiate our tests with a list of parameters. We must combine -// all variations of the boolean flag suppressing PrecalcPrimeTable and some -// meaningful values for tests. We choose a small value (1), and a value that -// will put some of the tested numbers beyond the capability of the -// PrecalcPrimeTable instance and some inside it (10). Combine will produce all -// possible combinations. -INSTANTIATE_TEST_CASE_P(MeaningfulTestParameters, - PrimeTableTest, - Combine(Bool(), Values(1, 10))); - -#else - -// Google Test may not support Combine() with some compilers. If we -// use conditional compilation to compile out all code referring to -// the gtest_main library, MSVC linker will not link that library at -// all and consequently complain about missing entry point defined in -// that library (fatal error LNK1561: entry point must be -// defined). This dummy test keeps gtest_main linked in. -TEST(DummyTest, CombineIsNotSupportedOnThisPlatform) {} - -#endif // GTEST_HAS_COMBINE diff --git a/packages/conan/recipes/highway/conandata.yml b/packages/conan/recipes/highway/conandata.yml new file mode 100644 index 00000000..b66e944e --- /dev/null +++ b/packages/conan/recipes/highway/conandata.yml @@ -0,0 +1,49 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b96b04ffad873992cbcfb98f0d84f6f44beb169d/recipes/highway/all/conandata.yml + +sources: + "1.2.0": + url: "https://github.com/google/highway/archive/1.2.0.tar.gz" + sha256: "7e0be78b8318e8bdbf6fa545d2ecb4c90f947df03f7aadc42c1967f019e63343" + "1.1.0": + url: "https://github.com/google/highway/archive/1.1.0.tar.gz" + sha256: "354a8b4539b588e70b98ec70844273e3f2741302c4c377bcc4e81b3d1866f7c9" + "1.0.7": + url: "https://github.com/google/highway/archive/1.0.7.tar.gz" + sha256: "5434488108186c170a5e2fca5e3c9b6ef59a1caa4d520b008a9b8be6b8abe6c5" + "1.0.6": + url: "https://github.com/google/highway/archive/1.0.6.tar.gz" + sha256: "d89664a045a41d822146e787bceeefbf648cc228ce354f347b18f2b419e57207" + "1.0.5": + url: "https://github.com/google/highway/archive/1.0.5.tar.gz" + sha256: "99b7dad98b8fa088673b720151458fae698ae5df9154016e39de4afdc23bb927" + "1.0.4": + url: "https://github.com/google/highway/archive/1.0.4.tar.gz" + sha256: "faccd343935c9e98afd1016e9d20e0b8b89d908508d1af958496f8c2d3004ac2" + "1.0.3": + url: "https://github.com/google/highway/archive/1.0.3.tar.gz" + sha256: "566fc77315878473d9a6bd815f7de78c73734acdcb745c3dde8579560ac5440e" + "1.0.2": + url: "https://github.com/google/highway/archive/1.0.2.tar.gz" + sha256: "e8ef71236ac0d97f12d553ec1ffc5b6375d57b5f0b860c7447dd69b6ed1072db" + "1.0.1": + url: "https://github.com/google/highway/archive/1.0.1.tar.gz" + sha256: "7ca6af7dc2e3e054de9e17b9dfd88609a7fd202812b1c216f43cc41647c97311" + "1.0.0": + url: "https://github.com/google/highway/archive/1.0.0.tar.gz" + sha256: "ab4f5f864932268356f9f6aa86f612fa4430a7db3c8de0391076750197e876b8" + "0.17.0": + url: "https://github.com/google/highway/archive/0.17.0.tar.gz" + sha256: "25158fd5c090b70ecea47fc246c860d150f07f801d2434e1e51ec14a6c15822c" + "0.12.2": + url: "https://github.com/google/highway/archive/0.12.2.tar.gz" + sha256: "e1d47ce510429fdcf31f41697ca74fb0dcd59d933196e531a86d51751a56f4cc" +patches: + "1.2.0": + - patch_file: "patches/1.2.0-0001-fix-dllexport.patch" + patch_description: "fix incorrect DLLEXPORT" + patch_type: "backport" + patch_source: "https://github.com/google/highway/pull/2229" diff --git a/packages/conan/recipes/highway/conanfile.py b/packages/conan/recipes/highway/conanfile.py new file mode 100644 index 00000000..f525eb30 --- /dev/null +++ b/packages/conan/recipes/highway/conanfile.py @@ -0,0 +1,132 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b96b04ffad873992cbcfb98f0d84f6f44beb169d/recipes/highway/all/conanfile.py + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.54.0" + + +class HighwayConan(ConanFile): + name = "highway" + description = "Performance-portable, length-agnostic SIMD with runtime dispatch" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/google/highway" + topics = ("simd", "neon", "avx", "sse",) + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_test": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_test": False, + } + + @property + def _min_cppstd(self): + return "11" + + @property + def _minimum_compilers_version(self): + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "8", + "clang": "7", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if Version(self.version) < "0.16.0": + del self.options.shared + self.package_type = "static-library" + elif self.options.shared: + self.options.rm_safe("fPIC") + if Version(self.version) < "1.0.6": + del self.options.with_test + + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: we want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._minimum_compilers_version.get(str(self.settings.compiler)) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_TESTING"] = False + tc.variables["HWY_ENABLE_EXAMPLES"] = False + tc.variables["HWY_ENABLE_TESTS"] = self.options.get_safe("with_test", False) + tc.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + # Honor fPIC option + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") + replace_in_file(self, cmakelists, "set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)", "") + replace_in_file(self, cmakelists, + "set_property(TARGET hwy PROPERTY POSITION_INDEPENDENT_CODE ON)", + "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + # ASWF: separate licenses from multiple package installs + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + cmake = CMake(self) + cmake.install() + # ASWF: libraries in lib64, keep cmake files + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) + + def package_info(self): + self.cpp_info.components["hwy"].set_property("pkg_config_name", "libhwy") + self.cpp_info.components["hwy"].libs = ["hwy"] + if Version(self.version) >= "0.16.0": + self.cpp_info.components["hwy"].defines.append( + "HWY_SHARED_DEFINE" if self.options.shared else "HWY_STATIC_DEFINE" + ) + if Version(self.version) >= "0.12.1": + self.cpp_info.components["hwy_contrib"].set_property("pkg_config_name", "libhwy-contrib") + self.cpp_info.components["hwy_contrib"].libs = ["hwy_contrib"] + self.cpp_info.components["hwy_contrib"].requires = ["hwy"] + if "0.15.0" <= Version(self.version) < "1.0.6" or (Version(self.version) >= "1.0.6" and self.options.with_test): + self.cpp_info.components["hwy_test"].set_property("pkg_config_name", "libhwy-test") + self.cpp_info.components["hwy_test"].libs = ["hwy_test"] + self.cpp_info.components["hwy_test"].requires = ["hwy"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/packages/conan/recipes/highway/patches/1.2.0-0001-fix-dllexport.patch b/packages/conan/recipes/highway/patches/1.2.0-0001-fix-dllexport.patch new file mode 100644 index 00000000..30ecee47 --- /dev/null +++ b/packages/conan/recipes/highway/patches/1.2.0-0001-fix-dllexport.patch @@ -0,0 +1,91 @@ +diff --git a/hwy/contrib/thread_pool/topology.cc b/hwy/contrib/thread_pool/topology.cc +index 3d24f4f..17f3563 100644 +--- a/hwy/contrib/thread_pool/topology.cc ++++ b/hwy/contrib/thread_pool/topology.cc +@@ -64,7 +64,7 @@ + + namespace hwy { + +-HWY_DLLEXPORT bool HaveThreadingSupport() { ++HWY_CONTRIB_DLLEXPORT bool HaveThreadingSupport() { + #if HWY_ARCH_WASM + return emscripten_has_threading_support() != 0; + #else +@@ -72,7 +72,7 @@ HWY_DLLEXPORT bool HaveThreadingSupport() { + #endif + } + +-HWY_DLLEXPORT size_t TotalLogicalProcessors() { ++HWY_CONTRIB_DLLEXPORT size_t TotalLogicalProcessors() { + size_t lp = 0; + #if HWY_ARCH_WASM + const int num_cores = emscripten_num_logical_cores(); +@@ -111,7 +111,7 @@ HWY_DLLEXPORT size_t TotalLogicalProcessors() { + #include + #endif + +-HWY_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps) { ++HWY_CONTRIB_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps) { + #if HWY_OS_WIN + // Only support the first 64 because WINE does not support processor groups. + const HANDLE hThread = GetCurrentThread(); +@@ -173,7 +173,7 @@ HWY_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps) { + #endif + } + +-HWY_DLLEXPORT bool SetThreadAffinity(const LogicalProcessorSet& lps) { ++HWY_CONTRIB_DLLEXPORT bool SetThreadAffinity(const LogicalProcessorSet& lps) { + #if HWY_OS_WIN + const HANDLE hThread = GetCurrentThread(); + const DWORD_PTR prev = SetThreadAffinityMask(hThread, lps.Get64()); +@@ -385,7 +385,7 @@ std::vector DetectPackages(std::vector& lps) { + } // namespace + #endif // HWY_OS_LINUX + +-HWY_DLLEXPORT Topology::Topology() { ++HWY_CONTRIB_DLLEXPORT Topology::Topology() { + #if HWY_OS_LINUX + lps.resize(TotalLogicalProcessors()); + const std::vector& per_package = DetectPackages(lps); +diff --git a/hwy/contrib/thread_pool/topology.h b/hwy/contrib/thread_pool/topology.h +index 95b0835..f80fc47 100644 +--- a/hwy/contrib/thread_pool/topology.h ++++ b/hwy/contrib/thread_pool/topology.h +@@ -28,7 +28,7 @@ + namespace hwy { + + // Returns false if std::thread should not be used. +-HWY_DLLEXPORT bool HaveThreadingSupport(); ++HWY_CONTRIB_DLLEXPORT bool HaveThreadingSupport(); + + // Upper bound on logical processors, including hyperthreads. + static constexpr size_t kMaxLogicalProcessors = 1024; // matches glibc +@@ -38,12 +38,12 @@ using LogicalProcessorSet = BitSet4096; + + // Returns false, or sets `lps` to all logical processors which are online and + // available to the current thread. +-HWY_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps); ++HWY_CONTRIB_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps); + + // Ensures the current thread can only run on the logical processors in `lps`. + // Returns false if not supported (in particular on Apple), or if the + // intersection between `lps` and `GetThreadAffinity` is the empty set. +-HWY_DLLEXPORT bool SetThreadAffinity(const LogicalProcessorSet& lps); ++HWY_CONTRIB_DLLEXPORT bool SetThreadAffinity(const LogicalProcessorSet& lps); + + // Returns false, or ensures the current thread will only run on `lp`, which + // must not exceed `TotalLogicalProcessors`. Note that this merely calls +@@ -58,11 +58,11 @@ static inline bool PinThreadToLogicalProcessor(size_t lp) { + // provided by the hardware clamped to `kMaxLogicalProcessors`. + // These processors are not necessarily all usable; you can determine which are + // via GetThreadAffinity(). +-HWY_DLLEXPORT size_t TotalLogicalProcessors(); ++HWY_CONTRIB_DLLEXPORT size_t TotalLogicalProcessors(); + + struct Topology { + // Caller must check packages.empty(); if so, do not use any fields. +- HWY_DLLEXPORT Topology(); ++ HWY_CONTRIB_DLLEXPORT Topology(); + + // Clique of cores with lower latency to each other. On Apple M1 these are + // four cores sharing an L2. On Zen4 these 'CCX' are up to eight cores sharing diff --git a/packages/conan/recipes/highway/test_package/CMakeLists.txt b/packages/conan/recipes/highway/test_package/CMakeLists.txt new file mode 100644 index 00000000..b0b52899 --- /dev/null +++ b/packages/conan/recipes/highway/test_package/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b96b04ffad873992cbcfb98f0d84f6f44beb169d/recipes/highway/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(highway REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE highway::highway) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/packages/conan/recipes/highway/test_package/conanfile.py b/packages/conan/recipes/highway/test_package/conanfile.py new file mode 100644 index 00000000..50414fe4 --- /dev/null +++ b/packages/conan/recipes/highway/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b96b04ffad873992cbcfb98f0d84f6f44beb169d/recipes/highway/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/highway/test_package/test_package.cpp b/packages/conan/recipes/highway/test_package/test_package.cpp new file mode 100644 index 00000000..3544412b --- /dev/null +++ b/packages/conan/recipes/highway/test_package/test_package.cpp @@ -0,0 +1,53 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b96b04ffad873992cbcfb98f0d84f6f44beb169d/recipes/highway/all/test_package/test_package.cpp +*/ + +#include "hwy/aligned_allocator.h" +#include "hwy/highway.h" + +#include + +HWY_BEFORE_NAMESPACE(); +namespace { +namespace HWY_NAMESPACE { + +void test() +{ + const HWY_FULL(uint32_t) d; + + const size_t count = 5 * Lanes(d); + auto x_array = hwy::AllocateAligned(count); + + uint32_t result = 0; + uint32_t expected = 0; + + for (size_t i = 0; i < count; ++i) { + x_array[i] = i; + expected += x_array[i]; + } + + for (size_t i = 0; i < count; i += Lanes(d)) { + const auto x = Load(d, &x_array[i]); +#if HWY_MAJOR == 0 && HWY_MINOR < 14 + result += GetLane(SumOfLanes(x)); +#else + result += GetLane(SumOfLanes(d, x)); +#endif + } + + std::cout << "result = " << result << ", expected = " << expected << '\n'; +} + +} // namespace HWY_NAMESPACE +} // namespace +HWY_AFTER_NAMESPACE(); + +int main() +{ + HWY_NAMESPACE::test(); + return 0; +} diff --git a/packages/conan/recipes/icu/conanfile.py b/packages/conan/recipes/icu/conanfile.py new file mode 100644 index 00000000..57b4ca98 --- /dev/null +++ b/packages/conan/recipes/icu/conanfile.py @@ -0,0 +1,60 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/icu/all/conanfile.py + +from conan import ConanFile + +class SystemICUConan(ConanFile): + name = "icu" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + + self.cpp_info.set_property("cmake_file_name", "ICU") + self.cpp_info.set_property("cmake_target_name", "ICU::ICU") + + # icudata + self.cpp_info.components["icu-data"].set_property("cmake_target_name", "ICU::data") + self.cpp_info.components["icu-data"].libs = ["icudata"] + + # Alias of data CMake component + self.cpp_info.components["icu-data-alias"].set_property("cmake_target_name", "ICU::dt") + self.cpp_info.components["icu-data-alias"].requires = ["icu-data"] + + # icuuc + self.cpp_info.components["icu-uc"].set_property("cmake_target_name", "ICU::uc") + self.cpp_info.components["icu-uc"].libs = ["icuuc"] + self.cpp_info.components["icu-uc"].requires = ["icu-data"] + self.cpp_info.components["icu-uc"].system_libs = ["m", "pthread"] + + # icui18n + self.cpp_info.components["icu-i18n"].set_property("cmake_target_name", "ICU::i18n") + self.cpp_info.components["icu-i18n"].libs = ["icui18n"] + self.cpp_info.components["icu-i18n"].requires = ["icu-uc"] + self.cpp_info.components["icu-i18n"].system_libs = ["m"] + + # Alias of i18n CMake component + self.cpp_info.components["icu-i18n-alias"].set_property("cmake_target_name", "ICU::in") + self.cpp_info.components["icu-i18n-alias"].requires = ["icu-i18n"] + + # icuio + self.cpp_info.components["icu-io"].set_property("cmake_target_name", "ICU::io") + self.cpp_info.components["icu-io"].libs = ["icuio"] + self.cpp_info.components["icu-io"].requires = ["icu-i18n", "icu-uc"] + + # icutu + self.cpp_info.components["icu-tu"].set_property("cmake_target_name", "ICU::tu") + self.cpp_info.components["icu-tu"].libs = ["icutu"] + self.cpp_info.components["icu-tu"].requires = ["icu-i18n", "icu-uc"] + self.cpp_info.components["icu-tu"].system_libs = ["pthread"] + + # icutest + self.cpp_info.components["icu-test"].set_property("cmake_target_name", "ICU::test") + self.cpp_info.components["icu-test"].libs = ["icutest"] + self.cpp_info.components["icu-test"].requires = ["icu-tu", "icu-uc"] diff --git a/packages/conan/recipes/imath/conandata.yml b/packages/conan/recipes/imath/conandata.yml index e36fb6c1..ad638df5 100644 --- a/packages/conan/recipes/imath/conandata.yml +++ b/packages/conan/recipes/imath/conandata.yml @@ -1,11 +1,28 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/cceee569179c10fa56d1fd9c3582f3371944ba59/recipes/imath/all/conandata.yml + sources: - "3.1.10": - url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.10.tar.gz" - sha256: "f2943e86bfb694e216c60b9a169e5356f8a90f18fbd34d7b6e3450be14f60b10" - "3.1.11": - url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.11.tar.gz" - sha256: "9057849585e49b8b85abe7cc1e76e22963b01bfdc3b6d83eac90c499cd760063" "3.1.12": url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.12.tar.gz" sha256: "8a1bc258f3149b5729c2f4f8ffd337c0e57f09096e4ba9784329f40c4a9035da" + "3.1.11": + url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.11.tar.gz" + sha256: "9057849585e49b8b85abe7cc1e76e22963b01bfdc3b6d83eac90c499cd760063" + "3.1.10": + url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.10.tar.gz" + sha256: "f2943e86bfb694e216c60b9a169e5356f8a90f18fbd34d7b6e3450be14f60b10" + "3.1.9": + url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.9.tar.gz" + sha256: "f1d8aacd46afed958babfced3190d2d3c8209b66da451f556abd6da94c165cf3" + "3.1.8": + url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.8.tar.gz" + sha256: "a23a4e2160ca8ff68607a4e129e484edd1d0d13f707394d32af7aed659020803" patches: + "3.1.10": + - patch_file: "patches/3.1.10-gcc5-backport.patch" + patch_description: "Add std:: prefix for isfinite (Backport from main, two commits on the file fix the issue)" + patch_type: "official" + patch_source: "https://github.com/AcademySoftwareFoundation/Imath/blob/main/src/Imath/ImathFun.cpp" diff --git a/packages/conan/recipes/imath/conanfile.py b/packages/conan/recipes/imath/conanfile.py index 281e0db6..ab6a91e9 100644 --- a/packages/conan/recipes/imath/conanfile.py +++ b/packages/conan/recipes/imath/conanfile.py @@ -1,99 +1,107 @@ # Copyright (c) Contributors to the conan-center-index Project. All rights reserved. # Copyright (c) Contributors to the aswf-docker Project. All rights reserved. # SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/cceee569179c10fa56d1fd9c3582f3371944ba59/recipes/imath/all/conanfile.py from conan import ConanFile -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import ( - apply_conandata_patches, - collect_libs, - copy, - export_conandata_patches, - get, - rmdir, -) +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rmdir from conan.tools.microsoft import is_msvc -from conan.tools.scm import Version -from conans import tools, RunEnvironment import os -required_conan_version = ">=1.38.0" +required_conan_version = ">=1.53.0" class ImathConan(ConanFile): name = "imath" - description = "Imath is a C++ and python library of 2D and 3D vector, matrix, and math operations for computer graphics." - topics = "conan", "imath", "python", "vfx" - homepage = "https://github.com/AcademySoftwareFoundation/Imath" - license = "BSD-3-Clause" - url = "https://github.com/AcademySoftwareFoundation/aswf-docker" - settings = ( - "os", - "arch", - "compiler", - "build_type", - "python", + description = ( + "Imath is a C++ and python library of 2D and 3D vector, matrix, and " + "math operations for computer graphics." ) + license = "BSD-3-Clause" + topics = ("computer-graphics", "matrix", "openexr", "3d-vector") + homepage = "https://github.com/AcademySoftwareFoundation/Imath" + url = "https://github.com/conan-io/conan-center-index" + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } def export_sources(self): export_conandata_patches(self) + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + def layout(self): cmake_layout(self, src_folder="src") - # We want DSOs in lib64 + # ASWF: DSOs in lib64 self.cpp.package.libdirs = ["lib64"] - def requirements(self): - self.requires( - f"python/{os.environ['ASWF_PYTHON_VERSION']}@{self.user}/{self.channel}" - ) - self.requires( - f"boost/{os.environ['ASWF_BOOST_VERSION']}@{self.user}/{self.channel}" - ) - - def build_requirements(self): - self.build_requires( - f"cmake/{os.environ['ASWF_CMAKE_VERSION']}@{self.user}/{self.channel}" - ) + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + def requirements(self): + # ASWF: explicit requirements + self.requires(f"cpython/{os.environ['ASWF_CPYTHON_VERSION']}@{self.user}/{self.channel}") + self.requires(f"boost/{os.environ['ASWF_BOOST_VERSION']}@{self.user}/{self.channel}") + self.requires(f"pybind11/{os.environ['ASWF_PYBIND11_VERSION']}@{self.user}/{self.channel}") + def generate(self): tc = CMakeToolchain(self) - # Build Python bindings + if is_msvc(self) and self.settings.compiler.get_safe("cppstd"): + # when msvc is working with a C++ standard level higher + # than the default, we need the __cplusplus macro to be correct + tc.variables["CMAKE_CXX_FLAGS"] = "/Zc:__cplusplus" + # ASWF: Build Python and Pybind11 bindings tc.variables["PYTHON"] = "ON" - # FIXME: Python_ROOT and Boost_ROOT required to find Conan-installed packages? - tc.cache_variables["Python_ROOT"] = self.deps_cpp_info["python"].rootpath - tc.cache_variables["Boost_ROOT"] = self.deps_cpp_info["boost"].rootpath + tc.variables["PYBIND11"] = "ON" + # ASWF: FIXME: Python_ROOT and Boost_ROOT required to find Conan-installed packages? + # tc.cache_variables["Python_ROOT"] = self.deps_cpp_info["python"].rootpath + # tc.cache_variables["Boost_ROOT"] = self.deps_cpp_info["boost"].rootpath tc.generate() - deps = CMakeDeps(self) - deps.generate() - - def _patch_sources(self): + def build(self): apply_conandata_patches(self) - def build(self): - env_build = RunEnvironment(self) - with tools.environment_append(env_build.vars): - self._patch_sources() - cmake = CMake(self) - cmake.configure() - cmake.build() + cmake = CMake(self) + cmake.configure() + cmake.build() def package(self): - copy( - self, - "LICENSE.md", - src=self.source_folder, - dst=os.path.join(self.package_folder, "licenses", self.name), - ) + # ASWF: separate licenses per package + copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) cmake = CMake(self) cmake.install() + # ASWF: cmake modules in lib64, leave them for non-Conan builds + # rmdir(self, os.path.join(self.package_folder, "cmake")) rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) def package_info(self): + # ASWF: Imath will use pybind11 soon, requires boost + self.cpp_info.requires.append("cpython::cpython") + self.cpp_info.requires.append("boost::boost") + self.cpp_info.requires.append("pybind11::pybind11") + self.cpp_info.set_property("cmake_file_name", "Imath") self.cpp_info.set_property("cmake_target_name", "Imath::Imath") self.cpp_info.set_property("pkg_config_name", "Imath") @@ -121,16 +129,3 @@ def package_info(self): imath_lib.names["cmake_find_package"] = "Imath" imath_lib.names["cmake_find_package_multi"] = "Imath" imath_lib.names["pkg_config"] = "Imath" - - self.cpp_info.requires.append("python::PythonLibs") - self.cpp_info.requires.append("boost::python") - pymajorminor = self.deps_user_info["python"].python_interp - self.env_info.PYTHONPATH.append( - os.path.join(self.package_folder, "lib64", pymajorminor, "site-packages") - ) - self.env_info.CMAKE_PREFIX_PATH.append( - os.path.join(self.package_folder, "lib64", "cmake") - ) - - def deploy(self): - self.copy("*", symlinks=True) diff --git a/packages/conan/recipes/imath/patches/3.1.10-gcc5-backport.patch b/packages/conan/recipes/imath/patches/3.1.10-gcc5-backport.patch new file mode 100644 index 00000000..8d27e546 --- /dev/null +++ b/packages/conan/recipes/imath/patches/3.1.10-gcc5-backport.patch @@ -0,0 +1,34 @@ +diff --git src/Imath/ImathFun.cpp src/Imath/ImathFun.cpp +index bfec292..c8c2e7e 100644 +--- src/Imath/ImathFun.cpp ++++ src/Imath/ImathFun.cpp +@@ -10,25 +10,25 @@ IMATH_INTERNAL_NAMESPACE_SOURCE_ENTER + + float succf(float f) IMATH_NOEXCEPT + { +- return isfinite(f) ? ++ return std::isfinite(f) ? + std::nextafter(f, std::numeric_limits::infinity()) : f; + } + + float predf(float f) IMATH_NOEXCEPT + { +- return isfinite(f) ? ++ return std::isfinite(f) ? + std::nextafter(f, -std::numeric_limits::infinity()) : f; + } + + double succd(double d) IMATH_NOEXCEPT + { +- return isfinite(d) ? ++ return std::isfinite(d) ? + std::nextafter(d, std::numeric_limits::infinity()) : d; + } + + double predd(double d) IMATH_NOEXCEPT + { +- return isfinite(d) ? ++ return std::isfinite(d) ? + std::nextafter(d, -std::numeric_limits::infinity()) : d; + } + diff --git a/packages/conan/recipes/imath/patches/dummy.diff b/packages/conan/recipes/imath/patches/dummy.diff deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/conan/recipes/imath/test_package/CMakeLists.txt b/packages/conan/recipes/imath/test_package/CMakeLists.txt index 7395a949..ce22f110 100644 --- a/packages/conan/recipes/imath/test_package/CMakeLists.txt +++ b/packages/conan/recipes/imath/test_package/CMakeLists.txt @@ -1,3 +1,9 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/cceee569179c10fa56d1fd9c3582f3371944ba59/recipes/imath/all/test_package/CMakeLists.txt + cmake_minimum_required(VERSION 3.12) project(test_package LANGUAGES CXX) diff --git a/packages/conan/recipes/imath/test_package/conanfile.py b/packages/conan/recipes/imath/test_package/conanfile.py index 7fce5bb1..456eec38 100644 --- a/packages/conan/recipes/imath/test_package/conanfile.py +++ b/packages/conan/recipes/imath/test_package/conanfile.py @@ -1,16 +1,17 @@ # Copyright (c) Contributors to the conan-center-index Project. All rights reserved. # Copyright (c) Contributors to the aswf-docker Project. All rights reserved. # SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/cceee569179c10fa56d1fd9c3582f3371944ba59/recipes/imath/all/test_package/conanfile.py from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conans import tools, RunEnvironment +from conan.tools.cmake import CMake, cmake_layout import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch", "python" + settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" test_type = "explicit" @@ -22,9 +23,8 @@ def requirements(self): def build(self): cmake = CMake(self) - with tools.environment_append(tools.RunEnvironment(self).vars): - cmake.configure() - cmake.build() + cmake.configure() + cmake.build() def test(self): if can_run(self): diff --git a/packages/conan/recipes/imath/test_package/test_package.cpp b/packages/conan/recipes/imath/test_package/test_package.cpp index b6b87d94..ad0c4386 100644 --- a/packages/conan/recipes/imath/test_package/test_package.cpp +++ b/packages/conan/recipes/imath/test_package/test_package.cpp @@ -1,9 +1,16 @@ -#include +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/cceee569179c10fa56d1fd9c3582f3371944ba59/recipes/imath/all/test_package/test_package.cpp +*/ + +#include #include int main(int argc, char *argv[]) { - IMATH_NAMESPACE::Vec2 v = IMATH_NAMESPACE::Vec2(1, 2); - std::cout << "ok\n" << std::endl; - return 0; + std::cout << half(1.0) << "\n"; + return 0; } diff --git a/packages/conan/recipes/lcms/conandata.yml b/packages/conan/recipes/lcms/conandata.yml new file mode 100644 index 00000000..a8b2d56c --- /dev/null +++ b/packages/conan/recipes/lcms/conandata.yml @@ -0,0 +1,25 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/lcms/all/conandata.yml + +sources: + "2.16": + url: "https://github.com/mm2/Little-CMS/releases/download/lcms2.16/lcms2-2.16.tar.gz" + sha256: "d873d34ad8b9b4cea010631f1a6228d2087475e4dc5e763eb81acc23d9d45a51" + "2.14": + url: "https://github.com/mm2/Little-CMS/releases/download/lcms2.14/lcms2-2.14.tar.gz" + sha256: "28474ea6f6591c4d4cee972123587001a4e6e353412a41b3e9e82219818d5740" + "2.13.1": + url: "https://github.com/mm2/Little-CMS/releases/download/lcms2.13.1/lcms2-2.13.1.tar.gz" + sha256: "d473e796e7b27c5af01bd6d1552d42b45b43457e7182ce9903f38bb748203b88" +patches: + "2.14": + - patch_file: "patches/2.13.1-0001-fix-msvc-import-lib.patch" + patch_description: "Fix msvc import lib" + patch_type: "portability" + "2.13.1": + - patch_file: "patches/2.13.1-0001-fix-msvc-import-lib.patch" + patch_description: "Fix msvc import lib" + patch_type: "portability" diff --git a/packages/conan/recipes/lcms/conanfile.py b/packages/conan/recipes/lcms/conanfile.py new file mode 100644 index 00000000..aa053d04 --- /dev/null +++ b/packages/conan/recipes/lcms/conanfile.py @@ -0,0 +1,115 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/lcms/all/conanfile.py + +from conan import ConanFile +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson, MesonToolchain +from conan.tools.microsoft import check_min_vs +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.57.0" + + +class LcmsConan(ConanFile): + name = "lcms" + url = "https://github.com/conan-io/conan-center-index" + description = "A free, open source, CMM engine." + license = "MIT" + homepage = "https://github.com/mm2/Little-CMS" + topics = ("littlecms", "little-cms", "cmm", "icc", "cmm-engine", "color-management-engine") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + basic_layout(self, src_folder="src") + # ASWF: DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def build_requirements(self): + self.tool_requires("meson/1.2.1") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = MesonToolchain(self) + tc.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + if check_min_vs(self, "190", raise_invalid=False): + # since VS2015 vsnprintf is built-in + path = os.path.join(self.source_folder, "src", "lcms2_internal.h") + replace_in_file(self, path, "# define vsnprintf _vsnprintf", "") + + def build(self): + self._patch_sources() + meson = Meson(self) + meson.configure() + meson.build() + + def package(self): + # ASWF: license files in package subdirectories + license_file = "LICENSE" if Version(self.version) >= "2.16" else "COPYING" + copy(self, license_file, src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + meson = Meson(self) + meson.install() + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + # ASWF: package info in lib64 + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + fix_apple_shared_install_name(self) + fix_msvc_libname(self) + + def package_info(self): + self.cpp_info.set_property("pkg_config_name", "lcms2") + self.cpp_info.libs = ["lcms2"] + if self.settings.os == "Windows" and self.options.shared: + self.cpp_info.defines.append("CMS_DLL") + if self.settings.os in ("FreeBSD", "Linux"): + self.cpp_info.system_libs.extend(["m", "pthread"]) + +def fix_msvc_libname(conanfile, remove_lib_prefix=True): + """remove lib prefix & change extension to .lib in case of cl like compiler""" + if not conanfile.settings.get_safe("compiler.runtime"): + return + from conan.tools.files import rename + import glob + libdirs = getattr(conanfile.cpp.package, "libdirs") + for libdir in libdirs: + for ext in [".dll.a", ".dll.lib", ".a"]: + full_folder = os.path.join(conanfile.package_folder, libdir) + for filepath in glob.glob(os.path.join(full_folder, f"*{ext}")): + libname = os.path.basename(filepath)[0:-len(ext)] + if remove_lib_prefix and libname[0:3] == "lib": + libname = libname[3:] + rename(conanfile, filepath, os.path.join(os.path.dirname(filepath), f"{libname}.lib")) diff --git a/packages/conan/recipes/lcms/patches/CMakeLists.txt b/packages/conan/recipes/lcms/patches/CMakeLists.txt new file mode 100644 index 00000000..73441009 --- /dev/null +++ b/packages/conan/recipes/lcms/patches/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/lcms/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(lcms REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE lcms::lcms) diff --git a/packages/conan/recipes/lcms/patches/conanfile.py b/packages/conan/recipes/lcms/patches/conanfile.py new file mode 100644 index 00000000..594450fa --- /dev/null +++ b/packages/conan/recipes/lcms/patches/conanfile.py @@ -0,0 +1,33 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/lcms/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") + diff --git a/packages/conan/recipes/lcms/patches/test_package.c b/packages/conan/recipes/lcms/patches/test_package.c new file mode 100644 index 00000000..21a20a5d --- /dev/null +++ b/packages/conan/recipes/lcms/patches/test_package.c @@ -0,0 +1,16 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/lcms/all/test_package/test_package.c +*/ + +#include "lcms2.h" + +int main() +{ + cmsUInt16Number linear[2] = { 0, 0xffff }; + cmsToneCurve * curve = cmsBuildTabulatedToneCurve16(0, 2, linear); + cmsFreeToneCurve(curve); +} diff --git a/packages/conan/recipes/libalsa/conanfile.py b/packages/conan/recipes/libalsa/conanfile.py new file mode 100644 index 00000000..c8c2cf21 --- /dev/null +++ b/packages/conan/recipes/libalsa/conanfile.py @@ -0,0 +1,21 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/libalsa/all/conanfile.py + +from conan import ConanFile + +class SystemLibalsaConan(ConanFile): + name = "libalsa" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["asound"] + + self.cpp_info.set_property("cmake_file_name", "ALSA") + self.cpp_info.set_property("cmake_target_name", "ALSA:ALSA") diff --git a/packages/conan/recipes/libaom-av1/conanfile.py b/packages/conan/recipes/libaom-av1/conanfile.py new file mode 100644 index 00000000..7cd83564 --- /dev/null +++ b/packages/conan/recipes/libaom-av1/conanfile.py @@ -0,0 +1,18 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/libaom-av1/all/conanfile.py + +from conan import ConanFile + +class SystemLibaomAv1Conan(ConanFile): + name = "libaom-av1" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["aom"] diff --git a/packages/conan/recipes/libbacktrace/conandata.yml b/packages/conan/recipes/libbacktrace/conandata.yml new file mode 100644 index 00000000..8810fde4 --- /dev/null +++ b/packages/conan/recipes/libbacktrace/conandata.yml @@ -0,0 +1,28 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/7abb9ee39e6009e3dbc45043307a1098246d4ad7/recipes/libbacktrace/all/conandata.yml + +sources: + "cci.20240730": + url: "https://github.com/ianlancetaylor/libbacktrace/archive/0dd27b95f9f2c11b4a89db5f185a888af912838e.tar.gz" + sha256: "dfbc52012846c57759eaaa5131c329c43f77695c808b3e1847ec2dacce238c35" + "cci.20210118": + url: "https://github.com/ianlancetaylor/libbacktrace/archive/dedbe13fda00253fe5d4f2fb812c909729ed5937.tar.gz" + sha256: "dc8c167f48f3de5ae318c528b26b72f300edb6e33744e55394674fd4b7cdd21d" +patches: + "cci.20240730": + - patch_file: "patches/cci.20240719-0001-pointer-arithmetic.patch" + patch_description: "casting pointer types for pointer arithmetics" + patch_type: "portability" + - patch_file: "patches/0002-msvc-unistd-alternative.patch" + patch_description: "support msvc for codes using unistd.h" + patch_type: "portability" + "cci.20210118": + - patch_file: "patches/0001-pointer-arithmetic.patch" + patch_description: "casting pointer types for pointer arithmetics" + patch_type: "portability" + - patch_file: "patches/0002-msvc-unistd-alternative.patch" + patch_description: "support msvc for codes using unistd.h" + patch_type: "portability" diff --git a/packages/conan/recipes/libbacktrace/conanfile.py b/packages/conan/recipes/libbacktrace/conanfile.py new file mode 100644 index 00000000..90d22f00 --- /dev/null +++ b/packages/conan/recipes/libbacktrace/conanfile.py @@ -0,0 +1,118 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/7abb9ee39e6009e3dbc45043307a1098246d4ad7/recipes/libbacktrace/all/conanfile.py + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rename, rm +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import check_min_vs, is_msvc, unix_path +import os + +required_conan_version = ">=1.54.0" + + +class LibbacktraceConan(ConanFile): + name = "libbacktrace" + description = "A C library that may be linked into a C/C++ program to produce symbolic backtraces." + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ianlancetaylor/libbacktrace" + topics = ("backtrace", "stack-trace") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") + # ASWF: DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def validate(self): + check_min_vs(self, "180") + if is_msvc(self) and self.options.shared: + raise ConanInvalidConfiguration(f"{self.ref} shared is not supported with Visual Studio") + + def build_requirements(self): + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + if is_msvc(self): + self.tool_requires("automake/1.16.5") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + + tc = AutotoolsToolchain(self) + if is_msvc(self): + # https://github.com/conan-io/conan/issues/6514 + tc.extra_cflags.append("-FS") + env = tc.environment() + if is_msvc(self): + compile_wrapper = unix_path(self, self.conf.get("user.automake:compile-wrapper")) + ar_wrapper = unix_path(self, self.conf.get("user.automake:lib-wrapper")) + env.define("CC", f"{compile_wrapper} cl -nologo") + env.define("CXX", f"{compile_wrapper} cl -nologo") + env.define("LD", "link -nologo") + env.define("AR", f"{ar_wrapper} \"lib -nologo\"") + env.define("NM", "dumpbin -symbols") + env.define("OBJDUMP", ":") + env.define("RANLIB", ":") + env.define("STRIP", ":") + tc.generate(env) + + def build(self): + apply_conandata_patches(self) + autotools = Autotools(self) + autotools.configure() + autotools.make() + + def package(self): + # ASWF: license files in package subdirs + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses",self.name)) + autotools = Autotools(self) + autotools.install() + # ASWF: libraries and modules in lib64 + lib_folder = os.path.join(self.package_folder, "lib64") + rm(self, "*.la", lib_folder) + fix_apple_shared_install_name(self) + if is_msvc(self): + rename(self, os.path.join(lib_folder, "libbacktrace.lib"), + os.path.join(lib_folder, "backtrace.lib")) + + def package_info(self): + self.cpp_info.libs = ["backtrace"] diff --git a/packages/conan/recipes/libbacktrace/patches/0001-pointer-arithmetic.patch b/packages/conan/recipes/libbacktrace/patches/0001-pointer-arithmetic.patch new file mode 100644 index 00000000..062c4cdb --- /dev/null +++ b/packages/conan/recipes/libbacktrace/patches/0001-pointer-arithmetic.patch @@ -0,0 +1,29 @@ +--- a/pecoff.c ++++ b/pecoff.c +@@ -648,7 +648,7 @@ coff_add (struct backtrace_state *state, int descriptor, + magic_ok = memcmp (magic, "PE\0", 4) == 0; + fhdr_off += 4; + +- memcpy (&fhdr, fhdr_view.data + 4, sizeof fhdr); ++ memcpy (&fhdr, (char *)fhdr_view.data + 4, sizeof fhdr); + } + else + { +@@ -682,7 +682,7 @@ coff_add (struct backtrace_state *state, int descriptor, + sects_view_valid = 1; + opt_hdr = (const b_coff_optional_header *) sects_view.data; + sects = (const b_coff_section_header *) +- (sects_view.data + fhdr.size_of_optional_header); ++ ((b_coff_optional_header *)sects_view.data + fhdr.size_of_optional_header); + + is_64 = 0; + if (fhdr.size_of_optional_header > sizeof (*opt_hdr)) +@@ -726,7 +726,7 @@ coff_add (struct backtrace_state *state, int descriptor, + goto fail; + syms_view_valid = 1; + +- str_size = coff_read4 (syms_view.data + syms_size); ++ str_size = coff_read4 ((const unsigned char *)((char *)syms_view.data + syms_size)); + + str_off = syms_off + syms_size; + diff --git a/packages/conan/recipes/libbacktrace/patches/0002-msvc-unistd-alternative.patch b/packages/conan/recipes/libbacktrace/patches/0002-msvc-unistd-alternative.patch new file mode 100644 index 00000000..988e538f --- /dev/null +++ b/packages/conan/recipes/libbacktrace/patches/0002-msvc-unistd-alternative.patch @@ -0,0 +1,54 @@ +--- a/allocfail.c ++++ b/allocfail.c +@@ -33,7 +33,6 @@ POSSIBILITY OF SUCH DAMAGE. */ + #include + #include + #include +-#include + + #include "filenames.h" + +--- a/fileline.c ++++ b/fileline.c +@@ -37,7 +37,11 @@ POSSIBILITY OF SUCH DAMAGE. */ + #include + #include + #include ++#ifdef _MSC_VER ++#include ++#else + #include ++#endif + + #if defined (HAVE_KERN_PROC_ARGS) || defined (HAVE_KERN_PROC) + #include +--- a/posix.c ++++ b/posix.c +@@ -36,7 +36,11 @@ POSSIBILITY OF SUCH DAMAGE. */ + #include + #include + #include ++#ifdef _MSC_VER ++#include ++#else + #include ++#endif + + #include "backtrace.h" + #include "internal.h" +--- a/read.c ++++ b/read.c +@@ -35,7 +35,13 @@ POSSIBILITY OF SUCH DAMAGE. */ + #include + #include + #include ++#ifdef _MSC_VER ++#include ++#include ++typedef SSIZE_T ssize_t; ++#else + #include ++#endif + + #include "backtrace.h" + #include "internal.h" diff --git a/packages/conan/recipes/libbacktrace/patches/cci.20240719-0001-pointer-arithmetic.patch b/packages/conan/recipes/libbacktrace/patches/cci.20240719-0001-pointer-arithmetic.patch new file mode 100644 index 00000000..dbf4fb34 --- /dev/null +++ b/packages/conan/recipes/libbacktrace/patches/cci.20240719-0001-pointer-arithmetic.patch @@ -0,0 +1,31 @@ +diff --git a/pecoff.c b/pecoff.c +index 636e1b1..975e417 100644 +--- a/pecoff.c ++++ b/pecoff.c +@@ -704,7 +704,7 @@ coff_add (struct backtrace_state *state, int descriptor, + magic_ok = memcmp (magic, "PE\0", 4) == 0; + fhdr_off += 4; + +- memcpy (&fhdr, fhdr_view.data + 4, sizeof fhdr); ++ memcpy (&fhdr, (char*)fhdr_view.data + 4, sizeof fhdr); + } + else + { +@@ -738,7 +738,7 @@ coff_add (struct backtrace_state *state, int descriptor, + sects_view_valid = 1; + opt_hdr = (const b_coff_optional_header *) sects_view.data; + sects = (const b_coff_section_header *) +- (sects_view.data + fhdr.size_of_optional_header); ++ ((b_coff_optional_header *)sects_view.data + fhdr.size_of_optional_header); + + is_64 = 0; + memset (&image_base, 0, sizeof image_base); +@@ -781,7 +781,7 @@ coff_add (struct backtrace_state *state, int descriptor, + goto fail; + syms_view_valid = 1; + +- str_size = coff_read4 (syms_view.data + syms_size); ++ str_size = coff_read4 ((const unsigned char *)((char *)syms_view.data + syms_size)); + + str_off = syms_off + syms_size; + diff --git a/packages/conan/recipes/libbacktrace/test_package/CMakeLists.txt b/packages/conan/recipes/libbacktrace/test_package/CMakeLists.txt new file mode 100644 index 00000000..8d443100 --- /dev/null +++ b/packages/conan/recipes/libbacktrace/test_package/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/7abb9ee39e6009e3dbc45043307a1098246d4ad7/recipes/libbacktrace/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(libbacktrace REQUIRED CONFIG) + +add_executable(test_package test_package.c) +target_link_libraries(test_package PRIVATE libbacktrace::libbacktrace) diff --git a/packages/conan/recipes/libbacktrace/test_package/conanfile.py b/packages/conan/recipes/libbacktrace/test_package/conanfile.py new file mode 100644 index 00000000..f2a93a52 --- /dev/null +++ b/packages/conan/recipes/libbacktrace/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/7abb9ee39e6009e3dbc45043307a1098246d4ad7/recipes/libbacktrace/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/libbacktrace/test_package/test_package.c b/packages/conan/recipes/libbacktrace/test_package/test_package.c new file mode 100644 index 00000000..35a301e0 --- /dev/null +++ b/packages/conan/recipes/libbacktrace/test_package/test_package.c @@ -0,0 +1,44 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/7abb9ee39e6009e3dbc45043307a1098246d4ad7/recipes/libbacktrace/all/test_package/test_package.c +*/ + +#include +#include + +#include +#include +#include + +void +error_callback(void* data, const char* msg, int errnum) +{ + fprintf(stderr, "%s", msg); + if (errnum > 0) + fprintf(stderr, ": %s", strerror(errnum)); + fprintf(stderr, "\n"); + exit(0); +} + +int +simple_callback(void* data, uintptr_t pc) +{ + printf(" 0x%016llx\n", pc); + return 1; +} + +int +main(int argc, char** argv) +{ + void* state; + + state = backtrace_create_state(argv[0], BACKTRACE_SUPPORTS_THREADS, error_callback, NULL); + printf("Top stack frame:\n"); + backtrace_simple(state, 0, simple_callback, error_callback, NULL); + printf("Done\n"); + + return 0; +} diff --git a/packages/conan/recipes/libdeflate/conandata.yml b/packages/conan/recipes/libdeflate/conandata.yml new file mode 100644 index 00000000..a06fa2f7 --- /dev/null +++ b/packages/conan/recipes/libdeflate/conandata.yml @@ -0,0 +1,31 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/187fd740e479c64303915954b5d43f56a490ce68/recipes/libdeflate/all/conandata.yml + +sources: + "1.23": + url: "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.23.tar.gz" + sha256: "1ab18349b9fb0ce8a0ca4116bded725be7dcbfa709e19f6f983d99df1fb8b25f" + "1.22": + url: "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.22.tar.gz" + sha256: "7f343c7bf2ba46e774d8a632bf073235e1fd27723ef0a12a90f8947b7fe851d6" + "1.21": + url: "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.21.tar.gz" + sha256: "50827d312c0413fbd41b0628590cd54d9ad7ebf88360cba7c0e70027942dbd01" + "1.20": + url: "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.20.tar.gz" + sha256: "ed1454166ced78913ff3809870a4005b7170a6fd30767dc478a09b96847b9c2a" + "1.19": + url: "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.19.tar.gz" + sha256: "27bf62d71cd64728ff43a9feb92f2ac2f2bf748986d856133cc1e51992428c25" + "1.18": + url: "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.18.tar.gz" + sha256: "225d982bcaf553221c76726358d2ea139bb34913180b20823c782cede060affd" + "1.17": + url: "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.17.tar.gz" + sha256: "fa4615af671513fa2a53dc2e7a89ff502792e2bdfc046869ef35160fcc373763" + "1.15": + url: "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.15.tar.gz" + sha256: "58b95040df7383dc0413defb700d9893c194732474283cc4c8f144b00a68154b" diff --git a/packages/conan/recipes/libdeflate/conanfile.py b/packages/conan/recipes/libdeflate/conanfile.py new file mode 100644 index 00000000..b13ede84 --- /dev/null +++ b/packages/conan/recipes/libdeflate/conanfile.py @@ -0,0 +1,88 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/187fd740e479c64303915954b5d43f56a490ce68/recipes/libdeflate/all/conanfile.py + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import collect_libs, copy, get, rmdir +import os + +required_conan_version = ">=1.53.0" + + +class LibdeflateConan(ConanFile): + name = "libdeflate" + description = "Heavily optimized library for DEFLATE/zlib/gzip compression and decompression." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ebiggers/libdeflate" + topics = ("compression", "decompression", "deflate", "zlib", "gzip") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: we want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["LIBDEFLATE_BUILD_STATIC_LIB"] = not self.options.shared + tc.variables["LIBDEFLATE_BUILD_SHARED_LIB"] = self.options.shared + tc.variables["LIBDEFLATE_BUILD_GZIP"] = False + tc.variables["LIBDEFLATE_BUILD_TESTS"] = False + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + # ASWF: licenses in project dir + copy(self, "COPYING", self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + cmake = CMake(self) + cmake.install() + # ASWF: keep cmake files in lib64 + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "libdeflate") + target_suffix = "_shared" if self.options.shared else "_static" + self.cpp_info.set_property("cmake_target_name", f"libdeflate::libdeflate{target_suffix}") + self.cpp_info.set_property("cmake_target_aliases", ["libdeflate::libdeflate"]) # not official, avoid to break users + self.cpp_info.set_property("pkg_config_name", "libdeflate") + # TODO: back to global scope in conan v2 + self.cpp_info.components["_libdeflate"].libs = collect_libs(self) + if self.settings.os == "Windows" and self.options.shared: + self.cpp_info.components["_libdeflate"].defines.append("LIBDEFLATE_DLL") + + # TODO: to remove in conan v2 + self.cpp_info.components["_libdeflate"].names["cmake_find_package"] = f"libdeflate{target_suffix}" + self.cpp_info.components["_libdeflate"].names["cmake_find_package_multi"] = f"libdeflate{target_suffix}" + self.cpp_info.components["_libdeflate"].set_property("cmake_target_name", f"libdeflate::libdeflate{target_suffix}") + self.cpp_info.components["_libdeflate"].set_property("pkg_config_name", "libdeflate") diff --git a/packages/conan/recipes/libdeflate/test_packagec/CMakeLists.txt b/packages/conan/recipes/libdeflate/test_packagec/CMakeLists.txt new file mode 100644 index 00000000..1e8f0d00 --- /dev/null +++ b/packages/conan/recipes/libdeflate/test_packagec/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/187fd740e479c64303915954b5d43f56a490ce68/recipes/libdeflate/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(libdeflate REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +if(TARGET libdeflate::libdeflate_static) + target_link_libraries(${PROJECT_NAME} PRIVATE libdeflate::libdeflate_static) +else() + target_link_libraries(${PROJECT_NAME} PRIVATE libdeflate::libdeflate_shared) +endif() diff --git a/packages/conan/recipes/libdeflate/test_packagec/conanfile.py b/packages/conan/recipes/libdeflate/test_packagec/conanfile.py new file mode 100644 index 00000000..85566a90 --- /dev/null +++ b/packages/conan/recipes/libdeflate/test_packagec/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/187fd740e479c64303915954b5d43f56a490ce68/recipes/libdeflate/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/libdeflate/test_packagec/test_package.c b/packages/conan/recipes/libdeflate/test_packagec/test_package.c new file mode 100644 index 00000000..727e5170 --- /dev/null +++ b/packages/conan/recipes/libdeflate/test_packagec/test_package.c @@ -0,0 +1,16 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/187fd740e479c64303915954b5d43f56a490ce68/recipes/libdeflate/all/test_package/test_package.c +*/ + +#include + +int main () { + struct libdeflate_compressor *c; + c = libdeflate_alloc_compressor(12); + libdeflate_free_compressor(c); + return 0; +} diff --git a/packages/conan/recipes/libdrm/conanfile.py b/packages/conan/recipes/libdrm/conanfile.py new file mode 100644 index 00000000..ef220e6e --- /dev/null +++ b/packages/conan/recipes/libdrm/conanfile.py @@ -0,0 +1,46 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/libdrm/all/conanfile.py + +from conan import ConanFile + +class SystemLibdrmConan(ConanFile): + name = "libdrm" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["drm", "drm_amdgpu", "drm_nouveau", "drm_intel", "drm_radeon"] + self.cpp_info.includedirs = ["/usr/include/libdrm", "/usr/include/libdrm/nouveau"] + + self.cpp_info.set_property("cmake_file_name", "Libdrm") + self.cpp_info.set_property("cmake_target_name", "Libdrm::Libdrm") + + # self.cpp_info.components["libdrm_libdrm"].libs = ["drm"] + # self.cpp_info.components["libdrm_libdrm"].includedirs.append("/usr/include/libdrm") + # self.cpp_info.components["libdrm_libdrm"].set_property("pkg_config_name", "libdrm") + + # self.cpp_info.components["libdrm_amdgpu"].libs = ["drm_amdgpu"] + # self.cpp_info.components["libdrm_amdgpu"].includedirs.append("/usr/include/libdrm") + # self.cpp_info.components["libdrm_amdgpu"].requires = ["libdrm_libdrm"] + # self.cpp_info.components["libdrm_amdgpu"].set_property("pkg_config_name", "libdrm_amdgpu") + + # self.cpp_info.components["libdrm_nouveau"].libs = ["drm_nouveau"] + # self.cpp_info.components["libdrm_nouveau"].includedirs.extend(["/usr/include/libdrm", "/usr/include/libdrm/nouveau"]) + # self.cpp_info.components["libdrm_nouveau"].requires = ["libdrm_libdrm"] + # self.cpp_info.components["libdrm_nouveau"].system_libs = ["pthread"] + # self.cpp_info.components["libdrm_nouveau"].set_property("pkg_config_name", "libdrm_nouveau") + + # self.cpp_info.components["libdrm_intel"].libs = ["drm_intel"] + # self.cpp_info.components["libdrm_intel"].includedirs.append("/usr/include/libdrm") + # self.cpp_info.components["libdrm_intel"].requires = ["libdrm_libdrm"] + # self.cpp_info.components["libdrm_intel"].set_property("pkg_config_name", "libdrm_intel") + + # self.cpp_info.components["libdrm_radeon"].libs = ["drm_radeon"] + # self.cpp_info.components["libdrm_radeon"].includedirs.append("/usr/include/libdrm") + # self.cpp_info.components["libdrm_radeon"].requires = ["libdrm_libdrm"] + # self.cpp_info.components["libdrm_radeon"].set_property("pkg_config_name", "libdrm_radeon") diff --git a/packages/conan/recipes/libffi/conanfile.py b/packages/conan/recipes/libffi/conanfile.py new file mode 100644 index 00000000..dd6a6473 --- /dev/null +++ b/packages/conan/recipes/libffi/conanfile.py @@ -0,0 +1,18 @@ +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT + +from conan import ConanFile + +class SystemLibffiConan(ConanFile): + name = "libffi" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["ffi"] + + self.cpp_info.set_property("cmake_file_name", "libffi") + self.cpp_info.set_property("cmake_target_name", "libffi::libffi") diff --git a/packages/conan/recipes/libiconv/conandata.yml b/packages/conan/recipes/libiconv/conandata.yml new file mode 100644 index 00000000..af819b0e --- /dev/null +++ b/packages/conan/recipes/libiconv/conandata.yml @@ -0,0 +1,19 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/libiconv/all/conandata.yml + +sources: + "1.17": + url: "https://ftp.gnu.org/gnu/libiconv/libiconv-1.17.tar.gz" + sha256: "8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313" + "1.16": + url: "https://ftp.gnu.org/gnu/libiconv/libiconv-1.16.tar.gz" + sha256: "e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04" + "1.15": + url: "https://ftp.gnu.org/gnu/libiconv/libiconv-1.15.tar.gz" + sha256: "ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178" +patches: + "1.16": + - patch_file: "patches/0001-libcharset-fix-linkage.patch" diff --git a/packages/conan/recipes/libiconv/conanfile.py b/packages/conan/recipes/libiconv/conanfile.py new file mode 100644 index 00000000..dc90dcee --- /dev/null +++ b/packages/conan/recipes/libiconv/conanfile.py @@ -0,0 +1,180 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/libiconv/all/conanfile.py + +from conan import ConanFile +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.build import cross_building +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import ( + apply_conandata_patches, + copy, + export_conandata_patches, + get, + rename, + rm, + rmdir, + replace_in_file +) +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, unix_path +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.54.0" + + +class LibiconvConan(ConanFile): + name = "libiconv" + description = "Convert text to and from Unicode" + license = ("LGPL-2.0-or-later", "LGPL-2.1-or-later") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.gnu.org/software/libiconv/" + topics = ("iconv", "text", "encoding", "locale", "unicode", "conversion") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _is_clang_cl(self): + return self.settings.compiler == "clang" and self.settings.os == "Windows" and \ + self.settings.compiler.get_safe("runtime") + + @property + def _msvc_tools(self): + return ("clang-cl", "llvm-lib", "lld-link") if self._is_clang_cl else ("cl", "lib", "link") + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + if Version(self.version) >= "1.17": + self.license = "LGPL-2.1-or-later" + else: + self.license = "LGPL-2.0-or-later" + + def layout(self): + basic_layout(self, src_folder="src") + # ASWF: DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def build_requirements(self): + if self._settings_build.os == "Windows": + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + self.win_bash = True + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + + tc = AutotoolsToolchain(self) + if self.settings.os == "Windows" and self.settings.compiler == "gcc": + if self.settings.arch == "x86": + tc.update_configure_args({ + "--host": "i686-w64-mingw32", + "RC": "windres --target=pe-i386", + "WINDRES": "windres --target=pe-i386", + }) + elif self.settings.arch == "x86_64": + tc.update_configure_args({ + "--host": "x86_64-w64-mingw32", + "RC": "windres --target=pe-x86-64", + "WINDRES": "windres --target=pe-x86-64", + }) + msvc_version = {"Visual Studio": "12", "msvc": "180"} + if is_msvc(self) and Version(self.settings.compiler.version) >= msvc_version[str(self.settings.compiler)]: + # https://github.com/conan-io/conan/issues/6514 + tc.extra_cflags.append("-FS") + if cross_building(self) and is_msvc(self): + triplet_arch_windows = {"x86_64": "x86_64", "x86": "i686", "armv8": "aarch64"} + # ICU doesn't like GNU triplet of conan for msvc (see https://github.com/conan-io/conan/issues/12546) + host_arch = triplet_arch_windows.get(str(self.settings.arch)) + build_arch = triplet_arch_windows.get(str(self._settings_build.arch)) + + if host_arch and build_arch: + host = f"{host_arch}-w64-mingw32" + build = f"{build_arch}-w64-mingw32" + tc.configure_args.extend([ + f"--host={host}", + f"--build={build}", + ]) + env = tc.environment() + if is_msvc(self) or self._is_clang_cl: + cc, lib, link = self._msvc_tools + build_aux_path = os.path.join(self.source_folder, "build-aux") + lt_compile = unix_path(self, os.path.join(build_aux_path, "compile")) + lt_ar = unix_path(self, os.path.join(build_aux_path, "ar-lib")) + env.define("CC", f"{lt_compile} {cc} -nologo") + env.define("CXX", f"{lt_compile} {cc} -nologo") + env.define("LD", link) + env.define("STRIP", ":") + env.define("AR", f"{lt_ar} {lib}") + env.define("RANLIB", ":") + env.define("NM", "dumpbin -symbols") + env.define("win32_target", "_WIN32_WINNT_VISTA") + tc.generate(env) + + def _apply_resource_patch(self): + if self.settings.arch == "x86": + windres_options_path = os.path.join(self.source_folder, "windows", "windres-options") + self.output.info("Applying {} resource patch: {}".format(self.settings.arch, windres_options_path)) + replace_in_file(self, windres_options_path, '# PACKAGE_VERSION_SUBMINOR', '# PACKAGE_VERSION_SUBMINOR\necho "--target=pe-i386"', strict=True) + + def build(self): + apply_conandata_patches(self) + self._apply_resource_patch() + autotools = Autotools(self) + autotools.configure() + autotools.make() + + def package(self): + # ASWF: licenses in package subdirectories + copy(self, "COPYING.LIB", self.source_folder, os.path.join(self.package_folder, "licenses", self.name)) + autotools = Autotools(self) + autotools.install() + # ASWF: libraries in lib64 + rm(self, "*.la", os.path.join(self.package_folder, "lib64")) + rmdir(self, os.path.join(self.package_folder, "share")) + fix_apple_shared_install_name(self) + if (is_msvc(self) or self._is_clang_cl) and self.options.shared: + for import_lib in ["iconv", "charset"]: + rename(self, os.path.join(self.package_folder, "lib", f"{import_lib}.dll.lib"), + os.path.join(self.package_folder, "lib", f"{import_lib}.lib")) + + def package_info(self): + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "Iconv") + self.cpp_info.set_property("cmake_target_name", "Iconv::Iconv") + self.cpp_info.libs = ["iconv", "charset"] + + # TODO: to remove in conan v2 + self.cpp_info.names["cmake_find_package"] = "Iconv" + self.cpp_info.names["cmake_find_package_multi"] = "Iconv" + self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) diff --git a/packages/conan/recipes/libiconv/patches/0001-libcharset-fix-linkage.patch b/packages/conan/recipes/libiconv/patches/0001-libcharset-fix-linkage.patch new file mode 100644 index 00000000..f39e0b72 --- /dev/null +++ b/packages/conan/recipes/libiconv/patches/0001-libcharset-fix-linkage.patch @@ -0,0 +1,155 @@ +diff --git a/libcharset/Makefile.in b/libcharset/Makefile.in +index 5f599fe..e6ba91a 100644 +--- a/libcharset/Makefile.in ++++ b/libcharset/Makefile.in +@@ -30,25 +30,22 @@ mkinstalldirs = $(SHELL) @top_srcdir@/build-aux/mkinstalldirs + + SHELL = @SHELL@ + +-all : include/libcharset.h force ++all : force + cd lib && $(MAKE) all + +-include/libcharset.h : +- if [ ! -d include ] ; then mkdir include ; fi +- $(CP) $(srcdir)/include/libcharset.h.in include/libcharset.h +- + # Installs the library and include files only. Typically called with only + # $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here. + install-lib : all force + cd lib && $(MAKE) install-lib libdir='$(libdir)' includedir='$(includedir)' + $(mkinstalldirs) $(includedir) +- $(INSTALL_DATA) include/libcharset.h $(includedir)/libcharset.h +- $(INSTALL_DATA) include/localcharset.h.inst $(includedir)/localcharset.h ++ $(INSTALL_DATA) include/libcharset.h.inst $(includedir)/libcharset.h ++# Here, use the include file that contains LIBCHARSET_DLL_EXPORTED annotations. ++ $(INSTALL_DATA) include/localcharset.h $(includedir)/localcharset.h + +-install : include/libcharset.h include/localcharset.h force ++install : all force + cd lib && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)' + $(mkinstalldirs) $(DESTDIR)$(includedir) +- $(INSTALL_DATA) include/libcharset.h $(DESTDIR)$(includedir)/libcharset.h ++ $(INSTALL_DATA) include/libcharset.h.inst $(DESTDIR)$(includedir)/libcharset.h + $(INSTALL_DATA) include/localcharset.h.inst $(DESTDIR)$(includedir)/localcharset.h + + install-strip : install +@@ -73,12 +70,12 @@ clean : force + + distclean : force + cd lib && if test -f Makefile; then $(MAKE) distclean; fi +- $(RM) include/libcharset.h include/localcharset.h include/localcharset.h.inst ++ $(RM) include/libcharset.h include/libcharset.h.inst include/localcharset.h include/localcharset.h.inst + $(RM) config.status config.log config.cache Makefile config.h libtool + + maintainer-clean : force + cd lib && if test -f Makefile; then $(MAKE) maintainer-clean; fi +- $(RM) include/libcharset.h include/localcharset.h include/localcharset.h.inst ++ $(RM) include/libcharset.h include/libcharset.h.inst include/localcharset.h include/localcharset.h.inst + $(RM) config.status config.log config.cache Makefile config.h libtool + + # List of source files. +@@ -133,6 +130,7 @@ IMPORTED_FILES = \ + # List of distributed files generated by autotools or Makefile.devel. + GENERATED_FILES = \ + autoconf/aclocal.m4 configure config.h.in \ ++ include/libcharset.h.build.in \ + include/localcharset.h.build.in + # List of distributed files generated by "make". + DISTRIBUTED_BUILT_FILES = +diff --git a/libcharset/configure b/libcharset/configure +index cf4f9d2..8844aca 100755 +--- a/libcharset/configure ++++ b/libcharset/configure +@@ -12346,6 +12346,10 @@ ac_config_files="$ac_config_files Makefile" + + ac_config_files="$ac_config_files lib/Makefile" + ++ac_config_files="$ac_config_files include/libcharset.h:include/libcharset.h.build.in" ++ ++ac_config_files="$ac_config_files include/libcharset.h.inst:include/libcharset.h.in" ++ + ac_config_files="$ac_config_files include/localcharset.h:include/localcharset.h.build.in" + + ac_config_files="$ac_config_files include/localcharset.h.inst:include/localcharset.h.in" +@@ -13346,6 +13350,8 @@ do + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; ++ "include/libcharset.h") CONFIG_FILES="$CONFIG_FILES include/libcharset.h:include/libcharset.h.build.in" ;; ++ "include/libcharset.h.inst") CONFIG_FILES="$CONFIG_FILES include/libcharset.h.inst:include/libcharset.h.in" ;; + "include/localcharset.h") CONFIG_FILES="$CONFIG_FILES include/localcharset.h:include/localcharset.h.build.in" ;; + "include/localcharset.h.inst") CONFIG_FILES="$CONFIG_FILES include/localcharset.h.inst:include/localcharset.h.in" ;; + +diff --git a/libcharset/configure.ac b/libcharset/configure.ac +index 362bde3..a071d25 100644 +--- a/libcharset/configure.ac ++++ b/libcharset/configure.ac +@@ -60,6 +60,8 @@ AC_CHECK_FUNCS([setlocale]) + + AC_CONFIG_FILES([Makefile]) + AC_CONFIG_FILES([lib/Makefile]) ++AC_CONFIG_FILES([include/libcharset.h:include/libcharset.h.build.in]) ++AC_CONFIG_FILES([include/libcharset.h.inst:include/libcharset.h.in]) + AC_CONFIG_FILES([include/localcharset.h:include/localcharset.h.build.in]) + AC_CONFIG_FILES([include/localcharset.h.inst:include/localcharset.h.in]) + AC_OUTPUT +diff --git a/libcharset/include/libcharset.h.build.in b/libcharset/include/libcharset.h.build.in +new file mode 100644 +index 0000000..46e911a +--- /dev/null ++++ b/libcharset/include/libcharset.h.build.in +@@ -0,0 +1,53 @@ ++/* Copyright (C) 2003 Free Software Foundation, Inc. ++ This file is part of the GNU CHARSET Library. ++ ++ The GNU CHARSET Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2 of the ++ License, or (at your option) any later version. ++ ++ The GNU CHARSET Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with the GNU CHARSET Library; see the file COPYING.LIB. If not, ++ see . */ ++ ++#ifndef _LIBCHARSET_H ++#define _LIBCHARSET_H ++ ++#if @HAVE_VISIBILITY@ && BUILDING_LIBCHARSET ++#define LIBCHARSET_DLL_EXPORTED __attribute__((__visibility__("default"))) ++#elif defined _MSC_VER && BUILDING_LIBCHARSET ++#define LIBCHARSET_DLL_EXPORTED __declspec(dllexport) ++#else ++#define LIBCHARSET_DLL_EXPORTED ++#endif ++ ++#include ++ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++ ++/* Support for relocatable packages. */ ++ ++/* Sets the original and the current installation prefix of the package. ++ Relocation simply replaces a pathname starting with the original prefix ++ by the corresponding pathname with the current prefix instead. Both ++ prefixes should be directory names without trailing slash (i.e. use "" ++ instead of "/"). */ ++extern LIBCHARSET_DLL_EXPORTED void libcharset_set_relocation_prefix (const char *orig_prefix, ++ const char *curr_prefix); ++ ++ ++#ifdef __cplusplus ++} ++#endif ++ ++ ++#endif /* _LIBCHARSET_H */ diff --git a/packages/conan/recipes/libiconv/test_package/CMakeLists.txt b/packages/conan/recipes/libiconv/test_package/CMakeLists.txt new file mode 100644 index 00000000..b7e84b64 --- /dev/null +++ b/packages/conan/recipes/libiconv/test_package/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/libiconv/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.1) +project(test_package C) + +find_package(Iconv REQUIRED) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE Iconv::Iconv) diff --git a/packages/conan/recipes/libiconv/test_package/conanfile.py b/packages/conan/recipes/libiconv/test_package/conanfile.py new file mode 100644 index 00000000..191dc34b --- /dev/null +++ b/packages/conan/recipes/libiconv/test_package/conanfile.py @@ -0,0 +1,33 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/libiconv/all/test_package/conanfile.py + +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/libiconv/test_package/test_package.c b/packages/conan/recipes/libiconv/test_package/test_package.c new file mode 100644 index 00000000..1d5b3014 --- /dev/null +++ b/packages/conan/recipes/libiconv/test_package/test_package.c @@ -0,0 +1,58 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/libiconv/all/test_package/test_package.c +*/ + +#include +#include +#include //for EXIT_FAILURE +#include + +#if _MSC_VER && _MSC_VER < 1600 +typedef unsigned __int32 uint32_t; +#else +#include +#endif + +#include "iconv.h" +#include "libcharset.h" + +int main() +{ + // Test libiconv + char in_bytes[4] = {'c', 'i', 'a', 'o'}; + char *in_buffer = (char *)&in_bytes; + size_t in_bytes_left = sizeof(char) * 4; + uint32_t ou_bytes[4] = {(uint32_t)-1, (uint32_t)-1, (uint32_t)-1, (uint32_t)-1}; + size_t ou_bytes_left = sizeof(uint32_t) * 4; + char *ou_buffer = (char *)&ou_bytes; + iconv_t context; + size_t rv; + + context = iconv_open("UCS-4-INTERNAL", "US-ASCII"); + if ((iconv_t)(-1) == context) + { + fprintf(stderr, "iconv_open failed\n"); + return EXIT_FAILURE; + } + + rv = iconv(context, &in_buffer, &in_bytes_left, &ou_buffer, &ou_bytes_left); + if ((size_t)(-1) == rv) + { + fprintf(stderr, "icon failed\n"); + return EXIT_FAILURE; + } + + printf("retval libiconv: %lu %u %u %u %u\n", rv, ou_bytes[0], ou_bytes[1], ou_bytes[2], ou_bytes[3]); + + iconv_close(context); + + // Test libcharset + setlocale(LC_ALL, ""); + printf("retval libcharset: %s\n", locale_charset()); + + return EXIT_SUCCESS; +} diff --git a/packages/conan/recipes/libjpeg-turbo/conandata.yml b/packages/conan/recipes/libjpeg-turbo/conandata.yml new file mode 100644 index 00000000..20f02b5c --- /dev/null +++ b/packages/conan/recipes/libjpeg-turbo/conandata.yml @@ -0,0 +1,31 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/libjpeg-turbo/all/conandata.yml + +sources: + "3.1.0": + url: "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.1.0/libjpeg-turbo-3.1.0.tar.gz" + sha256: "9564c72b1dfd1d6fe6274c5f95a8d989b59854575d4bbee44ade7bc17aa9bc93" + "3.0.4": + url: "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.0.4/libjpeg-turbo-3.0.4.tar.gz" + sha256: "99130559e7d62e8d695f2c0eaeef912c5828d5b84a0537dcb24c9678c9d5b76b" + "3.0.3": + url: "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.0.3/libjpeg-turbo-3.0.3.tar.gz" + sha256: "343e789069fc7afbcdfe44dbba7dbbf45afa98a15150e079a38e60e44578865d" + "3.0.2": + url: "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.0.2/libjpeg-turbo-3.0.2.tar.gz" + sha256: "c2ce515a78d91b09023773ef2770d6b0df77d674e144de80d63e0389b3a15ca6" + "3.0.1": + url: "https://sourceforge.net/projects/libjpeg-turbo/files/3.0.1/libjpeg-turbo-3.0.1.tar.gz" + sha256: "22429507714ae147b3acacd299e82099fce5d9f456882fc28e252e4579ba2a75" + "3.0.0": + url: "https://sourceforge.net/projects/libjpeg-turbo/files/3.0.0/libjpeg-turbo-3.0.0.tar.gz" + sha256: "c77c65fcce3d33417b2e90432e7a0eb05f59a7fff884022a9d931775d583bfaa" + "2.1.5": + url: "https://sourceforge.net/projects/libjpeg-turbo/files/2.1.5/libjpeg-turbo-2.1.5.tar.gz" + sha256: "bc12bc9dce55300c6bf4342bc233bcc26bd38bf289eedf147360d731c668ddaf" + "2.0.6": + url: "https://sourceforge.net/projects/libjpeg-turbo/files/2.0.6/libjpeg-turbo-2.0.6.tar.gz" + sha256: "d74b92ac33b0e3657123ddcf6728788c90dc84dcb6a52013d758af3c4af481bb" diff --git a/packages/conan/recipes/libjpeg-turbo/conanfile.py b/packages/conan/recipes/libjpeg-turbo/conanfile.py new file mode 100644 index 00000000..34aac8cc --- /dev/null +++ b/packages/conan/recipes/libjpeg-turbo/conanfile.py @@ -0,0 +1,189 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b96b04ffad873992cbcfb98f0d84f6f44beb169d/recipes/libjpeg-turbo/all/conanfile.py + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, replace_in_file, rm, rmdir +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.53.0" + + +class LibjpegTurboConan(ConanFile): + name = "libjpeg-turbo" + description = "SIMD-accelerated libjpeg-compatible JPEG codec library" + license = ("IJG", "BSD-3-Clause", "Zlib") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://libjpeg-turbo.org" + topics = ("jpeg", "libjpeg", "image", "multimedia", "format", "graphics") + provides = "libjpeg" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "SIMD": [True, False], + "arithmetic_encoder": [True, False], + "arithmetic_decoder": [True, False], + "libjpeg7_compatibility": [True, False], + "libjpeg8_compatibility": [True, False], + "mem_src_dst": [True, False], + "turbojpeg": [True, False], + "java": [True, False], + "enable12bit": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "SIMD": True, + "arithmetic_encoder": True, + "arithmetic_decoder": True, + "libjpeg7_compatibility": True, + "libjpeg8_compatibility": True, + "mem_src_dst": True, + "turbojpeg": True, + "java": False, + "enable12bit": False, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + if Version(self.version) >= "3.0.0": + del self.options.enable12bit + del self.options.mem_src_dst + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + if self.options.get_safe("enable12bit"): + del self.options.java + del self.options.turbojpeg + if self.options.get_safe("enable12bit") or self.settings.os == "Emscripten": + del self.options.SIMD + if self.options.get_safe("enable12bit") or self.options.libjpeg7_compatibility or self.options.libjpeg8_compatibility: + del self.options.arithmetic_encoder + del self.options.arithmetic_decoder + if self.options.libjpeg8_compatibility: + self.options.rm_safe("mem_src_dst") + + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: we want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def validate(self): + if self.options.get_safe("enable12bit") and (self.options.libjpeg7_compatibility or self.options.libjpeg8_compatibility): + raise ConanInvalidConfiguration("12-bit samples is not allowed with libjpeg v7/v8 API/ABI") + if self.options.get_safe("java") and not self.options.shared: + raise ConanInvalidConfiguration("java wrapper requires shared libjpeg-turbo") + if self.options.shared and is_msvc(self) and is_msvc_static_runtime(self): + raise ConanInvalidConfiguration(f"{self.ref} shared can't be built with static vc runtime") + + def build_requirements(self): + if self.options.get_safe("SIMD") and self.settings.arch in ["x86", "x86_64"]: + self.tool_requires("nasm/2.15.05") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + @property + def _is_arithmetic_encoding_enabled(self): + return self.options.get_safe("arithmetic_encoder", False) or \ + self.options.libjpeg7_compatibility or self.options.libjpeg8_compatibility + + @property + def _is_arithmetic_decoding_enabled(self): + return self.options.get_safe("arithmetic_decoder", False) or \ + self.options.libjpeg7_compatibility or self.options.libjpeg8_compatibility + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + + tc = CMakeToolchain(self) + tc.variables["ENABLE_STATIC"] = not self.options.shared + tc.variables["ENABLE_SHARED"] = self.options.shared + tc.variables["WITH_SIMD"] = self.options.get_safe("SIMD", False) + tc.variables["WITH_ARITH_ENC"] = self._is_arithmetic_encoding_enabled + tc.variables["WITH_ARITH_DEC"] = self._is_arithmetic_decoding_enabled + tc.variables["WITH_JPEG7"] = self.options.libjpeg7_compatibility + tc.variables["WITH_JPEG8"] = self.options.libjpeg8_compatibility + tc.variables["WITH_TURBOJPEG"] = self.options.get_safe("turbojpeg", False) + tc.variables["WITH_JAVA"] = self.options.get_safe("java", False) + if Version(self.version) < "3.0.0": + tc.variables["WITH_MEM_SRCDST"] = self.options.get_safe("mem_src_dst", False) + tc.variables["WITH_12BIT"] = self.options.enable12bit + if is_msvc(self): + tc.variables["WITH_CRT_DLL"] = True # avoid replacing /MD by /MT in compiler flags + if Version(self.version) <= "2.1.0": + tc.variables["CMAKE_MACOSX_BUNDLE"] = False # avoid configuration error if building for iOS/tvOS/watchOS + tc.generate() + + def _patch_sources(self): + # use standard GNUInstallDirs.cmake - custom one is broken + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "include(cmakescripts/GNUInstallDirs.cmake)", + "include(GNUInstallDirs)") + # do not override /MT by /MD if shared + replace_in_file(self, os.path.join(self.source_folder, "sharedlib", "CMakeLists.txt"), + """string(REGEX REPLACE "/MT" "/MD" ${var} "${${var}}")""", + "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + # ASWF: separate licenses from multiple package installs + copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + copy(self, "README.ijg", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + cmake = CMake(self) + cmake.install() + # remove unneeded directories + rmdir(self, os.path.join(self.package_folder, "share")) + # ASWF: keep cmake files for non-Conan clients + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) + rmdir(self, os.path.join(self.package_folder, "doc")) + # remove binaries and pdb files + for pattern_to_remove in ["cjpeg*", "djpeg*", "jpegtran*", "tjbench*", "wrjpgcom*", "rdjpgcom*", "*.pdb"]: + rm(self, pattern_to_remove, os.path.join(self.package_folder, "bin")) + + def package_info(self): + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_module_file_name", "JPEG") + self.cpp_info.set_property("cmake_file_name", "libjpeg-turbo") + + cmake_target_suffix = "-static" if not self.options.shared else "" + lib_suffix = "-static" if is_msvc(self) and not self.options.shared else "" + + self.cpp_info.components["jpeg"].set_property("cmake_module_target_name", "JPEG::JPEG") + self.cpp_info.components["jpeg"].set_property("cmake_target_name", f"libjpeg-turbo::jpeg{cmake_target_suffix}") + self.cpp_info.components["jpeg"].set_property("pkg_config_name", "libjpeg") + self.cpp_info.components["jpeg"].libs = [f"jpeg{lib_suffix}"] + + if self.options.get_safe("turbojpeg"): + self.cpp_info.components["turbojpeg"].set_property("cmake_target_name", f"libjpeg-turbo::turbojpeg{cmake_target_suffix}") + self.cpp_info.components["turbojpeg"].set_property("pkg_config_name", "libturbojpeg") + self.cpp_info.components["turbojpeg"].libs = [f"turbojpeg{lib_suffix}"] + + # TODO: to remove in conan v2 + self.cpp_info.names["cmake_find_package"] = "JPEG" + self.cpp_info.names["cmake_find_package_multi"] = "libjpeg-turbo" + self.cpp_info.components["jpeg"].names["cmake_find_package"] = "JPEG" + self.cpp_info.components["jpeg"].names["cmake_find_package_multi"] = f"jpeg{cmake_target_suffix}" + if self.options.get_safe("turbojpeg"): + self.cpp_info.components["turbojpeg"].names["cmake_find_package"] = f"turbojpeg{cmake_target_suffix}" + self.cpp_info.components["turbojpeg"].names["cmake_find_package_multi"] = f"turbojpeg{cmake_target_suffix}" diff --git a/packages/conan/recipes/libjpeg-turbo/test_package/CMakeLists.txt b/packages/conan/recipes/libjpeg-turbo/test_package/CMakeLists.txt new file mode 100644 index 00000000..c8216623 --- /dev/null +++ b/packages/conan/recipes/libjpeg-turbo/test_package/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/libjpeg-turbo/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(libjpeg-turbo REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +if(TARGET libjpeg-turbo::jpeg) + target_link_libraries(${PROJECT_NAME} PRIVATE libjpeg-turbo::jpeg) +else() + target_link_libraries(${PROJECT_NAME} PRIVATE libjpeg-turbo::jpeg-static) +endif() +target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) diff --git a/packages/conan/recipes/libjpeg-turbo/test_package/conanfile.py b/packages/conan/recipes/libjpeg-turbo/test_package/conanfile.py new file mode 100644 index 00000000..c0c6cb77 --- /dev/null +++ b/packages/conan/recipes/libjpeg-turbo/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/libjpeg-turbo/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/libjpeg-turbo/test_package/test_package.c b/packages/conan/recipes/libjpeg-turbo/test_package/test_package.c new file mode 100644 index 00000000..c214c3ae --- /dev/null +++ b/packages/conan/recipes/libjpeg-turbo/test_package/test_package.c @@ -0,0 +1,17 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/libjpeg-turbo/all/test_package/test_package.c\ +*/ + +#include +#include "jpeglib.h" + +int main() { + struct jpeg_decompress_struct info; + struct jpeg_error_mgr err; + info.err = jpeg_std_error(&err); + jpeg_create_decompress(&info); +} diff --git a/packages/conan/recipes/libjpeg-turbo/test_package_module/CMakeLists.txt b/packages/conan/recipes/libjpeg-turbo/test_package_module/CMakeLists.txt new file mode 100644 index 00000000..277de56f --- /dev/null +++ b/packages/conan/recipes/libjpeg-turbo/test_package_module/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/libjpeg-turbo/all/test_package_module/CMakeLists.txt + +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES C) + +find_package(JPEG REQUIRED) + +add_executable(${PROJECT_NAME} ../test_package/test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE JPEG::JPEG) +target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) diff --git a/packages/conan/recipes/libjpeg-turbo/test_package_module/conanfile.py b/packages/conan/recipes/libjpeg-turbo/test_package_module/conanfile.py new file mode 100644 index 00000000..0a3938b8 --- /dev/null +++ b/packages/conan/recipes/libjpeg-turbo/test_package_module/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/libjpeg-turbo/all/test_package_module/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/libjxl/conan_deps.cmake b/packages/conan/recipes/libjxl/conan_deps.cmake new file mode 100644 index 00000000..fb5cef6b --- /dev/null +++ b/packages/conan/recipes/libjxl/conan_deps.cmake @@ -0,0 +1,30 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b96b04ffad873992cbcfb98f0d84f6f44beb169d/recipes/libjxl/all/conan_deps.cmake + +find_package(Brotli REQUIRED CONFIG) +find_package(HWY REQUIRED CONFIG) +find_package(LCMS2 REQUIRED CONFIG) + +# Add wrapper targets for the project to link against +add_library(brotlicommon INTERFACE) +target_link_libraries(brotlicommon INTERFACE brotli::brotli) +set_target_properties(brotlicommon PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${Brotli_INCLUDE_DIRS}") +set_target_properties(brotlicommon PROPERTIES INCLUDE_DIRECTORIES "${Brotli_INCLUDE_DIRS}") +add_library(brotlidec ALIAS brotlicommon) +add_library(brotlienc ALIAS brotlicommon) +add_library(brotlicommon-static ALIAS brotlicommon) +add_library(brotlidec-static ALIAS brotlicommon) +add_library(brotlienc-static ALIAS brotlicommon) + +add_library(hwy INTERFACE) +target_link_libraries(hwy INTERFACE highway::highway) +set_target_properties(hwy PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${HWY_INCLUDE_DIRS}") +set_target_properties(hwy PROPERTIES INCLUDE_DIRECTORIES "${HWY_INCLUDE_DIRS}") + +add_library(lcms2 INTERFACE) +target_link_libraries(lcms2 INTERFACE lcms::lcms) +set_target_properties(lcms2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LCMS2_INCLUDE_DIRS}") +set_target_properties(lcms2 PROPERTIES INCLUDE_DIRECTORIES "${LCMS2_INCLUDE_DIRS}") diff --git a/packages/conan/recipes/libjxl/conandata.yml b/packages/conan/recipes/libjxl/conandata.yml new file mode 100644 index 00000000..a5ad591d --- /dev/null +++ b/packages/conan/recipes/libjxl/conandata.yml @@ -0,0 +1,19 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b96b04ffad873992cbcfb98f0d84f6f44beb169d/recipes/libjxl/all/conandata.yml + +sources: + "0.11.1": + url: "https://github.com/libjxl/libjxl/archive/v0.11.1.tar.gz" + sha256: "1492dfef8dd6c3036446ac3b340005d92ab92f7d48ee3271b5dac1d36945d3d9" + "0.10.3": + url: "https://github.com/libjxl/libjxl/archive/v0.10.3.zip" + sha256: "a9e2103f61ab79f5561b506ad03fcba33207263284b1a796eba3ca826ab0a75f" + "0.10.2": + url: "https://github.com/libjxl/libjxl/archive/v0.10.2.zip" + sha256: "910ab4245eebe0fba801a057f5fbc4fe96dad7c9979880bb49ad3e2623a911a2" + "0.8.2": + url: "https://github.com/libjxl/libjxl/archive/v0.8.2.zip" + sha256: "1f2ccc06f07c4f6cf4aa6c7763ba0598f12a7544d597f02beb07f615eb08ccf0" diff --git a/packages/conan/recipes/libjxl/conanfile.py b/packages/conan/recipes/libjxl/conanfile.py new file mode 100644 index 00000000..0ab1c47f --- /dev/null +++ b/packages/conan/recipes/libjxl/conanfile.py @@ -0,0 +1,231 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b96b04ffad873992cbcfb98f0d84f6f44beb169d/recipes/libjxl/all/conanfile.py + +import os + +from conan import ConanFile +from conan.tools.build import cross_building, stdcpp_library, check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rmdir, save, rm, replace_in_file +from conan.tools.gnu import PkgConfigDeps +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=2" + + +class LibjxlConan(ConanFile): + name = "libjxl" + description = "JPEG XL image format reference implementation" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/libjxl/libjxl" + topics = ("image", "jpeg-xl", "jxl", "jpeg") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "avx512": [True, False], + "avx512_spr": [True, False], + "avx512_zen4": [True, False], + "with_tcmalloc": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "avx512": False, + "avx512_spr": False, + "avx512_zen4": False, + "with_tcmalloc": False, + } + + def export_sources(self): + copy(self, "conan_deps.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + if self.settings.arch not in ["x86", "x86_64"] or Version(self.version) < "0.9": + del self.options.avx512 + del self.options.avx512_spr + del self.options.avx512_zen4 + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: we want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def requirements(self): + self.requires("brotli/1.1.0") + self.requires("highway/1.1.0",transitive_libs=True) # ASWF + self.requires("lcms/2.16") + if self.options.with_tcmalloc: + self.requires("gperftools/2.15") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + + def build_requirements(self): + # Require newer CMake, which allows INCLUDE_DIRECTORIES to be set on INTERFACE targets + # Also, v0.9+ require CMake 3.16 + self.tool_requires("cmake/[>=3.19 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + VirtualBuildEnv(self).generate() + + tc = CMakeToolchain(self) + tc.variables["CMAKE_PROJECT_LIBJXL_INCLUDE"] = "conan_deps.cmake" + tc.variables["BUILD_TESTING"] = False + tc.variables["JPEGXL_STATIC"] = False + tc.variables["JPEGXL_BUNDLE_LIBPNG"] = False + tc.variables["JPEGXL_ENABLE_BENCHMARK"] = False + tc.variables["JPEGXL_ENABLE_DOXYGEN"] = False + tc.variables["JPEGXL_ENABLE_EXAMPLES"] = False + tc.variables["JPEGXL_ENABLE_JNI"] = False + tc.variables["JPEGXL_ENABLE_MANPAGES"] = False + tc.variables["JPEGXL_ENABLE_OPENEXR"] = False + tc.variables["JPEGXL_ENABLE_PLUGINS"] = False + tc.variables["JPEGXL_ENABLE_SJPEG"] = False + tc.variables["JPEGXL_ENABLE_SKCMS"] = False + tc.variables["JPEGXL_ENABLE_TCMALLOC"] = self.options.with_tcmalloc + tc.variables["JPEGXL_ENABLE_VIEWERS"] = False + tc.variables["JPEGXL_ENABLE_TOOLS"] = False + tc.variables["JPEGXL_FORCE_SYSTEM_BROTLI"] = True + tc.variables["JPEGXL_FORCE_SYSTEM_GTEST"] = True + tc.variables["JPEGXL_FORCE_SYSTEM_HWY"] = True + tc.variables["JPEGXL_FORCE_SYSTEM_LCMS2"] = True + tc.variables["JPEGXL_WARNINGS_AS_ERRORS"] = False + tc.variables["JPEGXL_FORCE_NEON"] = False + tc.variables["JPEGXL_ENABLE_AVX512"] = self.options.get_safe("avx512", False) + tc.variables["JPEGXL_ENABLE_AVX512_SPR"] = self.options.get_safe("avx512_spr", False) + tc.variables["JPEGXL_ENABLE_AVX512_ZEN4"] = self.options.get_safe("avx512_zen4", False) + if cross_building(self): + tc.variables["CMAKE_SYSTEM_PROCESSOR"] = str(self.settings.arch) + # Allow non-cache_variables to be used + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + # Skip the buggy custom FindAtomic and force the use of atomic library directly for libstdc++ + tc.variables["ATOMICS_LIBRARIES"] = "atomic" if self._atomic_required else "" + if Version(self.version) >= "0.8": + # TODO: add support for the jpegli JPEG encoder library + tc.variables["JPEGXL_ENABLE_JPEGLI"] = False + tc.variables["JPEGXL_ENABLE_JPEGLI_LIBJPEG"] = False + # TODO: can hopefully be removed in newer versions + # https://github.com/libjxl/libjxl/issues/3159 + if Version(self.version) >= "0.9" and self.settings.build_type == "Debug" and is_msvc(self): + tc.preprocessor_definitions["JXL_DEBUG_V_LEVEL"] = 1 + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("brotli", "cmake_file_name", "Brotli") + deps.set_property("highway", "cmake_file_name", "HWY") + deps.set_property("lcms", "cmake_file_name", "LCMS2") + deps.generate() + + # For tcmalloc + deps = PkgConfigDeps(self) + deps.generate() + + @property + def _atomic_required(self): + return self.settings.get_safe("compiler.libcxx") in ["libstdc++", "libstdc++11"] + + def _patch_sources(self): + # Disable tools, extras and third_party + save(self, os.path.join(self.source_folder, "tools", "CMakeLists.txt"), "") + save(self, os.path.join(self.source_folder, "third_party", "CMakeLists.txt"), "") + # FindAtomics.cmake values are set by CMakeToolchain instead + save(self, os.path.join(self.source_folder, "cmake", "FindAtomics.cmake"), "") + + # Allow fPIC to be set by Conan + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)", "") + for cmake_file in ["jxl.cmake", "jxl_threads.cmake", "jxl_cms.cmake", "jpegli.cmake"]: + path = os.path.join(self.source_folder, "lib", cmake_file) + if os.path.exists(path): + fpic = "ON" if self.options.get_safe("fPIC", True) else "OFF" + replace_in_file(self, path, "POSITION_INDEPENDENT_CODE ON", f"POSITION_INDEPENDENT_CODE {fpic}") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() + # ASWF: separate licenses from multiple package installs + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses", self.name)) + # ASWF: libraries in lib64 + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + if self.options.shared: + rm(self, "*.a", os.path.join(self.package_folder, "lib64")) + rm(self, "*-static.lib", os.path.join(self.package_folder, "lib64")) + + def _lib_name(self, name): + if Version(self.version) < "0.9" and not self.options.shared and self.settings.os == "Windows": + return name + "-static" + return name + + def package_info(self): + libcxx = stdcpp_library(self) + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_module_file_name", "JXL") + self.cpp_info.set_property("cmake_file_name", "libjxl") + + # jxl + self.cpp_info.components["jxl"].set_property("pkg_config_name", "libjxl") + self.cpp_info.components["jxl"].libs = [self._lib_name("jxl")] + self.cpp_info.components["jxl"].requires = ["brotli::brotli", "highway::highway", "lcms::lcms"] + if self.options.with_tcmalloc: + self.cpp_info.components["jxl"].requires.append("gperftools::tcmalloc_minimal") + if self._atomic_required: + self.cpp_info.components["jxl"].system_libs.append("atomic") + if not self.options.shared: + self.cpp_info.components["jxl"].defines.append("JXL_STATIC_DEFINE") + if libcxx: + self.cpp_info.components["jxl"].system_libs.append(libcxx) + + # jxl_cms + if Version(self.version) >= "0.9.0": + self.cpp_info.components["jxl_cms"].set_property("pkg_config_name", "libjxl_cms") + self.cpp_info.components["jxl_cms"].libs = [self._lib_name("jxl_cms")] + self.cpp_info.components["jxl_cms"].requires = ["lcms::lcms", "highway::highway"] + if not self.options.shared: + self.cpp_info.components["jxl"].defines.append("JXL_CMS_STATIC_DEFINE") + if libcxx: + self.cpp_info.components["jxl_cms"].system_libs.append(libcxx) + self.cpp_info.components["jxl"].requires.append("jxl_cms") + + # jxl_dec + if Version(self.version) < "0.9.0": + if not self.options.shared: + self.cpp_info.components["jxl_dec"].set_property("pkg_config_name", "libjxl_dec") + self.cpp_info.components["jxl_dec"].libs = [self._lib_name("jxl_dec")] + self.cpp_info.components["jxl_dec"].requires = ["brotli::brotli", "highway::highway", "lcms::lcms"] + if libcxx: + self.cpp_info.components["jxl_dec"].system_libs.append(libcxx) + + # jxl_threads + self.cpp_info.components["jxl_threads"].set_property("pkg_config_name", "libjxl_threads") + self.cpp_info.components["jxl_threads"].libs = [self._lib_name("jxl_threads")] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["jxl_threads"].system_libs = ["pthread"] + if not self.options.shared: + self.cpp_info.components["jxl_threads"].defines.append("JXL_THREADS_STATIC_DEFINE") + if libcxx: + self.cpp_info.components["jxl_threads"].system_libs.append(libcxx) diff --git a/packages/conan/recipes/libjxl/test_package/CMakeLists.txt b/packages/conan/recipes/libjxl/test_package/CMakeLists.txt new file mode 100644 index 00000000..4771fc13 --- /dev/null +++ b/packages/conan/recipes/libjxl/test_package/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b96b04ffad873992cbcfb98f0d84f6f44beb169d/recipes/libjxl/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.15) +project(test_package C) + +find_package(libjxl REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE libjxl::libjxl) diff --git a/packages/conan/recipes/libjxl/test_package/conanfile.py b/packages/conan/recipes/libjxl/test_package/conanfile.py new file mode 100644 index 00000000..73a821aa --- /dev/null +++ b/packages/conan/recipes/libjxl/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b96b04ffad873992cbcfb98f0d84f6f44beb169d/recipes/libjxl/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/libjxl/test_package/test_package.c b/packages/conan/recipes/libjxl/test_package/test_package.c new file mode 100644 index 00000000..74f8b2d1 --- /dev/null +++ b/packages/conan/recipes/libjxl/test_package/test_package.c @@ -0,0 +1,26 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b96b04ffad873992cbcfb98f0d84f6f44beb169d/recipes/libjxl/all/test_package/test_package.c +*/ + +#include +#include + +#include "jxl/decode.h" +#include "jxl/thread_parallel_runner.h" + +int main() +{ + JxlDecoder *dec = NULL; + void *runner = NULL; + dec = JxlDecoderCreate(NULL); + + // Allways True + if (JxlDecoderSubscribeEvents(dec, JXL_DEC_BASIC_INFO) == JXL_DEC_SUCCESS) + { + printf("Test"); + } +} diff --git a/packages/conan/recipes/libmp3lame/conanfile.py b/packages/conan/recipes/libmp3lame/conanfile.py new file mode 100644 index 00000000..89698df6 --- /dev/null +++ b/packages/conan/recipes/libmp3lame/conanfile.py @@ -0,0 +1,18 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/libmp3lame/all/conanfile.py + +from conan import ConanFile + +class SystemLibMP3LameConan(ConanFile): + name = "libmp3lame" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["mp3lame"] diff --git a/packages/conan/recipes/libpng/conanfile.py b/packages/conan/recipes/libpng/conanfile.py new file mode 100644 index 00000000..bda46ea2 --- /dev/null +++ b/packages/conan/recipes/libpng/conanfile.py @@ -0,0 +1,21 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/libpng/all/conanfile.py + +from conan import ConanFile + +class SystemLibpngConan(ConanFile): + name = "libpng" + version = "1.6.34" # For oiio recipe + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["png"] + + self.cpp_info.set_property("cmake_file_name", "PNG") + self.cpp_info.set_property("cmake_target_name", "PNG::PNG") diff --git a/packages/conan/recipes/libsndfile/conanfile.py b/packages/conan/recipes/libsndfile/conanfile.py new file mode 100644 index 00000000..40806ca5 --- /dev/null +++ b/packages/conan/recipes/libsndfile/conanfile.py @@ -0,0 +1,21 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/libsndfile/all/conanfile.py + +from conan import ConanFile + +class SystemLibsndfileConan(ConanFile): + name = "libsndfile" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["sndfile"] + + self.cpp_info.set_property("cmake_file_name", "SndFile") + self.cpp_info.set_property("cmake_target_name", "SndFile::sndfile") diff --git a/packages/conan/recipes/libsquish/conanfile.py b/packages/conan/recipes/libsquish/conanfile.py new file mode 100644 index 00000000..3596849f --- /dev/null +++ b/packages/conan/recipes/libsquish/conanfile.py @@ -0,0 +1,18 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/libsquish/all/conanfile.py + +from conan import ConanFile + +class SystemLibsquishConan(ConanFile): + name = "libsquish" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["squish"] diff --git a/packages/conan/recipes/libsvtav1/conanfile.py b/packages/conan/recipes/libsvtav1/conanfile.py new file mode 100644 index 00000000..dd1f5432 --- /dev/null +++ b/packages/conan/recipes/libsvtav1/conanfile.py @@ -0,0 +1,22 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/libsvtav1/all/conanfile.py + +from conan import ConanFile + +class SystemSVTAV1Conan(ConanFile): + name = "libsvtav1" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + + self.cpp_info.components["encoder"].libs = ["SvtAv1Enc"] + self.cpp_info.components["encoder"].includedirs = ["/usr/include/svt-av1"] + self.cpp_info.components["decoder"].libs = ["SvtAv1Dec"] + self.cpp_info.components["decoder"].includedirs = ["/usr/include/svt-av1"] diff --git a/packages/conan/recipes/libtiff/conanfile.py b/packages/conan/recipes/libtiff/conanfile.py new file mode 100644 index 00000000..add08f1a --- /dev/null +++ b/packages/conan/recipes/libtiff/conanfile.py @@ -0,0 +1,22 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/libtiff/all/conanfile.py + +from conan import ConanFile + +class SystemLibtiffConan(ConanFile): + name = "libtiff" + version = "4.0.9" # for OIIO recipe + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["tiff", "tiffxx"] + + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "TIFF") + self.cpp_info.set_property("cmake_target_name", "TIFF::TIFF") diff --git a/packages/conan/recipes/libuhdr/conandata.yml b/packages/conan/recipes/libuhdr/conandata.yml new file mode 100644 index 00000000..5d7eba1c --- /dev/null +++ b/packages/conan/recipes/libuhdr/conandata.yml @@ -0,0 +1,24 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT + +sources: + "1.4.0": + url: "https://github.com/google/libultrahdr/archive/refs/tags/v1.4.0.tar.gz" + sha256: "e7e1252e2c44d8ed6b99ee0f67a3caf2d8a61c43834b13b1c3cd485574c03ab9" + "1.3.0": + url: "https://github.com/google/libultrahdr/archive/refs/tags/v1.3.0.tar.gz" + sha256: "bf425e10a1a36507d47eb2711018e90effe11c76db8ecd4f10f4e1af9cb5288c" + "1.2.0": + url: "https://github.com/google/libultrahdr/archive/refs/tags/v1.2.0.tar.gz" + sha256: "0db267135611d96ef5d33f32162e8c226a8c2ab6320002f185d903d3131623c8" + "1.1.1": + url: "https://github.com/google/libultrahdr/archive/refs/tags/v1.1.1.tar.gz" + sha256: "5c2605bfa8cc56027892e66db8317784949e79bccf197dbcc5c48c8b94f86f32" + "1.1.0": + url: "https://github.com/google/libultrahdr/archive/refs/tags/v1.1.0.tar.gz" + sha256: "d5558cd419c8d46bdc958064cb97f963d1ea793866414c025906ec15033512ed" + "1.0.0": + url: "https://github.com/google/libultrahdr/archive/refs/tags/v1.0.0.tar.gz" + sha256: "d5558cd419c8d46bdc958064cb97f963d1ea793866414c025906ec15033512ed" + diff --git a/packages/conan/recipes/libuhdr/conanfile.py b/packages/conan/recipes/libuhdr/conanfile.py new file mode 100644 index 00000000..a4d111bc --- /dev/null +++ b/packages/conan/recipes/libuhdr/conanfile.py @@ -0,0 +1,72 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir +import glob +import os + +required_conan_version = ">=2.0" + +class LibuhdrConan(ConanFile): + name = "libuhdr" + license = "Apache-2.0" + url = "https://github.com/google/libultrahdr" + homepage = "https://github.com/google/libultrahdr" + description = "libuhdr is an image compression library that uses gain map technology to store and distribute HDR images." + topics = ("hdr", "image compression", "gain map", "high dynamic range") + + settings = "os", "compiler", "build_type", "arch" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def layout(self): + cmake_layout(self) + # ASWF: we want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() + # Copy license file if it is not copied by CMake install + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses", self.name), src=self.source_folder, keep_path=False) + # Keep cmake files for non-Conan clients + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + + # Clean up static lib if building dynamic + if self.options.shared: + for lib in glob.glob(os.path.join(self.package_folder, "lib64", "*.a")): + if not lib.endswith(".dll.a"): + os.remove(lib) + + def package_info(self): + self.cpp_info.libs = ["uhdr"] + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "LIBUHDR") + self.cpp_info.set_property("cmake_target_name", "LIBUHDR::LIBUHDR") diff --git a/packages/conan/recipes/libvpx/conanfile.py b/packages/conan/recipes/libvpx/conanfile.py new file mode 100644 index 00000000..7a516479 --- /dev/null +++ b/packages/conan/recipes/libvpx/conanfile.py @@ -0,0 +1,18 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/libvpx/all/conanfile.py + +from conan import ConanFile + +class SystemLibvpxConan(ConanFile): + name = "libvpx" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["vpx"] diff --git a/packages/conan/recipes/libwebp/conandata.yml b/packages/conan/recipes/libwebp/conandata.yml new file mode 100644 index 00000000..2391a94b --- /dev/null +++ b/packages/conan/recipes/libwebp/conandata.yml @@ -0,0 +1,57 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f2c56e90ae28fef1ee1a392adf59f96199ee1277/recipes/libwebp/all/conandata.yml + +sources: + "1.5.0": + url: "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.5.0.tar.gz" + sha256: "7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c" + "1.4.0": + url: "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.4.0.tar.gz" + sha256: "61f873ec69e3be1b99535634340d5bde750b2e4447caa1db9f61be3fd49ab1e5" + "1.3.2": + url: "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.3.2.tar.gz" + sha256: "2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4" + "1.3.1": + url: "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.3.1.tar.gz" + sha256: "b3779627c2dfd31e3d8c4485962c2efe17785ef975e2be5c8c0c9e6cd3c4ef66" + "1.2.4": + url: "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.2.4.tar.gz" + sha256: "7bf5a8a28cc69bcfa8cb214f2c3095703c6b73ac5fba4d5480c205331d9494df" + "1.1.0": + url: "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.1.0.tar.gz" + sha256: "98a052268cc4d5ece27f76572a7f50293f439c17a98e67c4ea0c7ed6f50ef043" +patches: + "1.5.0": + - patch_file: "patches/1.5.0-0001-fix-cmake.patch" + patch_description: "disable PIC, disable prefix library name on MSVC" + patch_type: "conan" + "1.4.0": + - patch_file: "patches/1.4.0-0001-fix-cmake.patch" + patch_description: "disable PIC, disable prefix library name on MSVC" + patch_type: "conan" + "1.3.2": + - patch_file: "patches/1.3.1-0001-fix-cmake.patch" + patch_description: "disable PIC, disable prefix library name on MSVC" + patch_type: "conan" + "1.3.1": + - patch_file: "patches/1.3.1-0001-fix-cmake.patch" + patch_description: "disable PIC, disable prefix library name on MSVC" + patch_type: "conan" + "1.2.4": + - patch_file: "patches/1.1.0-0001-fix-dll-export.patch" + patch_description: "define WEBP_EXTERN for windows shared build" + patch_type: "portability" + "1.1.0": + - patch_file: "patches/1.1.0-0001-fix-dll-export.patch" + patch_description: "define WEBP_EXTERN for windows shared build" + patch_type: "portability" + - patch_file: "patches/1.1.0-0002-qnx.patch" + patch_description: "work around cmake bug on QNX" + patch_type: "conan" + patch_source: "https://chromium-review.googlesource.com/c/webm/libwebp/+/2637274" + - patch_file: "patches/1.1.0-0003-build-libwebpmux.patch" + patch_description: "always build libwebpmux" + patch_type: "conan" diff --git a/packages/conan/recipes/libwebp/conanfile.py b/packages/conan/recipes/libwebp/conanfile.py new file mode 100644 index 00000000..d50a7bd6 --- /dev/null +++ b/packages/conan/recipes/libwebp/conanfile.py @@ -0,0 +1,161 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f2c56e90ae28fef1ee1a392adf59f96199ee1277/recipes/libwebp/all/conanfile.py + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.53.0" + + +class LibwebpConan(ConanFile): + name = "libwebp" + description = "Library to encode and decode images in WebP format" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://chromium.googlesource.com/webm/libwebp" + topics = ("image", "libwebp", "webp", "decoding", "encoding") + license = "BSD-3-Clause" + + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_simd": [True, False], + "near_lossless": [True, False], + "swap_16bit_csp": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_simd": True, + "near_lossless": True, + "swap_16bit_csp": False, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: we want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + # should be an option but it doesn't work yet + tc.variables["WEBP_ENABLE_SIMD"] = self.options.with_simd + tc.variables["WEBP_NEAR_LOSSLESS"] = self.options.near_lossless + tc.variables["WEBP_ENABLE_SWAP_16BIT_CSP"] = self.options.swap_16bit_csp + # avoid finding system libs + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_GIF"] = True + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_PNG"] = True + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_TIFF"] = True + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_JPEG"] = True + tc.variables["WEBP_BUILD_ANIM_UTILS"] = False + tc.variables["WEBP_BUILD_CWEBP"] = False + tc.variables["WEBP_BUILD_DWEBP"] = False + tc.variables["WEBP_BUILD_IMG2WEBP"] = False + tc.variables["WEBP_BUILD_GIF2WEBP"] = False + tc.variables["WEBP_BUILD_VWEBP"] = False + tc.variables["WEBP_BUILD_EXTRAS"] = False + tc.variables["WEBP_BUILD_WEBPINFO"] = False + if Version(self.version) >= "1.2.1": + tc.variables["WEBP_BUILD_LIBWEBPMUX"] = True + tc.variables["WEBP_BUILD_WEBPMUX"] = False + if self.options.shared and is_msvc(self): + # Building a dll (see fix-dll-export patch) + tc.preprocessor_definitions["WEBP_DLL"] = 1 + tc.generate() + # ASWF: want CMake files to consume outside Conan + deps = CMakeDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() + # ASWF: separate licenses from multiple package installs + copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + # ASWF: libwebp lands CMake files in in share/WebP/cmake, we patch CMakeFiles.txt to land in lib64/cmake/WebP + # rmdir(self, os.path.join(self.package_folder, lib64", "cmake")) + + def package_info(self): + self.cpp_info.set_property("cmake_find_mode", "both") # ASWF: want cmake files to consume outside Conan + self.cpp_info.set_property("cmake_file_name", "WebP") + self.cpp_info.set_property("pkg_config_name", "libwebp-all-do-not-use") + + # webpdecoder + self.cpp_info.components["webpdecoder"].set_property("cmake_target_name", "WebP::webpdecoder") + self.cpp_info.components["webpdecoder"].set_property("pkg_config_name", "libwebpdecoder") + self.cpp_info.components["webpdecoder"].libs = ["webpdecoder"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["webpdecoder"].system_libs = ["m", "pthread"] + if self.settings.os == "Android": + self.cpp_info.components["webpdecoder"].system_libs = ["m"] + + # webp + self.cpp_info.components["webp"].set_property("cmake_target_name", "WebP::webp") + self.cpp_info.components["webp"].set_property("pkg_config_name", "libwebp") + self.cpp_info.components["webp"].libs = ["webp"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["webp"].system_libs = ["m", "pthread"] + if self.settings.os == "Android": + self.cpp_info.components["webp"].system_libs = ["m"] + + if Version(self.version) >= "1.3.0": + # sharpyuv + self.cpp_info.components["sharpyuv"].set_property("cmake_target_name", "WebP::sharpyuv") + self.cpp_info.components["sharpyuv"].set_property("pkg_config_name", "libsharpyuv") + self.cpp_info.components["sharpyuv"].libs = ["sharpyuv"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["sharpyuv"].system_libs = ["m", "pthread"] + if self.settings.os == "Android": + self.cpp_info.components["sharpyuv"].system_libs = ["m"] + # note: webp now depends on sharpyuv + self.cpp_info.components["webp"].requires = ["sharpyuv"] + + # webpdemux + self.cpp_info.components["webpdemux"].set_property("cmake_target_name", "WebP::webpdemux") + self.cpp_info.components["webpdemux"].set_property("pkg_config_name", "libwebpdemux") + self.cpp_info.components["webpdemux"].libs = ["webpdemux"] + self.cpp_info.components["webpdemux"].requires = ["webp"] + + # webpmux + self.cpp_info.components["webpmux"].set_property("cmake_target_name", "WebP::libwebpmux") + self.cpp_info.components["webpmux"].set_property("pkg_config_name", "libwebpmux") + self.cpp_info.components["webpmux"].libs = ["webpmux"] + self.cpp_info.components["webpmux"].requires = ["webp"] + if self.settings.os in ["Linux", "FreeBSD", "Android"]: + self.cpp_info.components["webpmux"].system_libs = ["m"] + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.names["cmake_find_package"] = "WebP" + self.cpp_info.names["cmake_find_package_multi"] = "WebP" + self.cpp_info.names["pkg_config"] = "libwebp-all-do-not-use" + self.cpp_info.components["webpmux"].names["cmake_find_package"] = "libwebpmux" + self.cpp_info.components["webpmux"].names["cmake_find_package_multi"] = "libwebpmux" diff --git a/packages/conan/recipes/libwebp/patches/1.1.0-0001-fix-dll-export.patch b/packages/conan/recipes/libwebp/patches/1.1.0-0001-fix-dll-export.patch new file mode 100644 index 00000000..ec00b8a2 --- /dev/null +++ b/packages/conan/recipes/libwebp/patches/1.1.0-0001-fix-dll-export.patch @@ -0,0 +1,15 @@ +diff --git a/src/webp/types.h b/src/webp/types.h +index 0ce2622..69f7e89 100644 +--- a/src/webp/types.h ++++ b/src/webp/types.h +@@ -39,7 +39,9 @@ typedef long long int int64_t; + #ifndef WEBP_EXTERN + // This explicitly marks library functions and allows for changing the + // signature for e.g., Windows DLL builds. +-# if defined(__GNUC__) && __GNUC__ >= 4 ++# if defined(_MSC_VER) && defined(WEBP_DLL) ++# define WEBP_EXTERN __declspec(dllexport) ++# elif defined(__GNUC__) && __GNUC__ >= 4 + # define WEBP_EXTERN extern __attribute__ ((visibility ("default"))) + # else + # define WEBP_EXTERN extern diff --git a/packages/conan/recipes/libwebp/patches/1.1.0-0002-qnx.patch b/packages/conan/recipes/libwebp/patches/1.1.0-0002-qnx.patch new file mode 100644 index 00000000..00f5a9a0 --- /dev/null +++ b/packages/conan/recipes/libwebp/patches/1.1.0-0002-qnx.patch @@ -0,0 +1,14 @@ +diff --git a/cmake/deps.cmake b/cmake/deps.cmake +index f19c0378..7b2d7cd7 100644 +--- a/cmake/deps.cmake ++++ b/cmake/deps.cmake +@@ -24,7 +24,8 @@ check_c_source_compiles(" + # Check for libraries. + find_package(Threads) + if(Threads_FOUND) +- if(CMAKE_USE_PTHREADS_INIT) ++ # work around cmake bug on QNX (https://chromium-review.googlesource.com/c/webm/libwebp/+/2637274) ++ if(CMAKE_USE_PTHREADS_INIT AND NOT CMAKE_SYSTEM_NAME STREQUAL "QNX") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread") + endif() + foreach(PTHREAD_TEST HAVE_PTHREAD_PRIO_INHERIT PTHREAD_CREATE_UNDETACHED) diff --git a/packages/conan/recipes/libwebp/patches/1.1.0-0003-build-libwebpmux.patch b/packages/conan/recipes/libwebp/patches/1.1.0-0003-build-libwebpmux.patch new file mode 100644 index 00000000..a6ef960d --- /dev/null +++ b/packages/conan/recipes/libwebp/patches/1.1.0-0003-build-libwebpmux.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -402,7 +402,7 @@ if(WEBP_BUILD_CWEBP) + install(TARGETS cwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() + +-if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) ++if(1) + parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/mux "WEBP_MUX_SRCS" "") + add_library(libwebpmux ${WEBP_MUX_SRCS}) + target_link_libraries(libwebpmux webp) diff --git a/packages/conan/recipes/libwebp/patches/1.3.1-0001-fix-cmake.patch b/packages/conan/recipes/libwebp/patches/1.3.1-0001-fix-cmake.patch new file mode 100644 index 00000000..72ee3a12 --- /dev/null +++ b/packages/conan/recipes/libwebp/patches/1.3.1-0001-fix-cmake.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ad5e14c3..89c836f3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,7 +58,6 @@ if(WEBP_LINK_STATIC) + else() + set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + endif() +- set(CMAKE_POSITION_INDEPENDENT_CODE ON) + # vwebp does not compile on Ubuntu with static libraries so disabling it for + # now. + set(WEBP_BUILD_VWEBP OFF) +@@ -153,7 +152,7 @@ endif() + set(PTHREAD_LIBS ${CMAKE_THREAD_LIBS_INIT}) + set(INSTALLED_LIBRARIES) + +-if(MSVC) ++if(0) + # match the naming convention used by nmake + set(webp_libname_prefix "lib") + set(CMAKE_SHARED_LIBRARY_PREFIX "${webp_libname_prefix}") diff --git a/packages/conan/recipes/libwebp/patches/1.4.0-0001-fix-cmake.patch b/packages/conan/recipes/libwebp/patches/1.4.0-0001-fix-cmake.patch new file mode 100644 index 00000000..f819b1e4 --- /dev/null +++ b/packages/conan/recipes/libwebp/patches/1.4.0-0001-fix-cmake.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ad5e14c3..89c836f3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -60,7 +60,6 @@ if(WEBP_LINK_STATIC) + else() + set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + endif() +- set(CMAKE_POSITION_INDEPENDENT_CODE ON) + # vwebp does not compile on Ubuntu with static libraries so disabling it for + # now. + set(WEBP_BUILD_VWEBP OFF) +@@ -155,7 +154,7 @@ endif() + set(PTHREAD_LIBS ${CMAKE_THREAD_LIBS_INIT}) + set(INSTALLED_LIBRARIES) + +-if(MSVC) ++if(0) + # match the naming convention used by nmake + set(webp_libname_prefix "lib") + set(CMAKE_SHARED_LIBRARY_PREFIX "${webp_libname_prefix}") diff --git a/packages/conan/recipes/libwebp/patches/1.5.0-0001-fix-cmake.patch b/packages/conan/recipes/libwebp/patches/1.5.0-0001-fix-cmake.patch new file mode 100644 index 00000000..cca3e400 --- /dev/null +++ b/packages/conan/recipes/libwebp/patches/1.5.0-0001-fix-cmake.patch @@ -0,0 +1,30 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ad5e14c3..89c836f3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -61,7 +61,6 @@ if(WEBP_LINK_STATIC) + else() + set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + endif() +- set(CMAKE_POSITION_INDEPENDENT_CODE ON) + # vwebp does not compile on Ubuntu with static libraries so disabling it for + # now. + set(WEBP_BUILD_VWEBP OFF) +@@ -156,7 +155,7 @@ endif() + set(PTHREAD_LIBS ${CMAKE_THREAD_LIBS_INIT}) + set(INSTALLED_LIBRARIES) + +-if(MSVC) ++if(0) + # match the naming convention used by nmake + set(webp_libname_prefix "lib") + set(CMAKE_SHARED_LIBRARY_PREFIX "${webp_libname_prefix}") +@@ -790,7 +789,7 @@ + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +-set(ConfigPackageLocation ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake/) ++set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/) + install(EXPORT ${PROJECT_NAME}Targets NAMESPACE ${PROJECT_NAME}:: + DESTINATION ${ConfigPackageLocation}) + diff --git a/packages/conan/recipes/libwebp/test_package/CMakeLists.txt b/packages/conan/recipes/libwebp/test_package/CMakeLists.txt new file mode 100644 index 00000000..c7c5e161 --- /dev/null +++ b/packages/conan/recipes/libwebp/test_package/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f2c56e90ae28fef1ee1a392adf59f96199ee1277/recipes/libwebp/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(WebP REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE WebP::webp) diff --git a/packages/conan/recipes/libwebp/test_package/conanfile.py b/packages/conan/recipes/libwebp/test_package/conanfile.py new file mode 100644 index 00000000..cbfc2caa --- /dev/null +++ b/packages/conan/recipes/libwebp/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f2c56e90ae28fef1ee1a392adf59f96199ee1277/recipes/libwebp/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/libwebp/test_package/test_package.c b/packages/conan/recipes/libwebp/test_package/test_package.c new file mode 100644 index 00000000..f0650079 --- /dev/null +++ b/packages/conan/recipes/libwebp/test_package/test_package.c @@ -0,0 +1,18 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f2c56e90ae28fef1ee1a392adf59f96199ee1277/recipes/libwebp/all/test_package/test_package.c +*/ + +#include +#include + +int main(void) +{ + int version = WebPGetDecoderVersion(); + printf("Webp Decoder version: %d\n", version); + + return 0; +} diff --git a/packages/conan/recipes/libxcrypt/conandata.yml b/packages/conan/recipes/libxcrypt/conandata.yml new file mode 100644 index 00000000..8a56db8d --- /dev/null +++ b/packages/conan/recipes/libxcrypt/conandata.yml @@ -0,0 +1,43 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/libxcrypt/all/conandata.yml + +sources: + "4.4.36": + url: "https://github.com/besser82/libxcrypt/archive/v4.4.36.tar.gz" + sha256: "b979838d5f1f238869d467484793b72b8bca64c4eae696fdbba0a9e0b6c28453" + "4.4.35": + url: "https://github.com/besser82/libxcrypt/archive/v4.4.35.tar.gz" + sha256: "15981f2ffb82d70f07285f9683c485c4774083057564a2e7e74236c19e8e9f7b" + "4.4.34": + url: "https://github.com/besser82/libxcrypt/archive/v4.4.34.tar.gz" + sha256: "8888bbe9f8530bbd9f8063d65288018d419f91e9b3e3349abb8cb4d0a0397cc5" + "4.4.28": + url: "https://github.com/besser82/libxcrypt/archive/v4.4.28.tar.gz" + sha256: "db7e37901969cb1d1e8020cb73a991ef81e48e31ea5b76a101862c806426b457" + "4.4.27": + url: "https://github.com/besser82/libxcrypt/archive/v4.4.27.tar.gz" + sha256: "e4ff47b7fa5370fa08e27258f8a0de5cb7e9b09c297ec7ab56a8a82e229a1c84" + "4.4.26": + url: "https://github.com/besser82/libxcrypt/archive/v4.4.26.tar.gz" + sha256: "e8a544dd19171c1e6191a6044c96cc31496d781ba08b5a00f53310d001d58114" + "4.4.25": + url: "https://github.com/besser82/libxcrypt/archive/v4.4.25.tar.gz" + sha256: "caea3d032a46c4855ff818637884c7f5719ad228b79387b62ee023c8fbef17b4" + "4.4.23": + url: "https://github.com/besser82/libxcrypt/archive/v4.4.23.tar.gz" + sha256: "9cbbcb795ed5d121a1613eb0e40c77173b53e15a746796fc7cd7bd71cfd64533" + "4.4.22": + url: "https://github.com/besser82/libxcrypt/archive/v4.4.22.tar.gz" + sha256: "8d67c33837b8e5e930ca878c88f1856913b749cc95844fb11e7f1b4c8aab4f8e" + "4.4.18": + url: "https://github.com/besser82/libxcrypt/archive/v4.4.18.tar.gz" + sha256: "3801f0263a8596b15ec466343fc1fdc4ad4ec7416c51e038a3528fd47f3be01a" + "4.4.17": + url: "https://github.com/besser82/libxcrypt/archive/v4.4.17.tar.gz" + sha256: "7665168d0409574a03f7b484682e68334764c29c21ca5df438955a381384ca07" + "4.4.16": + url: "https://github.com/besser82/libxcrypt/archive/v4.4.16.tar.gz" + sha256: "a98f65b8baffa2b5ba68ee53c10c0a328166ef4116bce3baece190c8ce01f375" diff --git a/packages/conan/recipes/libxcrypt/conanfile.py b/packages/conan/recipes/libxcrypt/conanfile.py new file mode 100644 index 00000000..1673c6a2 --- /dev/null +++ b/packages/conan/recipes/libxcrypt/conanfile.py @@ -0,0 +1,105 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/libxcrypt/all/conanfile.py + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, replace_in_file, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, unix_path +import os + +required_conan_version = ">=1.53.0" + + +class LibxcryptConan(ConanFile): + name = "libxcrypt" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/besser82/libxcrypt" + description = "Extended crypt library for descrypt, md5crypt, bcrypt, and others" + topics = ("hash", "password", "one-way", "bcrypt", "md5", "sha256", "sha512") + license = ("LGPL-2.1-or-later", ) + settings = "os", "arch", "compiler", "build_type" + package_type = "library" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") + # ASWF: we want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def validate(self): + if is_msvc(self): + raise ConanInvalidConfiguration(f"{self.ref} does not support Visual Studio") + + def build_requirements(self): + self.tool_requires("libtool/2.4.7") + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + + def source(self): + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder, strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = AutotoolsToolchain(self) + tc.configure_args.append("--disable-werror") + tc.generate() + + def _patch_sources(self): + replace_in_file(self, os.path.join(self.source_folder, "Makefile.am"), + "\nlibcrypt_la_LDFLAGS = ", "\nlibcrypt_la_LDFLAGS = -no-undefined ") + + def build(self): + self._patch_sources() + autotools = Autotools(self) + autotools.autoreconf() + autotools.configure() + if self.settings.os == "Windows": + replace_in_file(self, os.path.join(self.build_folder, "libtool"), "-DPIC", "") + autotools.make() + + def package(self): + # ASWF: separate licenses from multiple package installs + copy(self, "COPYING.LIB", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + autotools = Autotools(self) + # TODO: replace by autotools.install() once https://github.com/conan-io/conan/issues/12153 fixed + autotools.install(args=[f"DESTDIR={unix_path(self, self.package_folder)}"]) + rm(self, "*.la", os.path.join(self.package_folder, "lib64")) + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + fix_apple_shared_install_name(self) + + def package_info(self): + self.cpp_info.set_property("pkg_config_name", "libxcrypt") + self.cpp_info.libs = ["crypt"] diff --git a/packages/conan/recipes/libxcrypt/test_package/CMakeLists.txt b/packages/conan/recipes/libxcrypt/test_package/CMakeLists.txt new file mode 100644 index 00000000..9bdacb16 --- /dev/null +++ b/packages/conan/recipes/libxcrypt/test_package/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/libxcrypt/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(libxcrypt REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE libxcrypt::libxcrypt) diff --git a/packages/conan/recipes/libxcrypt/test_package/conanfile.py b/packages/conan/recipes/libxcrypt/test_package/conanfile.py new file mode 100644 index 00000000..cce2404e --- /dev/null +++ b/packages/conan/recipes/libxcrypt/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/libxcrypt/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/libxcrypt/test_package/test_package.c b/packages/conan/recipes/libxcrypt/test_package/test_package.c new file mode 100644 index 00000000..fb16981c --- /dev/null +++ b/packages/conan/recipes/libxcrypt/test_package/test_package.c @@ -0,0 +1,16 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/libxcrypt/all/test_package/test_package.c +*/ + +#include "crypt.h" + +#include +int main() +{ + printf("preferred method: %s\n", crypt_preferred_method()); + return 0; +} diff --git a/packages/conan/recipes/libxshmfence/conanfile.py b/packages/conan/recipes/libxshmfence/conanfile.py new file mode 100644 index 00000000..c6aacb53 --- /dev/null +++ b/packages/conan/recipes/libxshmfence/conanfile.py @@ -0,0 +1,18 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/libxshmfence/all/conanfile.py + +from conan import ConanFile + +class SystemLibxshmfenceConan(ConanFile): + name = "libxshmfence" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["xshmfence"] diff --git a/packages/conan/recipes/log4cplus/CMakeLists.txt b/packages/conan/recipes/log4cplus/CMakeLists.txt deleted file mode 100644 index f54eccaa..00000000 --- a/packages/conan/recipes/log4cplus/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.12) - -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/packages/conan/recipes/log4cplus/conandata.yml b/packages/conan/recipes/log4cplus/conandata.yml index b783d6f3..dff74544 100644 --- a/packages/conan/recipes/log4cplus/conandata.yml +++ b/packages/conan/recipes/log4cplus/conandata.yml @@ -1,13 +1,50 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/log4cplus/all/conandata.yml + sources: - "1.1.2": - url: "https://github.com/log4cplus/log4cplus/releases/download/REL_1_1_2/log4cplus-1.1.2.tar.bz2" - sha256: "c46d56c96873dcb525791b5ea639d1415e74b1de99d51b657336cb6ebb72ed93" - "2.0.4": - url: "https://github.com/log4cplus/log4cplus/releases/download/REL_2_0_4/log4cplus-2.0.4.tar.bz2" - sha256: "0c8a7b4cabff07032385f0c6d1a078d2a79c69b1c43b06991ca774fb85880252" - "2.0.5": - url: "https://github.com/log4cplus/log4cplus/releases/download/REL_2_0_5/log4cplus-2.0.5.tar.bz2" - sha256: "b38dbfc68ef6d771e4de7de0be3544bc51bd3f7d5b75c5f6500d10e23203eb15" + "2.1.2": + url: "https://github.com/log4cplus/log4cplus/releases/download/REL_2_1_2/log4cplus-2.1.2.tar.bz2" + sha256: "2450dfbb4ab35dd2c9e64d8c750c514bf7293b81d8f32af7ab124417f70adfad" "2.1.1": url: "https://github.com/log4cplus/log4cplus/releases/download/REL_2_1_1/log4cplus-2.1.1.tar.bz2" sha256: "6597de782775e4e0fba8fdcad938c3709fd839a8084c4b6edfae3cc5046e2688" + "2.1.0": + url: "https://github.com/log4cplus/log4cplus/releases/download/REL_2_1_0/log4cplus-2.1.0.tar.bz2" + sha256: "a04945aca5fbc0487503c852befb9cdefbc3ae3fe614b08a905333f6df754387" + "2.0.8": + url: "https://github.com/log4cplus/log4cplus/releases/download/REL_2_0_8/log4cplus-2.0.8.tar.bz2" + sha256: "ca36aa366036d1c61fc0366a9ffbcf32bad55d74878b2c36a9c34dcc00b8a0ca" + "2.0.7": + url: "https://github.com/log4cplus/log4cplus/releases/download/REL_2_0_7/log4cplus-2.0.7.tar.bz2" + sha256: "8fadbafee2ba4e558a0f78842613c9fb239c775d83f23340d091084c0e1b12ab" + "1.2.2": + url: "https://github.com/log4cplus/log4cplus/releases/download/REL_1_2_2/log4cplus-1.2.2.tar.bz2" + sha256: "853efd919f9ca76c518c0944e6b0ced1174523a86b6db046ed4f23fe695167bd" +patches: + "2.1.2": + - patch_file: "patches/2.1.2-0001-fix-cmake.patch" + patch_description: "disable fPIC" + patch_type: "conan" + "2.1.1": + - patch_file: "patches/2.0.6-0001-fix-cmake.patch" + patch_description: "disable fPIC, move cmake_minimum_version to front" + patch_type: "conan" + "2.1.0": + - patch_file: "patches/2.0.6-0001-fix-cmake.patch" + patch_description: "disable fPIC, move cmake_minimum_version to front" + patch_type: "conan" + "2.0.8": + - patch_file: "patches/2.0.6-0001-fix-cmake.patch" + patch_description: "disable fPIC, move cmake_minimum_version to front" + patch_type: "conan" + "2.0.7": + - patch_file: "patches/2.0.6-0001-fix-cmake.patch" + patch_description: "disable fPIC, move cmake_minimum_version to front" + patch_type: "conan" + "1.2.2": + - patch_file: "patches/1.2.2-0001-fix-cmake.patch" + patch_description: "move cmake_minimum_version to front" + patch_type: "conan" diff --git a/packages/conan/recipes/log4cplus/conanfile.py b/packages/conan/recipes/log4cplus/conanfile.py index 99df704c..99c666bd 100644 --- a/packages/conan/recipes/log4cplus/conanfile.py +++ b/packages/conan/recipes/log4cplus/conanfile.py @@ -1,17 +1,29 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/log4cplus/all/conanfile.py + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, collect_libs +from conan.tools.build import check_min_cppstd, valid_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc import os -from conans import ConanFile, CMake, tools +required_conan_version = ">=1.53.0" class Log4cplusConan(ConanFile): name = "log4cplus" description = "simple to use C++ logging API, modelled after the Java log4j API" - url = "https://github.com/AcademySoftwareFoundation/aswf-docker" + url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/log4cplus/log4cplus" - topics = ("conan", "log4cplus", "logging", "log", "logging-library") - license = "BSD-2-Clause, Apache-2.0" - exports_sources = ["CMakeLists.txt"] - generators = "cmake" - settings = "os", "compiler", "build_type", "arch" + license = ("BSD-2-Clause, Apache-2.0") + topics = ("logging", "log", "logging-library") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -22,6 +34,7 @@ class Log4cplusConan(ConanFile): "working_c_locale": [True, False], "decorated_name": [True, False], "unicode": [True, False], + "thread_pool": [True, False], } default_options = { "shared": False, @@ -33,18 +46,12 @@ class Log4cplusConan(ConanFile): "working_c_locale": False, "decorated_name": False, "unicode": True, + "thread_pool": True, } short_paths = True - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -52,87 +59,76 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, 11) + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: we want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] def requirements(self): if self.options.with_iconv: - self.requires("libiconv/1.16") + self.requires("libiconv/1.17") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + if Version(self.version) < 2 and valid_min_cppstd(self, 17): + raise ConanInvalidConfiguration(f"${self.ref} does not support C++17") + if Version(self.version) >= "2.1.2" and \ + is_msvc(self) and Version(self.settings.compiler.version) < 192: + raise ConanInvalidConfiguration(f"${self.ref} requires Visual Studio 2019 or newer") def source(self): - archive_name = self.name + "-" + self.version - tools.get(**self.conan_data["sources"][self.version]) - os.rename(archive_name, self._source_subfolder) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["UNICODE"] = self.options.unicode - self._cmake.definitions["LOG4CPLUS_BUILD_TESTING"] = False - self._cmake.definitions["WITH_UNIT_TESTS"] = False - self._cmake.definitions[ - "LOG4CPLUS_ENABLE_DECORATED_LIBRARY_NAME" - ] = self.options.decorated_name - self._cmake.definitions["LOG4CPLUS_QT4"] = False - self._cmake.definitions["LOG4CPLUS_QT5"] = False - self._cmake.definitions[ - "LOG4CPLUS_SINGLE_THREADED" - ] = self.options.single_threaded - self._cmake.definitions[ - "LOG4CPLUS_BUILD_LOGGINGSERVER" - ] = self.options.build_logging_server - self._cmake.definitions["WITH_ICONV"] = self.options.with_iconv - self._cmake.definitions[ - "LOG4CPLUS_WORKING_LOCALE" - ] = self.options.working_locale - self._cmake.definitions[ - "LOG4CPLUS_WORKING_C_LOCALE" - ] = self.options.working_c_locale - self._cmake.configure(build_dir=self._build_subfolder) - return self._cmake - - def _patch_sources(self): - if tools.Version(self.version) > "2.0": - # don't force PIC - tools.replace_in_file( - os.path.join(self._source_subfolder, "CMakeLists.txt"), - "set (CMAKE_POSITION_INDEPENDENT_CODE ON)", - "", - ) - else: - tools.replace_in_file( - os.path.join(self._source_subfolder, "Log4CPlusCPack.cmake"), - "${CMAKE_SOURCE_DIR}/LICENSE", - "${CMAKE_SOURCE_DIR}/source_subfolder/LICENSE", - ) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["LOG4CPLUS_ENABLE_THREAD_POOL"] = self.options.thread_pool + tc.variables["UNICODE"] = self.options.unicode + tc.variables["LOG4CPLUS_BUILD_TESTING"] = False + tc.variables["WITH_UNIT_TESTS"] = False + tc.variables["LOG4CPLUS_ENABLE_DECORATED_LIBRARY_NAME"] = self.options.decorated_name + tc.variables["LOG4CPLUS_QT4"] = False + tc.variables["LOG4CPLUS_QT5"] = False + tc.variables["LOG4CPLUS_SINGLE_THREADED"] = self.options.single_threaded + tc.variables["LOG4CPLUS_BUILD_LOGGINGSERVER"] = self.options.build_logging_server + tc.variables["WITH_ICONV"] = self.options.with_iconv + tc.variables["LOG4CPLUS_WORKING_LOCALE"] = self.options.working_locale + tc.variables["LOG4CPLUS_WORKING_C_LOCALE"] = self.options.working_c_locale + tc.generate() + + dpes = CMakeDeps(self) + dpes.generate() def build(self): - self._patch_sources() - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy( - pattern="LICENSE", - dst=os.path.join("licenses", self.name), - src=self._source_subfolder, - ) - cmake = self._configure_cmake() + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses", self.name), src=self.source_folder) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + #rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) + if Version(self.version) >= "2.1.0": + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): - self.cpp_info.libs = tools.collect_libs(self) + self.cpp_info.set_property("cmake_file_name", "log4cplus") + self.cpp_info.set_property("cmake_target_name", "log4cplus::log4cplus") + if Version(self.version) >= "2.1.0": + self.cpp_info.set_property("pkg_config_name", "log4cplus") + + self.cpp_info.libs = collect_libs(self) if self.options.unicode: self.cpp_info.defines = ["UNICODE", "_UNICODE"] - if self.settings.os == "Linux": - self.cpp_info.system_libs = ["dl"] + if self.settings.os in ["Linux", "FreeBSD"]: + # ASWF: don't need / want libnsl + self.cpp_info.system_libs = ["dl", "m", "rt"] # , "nsl"] if not self.options.single_threaded: self.cpp_info.system_libs.append("pthread") elif self.settings.os == "Windows": - self.cpp_info.system_libs = ["advapi32", "Ws2_32"] - - def deploy(self): - self.copy("*", symlinks=True) + self.cpp_info.system_libs = ["advapi32", "ws2_32"] diff --git a/packages/conan/recipes/log4cplus/patches/1.2.2-0001-fix-cmake.patch b/packages/conan/recipes/log4cplus/patches/1.2.2-0001-fix-cmake.patch new file mode 100644 index 00000000..29c23910 --- /dev/null +++ b/packages/conan/recipes/log4cplus/patches/1.2.2-0001-fix-cmake.patch @@ -0,0 +1,12 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -11,8 +11,8 @@ + # Remove when CMake >= 2.8.4 is required + set (CMAKE_LEGACY_CYGWIN_WIN32 0) + ++cmake_minimum_required (VERSION 3.15) + project (log4cplus) +-cmake_minimum_required (VERSION 2.8.12) + + enable_language (CXX) + include(GNUInstallDirs) diff --git a/packages/conan/recipes/log4cplus/patches/2.0.6-0001-fix-cmake,patch b/packages/conan/recipes/log4cplus/patches/2.0.6-0001-fix-cmake,patch new file mode 100644 index 00000000..4abbd5b9 --- /dev/null +++ b/packages/conan/recipes/log4cplus/patches/2.0.6-0001-fix-cmake,patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5fa96f7..4209098 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,3 +1,5 @@ ++cmake_minimum_required (VERSION 3.12) ++ + # This block needs to stay before the project (log4cplus) line so that + # the output files placed into Android's libs directory. + if (CMAKE_TOOLCHAIN_FILE) +@@ -12,10 +14,6 @@ endif () + set (CMAKE_LEGACY_CYGWIN_WIN32 0) + + project (log4cplus) +-cmake_minimum_required (VERSION 3.12) +- +-# Use "-fPIC" / "-fPIE" for all targets by default, including static libs. +-set (CMAKE_POSITION_INDEPENDENT_CODE ON) + + enable_language (CXX) + if (MSVC) diff --git a/packages/conan/recipes/log4cplus/patches/2.1.2-0001-fix-cmake.patch b/packages/conan/recipes/log4cplus/patches/2.1.2-0001-fix-cmake.patch new file mode 100644 index 00000000..9bec3910 --- /dev/null +++ b/packages/conan/recipes/log4cplus/patches/2.1.2-0001-fix-cmake.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9dcbb8a..f80d3b9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,7 +15,7 @@ cmake_minimum_required (VERSION 3.12) + project (log4cplus) + + # Use "-fPIC" / "-fPIE" for all targets by default, including static libs. +-set (CMAKE_POSITION_INDEPENDENT_CODE ON) ++# set (CMAKE_POSITION_INDEPENDENT_CODE ON) + + enable_language (CXX) + if (MSVC) diff --git a/packages/conan/recipes/log4cplus/test_package/CMakeLists.txt b/packages/conan/recipes/log4cplus/test_package/CMakeLists.txt index 49932c46..e019d0f8 100644 --- a/packages/conan/recipes/log4cplus/test_package/CMakeLists.txt +++ b/packages/conan/recipes/log4cplus/test_package/CMakeLists.txt @@ -1,11 +1,18 @@ -cmake_minimum_required(VERSION 3.12) -project(test_package) +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/log4cplus/all/test_package/CMakeLists.txt -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) find_package(log4cplus REQUIRED CONFIG) -add_executable(${PROJECT_NAME} test_package${LOG4CPLUS_MAJOR_VERSION}.cpp) -target_link_libraries(${PROJECT_NAME} log4cplus::log4cplus) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) +if(log4cplus_VERSION VERSION_GREATER_EQUAL 2) + add_executable(${PROJECT_NAME} test_package.cpp) +else() + add_executable(${PROJECT_NAME} test_package_v1.cpp) +endif() +target_link_libraries(${PROJECT_NAME} PRIVATE log4cplus::log4cplus) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/packages/conan/recipes/log4cplus/test_package/conanfile.py b/packages/conan/recipes/log4cplus/test_package/conanfile.py index 6586bc3a..3d3a420f 100644 --- a/packages/conan/recipes/log4cplus/test_package/conanfile.py +++ b/packages/conan/recipes/log4cplus/test_package/conanfile.py @@ -1,20 +1,31 @@ -import os -from conans import ConanFile, CMake, tools +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/log4cplus/all/test_package/conanfile.py +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) - cmake.definitions["LOG4CPLUS_MAJOR_VERSION"] = tools.Version( - self.deps_cpp_info["log4cplus"].version - ).major cmake.configure() cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/log4cplus/test_package/test_package2.cpp b/packages/conan/recipes/log4cplus/test_package/test_package.cpp similarity index 54% rename from packages/conan/recipes/log4cplus/test_package/test_package2.cpp rename to packages/conan/recipes/log4cplus/test_package/test_package.cpp index af5a4e0b..25acb08d 100644 --- a/packages/conan/recipes/log4cplus/test_package/test_package2.cpp +++ b/packages/conan/recipes/log4cplus/test_package/test_package.cpp @@ -1,3 +1,11 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/log4cplus/all/test_package/test_package.cpp +*/ + #include #include #include diff --git a/packages/conan/recipes/log4cplus/test_package/test_package1.cpp b/packages/conan/recipes/log4cplus/test_package/test_package1.cpp deleted file mode 100644 index 2bd53668..00000000 --- a/packages/conan/recipes/log4cplus/test_package/test_package1.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include -#include - -int main() -{ - ::log4cplus::initialize(); - - log4cplus::BasicConfigurator config; - config.configure(); - - log4cplus::Logger logger = log4cplus::Logger::getInstance(LOG4CPLUS_TEXT("main")); - LOG4CPLUS_WARN(logger, LOG4CPLUS_TEXT("Hello, World!")); - - return 0; -} diff --git a/packages/conan/recipes/log4cplus/test_package/test_package_v1.cpp b/packages/conan/recipes/log4cplus/test_package/test_package_v1.cpp new file mode 100644 index 00000000..46fc8acc --- /dev/null +++ b/packages/conan/recipes/log4cplus/test_package/test_package_v1.cpp @@ -0,0 +1,24 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/22dfbd2b42eed730eca55e14025e8ffa65f723b2/recipes/log4cplus/all/test_package/test_package_v1.cpp +*/ + +#include +#include +#include + +int main() +{ + log4cplus::initialize(); + + log4cplus::BasicConfigurator config; + config.configure(); + + log4cplus::Logger logger = log4cplus::Logger::getInstance(LOG4CPLUS_TEXT("main")); + LOG4CPLUS_WARN(logger, LOG4CPLUS_TEXT("Hello, World!")); + + return 0; +} diff --git a/packages/conan/recipes/lz4/conandata.yml b/packages/conan/recipes/lz4/conandata.yml new file mode 100644 index 00000000..7a25f326 --- /dev/null +++ b/packages/conan/recipes/lz4/conandata.yml @@ -0,0 +1,26 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/lz4/all/conandata.yml + +sources: + "1.10.0": + url: "https://github.com/lz4/lz4/archive/v1.10.0.tar.gz" + sha256: "537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b" + "1.9.4": + url: "https://github.com/lz4/lz4/archive/v1.9.4.tar.gz" + sha256: "0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b" + "1.9.3": + url: "https://github.com/lz4/lz4/archive/v1.9.3.tar.gz" + sha256: "030644df4611007ff7dc962d981f390361e6c97a34e5cbc393ddfbe019ffe2c1" +patches: + "1.9.4": + - patch_file: "patches/0004-Added-namespace-declaration-for-xxhash-in-CMake.patch" + patch_description: "Added namespace/prefix for xxHash functions by altering CMakeLists.txt" + patch_type: official + patch_source: "https://github.com/lz4/lz4/pull/1258" + "1.9.3": + - patch_file: "patches/0003-cmake-minimum-required-first-1.9.3.patch" + patch_description: "Move cmake_minimum_required to the top of CMakeFile.txt" + patch_type: conan diff --git a/packages/conan/recipes/lz4/conanfile.py b/packages/conan/recipes/lz4/conanfile.py new file mode 100644 index 00000000..866509e8 --- /dev/null +++ b/packages/conan/recipes/lz4/conanfile.py @@ -0,0 +1,130 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/lz4/all/conanfile.py + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version +import os +import textwrap + +required_conan_version = ">=1.54.0" + + +class LZ4Conan(ConanFile): + name = "lz4" + description = "Extremely Fast Compression algorithm" + license = ("BSD-2-Clause", "BSD-3-Clause") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/lz4/lz4" + topics = ("compression") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: we want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def source(self): + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder, strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["LZ4_BUILD_CLI"] = False + if Version(self.version) < "1.10.0": + tc.variables["LZ4_BUILD_LEGACY_LZ4C"] = False + tc.variables["LZ4_BUNDLED_MODE"] = False + tc.variables["LZ4_POSITION_INDEPENDENT_LIB"] = self.options.get_safe("fPIC", True) + # Generate a relocatable shared lib on Macos + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" + # Honor BUILD_SHARED_LIBS (see https://github.com/conan-io/conan/issues/11840) + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + + @property + def _cmakelists_folder(self): + subfolder = os.path.join("build", "cmake") + return os.path.join(self.source_folder, subfolder) + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure(build_script_folder=self._cmakelists_folder) + cmake.build() + + def _create_cmake_module_alias_targets(self, module_file, targets): + content = "" + for alias, aliased in targets.items(): + content += textwrap.dedent(f"""\ + if(TARGET {aliased} AND NOT TARGET {alias}) + add_library({alias} INTERFACE IMPORTED) + set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) + endif() + """) + save(self, module_file, content) + + @property + def _module_file_rel_path(self): + return os.path.join("lib", "cmake", f"conan-official-{self.name}-targets.cmake") + + def package(self): + # ASWF: separate licenses from multiple package installs + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + cmake = CMake(self) + cmake.install() + # ASWF: keep cmake files for non-Conan clients + # if Version(self.version) >= "1.9.4": + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + + # TODO: to remove in conan v2 once legacy generators removed + self._create_cmake_module_alias_targets( + os.path.join(self.package_folder, self._module_file_rel_path), + {self._lz4_target: "lz4::lz4"}, + ) + + @property + def _lz4_target(self): + return f"LZ4::{'lz4_shared' if self.options.shared else 'lz4_static'}" + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "lz4") + self.cpp_info.set_property("cmake_target_name", self._lz4_target) + self.cpp_info.set_property("cmake_target_aliases", ["lz4::lz4"]) # old unofficial target in CCI for lz4, kept for the moment to not break consumers + self.cpp_info.set_property("pkg_config_name", "liblz4") + self.cpp_info.libs = ["lz4"] + if is_msvc(self) and self.options.shared: + self.cpp_info.defines.append("LZ4_DLL_IMPORT=1") + + # TODO: to remove in conan v2 once legacy generators removed + self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] + self.cpp_info.names["pkg_config"] = "liblz4" diff --git a/packages/conan/recipes/lz4/patches/0003-cmake-minimum-required-first-1.9.3.patch b/packages/conan/recipes/lz4/patches/0003-cmake-minimum-required-first-1.9.3.patch new file mode 100644 index 00000000..16c60111 --- /dev/null +++ b/packages/conan/recipes/lz4/patches/0003-cmake-minimum-required-first-1.9.3.patch @@ -0,0 +1,25 @@ +--- a/build/cmake/CMakeLists.txt ++++ b/build/cmake/CMakeLists.txt +@@ -9,11 +9,10 @@ + # + # LZ4's CMake support is maintained by Evan Nemerson; when filing + # bugs please mention @nemequ to make sure I see it. ++cmake_minimum_required (VERSION 2.8.6) + + set(LZ4_TOP_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..") + +-option(LZ4_BUILD_CLI "Build lz4 program" ON) +-option(LZ4_BUILD_LEGACY_LZ4C "Build lz4c progam with legacy argument support" ON) + + # Parse version information + file(STRINGS "${LZ4_TOP_SOURCE_DIR}/lib/lz4.h" LZ4_VERSION_MAJOR REGEX "^#define LZ4_VERSION_MAJOR +([0-9]+) +.*$") +@@ -34,7 +33,8 @@ else() + LANGUAGES C) + endif() + +-cmake_minimum_required (VERSION 2.8.6) ++option(LZ4_BUILD_CLI "Build lz4 program" ON) ++option(LZ4_BUILD_LEGACY_LZ4C "Build lz4c progam with legacy argument support" ON) + + # If LZ4 is being bundled in another project, we don't want to + # install anything. However, we want to let people override this, so diff --git a/packages/conan/recipes/lz4/patches/0004-Added-namespace-declaration-for-xxhash-in-CMake.patch b/packages/conan/recipes/lz4/patches/0004-Added-namespace-declaration-for-xxhash-in-CMake.patch new file mode 100644 index 00000000..04a888ec --- /dev/null +++ b/packages/conan/recipes/lz4/patches/0004-Added-namespace-declaration-for-xxhash-in-CMake.patch @@ -0,0 +1,19 @@ +--- a/build/cmake/CMakeLists.txt ++++ b/build/cmake/CMakeLists.txt +@@ -131,6 +131,16 @@ if(BUILD_STATIC_LIBS) + list(APPEND LZ4_LIBRARIES_BUILT lz4_static) + endif() + ++# xxhash namesapce ++if(BUILD_SHARED_LIBS) ++ target_compile_definitions(lz4_shared PRIVATE ++ XXH_NAMESPACE=LZ4_) ++endif() ++if(BUILD_STATIC_LIBS) ++ target_compile_definitions(lz4_static PRIVATE ++ XXH_NAMESPACE=LZ4_) ++endif() ++ + if(BUILD_STATIC_LIBS) + set(LZ4_LINK_LIBRARY lz4_static) + else() diff --git a/packages/conan/recipes/lz4/test_package/CMakeLists.txt b/packages/conan/recipes/lz4/test_package/CMakeLists.txt new file mode 100644 index 00000000..2637e814 --- /dev/null +++ b/packages/conan/recipes/lz4/test_package/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/lz4/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(lz4 REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +if(TARGET LZ4::lz4_static) + target_link_libraries(${PROJECT_NAME} PRIVATE LZ4::lz4_static) +else() + target_link_libraries(${PROJECT_NAME} PRIVATE LZ4::lz4_shared) +endif() + +option(TEST_SHARED_LIB "Use package in a shared library") +if(TEST_AS_SHARED_LIB) + add_library(${PROJECT_NAME}2 SHARED lib.c) + if(TARGET LZ4::lz4_static) + target_link_libraries(${PROJECT_NAME}2 PRIVATE LZ4::lz4_static) + else() + target_link_libraries(${PROJECT_NAME}2 PRIVATE LZ4::lz4_shared) + endif() +endif() diff --git a/packages/conan/recipes/lz4/test_package/conanfile.py b/packages/conan/recipes/lz4/test_package/conanfile.py new file mode 100644 index 00000000..b315adb6 --- /dev/null +++ b/packages/conan/recipes/lz4/test_package/conanfile.py @@ -0,0 +1,38 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/lz4/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + lz4 = self.dependencies["lz4"] + tc = CMakeToolchain(self) + tc.variables["TEST_SHARED_LIB"] = lz4.options.get_safe("fPIC", True) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/lz4/test_package/lib.c b/packages/conan/recipes/lz4/test_package/lib.c new file mode 100644 index 00000000..ae23e5d8 --- /dev/null +++ b/packages/conan/recipes/lz4/test_package/lib.c @@ -0,0 +1,21 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/lz4/all/test_package/lib.c +*/ + +#include "lz4.h" + +#ifdef _MSC_VER +#define API __declspec(dllexport) +#else +#define API __attribute__ ((visibility("default"))) +#endif + +API +int lz4_version() +{ + return LZ4_versionNumber(); +} diff --git a/packages/conan/recipes/lz4/test_package/test_package.c b/packages/conan/recipes/lz4/test_package/test_package.c new file mode 100644 index 00000000..c3ea0b22 --- /dev/null +++ b/packages/conan/recipes/lz4/test_package/test_package.c @@ -0,0 +1,21 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/lz4/all/test_package/test_package.c +*/ + +// LZ4 trivial example : print Library version number +// Copyright : Takayuki Matsuoka & Yann Collet + + +#include +#include "lz4.h" + +int main(int argc, char** argv) +{ + (void)argc; (void)argv; + printf("Hello World ! LZ4 Library version = %d\n", LZ4_versionNumber()); + return 0; +} diff --git a/packages/conan/recipes/materialx/conandata.yml b/packages/conan/recipes/materialx/conandata.yml index 8e1d6f05..9a3b2187 100644 --- a/packages/conan/recipes/materialx/conandata.yml +++ b/packages/conan/recipes/materialx/conandata.yml @@ -1,20 +1,47 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/materialx/all/conandata.yml + sources: - "1.38.5": - url: "https://github.com/AcademySoftwareFoundation/MaterialX/archive/v1.38.5.tar.gz" - sha256: "af1e1ddb7980b299171803c0410d2a189653eb8624beb49541fd15978b784f1d" - "1.38.7": - url: "https://github.com/AcademySoftwareFoundation/MaterialX/archive/v1.38.7.tar.gz" - sha256: "54ea1193c77a8a3a5c80b5c00b1911d82985453f4d4d072737cf44b34325f6df" - "1.38.9": - url: "https://github.com/AcademySoftwareFoundation/MaterialX/archive/v1.38.9.tar.gz" - sha256: "8eb707bd9bc63ced7a8d64c2e3b2e1e39df71e2a8650daa178f564bec0c79291" - "1.38.10": - url: "https://github.com/AcademySoftwareFoundation/MaterialX/archive/v1.38.10.tar.gz" - sha256: "706f44100188bc283a135ad24b348e55b405ac9e70cb64b7457c381383cc2887" - "1.39.0": - url: "https://github.com/AcademySoftwareFoundation/MaterialX/archive/v1.39.0.tar.gz" - sha256: "cc470da839cdc0e31e4b46ee46ff434d858c38c803b1d4a1012ed12546ace541" + "1.39.3": + url: "https://github.com/AcademySoftwareFoundation/MaterialX/archive/v1.39.3.tar.gz" + sha256: "1f299d14c1243a4834e2363921d98465cc002b37e7f5cddb6f8747ab58fbf6d1" + "1.39.2": + url: "https://github.com/AcademySoftwareFoundation/MaterialX/archive/v1.39.2.tar.gz" + sha256: "2816ca27398f8199106606368c07b379e4751cda0c63a99c8a735a05f62f98bd" "1.39.1": url: "https://github.com/AcademySoftwareFoundation/MaterialX/archive/v1.39.1.tar.gz" sha256: "a392fd0aa372bbea7a6f27d20160829ec9380a801976ff467949a90e6555258d" + "1.39.0": + url: "https://github.com/AcademySoftwareFoundation/MaterialX/archive/v1.39.0.tar.gz" + sha256: "cc470da839cdc0e31e4b46ee46ff434d858c38c803b1d4a1012ed12546ace541" + "1.38.10": + url: "https://github.com/AcademySoftwareFoundation/MaterialX/archive/v1.38.10.tar.gz" + sha256: "706f44100188bc283a135ad24b348e55b405ac9e70cb64b7457c381383cc2887" + "1.38.9": + url: "https://github.com/AcademySoftwareFoundation/MaterialX/archive/v1.38.9.tar.gz" + sha256: "8eb707bd9bc63ced7a8d64c2e3b2e1e39df71e2a8650daa178f564bec0c79291" + "1.38.7": + url: "https://github.com/AcademySoftwareFoundation/MaterialX/archive/v1.38.7.tar.gz" + sha256: "54ea1193c77a8a3a5c80b5c00b1911d82985453f4d4d072737cf44b34325f6df" + "1.38.5": + url: "https://github.com/AcademySoftwareFoundation/MaterialX/archive/v1.38.5.tar.gz" + sha256: "af1e1ddb7980b299171803c0410d2a189653eb8624beb49541fd15978b784f1d" patches: + "1.39.3": + - patch_file: "patches/pybind11-cmake.patch" + patch_description: "CMake: Must call find_package() on Python3 before pybind11" + patch_type: "conan" + - patch_file: "patches/1.39.3-cmake-libraries.patch" + patch_descriptions: "MaterialX support files in share/MaterialX" + patch_type: "conan" + "1.39.2": + - patch_file: "patches/pybind11-cmake.patch" + patch_description: "CMake: Must call find_package() on Python3 before pybind11" + patch_type: "conan" + "1.39.1": + - patch_file: "patches/pybind11-cmake.patch" + patch_description: "CMake: Must call find_package() on Python3 before pybind11" + patch_type: "conan" diff --git a/packages/conan/recipes/materialx/conanfile.py b/packages/conan/recipes/materialx/conanfile.py index 87d04e4f..95a19084 100644 --- a/packages/conan/recipes/materialx/conanfile.py +++ b/packages/conan/recipes/materialx/conanfile.py @@ -1,34 +1,29 @@ # Copyright (c) Contributors to the conan-center-index Project. All rights reserved. # Copyright (c) Contributors to the aswf-docker Project. All rights reserved. # SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/materialx/all/conanfile.py -from conans import ConanFile +from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import ( - apply_conandata_patches, - copy, - export_conandata_patches, - get, - rmdir, -) +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir, replace_in_file from conan.tools.apple import is_apple_os -from conans import tools, RunEnvironment +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" - class MaterialXConan(ConanFile): name = "materialx" description = "MaterialX is an open standard for the exchange of rich material and look-development content across applications and renderers." license = "Apache-2.0" - url = "https://github.com/AcademySoftwareFoundation/aswf-docker" + url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/AcademySoftwareFoundation/MaterialX" topics = ("vfx", "3d", "graphics", "aswf") package_type = "library" - settings = "os", "arch", "compiler", "build_type", "python" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -36,17 +31,20 @@ class MaterialXConan(ConanFile): "build_gen_msl": [True, False], } default_options = { - "shared": True, + "shared": False, "fPIC": True, - "with_openimageio": False, - "build_gen_msl": True, + "with_openimageio": True, # ASWF: exercise dependency + "build_gen_msl": True } short_paths = True @property def _min_cppstd(self): - return 14 + if Version(self.version) >= "1.39.0": + return 17 + else: + return 14 @property def _compilers_minimum_version(self): @@ -70,31 +68,32 @@ def configure(self): self.options.rm_safe("fPIC") def layout(self): - # src_folder must use the same source folder name the project cmake_layout(self, src_folder="src") - # We want DSOs in lib64 + # ASWF: DSOs in lib64 self.cpp.package.libdirs = ["lib64"] def requirements(self): if self.options.with_openimageio: - self.requires( - f"openimageio/{os.environ['ASWF_OIIO_VERSION']}@{self.user}/{self.channel}" - ) - self.requires( - f"python/{os.environ['ASWF_PYTHON_VERSION']}@{self.user}/{self.channel}" - ) + self.requires(f"oiio/{os.environ['ASWF_OIIO_VERSION']}@{self.user}/{self.channel}") # ASWF: oiio backwards compatibility + self.requires(f"cpython/{os.environ['ASWF_CPYTHON_VERSION']}@{self.user}/{self.channel}") # Comment out to use vendored pybind11 - self.requires( - f"pybind11/{os.environ['ASWF_PYBIND11_VERSION']}@{self.user}/{self.channel}" - ) + self.requires(f"pybind11/{os.environ['ASWF_PYBIND11_VERSION']}@{self.user}/{self.channel}") if self.settings.os in ["Linux", "FreeBSD"]: self.requires("xorg/system") self.requires("opengl/system") + def validate(self): + # validate the minimum cpp standard supported. For C++ projects only + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + def build_requirements(self): - self.build_requires( - f"cmake/{os.environ['ASWF_CMAKE_VERSION']}@{self.user}/{self.channel}" - ) + self.tool_requires("cmake/[>=3.24 <4]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -104,40 +103,60 @@ def generate(self): tc.variables["MATERIALX_BUILD_TESTS"] = False tc.variables["MATERIALX_TEST_RENDER"] = False tc.variables["MATERIALX_BUILD_PYTHON"] = "ON" - tc.variables["MATERIALX_PYTHON_VERSION"] = os.environ["ASWF_PYTHON_VERSION"] - if self.options.shared: - tc.variables["MATERIALX_BUILD_SHARED_LIBS"] = "ON" - tc.variables["MATERIALX_BUILD_GEN_MSL"] = ( - self.options.build_gen_msl and is_apple_os - ) + tc.variables["MATERIALX_PYTHON_VERSION"] = os.environ["ASWF_CPYTHON_VERSION"] + tc.variables["MATERIALX_BUILD_SHARED_LIBS"] = self.options.shared + tc.variables["MATERIALX_BUILD_GEN_MSL"] = self.options.build_gen_msl and is_apple_os + tc.variables["MATERIALX_INSTALL_LIB_PATH"] = "lib64" # ASWF: otherwise end up in lib + tc.variables["MATERIALX_INSTALL_STDLIB_PATH"] = os.path.join("share","MaterialX") # ASWF: otherwise end up in python + # TODO: Remove when Conan 1 support is dropped + if not self.settings.compiler.cppstd: + tc.variables["MATERIALX_BUILD_USE_CCACHE"] = self._min_cppstd + tc.variables["MATERIALX_BUILD_USE_CCACHE"] = False + tc.generate() + + tc = CMakeDeps(self) tc.generate() + def _patch_sources(self): + apply_conandata_patches(self) # ASWF: we have external patches + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_CXX_STANDARD", + "# set(CMAKE_CXX_STANDARD") + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_POSITION_INDEPENDENT_CODE", + "# set(CMAKE_POSITION_INDEPENDENT_CODE") + def build(self): - env_build = RunEnvironment(self) - with tools.environment_append(env_build.vars): - apply_conandata_patches(self) - cmake = CMake(self) - cmake.configure() - cmake.build(cli_args=["--verbose"]) - # cmake.build() + self._patch_sources() # ASWF: don't forget to patch sources + cmake = CMake(self) + cmake.configure() + cmake.build() def package(self): - copy( - self, - "LICENSE.md", - src=self.source_folder, - dst=os.path.join(self.package_folder, "licenses", self.name), - ) + # ASWF: license files in package subdirs + copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) cmake = CMake(self) cmake.install() - rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + + rmdir(self, os.path.join(self.package_folder, "resources")) + rmdir(self, os.path.join(self.package_folder, "libraries")) + # ASWF: keep CMake modules + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) + rm(self, "README.md", self.package_folder) + rm(self, "CHANGELOG.md", self.package_folder) + rm(self, "THIRD-PARTY.md", self.package_folder) + rm(self, "LICENSE", self.package_folder) + # ASWF: libraries in lib64 + rm(self, "*.la", os.path.join(self.package_folder, "lib64")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib64")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) def package_info(self): - self.cpp_info.requires.append("python::PythonLibs") + self.cpp_info.requires.append("cpython::cpython") # You can try uncommenting the following to use vendored pybind11 # instead of Conan dependency - # self.cpp_info.requires.append("pybind11::main") - self.env_info.PYTHONPATH.append(os.path.join(self.package_folder, "python")) + self.cpp_info.requires.append("pybind11::pybind11") + #self.env_info.PYTHONPATH.append(os.path.join(self.package_folder, "python")) if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("m") @@ -149,51 +168,29 @@ def package_info(self): self.cpp_info.components["MaterialXFormat"].requires = ["MaterialXCore"] self.cpp_info.components["MaterialXGenGlsl"].libs = ["MaterialXGenGlsl"] - self.cpp_info.components["MaterialXGenGlsl"].requires = [ - "MaterialXCore", - "MaterialXGenShader", - ] + self.cpp_info.components["MaterialXGenGlsl"].requires = ["MaterialXCore", "MaterialXGenShader"] self.cpp_info.components["MaterialXGenMdl"].libs = ["MaterialXGenMdl"] - self.cpp_info.components["MaterialXGenMdl"].requires = [ - "MaterialXCore", - "MaterialXGenShader", - ] + self.cpp_info.components["MaterialXGenMdl"].requires = ["MaterialXCore", "MaterialXGenShader"] self.cpp_info.components["MaterialXGenMsl"].libs = ["MaterialXGenMsl"] - self.cpp_info.components["MaterialXGenMsl"].requires = [ - "MaterialXCore", - "MaterialXGenShader", - ] + self.cpp_info.components["MaterialXGenMsl"].requires = ["MaterialXCore", "MaterialXGenShader"] self.cpp_info.components["MaterialXGenOsl"].libs = ["MaterialXGenOsl"] - self.cpp_info.components["MaterialXGenOsl"].requires = [ - "MaterialXCore", - "MaterialXGenShader", - ] + self.cpp_info.components["MaterialXGenOsl"].requires = ["MaterialXCore", "MaterialXGenShader"] self.cpp_info.components["MaterialXGenShader"].libs = ["MaterialXGenShader"] - self.cpp_info.components["MaterialXGenShader"].requires = [ - "MaterialXCore", - "MaterialXFormat", - ] + self.cpp_info.components["MaterialXGenShader"].requires = ["MaterialXCore", "MaterialXFormat"] self.cpp_info.components["MaterialXRender"].libs = ["MaterialXRender"] self.cpp_info.components["MaterialXRender"].requires = ["MaterialXGenShader"] if self.options.with_openimageio: - self.cpp_info.components["MaterialXRender"].requires.append( - "openimageio::openimageio" - ) + self.cpp_info.components["MaterialXRender"].requires.append("oiio::OpenImageIO") # ASWF: Conan package named oiio self.cpp_info.components["MaterialXRenderGlsl"].libs = ["MaterialXRenderGlsl"] - self.cpp_info.components["MaterialXRenderGlsl"].requires = [ - "MaterialXRenderHw", - "MaterialXGenGlsl", - ] + self.cpp_info.components["MaterialXRenderGlsl"].requires = ["MaterialXRenderHw", "MaterialXGenGlsl"] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["MaterialXRenderGlsl"].requires.append( - "opengl::opengl" - ) + self.cpp_info.components["MaterialXRenderGlsl"].requires.append("opengl::opengl") elif self.settings.os in ["Macos", "iOS"]: self.cpp_info.frameworks.extend(["Foundation", "Cocoa", "OpenGL"]) if self.settings.os == "Macos": @@ -219,28 +216,16 @@ def package_info(self): if self.options.build_gen_msl: self.cpp_info.components["MaterialXGenMsl"].libs = ["MaterialXGenMsl"] - self.cpp_info.components["MaterialXGenMsl"].requires = [ - "MaterialXCore", - "MaterialXGenShader", - ] - + self.cpp_info.components["MaterialXGenMsl"].requires = ["MaterialXCore", "MaterialXGenShader"] + if self.options.build_gen_msl and self.settings.os == "Macos": self.cpp_info.components["MaterialXRenderMsl"].libs = ["MaterialXRenderMsl"] - self.cpp_info.components["MaterialXRenderMsl"].requires = [ - "MaterialXRenderHw", - "MaterialXGenMsl", - ] - self.cpp_info.frameworks.extend( - ["CoreFoundation", "OpenGL", "AppKit", "Metal"] - ) + self.cpp_info.components["MaterialXRenderMsl"].requires = ["MaterialXRenderHw", "MaterialXGenMsl"] + self.cpp_info.frameworks.extend(["CoreFoundation", "OpenGL", "AppKit", "Metal"]) if self.settings.os == "Macos": self.cpp_info.includedirs.extend(["include/compat/osx"]) else: self.cpp_info.includedirs.extend(["include/compat/ios"]) - self.env_info.CMAKE_PREFIX_PATH.append( - os.path.join(self.package_folder, "lib64", "cmake") - ) - - def deploy(self): - self.copy("*", symlinks=True) + # ASWF FIXME still need this? + self.env_info.CMAKE_PREFIX_PATH.append(os.path.join(self.package_folder, "lib64", "cmake")) diff --git a/packages/conan/recipes/materialx/patches/1.39.3-cmake-libraries.patch b/packages/conan/recipes/materialx/patches/1.39.3-cmake-libraries.patch new file mode 100644 index 00000000..d08fa51e --- /dev/null +++ b/packages/conan/recipes/materialx/patches/1.39.3-cmake-libraries.patch @@ -0,0 +1,11 @@ +--- cmake/modules/MaterialXConfig.cmake.in ++++ cmake/modules/MaterialXConfig.cmake.in +@@ -18,7 +18,7 @@ + # MATERIALX_RESOURCES_DIR Path to MaterialX Resources (sample data, mtlx etc) + + set_and_check(MATERIALX_BASE_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@") +-set_and_check(MATERIALX_STDLIB_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@/libraries") ++set_and_check(MATERIALX_STDLIB_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@/share/MaterialX") + if(@MATERIALX_BUILD_PYTHON@ AND @MATERIALX_INSTALL_PYTHON@) + set_and_check(MATERIALX_PYTHON_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@/python") + endif() diff --git a/packages/conan/recipes/materialx/patches/dummy.diff b/packages/conan/recipes/materialx/patches/dummy.diff deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/conan/recipes/materialx/patches/pybind11-cmake.patch b/packages/conan/recipes/materialx/patches/pybind11-cmake.patch new file mode 100644 index 00000000..de9c400f --- /dev/null +++ b/packages/conan/recipes/materialx/patches/pybind11-cmake.patch @@ -0,0 +1,10 @@ +--- a/source/PyMaterialX/CMakeLists.txt ++++ b/source/PyMaterialX/CMakeLists.txt +@@ -9,6 +9,7 @@ + + # First look for a PyBind11 package via CMake. + if(MATERIALX_PYTHON_PYBIND11_DIR STREQUAL "") ++ find_package(Python3 COMPONENTS Interpreter Development) + find_package(pybind11 QUIET) + if(pybind11_FOUND) + include_directories(${PYBIND11_INCLUDE_DIR}) diff --git a/packages/conan/recipes/materialx/test_package/CMakeLists.txt b/packages/conan/recipes/materialx/test_package/CMakeLists.txt index 88effdf0..655c0799 100644 --- a/packages/conan/recipes/materialx/test_package/CMakeLists.txt +++ b/packages/conan/recipes/materialx/test_package/CMakeLists.txt @@ -1,3 +1,9 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/materialx/all/test_package/CMakeLists.txt + cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) diff --git a/packages/conan/recipes/materialx/test_package/conanfile.py b/packages/conan/recipes/materialx/test_package/conanfile.py index ec46b04a..cfdc9c77 100644 --- a/packages/conan/recipes/materialx/test_package/conanfile.py +++ b/packages/conan/recipes/materialx/test_package/conanfile.py @@ -1,17 +1,18 @@ # Copyright (c) Contributors to the conan-center-index Project. All rights reserved. # Copyright (c) Contributors to the aswf-docker Project. All rights reserved. # SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/materialx/all/test_package/conanfile.py from conan import ConanFile from conan.tools.build import can_run from conan.tools.cmake import cmake_layout, CMake -from conans import tools, RunEnvironment import os - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type", "python" +class TestMaterialXConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) @@ -21,19 +22,10 @@ def layout(self): def build(self): cmake = CMake(self) - with tools.environment_append(tools.RunEnvironment(self).vars): - cmake.configure() - cmake.build() + cmake.configure() + cmake.build() def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindir, "test_package") self.run(bin_path, env="conanrun") - # Skip Python test until we can figure out how to propagate PYTHONPATH - # self.run( - # "{} {}".format( - # self.deps_user_info["python"].python_interp, - # os.path.join(self.source_folder, "test_package.py"), - # ), - # run_environment=True, - # ) diff --git a/packages/conan/recipes/materialx/test_package/test_package.cpp b/packages/conan/recipes/materialx/test_package/test_package.cpp index a47da8e2..aea972e5 100644 --- a/packages/conan/recipes/materialx/test_package/test_package.cpp +++ b/packages/conan/recipes/materialx/test_package/test_package.cpp @@ -1,6 +1,10 @@ -// Copyright (c) Contributors to the conan-center-index Project. All rights reserved. -// Copyright (c) Contributors to the aswf-docker Project. All rights reserved. -// SPDX-License-Identifier: MIT +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/materialx/all/test_package/test_package.cpp +*/ #include diff --git a/packages/conan/recipes/materialx/test_package/test_package.py b/packages/conan/recipes/materialx/test_package/test_package.py deleted file mode 100644 index 4bdc3c90..00000000 --- a/packages/conan/recipes/materialx/test_package/test_package.py +++ /dev/null @@ -1,3 +0,0 @@ -import MaterialX as mx - -print(mx.Vector3(1, 2, 3)) diff --git a/packages/conan/recipes/md4c/conandata.yml b/packages/conan/recipes/md4c/conandata.yml new file mode 100644 index 00000000..3569a6ac --- /dev/null +++ b/packages/conan/recipes/md4c/conandata.yml @@ -0,0 +1,29 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/md4c/all/conandata.yml + +sources: + "0.5.2": + url: "https://github.com/mity/md4c/archive/refs/tags/release-0.5.2.tar.gz" + sha256: "55d0111d48fb11883aaee91465e642b8b640775a4d6993c2d0e7a8092758ef21" + "0.5.1": + url: "https://github.com/mity/md4c/archive/refs/tags/release-0.5.1.tar.gz" + sha256: "2dca17c6175a7f11182943079c2a4f9adb5071433e3d3d05ba801ff794993f34" + "0.4.8": + url: "https://github.com/mity/md4c/archive/refs/tags/release-0.4.8.tar.gz" + sha256: "4a457df853425b6bb6e3457aa1d1a13bccec587a04c38c622b1013a0da41439f" +patches: + "0.5.2": + - patch_file: "patches/0.5.2-0001-honor-vc-runtime.patch" + patch_description: "Honor msvc runtime from profile" + patch_type: "conan" + "0.5.1": + - patch_file: "patches/0.5.1-0001-honor-vc-runtime.patch" + patch_description: "Honor msvc runtime from profile" + patch_type: "conan" + "0.4.8": + - patch_file: "patches/0.4.8-0001-honor-vc-runtime.patch" + patch_description: "Honor msvc runtime from profile" + patch_type: "conan" diff --git a/packages/conan/recipes/md4c/conanfile.py b/packages/conan/recipes/md4c/conanfile.py new file mode 100644 index 00000000..890bf412 --- /dev/null +++ b/packages/conan/recipes/md4c/conanfile.py @@ -0,0 +1,128 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/770675220095fb519ea6e1473df3db264ee655ec/recipes/md4c/all/conanfile.py + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir +from conan.tools.scm import Version + +import os + +required_conan_version = ">=1.54.0" + + +class Md4cConan(ConanFile): + name = "md4c" + description = "C Markdown parser. Fast. SAX-like interface. Compliant to CommonMark specification." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/mity/md4c" + topics = ("markdown-parser", "markdown") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "md2html": [True, False], + "encoding": ["utf-8", "utf-16", "ascii"], + } + default_options = { + "shared": False, + "fPIC": True, + #"md2html": True, # conditional default value in config_options + "encoding": "utf-8", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + if Version(self.version) >= "0.5.0": + # Set it to false for iOS, tvOS, watchOS, visionOS + # to prevent cmake from creating a bundle for the md2html executable + is_ios_variant = is_apple_os(self) and not self.settings.os == "Macos" + self.options.md2html = not is_ios_variant + else: + # md2html was introduced in 0.5.0 + del self.options.md2html + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def validate(self): + if self.settings.os != "Windows" and self.options.encoding == "utf-16": + raise ConanInvalidConfiguration(f"{self.ref} doesn't support utf-16 options on non-Windows platforms") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["BUILD_MD2HTML_EXECUTABLE"] = self.options.get_safe("md2html", True) + if self.options.encoding == "utf-8": + tc.preprocessor_definitions["MD4C_USE_UTF8"] = "1" + elif self.options.encoding == "utf-16": + tc.preprocessor_definitions["MD4C_USE_UTF16"] = "1" + elif self.options.encoding == "ascii": + tc.preprocessor_definitions["MD4C_USE_ASCII"] = "1" + tc.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + # Honor encoding option + replace_in_file( + self, + os.path.join(self.source_folder, "src", "CMakeLists.txt"), + "COMPILE_FLAGS \"-DMD4C_USE_UTF8\"", + "", + ) + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + # ASWF: licenses in package subdirs + copy(self, pattern="LICENSE.md", dst=os.path.join(self.package_folder, "licenses", self.name), src=self.source_folder) + cmake = CMake(self) + cmake.install() + # ASWF: keep cmake modules in lib64 + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "md4c") + + self.cpp_info.components["_md4c"].set_property("cmake_target_name", "md4c::md4c") + self.cpp_info.components["_md4c"].set_property("pkg_config_name", "md4c") + self.cpp_info.components["_md4c"].libs = ["md4c"] + if self.settings.os == "Windows" and self.options.encoding == "utf-16": + self.cpp_info.components["_md4c"].defines.append("MD4C_USE_UTF16") + + self.cpp_info.components["md4c_html"].set_property("cmake_target_name", "md4c::md4c-html") + self.cpp_info.components["md4c_html"].set_property("pkg_config_name", "md4c-html") + self.cpp_info.components["md4c_html"].libs = ["md4c-html"] + self.cpp_info.components["md4c_html"].requires = ["_md4c"] + + # workaround so that global target & pkgconfig file have all components while avoiding + # to create unofficial target or pkgconfig file + self.cpp_info.set_property("cmake_target_name", "md4c::md4c-html") + self.cpp_info.set_property("pkg_config_name", "md4c-html") diff --git a/packages/conan/recipes/md4c/patches/0.4.8-0001-honor-vc-runtime.patch b/packages/conan/recipes/md4c/patches/0.4.8-0001-honor-vc-runtime.patch new file mode 100644 index 00000000..a20b07a1 --- /dev/null +++ b/packages/conan/recipes/md4c/patches/0.4.8-0001-honor-vc-runtime.patch @@ -0,0 +1,18 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,15 +42,6 @@ elseif(MSVC) + # Disable warnings about the so-called unsecured functions: + add_definitions(/D_CRT_SECURE_NO_WARNINGS) + +- # Specify proper C runtime library: +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELWITHDEBINFO "{$CMAKE_C_FLAGS_RELWITHDEBINFO}") +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}") +- set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd") +- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT") +- set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /MT") +- set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELEASE} /MT") + endif() + + include(GNUInstallDirs) diff --git a/packages/conan/recipes/md4c/patches/0.5.1-0001-honor-vc-runtime.patch b/packages/conan/recipes/md4c/patches/0.5.1-0001-honor-vc-runtime.patch new file mode 100644 index 00000000..a6ad6249 --- /dev/null +++ b/packages/conan/recipes/md4c/patches/0.5.1-0001-honor-vc-runtime.patch @@ -0,0 +1,29 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index be781e5..c60da0a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -46,15 +46,15 @@ elseif(MSVC) + # Disable warnings about the so-called unsecured functions: + add_definitions(/D_CRT_SECURE_NO_WARNINGS /W3) + +- # Specify proper C runtime library: +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELWITHDEBINFO "{$CMAKE_C_FLAGS_RELWITHDEBINFO}") +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}") +- set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd") +- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT") +- set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /MT") +- set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELEASE} /MT") ++# # Specify proper C runtime library: ++# string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") ++# string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") ++# string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELWITHDEBINFO "{$CMAKE_C_FLAGS_RELWITHDEBINFO}") ++# string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}") ++# set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd") ++# set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT") ++# set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /MT") ++# set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELEASE} /MT") + endif() + + include(GNUInstallDirs) diff --git a/packages/conan/recipes/md4c/patches/0.5.2-0001-honor-vc-runtime.patch b/packages/conan/recipes/md4c/patches/0.5.2-0001-honor-vc-runtime.patch new file mode 100644 index 00000000..5e8fb995 --- /dev/null +++ b/packages/conan/recipes/md4c/patches/0.5.2-0001-honor-vc-runtime.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aec8293..f24e654 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,14 +53,14 @@ elseif(MSVC) + add_compile_options(/W3) + + # Specify proper C runtime library: +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELWITHDEBINFO "{$CMAKE_C_FLAGS_RELWITHDEBINFO}") +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}") +- set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd") +- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT") +- set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /MT") +- set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELEASE} /MT") ++ # string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") ++ # string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") ++ # string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELWITHDEBINFO "{$CMAKE_C_FLAGS_RELWITHDEBINFO}") ++ # string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}") ++ # set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd") ++ # set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT") ++ # set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /MT") ++ # set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELEASE} /MT") + endif() + + include(GNUInstallDirs) diff --git a/packages/conan/recipes/md4c/test_package/CMakeLists.txt b/packages/conan/recipes/md4c/test_package/CMakeLists.txt new file mode 100644 index 00000000..8f21c070 --- /dev/null +++ b/packages/conan/recipes/md4c/test_package/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/md4c/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(md4c CONFIG REQUIRED) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(test_package PRIVATE md4c::md4c) diff --git a/packages/conan/recipes/md4c/test_package/conanfile.py b/packages/conan/recipes/md4c/test_package/conanfile.py new file mode 100644 index 00000000..fa5be9c9 --- /dev/null +++ b/packages/conan/recipes/md4c/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/md4c/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/md4c/test_package/test_package.c b/packages/conan/recipes/md4c/test_package/test_package.c new file mode 100644 index 00000000..635ebb6d --- /dev/null +++ b/packages/conan/recipes/md4c/test_package/test_package.c @@ -0,0 +1,65 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/md4c/all/test_package/test_package.c +*/ + +#include "md4c.h" + +#include +#include + +int enter_block(MD_BLOCKTYPE type, void* detail, void* userdata) { + printf("enter block\n"); + return 0; +} + +int leave_block(MD_BLOCKTYPE type, void* detail, void* userdata) { + printf("leave block\n"); + return 0; +} + +int enter_span(MD_SPANTYPE type, void* detail, void* userdata) { + printf("enter span\n"); + return 0; +} + +int leave_span(MD_SPANTYPE type, void* detail, void* userdata) { + printf("leave span\n"); + return 0; +} + +int text_block(MD_TEXTTYPE type, const MD_CHAR* text, MD_SIZE size, void* usrdata) { + printf("text block\n"); + return 0; +} + +int main() { + const char DATA[] = + "# title\n" + "\n" + "example1\n" + "`example2`\n" + "\n" + "> example3\n" + "\n" + ; + + printf("%s\n", DATA); + + MD_PARSER parser; + + parser.abi_version = 0; + parser.flags = MD_FLAG_TABLES; + parser.enter_block = enter_block; + parser.leave_block = leave_block; + parser.enter_span = enter_span; + parser.leave_span = leave_span; + parser.text = text_block; + + md_parse(DATA, strlen(DATA), &parser, NULL); + + return 0; +} diff --git a/packages/conan/recipes/minizip-ng/conandata.yml b/packages/conan/recipes/minizip-ng/conandata.yml new file mode 100644 index 00000000..1a70f39b --- /dev/null +++ b/packages/conan/recipes/minizip-ng/conandata.yml @@ -0,0 +1,70 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/minizip-ng/all/conandata.yml + +sources: + "4.0.8": + url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.8.tar.gz" + sha256: "c3e9ceab2bec26cb72eba1cf46d0e2c7cad5d2fe3adf5df77e17d6bbfea4ec8f" + "4.0.7": + url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.7.tar.gz" + sha256: "a87f1f734f97095fe1ef0018217c149d53d0f78438bcb77af38adc21dff2dfbc" + "4.0.6": + url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.6.tar.gz" + sha256: "e96ed3866706a67dbed05bf035e26ef6b60f408e1381bf0fe9af17fe2c0abebc" + "4.0.5": + url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.5.tar.gz" + sha256: "9bb636474b8a4269280d32aca7de4501f5c24cc642c9b4225b4ed7b327f4ee73" + "4.0.4": + url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.4.tar.gz" + sha256: "955800fe39f9d830fcb84e60746952f6a48e41093ec7a233c63ad611b5fcfe9f" + "4.0.3": + url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.3.tar.gz" + sha256: "e39a736d4f55c22fa548e68225b2e92bc22aedd9ab90d002b0c5851e3a7bdace" + "4.0.2": + url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.2.tar.gz" + sha256: "22008b4639197edfc3c5797c8bd1d7a3b2e684bf669a26834faf12b4026dba1c" + "4.0.1": + url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.1.tar.gz" + sha256: "63e47a2b4dbac0da501f43f4da74f118dfb3ef0dee0ffbbe89428271002260f8" + "4.0.0": + url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.0.tar.gz" + sha256: "f9062e576de026fd5026d65597de3b05263cd4d91400cacdbbe36dfa8a642fff" + "3.0.10": + url: "https://github.com/zlib-ng/minizip-ng/archive/3.0.10.tar.gz" + sha256: "d4a549731d8c7074e421dbab6d8b8ad0a93067752fe767c464f0f40fa5f0a80d" + "3.0.9": + url: "https://github.com/zlib-ng/minizip-ng/archive/3.0.9.tar.gz" + sha256: "992693a532eb15b20d306e6aeea1a1a6501bd19dca993ebe9a95fd22d6b7fd74" + "3.0.8": + url: "https://github.com/zlib-ng/minizip-ng/archive/3.0.8.tar.gz" + sha256: "27cc2f62cd02d79b71b346fc6ace02728385f8ba9c6b5f124062b0790a04629a" + "3.0.7": + url: "https://github.com/zlib-ng/minizip-ng/archive/3.0.7.tar.gz" + sha256: "39981a0db1bb6da504909bce63d7493286c5e50825c056564544c990d15c55cf" +patches: + "3.0.10": + - patch_file: "patches/3.0.10-0001-fix-cmake-project.patch" + patch_description: "CMake: declare project() sooner" + patch_type: "conan" + - patch_file: "patches/3.0.10-0001-mz-path-remove-slash.patch" + patch_description: "Backport https://github.com/zlib-ng/minizip-ng/issues/739 fix" + patch_type: "conan" + "3.0.9": + - patch_file: "patches/3.0.9-0001-fix-cmake-project.patch" + patch_description: "CMake: declare project() sooner" + patch_type: "conan" + "3.0.8": + - patch_file: "patches/3.0.8-0001-fix-cmake-project.patch" + patch_description: "CMake: declare project() sooner" + patch_type: "conan" + "3.0.7": + - patch_file: "patches/3.0.7-0001-fix-cmake-project.patch" + patch_description: "CMake: declare project() sooner" + patch_type: "conan" + - patch_file: "patches/3.0.6-0002-fix-lzma-libdir.patch" + patch_description: "CMake: inject libdir of lzma" + patch_type: "conan" + patch_source: "https://github.com/zlib-ng/minizip-ng/pull/658" diff --git a/packages/conan/recipes/minizip-ng/conanfile.py b/packages/conan/recipes/minizip-ng/conanfile.py new file mode 100644 index 00000000..62ccdbbc --- /dev/null +++ b/packages/conan/recipes/minizip-ng/conanfile.py @@ -0,0 +1,211 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/minizip-ng/all/conanfile.py + +from conan import ConanFile +from conan.tools.apple import is_apple_os +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import Environment, VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir +from conan.tools.gnu import PkgConfigDeps +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.53.0" + + +class MinizipNgConan(ConanFile): + name = "minizip-ng" + description = "Fork of the popular zip manipulation library found in the zlib distribution." + license = "Zlib" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/zlib-ng/minizip-ng" + topics = ("compression", "zip") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "mz_compatibility": [True, False], + "with_zlib": [True, False], + "with_bzip2": [True, False], + "with_lzma": [True, False], + "with_zstd": [True, False], + "with_openssl": [True, False], + "with_iconv": [True, False], + "with_libbsd": [True, False], + "with_libcomp": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "mz_compatibility": False, + "with_zlib": True, + "with_bzip2": True, + "with_lzma": True, + "with_zstd": True, + "with_openssl": True, + "with_iconv": True, + "with_libbsd": True, + "with_libcomp": True, + } + + @property + def _is_clang_cl(self): + return self.settings.os == "Windows" and self.settings.compiler == "clang" + + @property + def _needs_pkg_config(self): + return self.options.with_lzma or self.options.with_zstd or self.options.with_openssl + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + del self.options.with_iconv + del self.options.with_libbsd + if not is_apple_os(self): + del self.options.with_libcomp + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + if self.options.get_safe("with_libcomp"): + del self.options.with_zlib + + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def requirements(self): + if self.options.get_safe("with_zlib"): + self.requires("zlib/[>=1.2.11 <2]") + if self.options.with_bzip2: + self.requires("bzip2/1.0.8") + if self.options.with_lzma: + self.requires("xz_utils/5.4.5") + if self.options.with_zstd: + self.requires("zstd/1.5.5") + if self.options.with_openssl: + self.requires("openssl/[>=1.1 <4]") + if self.settings.os != "Windows": + if self.options.get_safe("with_iconv"): + self.requires("libiconv/1.17", transitive_libs=True) + + def build_requirements(self): + if self._needs_pkg_config: + self.tool_requires("pkgconf/2.1.0") + if Version(self.version) >= "4.0.0": + self.tool_requires("cmake/[>=3.19 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + if self._needs_pkg_config: + env = VirtualBuildEnv(self) + env.generate() + + tc = CMakeToolchain(self) + tc.cache_variables["MZ_FETCH_LIBS"] = False + tc.cache_variables["MZ_COMPAT"] = self.options.mz_compatibility + tc.cache_variables["MZ_ZLIB"] = self.options.get_safe("with_zlib", False) + tc.cache_variables["MZ_BZIP2"] = self.options.with_bzip2 + tc.cache_variables["MZ_LZMA"] = self.options.with_lzma + tc.cache_variables["MZ_ZSTD"] = self.options.with_zstd + tc.cache_variables["MZ_OPENSSL"] = self.options.with_openssl + tc.cache_variables["MZ_LIBCOMP"] = self.options.get_safe("with_libcomp", False) + if self.settings.os != "Windows": + tc.cache_variables["MZ_ICONV"] = self.options.with_iconv + tc.cache_variables["MZ_LIBBSD"] = self.options.with_libbsd + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + if self._needs_pkg_config: + deps = PkgConfigDeps(self) + deps.generate() + # TODO: to remove when properly handled by conan (see https://github.com/conan-io/conan/issues/11962) + env = Environment() + env.prepend_path("PKG_CONFIG_PATH", self.generators_folder) + env.vars(self).save_script("conanbuild_pkg_config_path") + + def _patch_sources(self): + apply_conandata_patches(self) + if Version(self.version) < "4.0.0": + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE 1)", + "") + elif Version(self.version) == "4.0.0": + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set_target_properties(${MINIZIP_TARGET} PROPERTIES POSITION_INDEPENDENT_CODE 1)", + "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + # ASWF: license files in package subdirectory + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + cmake = CMake(self) + cmake.install() + # ASWF: cmake files in lib64, keep for non-Conan use + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "minizip-ng") + # ASWF: we build minizip-ng without backwards compat but somehow still end up with MINIZIP::minizip in CMake files + if self.options.mz_compatibility: + self.cpp_info.set_property("cmake_target_name", "MINIZIP::minizip") + else: + self.cpp_info.set_property("cmake_target_name", "MINIZIP::minizip-ng") + # self.cpp_info.set_property("cmake_target_aliases", ["MINIZIP::minizip"]) + self.cpp_info.set_property("pkg_config_name", "minizip") + + # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed + prefix = "lib" if is_msvc(self) or self._is_clang_cl else "" + suffix = "" if self.options.mz_compatibility else "-ng" + self.cpp_info.components["minizip"].libs = [f"{prefix}minizip{suffix}"] + if self.options.with_lzma: + self.cpp_info.components["minizip"].defines.append("HAVE_LZMA") + if is_apple_os(self) and self.options.get_safe("with_libcomp"): + self.cpp_info.components["minizip"].defines.append("HAVE_LIBCOMP") + if self.options.with_bzip2: + self.cpp_info.components["minizip"].defines.append("HAVE_BZIP2") + + if Version(self.version) >= "4.0.0": + minizip_dir = "minizip" if self.options.mz_compatibility else "minizip-ng" + self.cpp_info.components["minizip"].includedirs.append(os.path.join(self.package_folder, "include", minizip_dir)) + + self.cpp_info.components["minizip"].set_property("cmake_target_name", "MINIZIP::minizip" if self.options.mz_compatibility else "MINIZIP::minizip-ng" ) + self.cpp_info.components["minizip"].set_property("pkg_config_name", "minizip") + if self.options.get_safe("with_zlib"): + self.cpp_info.components["minizip"].requires.append("zlib::zlib") + if self.options.with_bzip2: + self.cpp_info.components["minizip"].requires.append("bzip2::bzip2") + if self.options.with_lzma: + self.cpp_info.components["minizip"].requires.append("xz_utils::xz_utils") + if self.options.with_zstd: + self.cpp_info.components["minizip"].requires.append("zstd::zstd") + if self.options.with_openssl: + self.cpp_info.components["minizip"].requires.append("openssl::openssl") + elif is_apple_os(self): + self.cpp_info.components["minizip"].frameworks.extend(["CoreFoundation", "Security"]) + elif self.settings.os == "Windows": + self.cpp_info.components["minizip"].system_libs.append("crypt32") + if self.settings.os != "Windows" and self.options.with_iconv: + self.cpp_info.components["minizip"].requires.append("libiconv::libiconv") diff --git a/packages/conan/recipes/minizip-ng/patches/3.0.10-0001-fix-cmake-project.patch b/packages/conan/recipes/minizip-ng/patches/3.0.10-0001-fix-cmake-project.patch new file mode 100644 index 00000000..59a38a7b --- /dev/null +++ b/packages/conan/recipes/minizip-ng/patches/3.0.10-0001-fix-cmake-project.patch @@ -0,0 +1,18 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -80,6 +80,7 @@ + + # Library version + set(VERSION "3.0.10") ++project(minizip${MZ_PROJECT_SUFFIX} LANGUAGES C VERSION ${VERSION}) + + # API version + set(SOVERSION "3") +@@ -662,7 +663,6 @@ + list(APPEND MINIZIP_INC ${CMAKE_CURRENT_SOURCE_DIR}) + + # Create minizip library +-project(minizip${MZ_PROJECT_SUFFIX} LANGUAGES C VERSION ${VERSION}) + + if(NOT ${MZ_PROJECT_SUFFIX} STREQUAL "") + message(STATUS "Project configured as ${PROJECT_NAME}") diff --git a/packages/conan/recipes/minizip-ng/patches/3.0.10-0001-mz-path-remove-slash.patch b/packages/conan/recipes/minizip-ng/patches/3.0.10-0001-mz-path-remove-slash.patch new file mode 100644 index 00000000..84b41632 --- /dev/null +++ b/packages/conan/recipes/minizip-ng/patches/3.0.10-0001-mz-path-remove-slash.patch @@ -0,0 +1,11 @@ +--- mz_os.c ++++ mz_os.c +@@ -68,7 +68,7 @@ + + int32_t mz_path_has_slash(const char *path) { + int32_t path_len = (int32_t)strlen(path); +- if (path[path_len - 1] != '\\' && path[path_len - 1] != '/') ++ if (path_len > 0 && path[path_len - 1] != '\\' && path[path_len - 1] != '/') + return MZ_EXIST_ERROR; + return MZ_OK; + } diff --git a/packages/conan/recipes/minizip-ng/patches/3.0.6-0002-fix-lzma-libdir.patch b/packages/conan/recipes/minizip-ng/patches/3.0.6-0002-fix-lzma-libdir.patch new file mode 100644 index 00000000..5e74ea2f --- /dev/null +++ b/packages/conan/recipes/minizip-ng/patches/3.0.6-0002-fix-lzma-libdir.patch @@ -0,0 +1,10 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -304,6 +304,7 @@ if(MZ_LZMA) + + list(APPEND MINIZIP_INC ${LIBLZMA_INCLUDE_DIRS}) + list(APPEND MINIZIP_LIB ${LIBLZMA_LIBRARIES}) ++ list(APPEND MINIZIP_LBD ${LIBLZMA_LIBRARY_DIRS}) + + set(PC_PRIVATE_LIBS "${PC_PRIVATE_LIBS} -lliblzma") + elseif(MZ_FETCH_LIBS) diff --git a/packages/conan/recipes/minizip-ng/patches/3.0.7-0001-fix-cmake-project.patch b/packages/conan/recipes/minizip-ng/patches/3.0.7-0001-fix-cmake-project.patch new file mode 100644 index 00000000..5f9e5f69 --- /dev/null +++ b/packages/conan/recipes/minizip-ng/patches/3.0.7-0001-fix-cmake-project.patch @@ -0,0 +1,18 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -70,6 +70,7 @@ enable_language(C) + + # Library version + set(VERSION "3.0.7") ++project(minizip${MZ_PROJECT_SUFFIX} VERSION ${VERSION} LANGUAGES C) + + # API version + set(SOVERSION "3") +@@ -670,7 +671,6 @@ endif() + list(APPEND MINIZIP_INC ${CMAKE_CURRENT_SOURCE_DIR}) + + # Create minizip library +-project(minizip${MZ_PROJECT_SUFFIX} LANGUAGES C VERSION ${VERSION}) + + if(NOT ${MZ_PROJECT_SUFFIX} STREQUAL "") + message(STATUS "Project configured as ${PROJECT_NAME}") diff --git a/packages/conan/recipes/minizip-ng/patches/3.0.8-0001-fix-cmake-project.patch b/packages/conan/recipes/minizip-ng/patches/3.0.8-0001-fix-cmake-project.patch new file mode 100644 index 00000000..608ac1f9 --- /dev/null +++ b/packages/conan/recipes/minizip-ng/patches/3.0.8-0001-fix-cmake-project.patch @@ -0,0 +1,20 @@ +diff --git a/a/CMakeLists.txt b/b/CMakeLists.txt +index a073919..7ff2b58 100644 +--- a/a/CMakeLists.txt ++++ b/b/CMakeLists.txt +@@ -70,6 +70,7 @@ enable_language(C) + + # Library version + set(VERSION "3.0.8") ++project(minizip${MZ_PROJECT_SUFFIX} VERSION ${VERSION} LANGUAGES C) + + # API version + set(SOVERSION "3") +@@ -663,7 +664,6 @@ endif() + list(APPEND MINIZIP_INC ${CMAKE_CURRENT_SOURCE_DIR}) + + # Create minizip library +-project(minizip${MZ_PROJECT_SUFFIX} LANGUAGES C VERSION ${VERSION}) + + if(NOT ${MZ_PROJECT_SUFFIX} STREQUAL "") + message(STATUS "Project configured as ${PROJECT_NAME}") diff --git a/packages/conan/recipes/minizip-ng/patches/3.0.9-0001-fix-cmake-project.patch b/packages/conan/recipes/minizip-ng/patches/3.0.9-0001-fix-cmake-project.patch new file mode 100644 index 00000000..d91daa97 --- /dev/null +++ b/packages/conan/recipes/minizip-ng/patches/3.0.9-0001-fix-cmake-project.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index be7205c..cad8d50 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -80,6 +80,7 @@ enable_language(C) + + # Library version + set(VERSION "3.0.9") ++project(minizip${MZ_PROJECT_SUFFIX} VERSION ${VERSION} LANGUAGES C) + + # API version + set(SOVERSION "3") +@@ -665,7 +666,6 @@ endif() + list(APPEND MINIZIP_INC ${CMAKE_CURRENT_SOURCE_DIR}) + + # Create minizip library +-project(minizip${MZ_PROJECT_SUFFIX} LANGUAGES C VERSION ${VERSION}) + + if(NOT ${MZ_PROJECT_SUFFIX} STREQUAL "") + message(STATUS "Project configured as ${PROJECT_NAME}") diff --git a/packages/conan/recipes/minizip-ng/test_package/CMakeLists.txt b/packages/conan/recipes/minizip-ng/test_package/CMakeLists.txt new file mode 100644 index 00000000..dc1437c6 --- /dev/null +++ b/packages/conan/recipes/minizip-ng/test_package/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/minizip-ng/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES C) + +find_package(minizip-ng REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE MINIZIP::minizip-ng) +target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) diff --git a/packages/conan/recipes/minizip-ng/test_package/conanfile.py b/packages/conan/recipes/minizip-ng/test_package/conanfile.py new file mode 100644 index 00000000..1bd3cd48 --- /dev/null +++ b/packages/conan/recipes/minizip-ng/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/minizip-ng/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/minizip-ng/test_package/test_package.c b/packages/conan/recipes/minizip-ng/test_package/test_package.c new file mode 100644 index 00000000..856a1d7b --- /dev/null +++ b/packages/conan/recipes/minizip-ng/test_package/test_package.c @@ -0,0 +1,20 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/minizip-ng/all/test_package/test_package.c +*/ + +#include +#include +#include + +int main(int argc, char** argv) +{ + char output[256]; + memset(output, 'z', sizeof(output)); + int32_t err = mz_path_resolve("c:\\test\\.", output, sizeof(output)); + int32_t ok = (strcmp(output, "c:\\test\\") == 0); + return EXIT_SUCCESS; +} diff --git a/packages/conan/recipes/mpdecimal/conanfile.py b/packages/conan/recipes/mpdecimal/conanfile.py new file mode 100644 index 00000000..a4a5c56a --- /dev/null +++ b/packages/conan/recipes/mpdecimal/conanfile.py @@ -0,0 +1,18 @@ +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT + +from conan import ConanFile + +class SystemMpdecimalConan(ConanFile): + name = "mpdecimal" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["mpdec"] + + self.cpp_info.set_property("cmake_file_name", "mpdecimal") + self.cpp_info.set_property("cmake_target_name", "mpdecimal::mpdecimal") diff --git a/packages/conan/recipes/mpg123/conanfile.py b/packages/conan/recipes/mpg123/conanfile.py new file mode 100644 index 00000000..77b78c03 --- /dev/null +++ b/packages/conan/recipes/mpg123/conanfile.py @@ -0,0 +1,30 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/mpg123/all/conanfile.py + +from conan import ConanFile + +class SystemMpg123Conan(ConanFile): + name = "mpg123" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + + self.cpp_info.set_property("cmake_file_name", "mpg123") + + self.cpp_info.components["libmpg123"].libs = ["mpg123"] + self.cpp_info.components["libmpg123"].set_property("cmake_target_name", "MPG123::libmpg123") + + self.cpp_info.components["libout123"].libs = ["out123"] + self.cpp_info.components["libout123"].set_property("cmake_target_name", "MPG123::libout123") + self.cpp_info.components["libout123"].requires = ["libmpg123"] + + self.cpp_info.components["libsyn123"].libs = ["syn123"] + self.cpp_info.components["libsyn123"].set_property("cmake_target_name", "MPG123::libsyn123") + self.cpp_info.components["libsyn123"].requires = ["libmpg123"] diff --git a/packages/conan/recipes/nasm/conanfile.py b/packages/conan/recipes/nasm/conanfile.py new file mode 100644 index 00000000..5d537a84 --- /dev/null +++ b/packages/conan/recipes/nasm/conanfile.py @@ -0,0 +1,20 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b96b04ffad873992cbcfb98f0d84f6f44beb169d/recipes/nasm/all/conanfile.py + +from conan import ConanFile + +class SystemNASMConan(ConanFile): + name = "nasm" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = [""] + self.cpp_info.libdirs = [""] + self.cpp_info.bindirs = ["/usr/bin"] + self.cpp_info.binaries = ["nasm"] + diff --git a/packages/conan/recipes/ninja/conandata.yml b/packages/conan/recipes/ninja/conandata.yml index 123f87c3..bdbe6802 100644 --- a/packages/conan/recipes/ninja/conandata.yml +++ b/packages/conan/recipes/ninja/conandata.yml @@ -14,6 +14,9 @@ sources: "1.11.1": url: "https://github.com/ninja-build/ninja/archive/v1.11.1.tar.gz" sha256: "31747ae633213f1eda3842686f83c2aa1412e0f5691d1c14dbbcc67fe7400cea" + "1.12.1": + url: "https://github.com/ninja-build/ninja/archive/v1.12.1.tar.gz" + sha256: "821bdff48a3f683bc4bb3b6f0b5fe7b2d647cf65d52aeb63328c91a6c6df285a" patches: "1.10.0": - base_path: source_subfolder diff --git a/packages/conan/recipes/ninja/conanfile.py b/packages/conan/recipes/ninja/conanfile.py index fa325c43..f4418fca 100644 --- a/packages/conan/recipes/ninja/conanfile.py +++ b/packages/conan/recipes/ninja/conanfile.py @@ -19,11 +19,12 @@ class NinjaConan(ConanFile): name = "ninja" + package_type = "application" description = "Ninja is a small build system with a focus on speed" license = "Apache-2.0" url = "https://github.com/AcademySoftwareFoundation/aswf-docker" homepage = "https://github.com/ninja-build/ninja" - topics = ("conan", "ninja", "build") + topics = ("ninja", "build") settings = ( "os", "arch", @@ -31,9 +32,6 @@ class NinjaConan(ConanFile): "build_type", ) - def export_sources(self): - export_conandata_patches(self) - def layout(self): cmake_layout(self, src_folder="src") @@ -42,17 +40,20 @@ def package_id(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_TESTING"] = "OFF" + if self.settings.os == "Linux" and "libstdc++" in self.settings.compiler.libcxx: + # Link C++ library statically on Linux so that it can run on systems + # with an older C++ runtime + tc.cache_variables[ + "CMAKE_EXE_LINKER_FLAGS" + ] = "-static-libstdc++ -static-libgcc" tc.generate() - def _patch_sources(self): - apply_conandata_patches(self) - def build(self): - self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() @@ -72,6 +73,3 @@ def package_info(self): self.cpp_info.libdirs = [] self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) self.env_info.CONAN_CMAKE_GENERATOR = "Ninja" - - def deploy(self): - self.copy("*", symlinks=True) diff --git a/packages/conan/recipes/ninja/test_package/conanfile.py b/packages/conan/recipes/ninja/test_package/conanfile.py index 9da79ecb..18b4e003 100644 --- a/packages/conan/recipes/ninja/test_package/conanfile.py +++ b/packages/conan/recipes/ninja/test_package/conanfile.py @@ -1,7 +1,13 @@ -from conans import ConanFile -import os +from conan import ConanFile -class TestPackage(ConanFile): +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "VirtualBuildEnv" + test_type = "explicit" + + def build_requirements(self): + self.tool_requires(self.tested_reference_str) + def test(self): - self.run("ninja --version", run_environment=True) + self.run("ninja --version") diff --git a/packages/conan/recipes/nspr/conanfile.py b/packages/conan/recipes/nspr/conanfile.py new file mode 100644 index 00000000..de5237d7 --- /dev/null +++ b/packages/conan/recipes/nspr/conanfile.py @@ -0,0 +1,20 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/nspr/all/conanfile.py# + +from conan import ConanFile + +class SystemNsprConan(ConanFile): + name = "nspr" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include/nspr4"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["plds4", "plc4", "nspr4"] + self.cpp_info.system_libs.extend(["dl", "pthread", "rt"]) + self.cpp_info.resdirs = ["res"] diff --git a/packages/conan/recipes/nss/conanfile.py b/packages/conan/recipes/nss/conanfile.py new file mode 100644 index 00000000..137c75b7 --- /dev/null +++ b/packages/conan/recipes/nss/conanfile.py @@ -0,0 +1,52 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/nss/all/conanfile.py + +from conan import ConanFile + +class SystemNSSConan(ConanFile): + name = "nss" + version = "3.93" + + settings = "os", "arch", "compiler", "build_type" + + def requirements(self): + self.requires("nspr/4.35") + self.requires("sqlite3/3.41.2") + self.requires("zlib/1.2.13") + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include/nss3"] + self.cpp_info.libdirs = ["/usr/lib64"] + + def _library_name(lib,vers): + return f"{lib}{vers}" + self.cpp_info.components["libnss"].libs.append(_library_name("nss", 3)) + self.cpp_info.components["libnss"].requires = ["nssutil", "nspr::nspr"] + + self.cpp_info.components["nssutil"].libs = [_library_name("nssutil", 3)] + self.cpp_info.components["nssutil"].requires = ["nspr::nspr"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["nssutil"].system_libs = ["pthread"] + + self.cpp_info.components["softokn"].libs = [_library_name("softokn", 3)] + self.cpp_info.components["softokn"].requires = ["sqlite3::sqlite3", "nssutil", "nspr::nspr"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["softokn"].system_libs = ["pthread"] + + self.cpp_info.components["nssdbm"].libs = [_library_name("nssdbm", 3)] + self.cpp_info.components["nssdbm"].requires = ["nspr::nspr", "nssutil"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["nssdbm"].system_libs = ["pthread"] + + self.cpp_info.components["smime"].libs = [_library_name("smime", 3)] + self.cpp_info.components["smime"].requires = ["nspr::nspr", "libnss", "nssutil"] + + self.cpp_info.components["ssl"].libs = [_library_name("ssl", 3)] + self.cpp_info.components["ssl"].requires = ["nspr::nspr", "libnss", "nssutil"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["ssl"].system_libs = ["pthread"] + + self.cpp_info.components["nss_executables"].requires = ["zlib::zlib"] diff --git a/packages/conan/recipes/ocio/conandata.yml b/packages/conan/recipes/ocio/conandata.yml new file mode 100644 index 00000000..a9d4e442 --- /dev/null +++ b/packages/conan/recipes/ocio/conandata.yml @@ -0,0 +1,77 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/opencolorio/all/conandata.yml + +sources: + "2.4.2": + url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v2.4.2.tar.gz" + sha256: "2d8f2c47c40476d6e8cea9d878f6601d04f6d5642b47018eaafa9e9f833f3690" + "2.4.1": + url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v2.4.1.tar.gz" + sha256: "d4eb15408b33dffd6ba0bba9a53328085b40bdd9319fa3d0d7348d06a8cbe842" + "2.4.0": + url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v2.4.0.tar.gz" + sha256: "0ff3966b9214da0941b2b1cbdab3975a00a51fc6f3417fa860f98f5358f2c282" + "2.3.2": + url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v2.3.2.tar.gz" + sha256: "6bbf4e7fa4ea2f743a238cb22aff44890425771a2f57f62cece1574e46ceec2f" + "2.2.1": + url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v2.2.1.tar.gz" + sha256: "36f27c5887fc4e5c241805c29b8b8e68725aa05520bcaa7c7ec84c0422b8580e" + "2.1.0": + url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v2.1.0.tar.gz" + sha256: "81fc7853a490031632a69c73716bc6ac271b395e2ba0e2587af9995c2b0efb5f" + "1.1.1": + url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v1.1.1.tar.gz" + sha256: "c9b5b9def907e1dafb29e37336b702fff22cc6306d445a13b1621b8a754c14c8" +patches: + "2.4.2": + - patch_file: "patches/2.4.2-0001-fix-cmake-source-dir-and-targets.patch" + patch_description: "use cci package, use project_binary_dir/project_source_dir" + patch_type: "conan" + - patch_file: "patches/2.4.2-0002-cmake-deps-for-shared-libs.patch" + patch_description: "don't skip cmake dependencies for shared builds" + patch_type: "conan" + "2.4.1": + - patch_file: "patches/2.4.1-0001-fix-cmake-source-dir-and-targets.patch" + patch_description: "use cci package, use project_binary_dir/project_source_dir" + patch_type: "conan" + "2.4.0": + - patch_file: "patches/2.4.0-0001-fix-cmake-source-dir-and-targets.patch" + patch_description: "use cci package, use PROJECT_BINARY_DIR/PROJECT_SOURCE_DIR" + patch_type: "conan" + "2.3.2": + - patch_file: "patches/2.3.1-0001-fix-cmake-source-dir-and-targets.patch" + patch_description: "use cci package, use PROJECT_BINARY_DIR/PROJECT_SOURCE_DIR" + patch_type: "conan" + "2.2.1": + - patch_file: "patches/2.2.1-0001-fix-cmake-source-dir-and-targets.patch" + patch_description: "use cci package, use PROJECT_BINARY_DIR/PROJECT_SOURCE_DIR" + patch_type: "conan" + - patch_file: "patches/2.2.1-0002-fix-pystring.patch" + patch_description: "fix include path for pystring" + patch_type: "conan" + - patch_file: "patches/2.2.1-0003-strlen.patch" + patch_description: "add std namespace for strlen" + patch_type: "portability" + "2.1.0": + - patch_file: "patches/2.1.0-0001-fix-cmake-source-dir-and-targets.patch" + patch_description: "use cci package, use PROJECT_BINARY_DIR/PROJECT_SOURCE_DIR" + patch_type: "conan" + - patch_file: "patches/2.1.0-0002-fix-pystring.patch" + patch_description: "fix include path for pystring" + patch_type: "conan" + - patch_file: "patches/2.1.0-0003-strlen.patch" + patch_description: "include string.h for strlen" + patch_type: "portability" + - patch_file: "patches/2.1.0-0004-fix-cpp-version-check.patch" + patch_description: "fix C++20 compilation error" + patch_type: "portability" + patch_source: "https://github.com/AcademySoftwareFoundation/OpenColorIO/pull/1542" + "1.1.1": + - patch_file: "patches/1.1.1-fix-cmake.patch" + patch_description: "use cci package, use PROJECT_BINARY_DIR/PROJECT_SOURCE_DIR" + patch_type: "conan" + diff --git a/packages/conan/recipes/ocio/conanfile.py b/packages/conan/recipes/ocio/conanfile.py new file mode 100644 index 00000000..d9d6c7e9 --- /dev/null +++ b/packages/conan/recipes/ocio/conanfile.py @@ -0,0 +1,216 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/opencolorio/all/conanfile.py + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.microsoft import is_msvc +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +import os + +required_conan_version = ">=1.53.0" + +class OpenColorIOConan(ConanFile): + name = "ocio" # ASWF: ocio for compatibility + description = "A color management framework for visual effects and animation." + license = "BSD-3-Clause" + homepage = "https://opencolorio.org/" + url = "https://github.com/conan-io/conan-center-index" + topics = ("colors", "visual", "effects", "animation") + settings = "os", "arch", "compiler", "build_type" + package_type = "library" + options = { + "shared": [True, False], + "fPIC": [True, False], + "use_sse": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "use_sse": True, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + if self.settings.arch not in ["x86", "x86_64"]: + del self.options.use_sse + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def requirements(self): + self.requires("expat/[>=2.6.2 <3]") + if Version(self.version) < "2.2.0": + self.requires("openexr/2.5.7") + else: + self.requires("openexr/3.2.3") + self.requires("imath/3.1.9", transitive_libs=True) + + if Version(self.version) < "2.0.0": + self.requires("tinyxml/2.6.2", transitive_libs=True) + self.requires("yaml-cpp/0.7.0", transitive_libs=True) + else: + self.requires("pystring/1.1.4", transitive_libs=True) + self.requires("yaml-cpp/0.8.0", transitive_libs=True) + + if Version(self.version) >= "2.3.0": + self.requires("minizip-ng/4.0.3", transitive_libs=True) + elif Version(self.version) >= "2.2.0": + self.requires("minizip-ng/3.0.9", transitive_libs=True) + + # for tools only + self.requires("lcms/2.16") + # TODO: add GLUT (needed for ociodisplay tool) + + # ASWF: needs glew + self.requires("glew/2.1.0") + + def validate(self): + check_min_cppstd(self, 11) + if Version(self.version) >= "2.3.0" and \ + self.settings.compiler == "gcc" and \ + Version(self.settings.compiler.version) < "6.0": + raise ConanInvalidConfiguration(f"{self.ref} requires gcc >= 6.0") + + if Version(self.version) < "2.0.0" and \ + self.settings.compiler.value == "msvc" and \ + Version(self.settings.compiler.version) >= "17.0": + raise ConanInvalidConfiguration(f"{self.ref} < 2.0 not building on MSVC 2022") + + if Version(self.version) >= "2.3.0" and \ + self.settings.compiler == "clang" and \ + self.settings.compiler.libcxx == "libc++": + raise ConanInvalidConfiguration(f"{self.ref} deosn't support clang with libc++") + + # opencolorio>=2.2.0 requires minizip-ng with with_zlib + if Version(self.version) >= "2.2.0" and \ + not self.dependencies["minizip-ng"].options.get_safe("with_zlib", False): + raise ConanInvalidConfiguration(f"{self.ref} requires minizip-ng with with_zlib = True. On Apple platforms with_libcomp = False is also needed to enable the with_zlib option.") + + if Version(self.version) == "1.1.1" and self.options.shared and self.dependencies["yaml-cpp"].options.shared: + raise ConanInvalidConfiguration(f"{self.ref} requires static build yaml-cpp") + + def build_requirements(self): + if Version(self.version) >= "2.2.0": + self.tool_requires("cmake/[>=3.16 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CMAKE_VERBOSE_MAKEFILE"] = True + if Version(self.version) >= "2.1.0": + tc.variables["OCIO_BUILD_PYTHON"] = False + else: + tc.variables["OCIO_BUILD_SHARED"] = self.options.shared + tc.variables["OCIO_BUILD_STATIC"] = not self.options.shared + tc.variables["OCIO_BUILD_PYGLUE"] = False + + tc.variables["USE_EXTERNAL_YAML"] = True + tc.variables["USE_EXTERNAL_TINYXML"] = True + tc.variables["TINYXML_OBJECT_LIB_EMBEDDED"] = False + tc.variables["USE_EXTERNAL_LCMS"] = True + + tc.variables["OCIO_USE_SSE"] = self.options.get_safe("use_sse", False) + + # openexr 2.x provides Half library + tc.variables["OCIO_USE_OPENEXR_HALF"] = True + + tc.variables["OCIO_BUILD_APPS"] = True + tc.variables["OCIO_BUILD_DOCS"] = False + tc.variables["OCIO_BUILD_TESTS"] = False + tc.variables["OCIO_BUILD_GPU_TESTS"] = False + tc.variables["OCIO_USE_BOOST_PTR"] = False + # ASWF: avoid circular dependency between OCIO and OIIO + tc.variables["OCIO_USE_OIIO_FOR_APPS"] = False + + # avoid downloading dependencies + tc.variables["OCIO_INSTALL_EXT_PACKAGE"] = "NONE" + + if is_msvc(self) and not self.options.shared: + # define any value because ifndef is used + tc.variables["OpenColorIO_SKIP_IMPORTS"] = True + + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0091"] = "NEW" + tc.variables["CMAKE_CXX_STANDARD"] = self.settings.compiler.cppstd # ASWF + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + + for module in ("expat", "lcms2", "pystring", "yaml-cpp", "Imath", "minizip-ng"): + rm(self, "Find"+module+".cmake", os.path.join(self.source_folder, "share", "cmake", "modules")) + + def build(self): + self._patch_sources() + + cm = CMake(self) + cm.configure() + cm.build() + + def package(self): + cm = CMake(self) + cm.install() + + if not self.options.shared: + # ASWF: libraries in lib64 + copy(self, "*", + src=os.path.join(self.package_folder, "lib64", "static"), + dst=os.path.join(self.package_folder, "lib64")) + rmdir(self, os.path.join(self.package_folder, "lib64", "static")) + + rmdir(self, os.path.join(self.package_folder, "cmake")) + # ASWF: cmake files in lib64, keep for outside conan use + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) + rmdir(self, os.path.join(self.package_folder, "share")) + # nop for 2.x + rm(self, "OpenColorIOConfig*.cmake", self.package_folder) + + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + + # ASWF: license files in package subdirectory + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses", self.name), src=self.source_folder) + + if Version(self.version) == "1.1.1": + fix_apple_shared_install_name(self) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "OpenColorIO") + self.cpp_info.set_property("cmake_target_name", "OpenColorIO::OpenColorIO") + self.cpp_info.set_property("pkg_config_name", "OpenColorIO") + + self.cpp_info.libs = ["OpenColorIO"] + + if Version(self.version) < "2.1.0": + if not self.options.shared: + self.cpp_info.defines.append("OpenColorIO_STATIC") + + if is_apple_os(self): + self.cpp_info.frameworks.extend(["Foundation", "IOKit", "ColorSync", "CoreGraphics"]) + if Version(self.version) == "2.1.0": + self.cpp_info.frameworks.extend(["Carbon", "CoreFoundation"]) + + if is_msvc(self) and not self.options.shared: + self.cpp_info.defines.append("OpenColorIO_SKIP_IMPORTS") diff --git a/packages/conan/recipes/ocio/patches/1.1.1-fix-cmake.patch b/packages/conan/recipes/ocio/patches/1.1.1-fix-cmake.patch new file mode 100644 index 00000000..39c1981e --- /dev/null +++ b/packages/conan/recipes/ocio/patches/1.1.1-fix-cmake.patch @@ -0,0 +1,287 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e4f3119..9eb6d07 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,14 +1,16 @@ ++cmake_minimum_required(VERSION 2.8) + project(OpenColorIO) + set(OCIO_VERSION_MAJOR 1) + set(OCIO_VERSION_MINOR 1) + set(OCIO_VERSION_PATCH 1) + +-cmake_minimum_required(VERSION 2.8) +-set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/share/cmake) ++list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/share/cmake) + if(NOT DEFINED CMAKE_FIRST_RUN) + SET(CMAKE_FIRST_RUN 1 CACHE INTERNAL "") + endif() + ++set(CMAKE_CXX_STANDARD 11) ++ + ############################################################################### + ### GLOBAL ### + +@@ -142,11 +144,11 @@ endif(CMAKE_COMPILER_IS_GNUCXX) + ############################################################################### + ### Python ### + +-OCIOFindPython() ++#OCIOFindPython() + + # Find Python, used for (possibly) building pyglue, and now to + # construct the external project path +-set(EXTDIST_ROOT ${CMAKE_BINARY_DIR}/ext/dist) ++set(EXTDIST_ROOT ${PROJECT_BINARY_DIR}/ext/dist) + set(EXTDIST_BINPATH ${EXTDIST_ROOT}/bin) + if(PYTHON_OK) + set(EXTDIST_PYTHONPATH ${EXTDIST_ROOT}/${PYTHON_VARIANT_PATH}) +@@ -170,7 +172,12 @@ messageonce("Setting EXTDIST_PYTHONPATH: ${EXTDIST_PYTHONPATH}") + + if(USE_EXTERNAL_TINYXML) + set(TINYXML_VERSION_MIN "2.6.1") +- find_package(TinyXML) ++ find_package(TinyXML REQUIRED) ++ set(TINYXML_FOUND ${TinyXML_FOUND}) ++ set(TINYXML_LIBRARIES tinyxml::tinyxml) ++ set(TINYXML_VERSION "${TinyXML_VERSION}") ++ list(APPEND EXTERNAL_LIBRARIES ${TINYXML_LIBRARIES}) ++ + if(TINYXML_FOUND) + if(TINYXML_VERSION VERSION_EQUAL ${TINYXML_VERSION_MIN} OR + TINYXML_VERSION VERSION_GREATER ${TINYXML_VERSION_MIN}) +@@ -251,6 +258,13 @@ endif(USE_EXTERNAL_TINYXML) + if(USE_EXTERNAL_YAML) + # Set minimum yaml version for non-patched sources. + set(YAML_VERSION_MIN "0.3.0") ++ find_package(yaml-cpp REQUIRED) ++ set(YAML_CPP_INCLUDE_DIRS "${CONAN_INCLUDE_DIRS_YAML-CPP}") ++ set(YAML_CPP_LIBRARIES yaml-cpp) ++ set(YAML_CPP_VERSION "${yaml-cpp_VERSION}") ++ list(APPEND EXTERNAL_LIBRARIES ${YAML_CPP_LIBRARIES}) ++ ++ if(0) + include(FindPkgConfig) + pkg_check_modules(PC_YAML_CPP REQUIRED QUIET yaml-cpp) + find_path(YAML_CPP_INCLUDE_DIR yaml-cpp/yaml.h +@@ -293,6 +307,7 @@ if(USE_EXTERNAL_YAML) + else(YAML_CPP_FOUND) + message(FATAL_ERROR "ERROR: System yaml-cpp library was not found. Make sure the library is installed and the pkg-config file exists.") + endif(YAML_CPP_FOUND) ++ endif() + else(USE_EXTERNAL_YAML) ## provide 2 ways to build this dependency + set(YAML_CPP_VERSION 0.3.0) + set(YAML_CPP_CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR}/ext/dist -DYAML_CPP_BUILD_TOOLS:BOOL=FALSE -DOCIO_INLINES_HIDDEN:BOOL=${OCIO_INLINES_HIDDEN}) +@@ -384,7 +399,7 @@ else() + set(OCIO_INLINES_HIDDEN OFF) + endif() + +-set(EXTERNAL_COMPILE_FLAGS "-DTIXML_USE_STL ${YAML_CPP_COMPILE_FLAGS} ${GCC_COMPILE_FLAGS}") ++set(EXTERNAL_COMPILE_FLAGS "${YAML_CPP_COMPILE_FLAGS} ${GCC_COMPILE_FLAGS}") + + set(EXTERNAL_LINK_FLAGS "") + set(EXTERNAL_LIBRARY_DIRS ${PROJECT_BINARY_DIR}/ext/dist/lib) +@@ -460,7 +475,7 @@ endif() + if(OCIO_BUILD_APPS AND (OCIO_BUILD_STATIC OR OCIO_BUILD_SHARED) ) + + # Try to find OpenImageIO (OIIO) and OpenGL stuff +- OCIOFindOpenImageIO() ++ #OCIOFindOpenImageIO() + + if(OIIO_FOUND) + add_subdirectory(src/apps/ocioconvert) +@@ -528,7 +543,7 @@ endif() + + ############################################################################### + ### Configure env script ### +-configure_file(${CMAKE_SOURCE_DIR}/share/ocio/setup_ocio.sh.in ++configure_file(${PROJECT_SOURCE_DIR}/share/ocio/setup_ocio.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/share/ocio/setup_ocio.sh @ONLY) + + INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/share/ocio/setup_ocio.sh DESTINATION share/ocio/) +@@ -597,7 +612,7 @@ if(TARGET OpenColorIO_STATIC) + endif() + endif() + install(EXPORT OpenColorIO DESTINATION cmake) +-file(WRITE "${CMAKE_BINARY_DIR}/OpenColorIOConfig.cmake" ++file(WRITE "${PROJECT_BINARY_DIR}/OpenColorIOConfig.cmake" + " + get_filename_component(OpenColorIO_DIR \"\${CMAKE_CURRENT_LIST_FILE}\" PATH) + +@@ -646,4 +661,4 @@ file(WRITE "${CMAKE_BINARY_DIR}/OpenColorIOConfig.cmake" + message(STATUS OPENCOLORIO_FOUND=\${OPENCOLORIO_FOUND}) + " + ) +-install(FILES "${CMAKE_BINARY_DIR}/OpenColorIOConfig.cmake" DESTINATION .) ++install(FILES "${PROJECT_BINARY_DIR}/OpenColorIOConfig.cmake" DESTINATION .) +diff --git a/share/cmake/OCIOMacros.cmake b/share/cmake/OCIOMacros.cmake +index b9fb239..b1a206e 100644 +--- a/share/cmake/OCIOMacros.cmake ++++ b/share/cmake/OCIOMacros.cmake +@@ -356,9 +356,9 @@ ENDMACRO() + + MACRO(ExtractRstCPP INFILE OUTFILE) + add_custom_command( +- WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ++ WORKING_DIRECTORY ${PROJECT_BINARY_DIR} + OUTPUT ${OUTFILE} +- COMMAND ${PYTHON} ${CMAKE_SOURCE_DIR}/share/sphinx/ExtractRstFromSourceCPP.py ${INFILE} ${OUTFILE} ++ COMMAND ${PYTHON} ${PROJECT_SOURCE_DIR}/share/sphinx/ExtractRstFromSourceCPP.py ${INFILE} ${OUTFILE} + DEPENDS ${INFILE} + COMMENT "Extracting reStructuredText from ${INFILE} (using old process)" + ) +@@ -366,9 +366,9 @@ ENDMACRO() + + MACRO(ExtractRstSimple INFILE OUTFILE) + add_custom_command( +- WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ++ WORKING_DIRECTORY ${PROJECT_BINARY_DIR} + OUTPUT ${OUTFILE} +- COMMAND ${PYTHON} ${CMAKE_SOURCE_DIR}/share/sphinx/ExtractRstFromSourceSimple.py ${INFILE} ${OUTFILE} ++ COMMAND ${PYTHON} ${PROJECT_SOURCE_DIR}/share/sphinx/ExtractRstFromSourceSimple.py ${INFILE} ${OUTFILE} + DEPENDS ${INFILE} + COMMENT "Extracting reStructuredText from ${INFILE}" + ) +diff --git a/src/apps/ociobakelut/CMakeLists.txt b/src/apps/ociobakelut/CMakeLists.txt +index d31b4e3..4aa1efb 100644 +--- a/src/apps/ociobakelut/CMakeLists.txt ++++ b/src/apps/ociobakelut/CMakeLists.txt +@@ -1,6 +1,10 @@ + # LCMS +-include(FindPkgConfig FindPackageMessage) +-pkg_check_modules(LCMS QUIET lcms2) ++find_package(lcms REQUIRED) ++set(LCMS_FOUND ${lcms_FOUND}) ++set(LCMS_VERSION ${lcms_VERSION}) ++set(LCMS_LIBRARIES ${lcms_LIBRARIES}) ++set(LCMS_INCLUDE_DIR ${lcms_INCLUDE_DIR}) ++ + if(LCMS_FOUND AND (LCMS_VERSION VERSION_EQUAL 2.1 OR LCMS_VERSION VERSION_GREATER 2.1)) + FIND_PACKAGE_MESSAGE(LCMS "Found lcms: ${LCMS_LIBRARIES}" + "${LCMS_INCLUDE_DIR}") +@@ -29,12 +33,12 @@ else() + set(LCMS_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/${CMAKE_STATIC_LIBRARY_PREFIX}lcms2${CMAKE_STATIC_LIBRARY_SUFFIX}) + endif() + +-file(GLOB_RECURSE share_src_files "${CMAKE_SOURCE_DIR}/src/apps/share/*.cpp") ++file(GLOB_RECURSE share_src_files "${PROJECT_SOURCE_DIR}/src/apps/share/*.cpp") + + include_directories( +- ${CMAKE_SOURCE_DIR}/export/ +- ${CMAKE_BINARY_DIR}/export/ +- ${CMAKE_SOURCE_DIR}/src/apps/share/ ++ ${PROJECT_SOURCE_DIR}/export/ ++ ${PROJECT_BINARY_DIR}/export/ ++ ${PROJECT_SOURCE_DIR}/src/apps/share/ + ${LCMS_INCLUDE_DIRS} + ${Boost_INCLUDE_DIR} + ) +diff --git a/src/apps/ociocheck/CMakeLists.txt b/src/apps/ociocheck/CMakeLists.txt +index 4955f4d..14b5017 100644 +--- a/src/apps/ociocheck/CMakeLists.txt ++++ b/src/apps/ociocheck/CMakeLists.txt +@@ -1,9 +1,9 @@ +-file(GLOB_RECURSE share_src_files "${CMAKE_SOURCE_DIR}/src/apps/share/*.cpp") ++file(GLOB_RECURSE share_src_files "${PROJECT_SOURCE_DIR}/src/apps/share/*.cpp") + + include_directories( +- ${CMAKE_SOURCE_DIR}/export/ +- ${CMAKE_BINARY_DIR}/export/ +- ${CMAKE_SOURCE_DIR}/src/apps/share/ ++ ${PROJECT_SOURCE_DIR}/export/ ++ ${PROJECT_BINARY_DIR}/export/ ++ ${PROJECT_SOURCE_DIR}/src/apps/share/ + ${Boost_INCLUDE_DIR} + ) + +diff --git a/src/core/CDLTransform.cpp b/src/core/CDLTransform.cpp +index 8b05deb..a7d6031 100644 +--- a/src/core/CDLTransform.cpp ++++ b/src/core/CDLTransform.cpp +@@ -126,7 +126,11 @@ OCIO_NAMESPACE_ENTER + TiXmlPrinter printer; + printer.SetStreamPrinting(); + doc.Accept( &printer ); +- return printer.Str(); ++ #ifdef TIXML_USE_STL ++ return printer.Str(); ++ #else ++ return printer.CStr(); ++ #endif + } + } + +diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt +index 1eb691b..a2f099a 100644 +--- a/src/core/CMakeLists.txt ++++ b/src/core/CMakeLists.txt +@@ -2,29 +2,29 @@ + ### OCIO CORE ### + + include_directories( +- ${CMAKE_SOURCE_DIR}/export/ +- ${CMAKE_BINARY_DIR}/export/ +- ${CMAKE_SOURCE_DIR}/ext/oiio/src/include ++ ${PROJECT_SOURCE_DIR}/export/ ++ ${PROJECT_BINARY_DIR}/export/ ++ ${PROJECT_SOURCE_DIR}/ext/oiio/src/include + ${EXTERNAL_INCLUDE_DIRS} + ) + +-file(GLOB_RECURSE core_src_files "${CMAKE_SOURCE_DIR}/src/core/*.cpp") +-file(GLOB_RECURSE core_export_headers "${CMAKE_SOURCE_DIR}/export/OpenColorIO/*.h") ++file(GLOB_RECURSE core_src_files "${PROJECT_SOURCE_DIR}/src/core/*.cpp") ++file(GLOB_RECURSE core_export_headers "${PROJECT_SOURCE_DIR}/export/OpenColorIO/*.h") + + message(STATUS "Create OpenColorABI.h from OpenColorABI.h.in") +-configure_file(${CMAKE_SOURCE_DIR}/export/OpenColorIO/OpenColorABI.h.in +- ${CMAKE_BINARY_DIR}/export/OpenColorABI.h @ONLY) +-list(APPEND core_export_headers ${CMAKE_BINARY_DIR}/export/OpenColorABI.h) ++configure_file(${PROJECT_SOURCE_DIR}/export/OpenColorIO/OpenColorABI.h.in ++ ${PROJECT_BINARY_DIR}/export/OpenColorABI.h @ONLY) ++list(APPEND core_export_headers ${PROJECT_BINARY_DIR}/export/OpenColorABI.h) + + # Process all warnings as errors + + if(WIN32) + # On debug mode there are other kinds of warning... + if("${CMAKE_BUILD_TYPE}" STREQUAL "Release") +- set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} /WX") ++ # set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} /WX") + endif() + else() +- set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} -Werror") ++ # set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} -Werror") + endif() + + # SHARED +@@ -75,7 +75,7 @@ endif() + # STATIC + + if(OCIO_BUILD_STATIC) +- list(REMOVE_ITEM core_src_files ${CMAKE_SOURCE_DIR}/src/core/UnitTest.cpp) ++ list(REMOVE_ITEM core_src_files ${PROJECT_SOURCE_DIR}/src/core/UnitTest.cpp) + add_library(OpenColorIO_STATIC STATIC ${EXTERNAL_OBJECTS} ${core_src_files}) + add_dependencies(OpenColorIO_STATIC TINYXML_LIB YAML_CPP_LIB) + if(EXTERNAL_LIBRARIES) +@@ -113,7 +113,7 @@ install(FILES ${core_export_headers} + + # pkg-config + message(STATUS "Create OpenColorIO.pc from OpenColorIO.pc.in") +-configure_file(${CMAKE_SOURCE_DIR}/export/pkgconfig/OpenColorIO.pc.in ++configure_file(${PROJECT_SOURCE_DIR}/export/pkgconfig/OpenColorIO.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/OpenColorIO.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/OpenColorIO.pc + DESTINATION ${CMAKE_INSTALL_EXEC_PREFIX}/lib${LIB_SUFFIX}/pkgconfig/) +diff --git a/src/core/OCIOYaml.cpp b/src/core/OCIOYaml.cpp +index 68fcef6..a1c1c1d 100644 +--- a/src/core/OCIOYaml.cpp ++++ b/src/core/OCIOYaml.cpp +@@ -1442,7 +1442,7 @@ OCIO_NAMESPACE_ENTER + #ifdef OLDYAML + if(node.FindValue("ocio_profile_version") == NULL) + #else +- if(node["ocio_profile_version"] == NULL) ++ if(node["ocio_profile_version"].IsNull()) + #endif + { + std::ostringstream os; diff --git a/packages/conan/recipes/ocio/patches/2.1.0-0001-fix-cmake-source-dir-and-targets.patch b/packages/conan/recipes/ocio/patches/2.1.0-0001-fix-cmake-source-dir-and-targets.patch new file mode 100644 index 00000000..5de7b145 --- /dev/null +++ b/packages/conan/recipes/ocio/patches/2.1.0-0001-fix-cmake-source-dir-and-targets.patch @@ -0,0 +1,61 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b0840ac..e4875ab 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,9 +9,9 @@ cmake_minimum_required(VERSION 3.12) + + set(CMAKE_MODULE_PATH + ${CMAKE_MODULE_PATH} +- ${CMAKE_SOURCE_DIR}/share/cmake/utils +- ${CMAKE_SOURCE_DIR}/share/cmake/macros +- ${CMAKE_SOURCE_DIR}/share/cmake/modules ++ ${CMAKE_CURRENT_SOURCE_DIR}/share/cmake/utils ++ ${CMAKE_CURRENT_SOURCE_DIR}/share/cmake/macros ++ ${CMAKE_CURRENT_SOURCE_DIR}/share/cmake/modules + ) + + set(CMAKE_WARN_DEPRECATED ON) +@@ -272,7 +272,7 @@ else() + set(OCIO_SETUP_NAME setup_ocio.sh) + endif() + +-configure_file(${CMAKE_SOURCE_DIR}/share/ocio/${OCIO_SETUP_NAME}.in ++configure_file(${PROJECT_SOURCE_DIR}/share/ocio/${OCIO_SETUP_NAME}.in + ${CMAKE_CURRENT_BINARY_DIR}/share/ocio/${OCIO_SETUP_NAME} @ONLY) + + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/share/ocio/${OCIO_SETUP_NAME} DESTINATION share/ocio/) +diff --git a/share/cmake/modules/FindExtPackages.cmake b/share/cmake/modules/FindExtPackages.cmake +index 86a0225..73d8599 100644 +--- a/share/cmake/modules/FindExtPackages.cmake ++++ b/share/cmake/modules/FindExtPackages.cmake +@@ -50,7 +50,7 @@ else() + + # OpenEXR/IlmBase (<=2.5) + # https://github.com/AcademySoftwareFoundation/openexr +- find_package(Half 2.4.0 REQUIRED) ++ find_package(OpenEXR 2.4.0 REQUIRED) + + set(OCIO_HALF_LIB IlmBase::Half CACHE STRING "Half library target" FORCE) + set(OCIO_USE_IMATH_HALF "0" CACHE STRING "Whether 'half' type will be sourced from the Imath library (>=v3.0)" FORCE) +@@ -65,7 +65,7 @@ if(OCIO_BUILD_APPS) + + # lcms2 + # https://github.com/mm2/Little-CMS +- find_package(lcms2 2.2 REQUIRED) ++ find_package(lcms 2.2 REQUIRED) + endif() + + if(OCIO_BUILD_OPENFX) +diff --git a/src/apps/ociobakelut/CMakeLists.txt b/src/apps/ociobakelut/CMakeLists.txt +index 7eb1cd8..de13607 100755 +--- a/src/apps/ociobakelut/CMakeLists.txt ++++ b/src/apps/ociobakelut/CMakeLists.txt +@@ -35,7 +35,7 @@ set_target_properties(ociobakelut + target_link_libraries(ociobakelut + PRIVATE + apputils +- lcms2::lcms2 ++ lcms::lcms + OpenColorIO + ) + diff --git a/packages/conan/recipes/ocio/patches/2.1.0-0002-fix-pystring.patch b/packages/conan/recipes/ocio/patches/2.1.0-0002-fix-pystring.patch new file mode 100644 index 00000000..38f15d7e --- /dev/null +++ b/packages/conan/recipes/ocio/patches/2.1.0-0002-fix-pystring.patch @@ -0,0 +1,117 @@ +diff --git a/src/OpenColorIO/Context.cpp b/src/OpenColorIO/Context.cpp +index 26fdcbee..9ddb4522 100644 +--- a/src/OpenColorIO/Context.cpp ++++ b/src/OpenColorIO/Context.cpp +@@ -14,7 +14,7 @@ + #include "Mutex.h" + #include "PathUtils.h" + #include "PrivateTypes.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "utils/StringUtils.h" + + +diff --git a/src/OpenColorIO/OCIOYaml.cpp b/src/OpenColorIO/OCIOYaml.cpp +index 67cafdf1..744fb817 100644 +--- a/src/OpenColorIO/OCIOYaml.cpp ++++ b/src/OpenColorIO/OCIOYaml.cpp +@@ -19,7 +19,7 @@ + #include "ParseUtils.h" + #include "PathUtils.h" + #include "Platform.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "utils/StringUtils.h" + #include "ViewingRules.h" + #include "yaml-cpp/yaml.h" +diff --git a/src/OpenColorIO/Op.cpp b/src/OpenColorIO/Op.cpp +index ebbba040..08db0f68 100755 +--- a/src/OpenColorIO/Op.cpp ++++ b/src/OpenColorIO/Op.cpp +@@ -20,7 +20,7 @@ + #include "ops/lut1d/Lut1DOp.h" + #include "ops/lut3d/Lut3DOp.h" + #include "ops/range/RangeOp.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + + namespace OCIO_NAMESPACE + { +diff --git a/src/OpenColorIO/PathUtils.cpp b/src/OpenColorIO/PathUtils.cpp +index 7ed5e9e8..e71d03d9 100644 +--- a/src/OpenColorIO/PathUtils.cpp ++++ b/src/OpenColorIO/PathUtils.cpp +@@ -10,7 +10,7 @@ + + #include "Mutex.h" + #include "PathUtils.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "utils/StringUtils.h" + + #if !defined(_WIN32) +diff --git a/src/OpenColorIO/fileformats/FileFormatCTF.cpp b/src/OpenColorIO/fileformats/FileFormatCTF.cpp +index 89c13066..648aabc0 100644 +--- a/src/OpenColorIO/fileformats/FileFormatCTF.cpp ++++ b/src/OpenColorIO/fileformats/FileFormatCTF.cpp +@@ -22,7 +22,7 @@ + #include "OpBuilders.h" + #include "ops/noop/NoOps.h" + #include "Platform.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "TransformBuilder.h" + #include "transforms/FileTransform.h" + #include "utils/StringUtils.h" +diff --git a/src/OpenColorIO/fileformats/FileFormatDiscreet1DL.cpp b/src/OpenColorIO/fileformats/FileFormatDiscreet1DL.cpp +index a52bc728..bd827f06 100755 +--- a/src/OpenColorIO/fileformats/FileFormatDiscreet1DL.cpp ++++ b/src/OpenColorIO/fileformats/FileFormatDiscreet1DL.cpp +@@ -16,7 +16,7 @@ + #include "ops/lut1d/Lut1DOp.h" + #include "ops/lut3d/Lut3DOp.h" + #include "ParseUtils.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "Platform.h" + #include "transforms/FileTransform.h" + #include "utils/StringUtils.h" +diff --git a/src/OpenColorIO/fileformats/FileFormatICC.cpp b/src/OpenColorIO/fileformats/FileFormatICC.cpp +index df86206e..b6983cf6 100755 +--- a/src/OpenColorIO/fileformats/FileFormatICC.cpp ++++ b/src/OpenColorIO/fileformats/FileFormatICC.cpp +@@ -12,7 +12,7 @@ + #include "ops/gamma/GammaOp.h" + #include "ops/lut1d/Lut1DOp.h" + #include "ops/matrix/MatrixOp.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "transforms/FileTransform.h" + + +diff --git a/src/OpenColorIO/fileformats/FileFormatIridasLook.cpp b/src/OpenColorIO/fileformats/FileFormatIridasLook.cpp +index 0f83f5b3..d6ee59de 100755 +--- a/src/OpenColorIO/fileformats/FileFormatIridasLook.cpp ++++ b/src/OpenColorIO/fileformats/FileFormatIridasLook.cpp +@@ -13,7 +13,7 @@ + #include "ops/lut3d/Lut3DOp.h" + #include "ParseUtils.h" + #include "Platform.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "transforms/FileTransform.h" + #include "utils/StringUtils.h" + +diff --git a/src/OpenColorIO/transforms/FileTransform.cpp b/src/OpenColorIO/transforms/FileTransform.cpp +index 4f6ea887..97621959 100755 +--- a/src/OpenColorIO/transforms/FileTransform.cpp ++++ b/src/OpenColorIO/transforms/FileTransform.cpp +@@ -17,7 +17,7 @@ + #include "ops/noop/NoOps.h" + #include "PathUtils.h" + #include "Platform.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "utils/StringUtils.h" + + diff --git a/packages/conan/recipes/ocio/patches/2.1.0-0003-strlen.patch b/packages/conan/recipes/ocio/patches/2.1.0-0003-strlen.patch new file mode 100644 index 00000000..b90bcdfc --- /dev/null +++ b/packages/conan/recipes/ocio/patches/2.1.0-0003-strlen.patch @@ -0,0 +1,12 @@ +diff --git a/src/OpenColorIO/FileRules.cpp b/src/OpenColorIO/FileRules.cpp +index 794dfdbe..94729459 100644 +--- a/src/OpenColorIO/FileRules.cpp ++++ b/src/OpenColorIO/FileRules.cpp +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + + #include + diff --git a/packages/conan/recipes/ocio/patches/2.1.0-0004-fix-cpp-version-check.patch b/packages/conan/recipes/ocio/patches/2.1.0-0004-fix-cpp-version-check.patch new file mode 100644 index 00000000..50d9ce38 --- /dev/null +++ b/packages/conan/recipes/ocio/patches/2.1.0-0004-fix-cpp-version-check.patch @@ -0,0 +1,18 @@ +diff --git a/share/cmake/utils/CppVersion.cmake b/share/cmake/utils/CppVersion.cmake +index aeca6c0..6b4dc4e 100644 +--- a/share/cmake/utils/CppVersion.cmake ++++ b/share/cmake/utils/CppVersion.cmake +@@ -12,11 +12,11 @@ if(NOT DEFINED CMAKE_CXX_STANDARD) + message(STATUS "Setting C++ version to '11' as none was specified.") + set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard to compile against") + elseif(NOT CMAKE_CXX_STANDARD IN_LIST SUPPORTED_CXX_STANDARDS) +- message(FATAL_ERROR ++ message(WARNING + "CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} is unsupported. Supported standards are: ${SUPPORTED_CXX_STANDARDS_STR}.") + endif() + +-set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS "${SUPPORTED_CXX_STANDARDS}") ++#set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS "${SUPPORTED_CXX_STANDARDS}") + + include(CheckCXXCompilerFlag) + diff --git a/packages/conan/recipes/ocio/patches/2.2.1-0001-fix-cmake-source-dir-and-targets.patch b/packages/conan/recipes/ocio/patches/2.2.1-0001-fix-cmake-source-dir-and-targets.patch new file mode 100644 index 00000000..11585777 --- /dev/null +++ b/packages/conan/recipes/ocio/patches/2.2.1-0001-fix-cmake-source-dir-and-targets.patch @@ -0,0 +1,105 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 17e188d..91af0ec 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -332,7 +332,7 @@ install( + FILE ${OCIO_TARGETS_EXPORT_NAME} + ) + +-if (NOT BUILD_SHARED_LIBS) ++if (0) + # Install custom macros used in the find modules. + install(FILES + ${CMAKE_CURRENT_LIST_DIR}/share/cmake/macros/VersionUtils.cmake +diff --git a/share/cmake/modules/FindExtPackages.cmake b/share/cmake/modules/FindExtPackages.cmake +index 5455a08..420fbd4 100644 +--- a/share/cmake/modules/FindExtPackages.cmake ++++ b/share/cmake/modules/FindExtPackages.cmake +@@ -41,7 +41,7 @@ find_package(expat 2.4.1 REQUIRED) + + # yaml-cpp + # https://github.com/jbeder/yaml-cpp +-find_package(yaml-cpp 0.7.0 REQUIRED) ++find_package(yaml-cpp REQUIRED) + + # pystring + # https://github.com/imageworks/pystring +@@ -138,7 +138,7 @@ endif() + + # minizip-ng + # https://github.com/zlib-ng/minizip-ng +-find_package(minizip-ng 3.0.7 REQUIRED) ++find_package(minizip REQUIRED) + + if(OCIO_BUILD_APPS) + +@@ -149,7 +149,7 @@ if(OCIO_BUILD_APPS) + + # lcms2 + # https://github.com/mm2/Little-CMS +- find_package(lcms2 2.2 REQUIRED) ++ find_package(lcms REQUIRED) + endif() + + if(OCIO_BUILD_OPENFX) +@@ -214,7 +214,7 @@ if(OCIO_BUILD_APPS) + # OpenEXR + # https://github.com/AcademySoftwareFoundation/openexr + set(_OpenEXR_ExternalProject_VERSION "3.1.5") +- find_package(OpenEXR 3.0) ++ find_package(OpenEXR CONFIG) + + if(OpenEXR_FOUND AND TARGET OpenEXR::OpenEXR) + add_library(OpenColorIO::ImageIOBackend ALIAS OpenEXR::OpenEXR) +diff --git a/share/cmake/utils/CppVersion.cmake b/share/cmake/utils/CppVersion.cmake +index 175d89c..2d34a65 100644 +--- a/share/cmake/utils/CppVersion.cmake ++++ b/share/cmake/utils/CppVersion.cmake +@@ -16,8 +16,6 @@ elseif(NOT CMAKE_CXX_STANDARD IN_LIST SUPPORTED_CXX_STANDARDS) + "CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} is unsupported. Supported standards are: ${SUPPORTED_CXX_STANDARDS_STR}.") + endif() + +-set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS "${SUPPORTED_CXX_STANDARDS}") +- + include(CheckCXXCompilerFlag) + + # As CheckCXXCompilerFlag implicitly uses CMAKE_CXX_FLAGS some custom flags could trigger unrelated +diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt +index 1c4d774..da70227 100755 +--- a/src/OpenColorIO/CMakeLists.txt ++++ b/src/OpenColorIO/CMakeLists.txt +@@ -289,7 +289,7 @@ target_link_libraries(OpenColorIO + "$" + "$" + yaml-cpp +- MINIZIP::minizip-ng ++ PUBLIC MINIZIP::minizip + ) + + if(APPLE) +diff --git a/src/apps/ocioarchive/CMakeLists.txt b/src/apps/ocioarchive/CMakeLists.txt +index 6b868d1..820e36c 100644 +--- a/src/apps/ocioarchive/CMakeLists.txt ++++ b/src/apps/ocioarchive/CMakeLists.txt +@@ -19,7 +19,7 @@ target_link_libraries(ocioarchive + PRIVATE + apputils + OpenColorIO +- MINIZIP::minizip-ng ++ MINIZIP::minizip + ) + + install(TARGETS ocioarchive +diff --git a/src/apps/ociobakelut/CMakeLists.txt b/src/apps/ociobakelut/CMakeLists.txt +index a50e87e..37174ea 100755 +--- a/src/apps/ociobakelut/CMakeLists.txt ++++ b/src/apps/ociobakelut/CMakeLists.txt +@@ -28,7 +28,7 @@ set_target_properties(ociobakelut + target_link_libraries(ociobakelut + PRIVATE + apputils +- lcms2::lcms2 ++ lcms::lcms + OpenColorIO + ) + diff --git a/packages/conan/recipes/ocio/patches/2.2.1-0002-fix-pystring.patch b/packages/conan/recipes/ocio/patches/2.2.1-0002-fix-pystring.patch new file mode 100644 index 00000000..fc58ce5a --- /dev/null +++ b/packages/conan/recipes/ocio/patches/2.2.1-0002-fix-pystring.patch @@ -0,0 +1,163 @@ +diff --git a/src/OpenColorIO/Config.cpp b/src/OpenColorIO/Config.cpp +index 665d522..6abc149 100644 +--- a/src/OpenColorIO/Config.cpp ++++ b/src/OpenColorIO/Config.cpp +@@ -33,7 +33,7 @@ + #include "Platform.h" + #include "PrivateTypes.h" + #include "Processor.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "transforms/FileTransform.h" + #include "utils/StringUtils.h" + #include "ViewingRules.h" +diff --git a/src/OpenColorIO/Context.cpp b/src/OpenColorIO/Context.cpp +index bb6fb07..a8890ed 100644 +--- a/src/OpenColorIO/Context.cpp ++++ b/src/OpenColorIO/Context.cpp +@@ -15,7 +15,7 @@ + #include "OCIOZArchive.h" + #include "PathUtils.h" + #include "PrivateTypes.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "utils/StringUtils.h" + + namespace OCIO_NAMESPACE +diff --git a/src/OpenColorIO/OCIOYaml.cpp b/src/OpenColorIO/OCIOYaml.cpp +index 62cbb0d..59c1564 100644 +--- a/src/OpenColorIO/OCIOYaml.cpp ++++ b/src/OpenColorIO/OCIOYaml.cpp +@@ -19,7 +19,7 @@ + #include "ParseUtils.h" + #include "PathUtils.h" + #include "Platform.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "utils/StringUtils.h" + #include "ViewingRules.h" + #include "yaml-cpp/yaml.h" +diff --git a/src/OpenColorIO/OCIOZArchive.cpp b/src/OpenColorIO/OCIOZArchive.cpp +index 85fc7bb..4cd1448 100644 +--- a/src/OpenColorIO/OCIOZArchive.cpp ++++ b/src/OpenColorIO/OCIOZArchive.cpp +@@ -11,7 +11,7 @@ + #include + #include "Mutex.h" + #include "Platform.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "utils/StringUtils.h" + #include "transforms/FileTransform.h" + +@@ -630,4 +630,4 @@ void CIOPOciozArchive::buildEntries() + getEntriesMappingFromArchiveFile(m_archiveAbsPath, m_entries); + } + +-} // namespace OCIO_NAMESPACE +\ No newline at end of file ++} // namespace OCIO_NAMESPACE +diff --git a/src/OpenColorIO/Op.cpp b/src/OpenColorIO/Op.cpp +index 1ae607a..bb5406f 100755 +--- a/src/OpenColorIO/Op.cpp ++++ b/src/OpenColorIO/Op.cpp +@@ -20,7 +20,7 @@ + #include "ops/lut1d/Lut1DOp.h" + #include "ops/lut3d/Lut3DOp.h" + #include "ops/range/RangeOp.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + + namespace OCIO_NAMESPACE + { +diff --git a/src/OpenColorIO/PathUtils.cpp b/src/OpenColorIO/PathUtils.cpp +index 9dc8c6b..4a1096d 100644 +--- a/src/OpenColorIO/PathUtils.cpp ++++ b/src/OpenColorIO/PathUtils.cpp +@@ -10,7 +10,7 @@ + #include "Mutex.h" + #include "PathUtils.h" + #include "Platform.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "utils/StringUtils.h" + #include "OCIOZArchive.h" + +diff --git a/src/OpenColorIO/fileformats/FileFormatCTF.cpp b/src/OpenColorIO/fileformats/FileFormatCTF.cpp +index ebed326..9f70ff8 100644 +--- a/src/OpenColorIO/fileformats/FileFormatCTF.cpp ++++ b/src/OpenColorIO/fileformats/FileFormatCTF.cpp +@@ -23,7 +23,7 @@ + #include "OpBuilders.h" + #include "ops/noop/NoOps.h" + #include "Platform.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "TransformBuilder.h" + #include "transforms/FileTransform.h" + #include "utils/StringUtils.h" +diff --git a/src/OpenColorIO/fileformats/FileFormatDiscreet1DL.cpp b/src/OpenColorIO/fileformats/FileFormatDiscreet1DL.cpp +index a52bc72..bd827f0 100755 +--- a/src/OpenColorIO/fileformats/FileFormatDiscreet1DL.cpp ++++ b/src/OpenColorIO/fileformats/FileFormatDiscreet1DL.cpp +@@ -16,7 +16,7 @@ + #include "ops/lut1d/Lut1DOp.h" + #include "ops/lut3d/Lut3DOp.h" + #include "ParseUtils.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "Platform.h" + #include "transforms/FileTransform.h" + #include "utils/StringUtils.h" +diff --git a/src/OpenColorIO/fileformats/FileFormatICC.cpp b/src/OpenColorIO/fileformats/FileFormatICC.cpp +index 786c8a5..4953103 100755 +--- a/src/OpenColorIO/fileformats/FileFormatICC.cpp ++++ b/src/OpenColorIO/fileformats/FileFormatICC.cpp +@@ -14,7 +14,7 @@ + #include "ops/lut1d/Lut1DOp.h" + #include "ops/matrix/MatrixOp.h" + #include "ops/range/RangeOp.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "transforms/FileTransform.h" + + +diff --git a/src/OpenColorIO/fileformats/FileFormatIridasLook.cpp b/src/OpenColorIO/fileformats/FileFormatIridasLook.cpp +index 7402efd..cc3acb4 100755 +--- a/src/OpenColorIO/fileformats/FileFormatIridasLook.cpp ++++ b/src/OpenColorIO/fileformats/FileFormatIridasLook.cpp +@@ -13,7 +13,7 @@ + #include "ops/lut3d/Lut3DOp.h" + #include "ParseUtils.h" + #include "Platform.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "transforms/FileTransform.h" + #include "utils/StringUtils.h" + #include "utils/NumberUtils.h" +diff --git a/src/OpenColorIO/transforms/FileTransform.cpp b/src/OpenColorIO/transforms/FileTransform.cpp +index 4fd4d5d..dc5eb3c 100755 +--- a/src/OpenColorIO/transforms/FileTransform.cpp ++++ b/src/OpenColorIO/transforms/FileTransform.cpp +@@ -19,7 +19,7 @@ + #include "ops/noop/NoOps.h" + #include "PathUtils.h" + #include "Platform.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "utils/StringUtils.h" + + namespace OCIO_NAMESPACE +diff --git a/vendor/openfx/OCIOUtils.cpp b/vendor/openfx/OCIOUtils.cpp +index ca44905..469ed35 100644 +--- a/vendor/openfx/OCIOUtils.cpp ++++ b/vendor/openfx/OCIOUtils.cpp +@@ -9,7 +9,7 @@ namespace OCIO = OCIO_NAMESPACE; + #include + + #include "ofxsLog.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + + namespace + { diff --git a/packages/conan/recipes/ocio/patches/2.2.1-0003-strlen.patch b/packages/conan/recipes/ocio/patches/2.2.1-0003-strlen.patch new file mode 100644 index 00000000..b694178b --- /dev/null +++ b/packages/conan/recipes/ocio/patches/2.2.1-0003-strlen.patch @@ -0,0 +1,13 @@ +diff --git a/src/OpenColorIO/FileRules.cpp b/src/OpenColorIO/FileRules.cpp +index 61a5e0f..e0df0d0 100644 +--- a/src/OpenColorIO/FileRules.cpp ++++ b/src/OpenColorIO/FileRules.cpp +@@ -62,7 +62,7 @@ std::string ConvertToRegularExpression(const char * globPattern, bool ignoreCase + + if (ignoreCase) + { +- const size_t length = strlen(globPattern); ++ const size_t length = std::strlen(globPattern); + bool respectCase = false; + for (size_t i = 0; i < length; ++i) + { diff --git a/packages/conan/recipes/ocio/patches/2.3.1-0001-fix-cmake-source-dir-and-targets.patch b/packages/conan/recipes/ocio/patches/2.3.1-0001-fix-cmake-source-dir-and-targets.patch new file mode 100644 index 00000000..8b057e40 --- /dev/null +++ b/packages/conan/recipes/ocio/patches/2.3.1-0001-fix-cmake-source-dir-and-targets.patch @@ -0,0 +1,101 @@ +diff --git CMakeLists.txt CMakeLists.txt +index 7b62a993..5ea33694 100755 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -511,7 +511,7 @@ install( + FILE ${OCIO_TARGETS_EXPORT_NAME} + ) + +-if (NOT BUILD_SHARED_LIBS) ++if (0) + # Install custom macros used in the find modules. + install(FILES + ${CMAKE_CURRENT_LIST_DIR}/share/cmake/macros/VersionUtils.cmake +diff --git share/cmake/modules/FindExtPackages.cmake share/cmake/modules/FindExtPackages.cmake +index 2625242c..dcb41cf2 100644 +--- share/cmake/modules/FindExtPackages.cmake ++++ share/cmake/modules/FindExtPackages.cmake +@@ -63,7 +63,7 @@ ocio_handle_dependency( expat REQUIRED ALLOW_INSTALL + # https://github.com/jbeder/yaml-cpp + ocio_handle_dependency( yaml-cpp REQUIRED ALLOW_INSTALL + MIN_VERSION 0.6.3 +- RECOMMENDED_VERSION 0.7.0 ++ RECOMMENDED_VERSION 0.8.0 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") + + # pystring +@@ -110,9 +110,9 @@ ocio_handle_dependency( ZLIB REQUIRED ALLOW_INSTALL + + # minizip-ng + # https://github.com/zlib-ng/minizip-ng +-ocio_handle_dependency( minizip-ng REQUIRED ALLOW_INSTALL ++ocio_handle_dependency( minizip REQUIRED ALLOW_INSTALL + MIN_VERSION 3.0.6 +- RECOMMENDED_VERSION 3.0.7 ++ RECOMMENDED_VERSION 4.0.1 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") + + ############################################################################### +@@ -131,7 +131,7 @@ if(OCIO_BUILD_APPS) + + # lcms2 + # https://github.com/mm2/Little-CMS +- ocio_handle_dependency( lcms2 REQUIRED ALLOW_INSTALL ++ ocio_handle_dependency( lcms REQUIRED ALLOW_INSTALL + MIN_VERSION 2.2 + RECOMMENDED_VERSION 2.2 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") +diff --git share/cmake/utils/CppVersion.cmake share/cmake/utils/CppVersion.cmake +index 175d89c2..ac93b87a 100644 +--- share/cmake/utils/CppVersion.cmake ++++ share/cmake/utils/CppVersion.cmake +@@ -16,7 +16,7 @@ elseif(NOT CMAKE_CXX_STANDARD IN_LIST SUPPORTED_CXX_STANDARDS) + "CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} is unsupported. Supported standards are: ${SUPPORTED_CXX_STANDARDS_STR}.") + endif() + +-set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS "${SUPPORTED_CXX_STANDARDS}") ++# set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS "${SUPPORTED_CXX_STANDARDS}") + + include(CheckCXXCompilerFlag) + +diff --git src/OpenColorIO/CMakeLists.txt src/OpenColorIO/CMakeLists.txt +index 26b4bb4c..d54cff3d 100755 +--- src/OpenColorIO/CMakeLists.txt ++++ src/OpenColorIO/CMakeLists.txt +@@ -309,8 +309,8 @@ target_link_libraries(OpenColorIO + "$" + "$" + "$" +- ${YAML_CPP_LIBRARIES} +- MINIZIP::minizip-ng ++ PUBLIC yaml-cpp ++ MINIZIP::minizip + ) + + if(OCIO_USE_SIMD AND OCIO_USE_SSE2NEON AND COMPILER_SUPPORTS_SSE_WITH_SSE2NEON) +diff --git src/apps/ocioarchive/CMakeLists.txt src/apps/ocioarchive/CMakeLists.txt +index 599d706f..efe6cd5a 100644 +--- src/apps/ocioarchive/CMakeLists.txt ++++ src/apps/ocioarchive/CMakeLists.txt +@@ -21,7 +21,7 @@ target_link_libraries(ocioarchive + PRIVATE + apputils + OpenColorIO +- MINIZIP::minizip-ng ++ MINIZIP::minizip + ) + + include(StripUtils) +diff --git src/apps/ociobakelut/CMakeLists.txt src/apps/ociobakelut/CMakeLists.txt +index 3d6e586b..f7069a1f 100755 +--- src/apps/ociobakelut/CMakeLists.txt ++++ src/apps/ociobakelut/CMakeLists.txt +@@ -29,7 +29,7 @@ set_target_properties(ociobakelut + target_link_libraries(ociobakelut + PRIVATE + apputils +- lcms2::lcms2 ++ lcms::lcms + OpenColorIO + ) + diff --git a/packages/conan/recipes/ocio/patches/2.4.0-0001-fix-cmake-source-dir-and-targets.patch b/packages/conan/recipes/ocio/patches/2.4.0-0001-fix-cmake-source-dir-and-targets.patch new file mode 100644 index 00000000..35a7af01 --- /dev/null +++ b/packages/conan/recipes/ocio/patches/2.4.0-0001-fix-cmake-source-dir-and-targets.patch @@ -0,0 +1,101 @@ +diff --git CMakeLists.txt CMakeLists.txt +index 0eaec4be..e711295c 100755 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -511,7 +511,7 @@ install( + FILE ${OCIO_TARGETS_EXPORT_NAME} + ) + +-if (NOT BUILD_SHARED_LIBS) ++if (0) + # Install custom macros used in the find modules. + install(FILES + ${CMAKE_CURRENT_LIST_DIR}/share/cmake/macros/VersionUtils.cmake +diff --git share/cmake/modules/FindExtPackages.cmake share/cmake/modules/FindExtPackages.cmake +index accdecec..945c5edc 100644 +--- share/cmake/modules/FindExtPackages.cmake ++++ share/cmake/modules/FindExtPackages.cmake +@@ -63,7 +63,7 @@ ocio_handle_dependency( expat REQUIRED ALLOW_INSTALL + # https://github.com/jbeder/yaml-cpp + ocio_handle_dependency( yaml-cpp REQUIRED ALLOW_INSTALL + MIN_VERSION 0.6.3 +- RECOMMENDED_VERSION 0.7.0 ++ RECOMMENDED_VERSION 0.8.0 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") + + # pystring +@@ -110,9 +110,9 @@ ocio_handle_dependency( ZLIB REQUIRED ALLOW_INSTALL + + # minizip-ng + # https://github.com/zlib-ng/minizip-ng +-ocio_handle_dependency( minizip-ng REQUIRED ALLOW_INSTALL ++ocio_handle_dependency( minizip REQUIRED ALLOW_INSTALL + MIN_VERSION 3.0.6 +- RECOMMENDED_VERSION 3.0.7 ++ RECOMMENDED_VERSION 4.0.1 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") + + ############################################################################### +@@ -131,7 +131,7 @@ if(OCIO_BUILD_APPS) + + # lcms2 + # https://github.com/mm2/Little-CMS +- ocio_handle_dependency( lcms2 REQUIRED ALLOW_INSTALL ++ ocio_handle_dependency( lcms REQUIRED ALLOW_INSTALL + MIN_VERSION 2.2 + RECOMMENDED_VERSION 2.2 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") +diff --git share/cmake/utils/CppVersion.cmake share/cmake/utils/CppVersion.cmake +index 175d89c2..ac93b87a 100644 +--- share/cmake/utils/CppVersion.cmake ++++ share/cmake/utils/CppVersion.cmake +@@ -16,7 +16,7 @@ elseif(NOT CMAKE_CXX_STANDARD IN_LIST SUPPORTED_CXX_STANDARDS) + "CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} is unsupported. Supported standards are: ${SUPPORTED_CXX_STANDARDS_STR}.") + endif() + +-set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS "${SUPPORTED_CXX_STANDARDS}") ++# set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS "${SUPPORTED_CXX_STANDARDS}") + + include(CheckCXXCompilerFlag) + +diff --git src/OpenColorIO/CMakeLists.txt src/OpenColorIO/CMakeLists.txt +index 7d2894da..1e6570b4 100755 +--- src/OpenColorIO/CMakeLists.txt ++++ src/OpenColorIO/CMakeLists.txt +@@ -315,8 +315,8 @@ target_link_libraries(OpenColorIO + "$" + "$" + "$" +- ${YAML_CPP_LIBRARIES} +- MINIZIP::minizip-ng ++ PUBLIC yaml-cpp ++ MINIZIP::minizip + ) + + if(OCIO_USE_SIMD AND OCIO_USE_SSE2NEON AND COMPILER_SUPPORTS_SSE_WITH_SSE2NEON) +diff --git src/apps/ocioarchive/CMakeLists.txt src/apps/ocioarchive/CMakeLists.txt +index 599d706f..efe6cd5a 100644 +--- src/apps/ocioarchive/CMakeLists.txt ++++ src/apps/ocioarchive/CMakeLists.txt +@@ -21,7 +21,7 @@ target_link_libraries(ocioarchive + PRIVATE + apputils + OpenColorIO +- MINIZIP::minizip-ng ++ MINIZIP::minizip + ) + + include(StripUtils) +diff --git src/apps/ociobakelut/CMakeLists.txt src/apps/ociobakelut/CMakeLists.txt +index 3d6e586b..f7069a1f 100755 +--- src/apps/ociobakelut/CMakeLists.txt ++++ src/apps/ociobakelut/CMakeLists.txt +@@ -29,7 +29,7 @@ set_target_properties(ociobakelut + target_link_libraries(ociobakelut + PRIVATE + apputils +- lcms2::lcms2 ++ lcms::lcms + OpenColorIO + ) + diff --git a/packages/conan/recipes/ocio/patches/2.4.1-0001-fix-cmake-source-dir-and-targets.patch b/packages/conan/recipes/ocio/patches/2.4.1-0001-fix-cmake-source-dir-and-targets.patch new file mode 100644 index 00000000..35a7af01 --- /dev/null +++ b/packages/conan/recipes/ocio/patches/2.4.1-0001-fix-cmake-source-dir-and-targets.patch @@ -0,0 +1,101 @@ +diff --git CMakeLists.txt CMakeLists.txt +index 0eaec4be..e711295c 100755 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -511,7 +511,7 @@ install( + FILE ${OCIO_TARGETS_EXPORT_NAME} + ) + +-if (NOT BUILD_SHARED_LIBS) ++if (0) + # Install custom macros used in the find modules. + install(FILES + ${CMAKE_CURRENT_LIST_DIR}/share/cmake/macros/VersionUtils.cmake +diff --git share/cmake/modules/FindExtPackages.cmake share/cmake/modules/FindExtPackages.cmake +index accdecec..945c5edc 100644 +--- share/cmake/modules/FindExtPackages.cmake ++++ share/cmake/modules/FindExtPackages.cmake +@@ -63,7 +63,7 @@ ocio_handle_dependency( expat REQUIRED ALLOW_INSTALL + # https://github.com/jbeder/yaml-cpp + ocio_handle_dependency( yaml-cpp REQUIRED ALLOW_INSTALL + MIN_VERSION 0.6.3 +- RECOMMENDED_VERSION 0.7.0 ++ RECOMMENDED_VERSION 0.8.0 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") + + # pystring +@@ -110,9 +110,9 @@ ocio_handle_dependency( ZLIB REQUIRED ALLOW_INSTALL + + # minizip-ng + # https://github.com/zlib-ng/minizip-ng +-ocio_handle_dependency( minizip-ng REQUIRED ALLOW_INSTALL ++ocio_handle_dependency( minizip REQUIRED ALLOW_INSTALL + MIN_VERSION 3.0.6 +- RECOMMENDED_VERSION 3.0.7 ++ RECOMMENDED_VERSION 4.0.1 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") + + ############################################################################### +@@ -131,7 +131,7 @@ if(OCIO_BUILD_APPS) + + # lcms2 + # https://github.com/mm2/Little-CMS +- ocio_handle_dependency( lcms2 REQUIRED ALLOW_INSTALL ++ ocio_handle_dependency( lcms REQUIRED ALLOW_INSTALL + MIN_VERSION 2.2 + RECOMMENDED_VERSION 2.2 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") +diff --git share/cmake/utils/CppVersion.cmake share/cmake/utils/CppVersion.cmake +index 175d89c2..ac93b87a 100644 +--- share/cmake/utils/CppVersion.cmake ++++ share/cmake/utils/CppVersion.cmake +@@ -16,7 +16,7 @@ elseif(NOT CMAKE_CXX_STANDARD IN_LIST SUPPORTED_CXX_STANDARDS) + "CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} is unsupported. Supported standards are: ${SUPPORTED_CXX_STANDARDS_STR}.") + endif() + +-set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS "${SUPPORTED_CXX_STANDARDS}") ++# set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS "${SUPPORTED_CXX_STANDARDS}") + + include(CheckCXXCompilerFlag) + +diff --git src/OpenColorIO/CMakeLists.txt src/OpenColorIO/CMakeLists.txt +index 7d2894da..1e6570b4 100755 +--- src/OpenColorIO/CMakeLists.txt ++++ src/OpenColorIO/CMakeLists.txt +@@ -315,8 +315,8 @@ target_link_libraries(OpenColorIO + "$" + "$" + "$" +- ${YAML_CPP_LIBRARIES} +- MINIZIP::minizip-ng ++ PUBLIC yaml-cpp ++ MINIZIP::minizip + ) + + if(OCIO_USE_SIMD AND OCIO_USE_SSE2NEON AND COMPILER_SUPPORTS_SSE_WITH_SSE2NEON) +diff --git src/apps/ocioarchive/CMakeLists.txt src/apps/ocioarchive/CMakeLists.txt +index 599d706f..efe6cd5a 100644 +--- src/apps/ocioarchive/CMakeLists.txt ++++ src/apps/ocioarchive/CMakeLists.txt +@@ -21,7 +21,7 @@ target_link_libraries(ocioarchive + PRIVATE + apputils + OpenColorIO +- MINIZIP::minizip-ng ++ MINIZIP::minizip + ) + + include(StripUtils) +diff --git src/apps/ociobakelut/CMakeLists.txt src/apps/ociobakelut/CMakeLists.txt +index 3d6e586b..f7069a1f 100755 +--- src/apps/ociobakelut/CMakeLists.txt ++++ src/apps/ociobakelut/CMakeLists.txt +@@ -29,7 +29,7 @@ set_target_properties(ociobakelut + target_link_libraries(ociobakelut + PRIVATE + apputils +- lcms2::lcms2 ++ lcms::lcms + OpenColorIO + ) + diff --git a/packages/conan/recipes/ocio/patches/2.4.2-0001-fix-cmake-source-dir-and-targets.patch b/packages/conan/recipes/ocio/patches/2.4.2-0001-fix-cmake-source-dir-and-targets.patch new file mode 100644 index 00000000..a34c9ba5 --- /dev/null +++ b/packages/conan/recipes/ocio/patches/2.4.2-0001-fix-cmake-source-dir-and-targets.patch @@ -0,0 +1,84 @@ +diff --git CMakeLists.txt CMakeLists.txt +index 0eaec4be..e711295c 100755 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -518,7 +518,7 @@ install( + FILE ${OCIO_TARGETS_EXPORT_NAME} + ) + +-if (NOT BUILD_SHARED_LIBS) ++if (0) + # Install custom macros used in the find modules. + install(FILES + ${CMAKE_CURRENT_LIST_DIR}/share/cmake/macros/VersionUtils.cmake +diff --git share/cmake/modules/FindExtPackages.cmake share/cmake/modules/FindExtPackages.cmake +index accdecec..945c5edc 100644 +--- share/cmake/modules/FindExtPackages.cmake ++++ share/cmake/modules/FindExtPackages.cmake +@@ -63,7 +63,7 @@ + # https://github.com/jbeder/yaml-cpp + ocio_handle_dependency( yaml-cpp REQUIRED ALLOW_INSTALL + MIN_VERSION 0.6.3 +- RECOMMENDED_VERSION 0.7.0 ++ RECOMMENDED_VERSION 0.8.0 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") + + # pystring +@@ -112,7 +112,7 @@ + # https://github.com/zlib-ng/minizip-ng + ocio_handle_dependency( minizip-ng REQUIRED ALLOW_INSTALL + MIN_VERSION 3.0.6 +- RECOMMENDED_VERSION 3.0.7 ++ RECOMMENDED_VERSION 4.0.8 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") + + ############################################################################### +@@ -131,7 +131,7 @@ + + # lcms2 + # https://github.com/mm2/Little-CMS +- ocio_handle_dependency( lcms2 REQUIRED ALLOW_INSTALL ++ ocio_handle_dependency( lcms REQUIRED ALLOW_INSTALL + MIN_VERSION 2.2 + RECOMMENDED_VERSION 2.2 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") +diff --git share/cmake/utils/CppVersion.cmake share/cmake/utils/CppVersion.cmake +index 175d89c2..ac93b87a 100644 +--- share/cmake/utils/CppVersion.cmake ++++ share/cmake/utils/CppVersion.cmake +@@ -16,7 +16,7 @@ elseif(NOT CMAKE_CXX_STANDARD IN_LIST SUPPORTED_CXX_STANDARDS) + "CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} is unsupported. Supported standards are: ${SUPPORTED_CXX_STANDARDS_STR}.") + endif() + +-set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS "${SUPPORTED_CXX_STANDARDS}") ++# set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS "${SUPPORTED_CXX_STANDARDS}") + + include(CheckCXXCompilerFlag) + +diff --git src/OpenColorIO/CMakeLists.txt src/OpenColorIO/CMakeLists.txt +index 7d2894da..1e6570b4 100755 +--- src/OpenColorIO/CMakeLists.txt ++++ src/OpenColorIO/CMakeLists.txt +@@ -315,7 +315,7 @@ + "$" + "$" + "$" +- ${YAML_CPP_LIBRARIES} ++ PUBLIC yaml-cpp + MINIZIP::minizip-ng + ) + + if(OCIO_USE_SIMD AND OCIO_USE_SSE2NEON AND COMPILER_SUPPORTS_SSE_WITH_SSE2NEON) +diff --git src/apps/ociobakelut/CMakeLists.txt src/apps/ociobakelut/CMakeLists.txt +index 3d6e586b..f7069a1f 100755 +--- src/apps/ociobakelut/CMakeLists.txt ++++ src/apps/ociobakelut/CMakeLists.txt +@@ -29,7 +29,7 @@ set_target_properties(ociobakelut + target_link_libraries(ociobakelut + PRIVATE + apputils +- lcms2::lcms2 ++ lcms::lcms + OpenColorIO + ) + diff --git a/packages/conan/recipes/ocio/patches/2.4.2-0002-cmake-deps-for-shared-libs.patch b/packages/conan/recipes/ocio/patches/2.4.2-0002-cmake-deps-for-shared-libs.patch new file mode 100644 index 00000000..3295b145 --- /dev/null +++ b/packages/conan/recipes/ocio/patches/2.4.2-0002-cmake-deps-for-shared-libs.patch @@ -0,0 +1,13 @@ +diff --git src/cmake/Config.cmake.in src/cmake/Config.cmake.in +index 0eaec4be..e711295c 100755 +--- src/cmake/Config.cmake.in ++++ src/cmake/Config.cmake.in +@@ -2,7 +2,7 @@ + + include(CMakeFindDependencyMacro) + +-if (NOT @BUILD_SHARED_LIBS@) # NOT @BUILD_SHARED_LIBS@ ++if (NOT OFF) # NOT @BUILD_SHARED_LIBS@ + if (APPLE) + # Store the previous value of CMAKE_FIND_FRAMEWORK and CMAKE_FIND_APPBUNDLE. + set(_PREVIOUS_CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK}) diff --git a/packages/conan/recipes/ocio/test_package/CMakeLists.txt b/packages/conan/recipes/ocio/test_package/CMakeLists.txt new file mode 100644 index 00000000..1c511739 --- /dev/null +++ b/packages/conan/recipes/ocio/test_package/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/opencolorio/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(OpenColorIO REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE OpenColorIO::OpenColorIO) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/packages/conan/recipes/ocio/test_package/conanfile.py b/packages/conan/recipes/ocio/test_package/conanfile.py new file mode 100644 index 00000000..dc88fa36 --- /dev/null +++ b/packages/conan/recipes/ocio/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/opencolorio/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/ocio/test_package/test_package.cpp b/packages/conan/recipes/ocio/test_package/test_package.cpp new file mode 100644 index 00000000..44802fc5 --- /dev/null +++ b/packages/conan/recipes/ocio/test_package/test_package.cpp @@ -0,0 +1,16 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/opencolorio/all/test_package/test_package.cpp +*/ + +#include +#include + +int main() +{ + std::cout << "OpenColorIO " << OCIO_NAMESPACE::GetVersion() << "\n"; + return 0; +} diff --git a/packages/conan/recipes/ogg/conanfile.py b/packages/conan/recipes/ogg/conanfile.py new file mode 100644 index 00000000..0698b160 --- /dev/null +++ b/packages/conan/recipes/ogg/conanfile.py @@ -0,0 +1,21 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/ogg/all/conanfile.py + +from conan import ConanFile + +class SystemOggConan(ConanFile): + name = "ogg" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["ogg"] + + self.cpp_info.set_property("cmake_file_name", "Ogg") + self.cpp_info.set_property("cmake_target_name", "Ogg::ogg") diff --git a/packages/conan/recipes/oiio/conandata.yml b/packages/conan/recipes/oiio/conandata.yml new file mode 100644 index 00000000..60512366 --- /dev/null +++ b/packages/conan/recipes/oiio/conandata.yml @@ -0,0 +1,82 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/openimageio/all/conandata.yml + +sources: + "3.0.5.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v3.0.5.0.tar.gz" + sha256: "340bb14a084d94918de8d46af14e361168215430f3dd6c336b2ffb895fe9d5cb" + "3.0.4.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v3.0.4.0.tar.gz" + sha256: "dd481071d532c1ab38242011bb7af16f6ec7d915c58cada9fb78ed72b402ebc5" + "3.0.1.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v3.0.1.0.tar.gz" + sha256: "7f84c2b9c13be74c4a187fefe3844b391374ba329aa63fbbca21fa232e43c87b" + "2.5.16.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.16.0.tar.gz" + sha256: "e5438e28d34a5b0a09428ed77ec310edd47c141db1b259364859110847e161e7" + "2.4.13.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.4.13.0.tar.gz" + sha256: "bb10a7ab6dff5dae2c6d854e9da38136546232235913237e8b1b3c99abb7dd0b" + "2.4.7.1": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.4.7.1.tar.gz" + sha256: "a3dc6fdb3693eb5f1e22191e41c05800a4944f3c76daffe90bd203f956180126" + "2.4.17.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.4.17.0.tar.gz" + sha256: "7fe81d8e5bce30cc4a212f020ac3cc4344e6b7c1c0842475e3a048515099c65c" + "2.5.14.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.14.0.tar.gz" + sha256: "0e74372c658f083820872311d126867f10d59b526a856672746de7b2c772034d" + "2.5.15.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.15.0.tar.gz" + sha256: "7779ef2c3d03c5ed95e13ff292de85c3f8cee301cd46baad0d2dc83c93bfe85c" + "2.5.16.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.16.0.tar.gz" + sha256: "e5438e28d34a5b0a09428ed77ec310edd47c141db1b259364859110847e161e7" + "2.5.17.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.17.0.tar.gz" + sha256: "9cf1b98762ce5aa5f3f7cd34672549034f5716da1eba26eb5173c18aa21e6583" +patches: + "2.4.7.1": + - patch_file: "patches/2.4.7.1-cmake-targets.patch" + patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" + patch_type: "conan" + - patch_file: "patches/2.4.7.1-fix-msvc2017.patch" + patch_description: "Fix compile error with MSVC 2017" + patch_type: "official" + "2.4.17.0": + - patch_file: "patches/2.4.17.0-cmake-targets.patch" + patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" + patch_type: "conan" + "2.5.14.0": + - patch_file: "patches/2.5.14.0-cmake-targets.patch" + patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" + patch_type: "conan" + "2.5.15.0": + - patch_file: "patches/2.5.14.0-cmake-targets.patch" + patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" + patch_type: "conan" + "2.5.16.0": + - patch_file: "patches/2.5.14.0-cmake-targets.patch" + patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" + patch_type: "conan" + "2.5.17.0": + - patch_file: "patches/2.5.17.0-cmake-targets.patch" + patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" + patch_type: "conan" + "3.0.4.0": + - patch_file: "patches/3.0.4.0-cmake-fmt.patch" + patch_description: "Deal with generator expression from fmt Conan package" + patch_type: "conan" + - patch_file: "patches/3.0.4.0-imath-includes.txt" + patch_description: "Missing includes when Imath from Conan package" + patch_type: "conan" + "3.0.5.0": + - patch_file: "patches/3.0.5.0-cmake-fmt.patch" + patch_description: "Deal with generator expression from fmt Conan package" + patch_type: "conan" + - patch_file: "patches/3.0.5.0-imath-includes.txt" + patch_description: "Missing includes when Imath from Conan package" + patch_type: "conan" diff --git a/packages/conan/recipes/oiio/conanfile.py b/packages/conan/recipes/oiio/conanfile.py new file mode 100644 index 00000000..db1dea21 --- /dev/null +++ b/packages/conan/recipes/oiio/conanfile.py @@ -0,0 +1,330 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/openimageio/all/conanfile.py + +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rm, rmdir +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration +import os + +required_conan_version = ">=1.53.0" + + +class OpenImageIOConan(ConanFile): + name = "oiio" # ASWF: short name for compatibility + description = ( + "OpenImageIO is a library for reading and writing images, and a bunch " + "of related classes, utilities, and applications. There is a " + "particular emphasis on formats and functionality used in " + "professional, large-scale animation and visual effects work for film." + ) + topics = ("vfx", "image", "picture") + license = "Apache-2.0", "BSD-3-Clause" + homepage = "http://www.openimageio.org/" + url = "https://github.com/conan-io/conan-center-index" + + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_libjpeg": ["libjpeg", "libjpeg-turbo"], + "with_libpng": [True, False], + "with_freetype": [True, False], + "with_hdf5": [True, False], + "with_opencolorio": [True, False], + "with_opencv": [True, False], + "with_tbb": [True, False], + "with_dicom": [True, False], + "with_ffmpeg": [True, False], + "with_giflib": [True, False], + "with_libheif": [True, False], + "with_raw": [True, False], + "with_openjpeg": [True, False], + "with_openvdb": [True, False], + "with_ptex": [True, False], + "with_libwebp": [True, False], + "with_libjxl": [True, False], + "with_libuhdr": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_libjpeg": "libjpeg-turbo", # ASWF: EL distros default to -turbo + "with_libpng": True, + "with_freetype": True, + "with_hdf5": False, # ASWF: disable until we resolve dependencies + "with_opencolorio": True, + "with_opencv": False, + "with_tbb": False, + "with_dicom": False, # Heavy dependency, disabled by default + "with_ffmpeg": False, # ASWF: disable until we resolve dependencies + "with_giflib": True, + "with_libheif": False,# ASWF: disable until we resolve dependencies + "with_raw": False, # libraw is available under CDDL-1.0 or LGPL-2.1, for this reason it is disabled by default + "with_openjpeg": True, + "with_openvdb": False, # FIXME: broken on M1 + "with_ptex": True, + "with_libwebp": True, + "with_libjxl": True, + "with_libuhdr": True, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def requirements(self): + # Required libraries + self.requires("zlib/[>=1.2.11 <2]") + self.requires("boost/1.84.0") + self.requires("libtiff/4.6.0") + self.requires("imath/3.1.9", transitive_headers=True) + self.requires("openexr/3.2.3") + if self.options.with_libjpeg == "libjpeg": + self.requires("libjpeg/9e") + elif self.options.with_libjpeg == "libjpeg-turbo": + self.requires("libjpeg-turbo/3.0.2") + self.requires("pugixml/1.14") + self.requires("libsquish/1.15") + self.requires("tsl-robin-map/1.2.1") + if Version(self.version) >= "2.4.17.0": + self.requires("fmt/10.2.1", transitive_headers=True) + else: + self.requires("fmt/9.1.0", transitive_headers=True) + + # Optional libraries + if self.options.with_libpng: + self.requires("libpng/[>=1.6 <2]") + if self.options.with_freetype: + self.requires("freetype/2.13.2") + if self.options.with_hdf5: + self.requires("hdf5/1.14.3") + if self.options.with_opencolorio: + self.requires("ocio/2.3.1") # ASWF: ocio for backwards compatibility + if self.options.with_opencv: + self.requires("opencv/4.8.1") + if self.options.with_tbb: + self.requires("onetbb/2021.10.0") + if self.options.with_dicom: + self.requires("dcmtk/3.6.7") + if self.options.with_ffmpeg: + self.requires("ffmpeg/6.1") + # TODO: Field3D dependency + if self.options.with_giflib: + self.requires("giflib/5.2.1") + if self.options.with_libheif: + self.requires("libheif/1.16.2") + if self.options.with_raw: + self.requires("libraw/0.21.2") + if self.options.with_openjpeg: + self.requires("openjpeg/2.5.2") + if self.options.with_openvdb: + self.requires("openvdb/8.0.1") + if self.options.with_ptex: + self.requires("ptex/2.4.2") + if self.options.with_libwebp: + self.requires("libwebp/1.3.2") + if self.options.with_libjxl: + self.requires("libjxl/0.11.1") + if self.options.with_libuhdr: + self.requires("libuhdr/1.4.0") + # TODO: R3DSDK dependency + # TODO: Nuke dependency + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 14) + if is_msvc(self) and is_msvc_static_runtime(self) and self.options.shared: + raise ConanInvalidConfiguration( + "Building shared library with static runtime is not supported!" + ) + + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + + # CMake options + tc.variables["CMAKE_DEBUG_POSTFIX"] = "" # Needed for 2.3.x.x+ versions + tc.variables["OIIO_BUILD_TOOLS"] = True + tc.variables["OIIO_BUILD_TESTS"] = False + tc.variables["BUILD_DOCS"] = False + tc.variables["INSTALL_DOCS"] = False + tc.variables["INSTALL_FONTS"] = False + tc.variables["INSTALL_CMAKE_HELPER"] = False + tc.variables["EMBEDPLUGINS"] = True + tc.variables["USE_PYTHON"] = False + tc.variables["USE_EXTERNAL_PUGIXML"] = True + tc.variables["BUILD_MISSING_FMT"] = False + + # Conan is normally not used for testing, so fixing this option to not build the tests + tc.variables["BUILD_TESTING"] = False + + # OIIO CMake files are patched to check USE_* flags to require or not use dependencies + tc.variables["USE_JPEGTURBO"] = ( + self.options.with_libjpeg == "libjpeg-turbo" + ) + tc.variables[ + "USE_JPEG" + ] = True # Needed for jpeg.imageio plugin, libjpeg/libjpeg-turbo selection still works + tc.variables["USE_HDF5"] = self.options.with_hdf5 + tc.variables["USE_OPENCOLORIO"] = self.options.with_opencolorio + tc.variables["USE_OPENCV"] = self.options.with_opencv + tc.variables["USE_TBB"] = self.options.with_tbb + tc.variables["USE_DCMTK"] = self.options.with_dicom + tc.variables["USE_FFMPEG"] = self.options.with_ffmpeg + tc.variables["USE_FIELD3D"] = False + tc.variables["USE_GIF"] = self.options.with_giflib + tc.variables["USE_LIBHEIF"] = self.options.with_libheif + tc.variables["USE_LIBRAW"] = self.options.with_raw + tc.variables["USE_OPENVDB"] = self.options.with_openvdb + tc.variables["USE_PTEX"] = self.options.with_ptex + tc.variables["USE_R3DSDK"] = False + tc.variables["USE_NUKE"] = False + tc.variables["USE_OPENGL"] = False + tc.variables["USE_QT"] = False + tc.variables["USE_LIBPNG"] = self.options.with_libpng + tc.variables["USE_FREETYPE"] = self.options.with_freetype + tc.variables["USE_LIBWEBP"] = self.options.with_libwebp + tc.variables["USE_OPENJPEG"] = self.options.with_openjpeg + + tc.generate() + cd = CMakeDeps(self) + cd.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + # ASWF: license files in package subdirectory + copy(self, "LICENSE*.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "share")) + if self.settings.os == "Windows": + for vc_file in ("concrt", "msvcp", "vcruntime"): + rm(self, f"{vc_file}*.dll", os.path.join(self.package_folder, "bin")) + # ASWF: cmake files in lib64, keep for outside conan use + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) + + @staticmethod + def _conan_comp(name): + return f"openimageio_{name.lower()}" + + def _add_component(self, name): + component = self.cpp_info.components[self._conan_comp(name)] + component.set_property("cmake_target_name", f"OpenImageIO::{name}") + component.names["cmake_find_package"] = name + component.names["cmake_find_package_multi"] = name + return component + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "OpenImageIO") + self.cpp_info.set_property("pkg_config_name", "OpenImageIO") + + self.cpp_info.names["cmake_find_package"] = "OpenImageIO" + self.cpp_info.names["cmake_find_package_multi"] = "OpenImageIO" + + # OpenImageIO::OpenImageIO_Util + # ASWF: _add_component() deprecated in Conan 2.0 + self.cpp_info.components["OpenImageIO_Util"].libs = ["OpenImageIO_Util"] + self.cpp_info.components["OpenImageIO_Util"].requires = [ + "boost::filesystem", + "boost::thread", + "boost::system", + "boost::regex", + "imath::imath", + "openexr::openexr", + ] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["OpenImageIO_Util"].system_libs.extend( + ["dl", "m", "pthread"] + ) + if self.options.with_tbb: + self.cpp_info.components["OpenImageIO_Util"].requires.append("onetbb::onetbb") + + # OpenImageIO::OpenImageIO + # ASWF: _add_component() deprecated in Conan 2.0 + self.cpp_info.components["OpenImageIO"].libs = ["OpenImageIO"] + self.cpp_info.components["OpenImageIO"].requires = [ + "OpenImageIO_Util", + "zlib::zlib", + "boost::thread", + "boost::system", + "boost::container", + "boost::regex", + "libtiff::libtiff", + "pugixml::pugixml", + "tsl-robin-map::tsl-robin-map", + "libsquish::libsquish", + "fmt::fmt", + "imath::imath", + "openexr::openexr", + ] + + if self.options.with_libjpeg == "libjpeg": + self.cpp_info.components["OpenImageIO"].requires.append("libjpeg::libjpeg") + elif self.options.with_libjpeg == "libjpeg-turbo": + self.cpp_info.components["OpenImageIO"].requires.append( + "libjpeg-turbo::libjpeg-turbo" + ) + if self.options.with_libpng: + self.cpp_info.components["OpenImageIO"].requires.append("libpng::libpng") + if self.options.with_freetype: + self.cpp_info.components["OpenImageIO"].requires.append("freetype::freetype") + if self.options.with_hdf5: + self.cpp_info.components["OpenImageIO"].requires.append("hdf5::hdf5") + if self.options.with_opencolorio: + self.cpp_info.components["OpenImageIO"].requires.append("ocio::ocio") # ASWF: ocio instead of opencolorio for compat + if self.options.with_opencv: + self.cpp_info.components["OpenImageIO"].requires.append("opencv::opencv") + if self.options.with_dicom: + self.cpp_info.components["OpenImageIO"].requires.append("dcmtk::dcmtk") + if self.options.with_ffmpeg: + self.cpp_info.components["OpenImageIO"].requires.append("ffmpeg::ffmpeg") + if self.options.with_giflib: + self.cpp_info.components["OpenImageIO"].requires.append("giflib::giflib") + if self.options.with_libheif: + self.cpp_info.components["OpenImageIO"].requires.append("libheif::libheif") + if self.options.with_raw: + self.cpp_info.components["OpenImageIO"].requires.append("libraw::libraw") + if self.options.with_openjpeg: + self.cpp_info.components["OpenImageIO"].requires.append("openjpeg::openjpeg") + if self.options.with_openvdb: + self.cpp_info.components["OpenImageIO"].requires.append("openvdb::openvdb") + if self.options.with_ptex: + self.cpp_info.components["OpenImageIO"].requires.append("ptex::ptex") + if self.options.with_libwebp: + self.cpp_info.components["OpenImageIO"].requires.append("libwebp::libwebp") + if self.options.with_libjxl: + self.cpp_info.components["OpenImageIO"].requires.append("libjxl::libjxl") + if self.options.with_libuhdr: + self.cpp_info.components["OpenImageIO"].requires.append("libuhdr::libuhdr") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["OpenImageIO"].system_libs.extend(["dl", "m", "pthread"]) + + if not self.options.shared: + self.cpp_info.components["OpenImageIO"].defines.append("OIIO_STATIC_DEFINE") diff --git a/packages/conan/recipes/oiio/patches/2.4.17.0-cmake-targets.patch b/packages/conan/recipes/oiio/patches/2.4.17.0-cmake-targets.patch new file mode 100644 index 00000000..5ed8bf12 --- /dev/null +++ b/packages/conan/recipes/oiio/patches/2.4.17.0-cmake-targets.patch @@ -0,0 +1,456 @@ +diff --git CMakeLists.txt CMakeLists.txt +index a5a6de1c5..f1801af5a 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -144,7 +144,7 @@ message(STATUS "Setting Namespace to: ${PROJ_NAMESPACE_V}") + add_definitions (-DOIIO_INTERNAL=1) + + list (APPEND CMAKE_MODULE_PATH +- "${PROJECT_SOURCE_DIR}/src/cmake/modules" ++ #"${PROJECT_SOURCE_DIR}/src/cmake/modules" + "${PROJECT_SOURCE_DIR}/src/cmake") + + include (GNUInstallDirs) +@@ -224,7 +224,7 @@ if (OIIO_BUILD_TOOLS AND NOT BUILD_OIIOUTIL_ONLY) + add_subdirectory (src/iinfo) + add_subdirectory (src/maketx) + add_subdirectory (src/oiiotool) +- add_subdirectory (src/testtex) ++ #add_subdirectory (src/testtex) + add_subdirectory (src/iv) + endif () + +diff --git src/cmake/externalpackages.cmake src/cmake/externalpackages.cmake +index a4f895c07..f55da37cb 100644 +--- src/cmake/externalpackages.cmake ++++ src/cmake/externalpackages.cmake +@@ -45,14 +45,14 @@ if (NOT DEFINED Boost_USE_STATIC_LIBS) + set (Boost_USE_STATIC_LIBS "${LINKSTATIC}") + endif () + +-if (MSVC) +- # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: +- if (NOT Boost_USE_STATIC_LIBS) +- add_definitions (-DBOOST_ALL_DYN_LINK=1) +- endif () +-endif () +- +-set (Boost_COMPONENTS thread) ++# if (MSVC) ++# # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: ++# if (NOT Boost_USE_STATIC_LIBS) ++# add_definitions (-DBOOST_ALL_DYN_LINK=1) ++# endif () ++# endif () ++ ++set (Boost_COMPONENTS filesystem system thread container) + if (NOT USE_STD_FILESYSTEM) + list (APPEND Boost_COMPONENTS filesystem) + endif () +@@ -108,9 +108,9 @@ checked_find_package (OpenEXR REQUIRED + # building against Imath/OpenEXR 3.x when there is still a system-level + # install version of 2.x. + include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) +-if (MSVC AND NOT LINKSTATIC) +- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? +-endif () ++# if (MSVC AND NOT LINKSTATIC) ++# add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? ++# endif () + if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.0) + set (OIIO_USING_IMATH 3) + else () +@@ -141,12 +141,15 @@ set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL + "Exclude find_dependency(Imath) from the exported OpenImageIOConfig.cmake") + + # JPEG -- prefer Turbo-JPEG to regular libjpeg +-checked_find_package (JPEGTurbo +- DEFINITIONS -DUSE_JPEG_TURBO=1 +- PRINT JPEG_INCLUDES JPEG_INCLUDE_DIRS +- JPEG_LIBRARIES JPEG_VERSION) +-if (NOT JPEG_FOUND) # Try to find the non-turbo version ++if (USE_JPEGTURBO) ++ checked_find_package (libjpeg-turbo REQUIRED ++ DEFINITIONS -DUSE_JPEG_TURBO=1 ++ PRINT libjpeg-turbo_INCLUDES libjpeg-turbo_LIBRARIES) ++ add_library(JPEG::JPEG ALIAS libjpeg-turbo::libjpeg-turbo) ++elseif (USE_JPEG) # Try to find the non-turbo version + checked_find_package (JPEG REQUIRED) ++else () ++ message(FATAL_ERROR "JPEG library was not found!") + endif () + + # Pugixml setup. Normally we just use the version bundled with oiio, but +@@ -162,106 +165,110 @@ else () + endif() + + # From pythonutils.cmake +-find_python() ++#find_python() + + + ########################################################################### + # Dependencies for optional formats and features. If these are not found, + # we will continue building, but the related functionality will be disabled. + +-checked_find_package (PNG) +- +-checked_find_package (BZip2) # Used by ffmpeg and freetype +-if (NOT BZIP2_FOUND) +- set (BZIP2_LIBRARIES "") # TODO: why does it break without this? +-endif () ++if (USE_LIBPNG) ++ checked_find_package (PNG) ++endif() + +-checked_find_package (Freetype +- DEFINITIONS -DUSE_FREETYPE=1 ) ++if (USE_FREETYPE) ++ checked_find_package (Freetype ++ DEFINITIONS -DUSE_FREETYPE=1 ) ++endif() + +-checked_find_package (OpenColorIO +- DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 +- # PREFER_CONFIG +- ) +-if (NOT OpenColorIO_FOUND) +- set (OpenColorIO_FOUND 0) +-endif () +-checked_find_package (OpenCV 3.0 +- DEFINITIONS -DUSE_OPENCV=1) ++if (USE_OPENCOLORIO) ++ checked_find_package (OpenColorIO ++ DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 ++ # PREFER_CONFIG ++ ) ++ if (NOT OpenColorIO_FOUND) ++ set (OpenColorIO_FOUND 0) ++ endif () ++endif() ++if (USE_OPENCV) ++ checked_find_package (OpenCV 3.0 ++ DEFINITIONS -DUSE_OPENCV=1) ++endif() + + # Intel TBB +-set (TBB_USE_DEBUG_BUILD OFF) +-checked_find_package (TBB 2017 +- SETVARIABLES OIIO_TBB +- PREFER_CONFIG) +- +-checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images +-checked_find_package (FFmpeg VERSION_MIN 3.0) +-checked_find_package (GIF +- VERSION_MIN 4 +- RECOMMEND_MIN 5.0 +- RECOMMEND_MIN_REASON "for stability and thread safety") +- ++if (USE_TBB)# Intel TBB ++ set (TBB_USE_DEBUG_BUILD OFF) ++ checked_find_package (TBB 2017 ++ SETVARIABLES OIIO_TBB ++ PREFER_CONFIG) ++endif() ++if (USE_DCMTK) ++ checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images ++endif() ++if (USE_FFMPEG) ++ checked_find_package (ffmpeg VERSION_MIN 3.0) ++endif() ++if (USE_GIF) ++ checked_find_package (GIF ++ VERSION_MIN 4 ++ RECOMMEND_MIN 5.0 ++ RECOMMEND_MIN_REASON "for stability and thread safety") ++endif() ++ + # For HEIF/HEIC/AVIF formats +-checked_find_package (Libheif VERSION_MIN 1.3 +- RECOMMEND_MIN 1.7 +- RECOMMEND_MIN_REASON "for AVIF support") +-if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) +- message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") +- set (Libheif_FOUND 0) +-endif () +- +-checked_find_package (LibRaw +- RECOMMEND_MIN 0.18 +- RECOMMEND_MIN_REASON "for ACES support and better camera metadata" +- PRINT LibRaw_r_LIBRARIES) +-if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) +- message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}") +- # Currently, we issue the above warning and let them take their chances. +- # If we wish to disable the LibRaw<0.20/C++17 combination that may fail, +- # just uncomment the following two lines. +- # set (LibRaw_FOUND 0) +- # set (LIBRAW_FOUND 0) +-endif () ++if (USE_LIBHEIF) ++ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 ++ RECOMMEND_MIN 1.7 ++ RECOMMEND_MIN_REASON "for AVIF support") ++endif() + +-checked_find_package (OpenJPEG VERSION_MIN 2.0 +- RECOMMEND_MIN 2.2 +- RECOMMEND_MIN_REASON "for multithreading support") +-# Note: Recent OpenJPEG versions have exported cmake configs, but we don't +-# find them reliable at all, so we stick to our FindOpenJPEG.cmake module. +- +-checked_find_package (OpenVDB +- VERSION_MIN 5.0 +- DEPS TBB +- DEFINITIONS -DUSE_OPENVDB=1) +-if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 10.1 AND CMAKE_CXX_STANDARD VERSION_LESS 17) +- message (WARNING "${ColorYellow}OpenVDB >= 10.1 (we found ${OpenVDB_VERSION}) can only be used when we build with C++17 or higher. Disabling OpenVDB support.${ColorReset}") +- set (OpeVDB_FOUND 0) +-endif () ++if (USE_LIBRAW) ++ checked_find_package (LibRaw ++ RECOMMEND_MIN 0.18 ++ RECOMMEND_MIN_REASON "for ACES support and better camera metadata" ++ PRINT LibRaw_r_LIBRARIES) ++endif() + +-checked_find_package (Ptex PREFER_CONFIG) +-if (NOT Ptex_FOUND OR NOT Ptex_VERSION) +- # Fallback for inadequate Ptex exported configs. This will eventually +- # disappear when we can 100% trust Ptex's exports. +- unset (Ptex_FOUND) +- checked_find_package (Ptex) +-endif () ++if (USE_OPENJPEG) ++ checked_find_package (OpenJPEG REQUIRED ++ VERSION_MIN 2.0 ++ RECOMMEND_MIN 2.2 ++ RECOMMEND_MIN_REASON "for multithreading support") ++ # Note: Recent OpenJPEG versions have exported cmake configs, but we don't ++ # find them reliable at all, so we stick to our FindOpenJPEG.cmake module. ++endif() ++if (USE_OPENVDB) ++ checked_find_package (OpenVDB REQUIRED ++ VERSION_MIN 5.0 ++ DEPS TBB ++ DEFINITIONS -DUSE_OPENVDB=1) ++endif() + +-checked_find_package (WebP) ++if (USE_PTEX) ++ checked_find_package (ptex PREFER_CONFIG) ++endif() + ++if (USE_LIBWEBP) ++ checked_find_package (WebP REQUIRED) ++endif() ++ + option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) +-checked_find_package (R3DSDK) # RED camera +- ++if (USE_R3DSDK) ++ checked_find_package (R3DSDK REQUIRED) # RED camera ++endif () ++ + set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") +-checked_find_package (Nuke) ++if (USE_NUKE) ++ checked_find_package (Nuke REQUIRED) ++endif () + + + # Qt -- used for iv + option (USE_QT "Use Qt if found" ON) +-if (USE_QT) +- checked_find_package (OpenGL) # used for iv ++if (USE_OPENGL) ++ checked_find_package (OpenGL REQUIRED) # used for iv + endif () +-if (USE_QT AND OPENGL_FOUND) ++if (USE_QT AND USE_OPENGL) + checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets) + if (NOT Qt6_FOUND) + checked_find_package (Qt5 COMPONENTS Core Gui Widgets OpenGL) +@@ -285,13 +291,13 @@ macro (find_or_download_robin_map) + # for an installed version. Still prefer a copy that seems to be + # locally installed in this tree. + if (NOT BUILD_ROBINMAP_FORCE) +- find_package (Robinmap QUIET) ++ find_package (tsl-robin-map REQUIRED) + endif () + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then + # download and build it. + # Download the headers from github +- if ((BUILD_MISSING_ROBINMAP AND NOT ROBINMAP_FOUND) OR BUILD_ROBINMAP_FORCE) ++ if ((BUILD_MISSING_ROBINMAP AND NOT tsl-robin-map_FOUND) OR BUILD_ROBINMAP_FORCE) + message (STATUS "Downloading local Tessil/robin-map") + set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map") + set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map") +@@ -309,7 +315,7 @@ macro (find_or_download_robin_map) + endif () + set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}/include") + endif () +- checked_find_package (Robinmap REQUIRED) ++ checked_find_package (tsl-robin-map REQUIRED) + endmacro() + + +@@ -331,7 +337,7 @@ macro (find_or_download_fmt) + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then + # download and build it. +- if ((BUILD_MISSING_FMT AND NOT FMT_FOUND) OR BUILD_FMT_FORCE) ++ if ((BUILD_MISSING_FMT AND NOT fmt_FOUND) OR BUILD_FMT_FORCE) + message (STATUS "Downloading local fmtlib/fmt") + set (FMT_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/fmt") + set (FMT_GIT_REPOSITORY "https://github.com/fmtlib/fmt") +diff --git src/ffmpeg.imageio/CMakeLists.txt src/ffmpeg.imageio/CMakeLists.txt +index 100d4d773..ec7e01884 100644 +--- src/ffmpeg.imageio/CMakeLists.txt ++++ src/ffmpeg.imageio/CMakeLists.txt +@@ -2,13 +2,11 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (FFmpeg_FOUND) ++if (USE_FFMPEG) + add_oiio_plugin (ffmpeginput.cpp +- INCLUDE_DIRS ${FFMPEG_INCLUDES} +- LINK_LIBRARIES ${FFMPEG_LIBRARIES} +- ${BZIP2_LIBRARIES} ++ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale + DEFINITIONS "-DUSE_FFMPEG" +- "-DOIIO_FFMPEG_VERSION=\"${FFMPEG_VERSION}\"") ++ "-DOIIO_FFMPEG_VERSION=\"${ffmpeg_VERSION}\"") + else() + message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") + endif() +diff --git src/heif.imageio/CMakeLists.txt src/heif.imageio/CMakeLists.txt +index eed740900..72aaaff86 100644 +--- src/heif.imageio/CMakeLists.txt ++++ src/heif.imageio/CMakeLists.txt +@@ -2,10 +2,10 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Libheif_FOUND) ++if (USE_LIBHEIF) + add_oiio_plugin (heifinput.cpp heifoutput.cpp +- INCLUDE_DIRS ${LIBHEIF_INCLUDES} +- LINK_LIBRARIES ${LIBHEIF_LIBRARIES} ++ #INCLUDE_DIRS ${LIBHEIF_INCLUDES} ++ LINK_LIBRARIES libheif::heif + DEFINITIONS "-DUSE_HEIF=1") + else () + message (WARNING "heif plugin will not be built") +diff --git src/include/CMakeLists.txt src/include/CMakeLists.txt +index 006cb65a7..2e2c2c2ea 100644 +--- src/include/CMakeLists.txt ++++ src/include/CMakeLists.txt +@@ -65,6 +65,7 @@ install (FILES ${detail_headers} + COMPONENT developer) + + if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) ++ set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") + set (fmt_headers + ${FMT_INCLUDES}/fmt/core.h + ${FMT_INCLUDES}/fmt/format-inl.h +@@ -74,8 +75,8 @@ if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) + if (fmt_VERSION VERSION_GREATER_EQUAL 90000) + list (APPEND fmt_headers ${FMT_INCLUDES}/fmt/std.h) + endif () +- file (COPY ${fmt_headers} +- DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) ++ # file (COPY ${fmt_headers} ++ # DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) + else () + set (fmt_headers + ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt/format.h +diff --git src/include/OpenImageIO/detail/fmt.h src/include/OpenImageIO/detail/fmt.h +index 31a986d31..9a7e5ce54 100644 +--- src/include/OpenImageIO/detail/fmt.h ++++ src/include/OpenImageIO/detail/fmt.h +@@ -55,9 +55,9 @@ OIIO_PRAGMA_WARNING_PUSH + # pragma GCC diagnostic ignored "-Wtautological-constant-compare" + #endif + +-#include +-#include +-#include ++#include ++#include ++#include + + OIIO_PRAGMA_WARNING_POP + +diff --git src/jpeg2000.imageio/CMakeLists.txt src/jpeg2000.imageio/CMakeLists.txt +index 560e8d486..94b5cd2dc 100644 +--- src/jpeg2000.imageio/CMakeLists.txt ++++ src/jpeg2000.imageio/CMakeLists.txt +@@ -4,8 +4,7 @@ + + if (OPENJPEG_FOUND) + add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp +- INCLUDE_DIRS ${OPENJPEG_INCLUDES} +- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} ++ LINK_LIBRARIES openjp2 + DEFINITIONS "-DUSE_OPENJPEG") + else() + message (WARNING "Jpeg-2000 plugin will not be built") +diff --git src/libOpenImageIO/CMakeLists.txt src/libOpenImageIO/CMakeLists.txt +index 772b39ff2..898fb2be6 100644 +--- src/libOpenImageIO/CMakeLists.txt ++++ src/libOpenImageIO/CMakeLists.txt +@@ -141,12 +141,17 @@ target_link_libraries (OpenImageIO + $ + ${BZIP2_LIBRARIES} + ZLIB::ZLIB +- $ ++ tsl::robin_map ++ Boost::filesystem Boost::thread Boost::system Boost::container + ${CMAKE_DL_LIBS} + ) + ++if (USE_OPENCV) ++ target_link_libraries (OpenImageIO PUBLIC opencv::opencv_core opencv::opencv_imgproc opencv::opencv_videoio) ++endif () ++ +-if (FREETYPE_FOUND) +- target_link_libraries (OpenImageIO PRIVATE ${FREETYPE_LIBRARIES}) ++if (USE_FREETYPE) ++ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) + endif() + + if (WIN32) +diff --git src/libutil/CMakeLists.txt src/libutil/CMakeLists.txt +index 8933bfe5b..3970eb0c3 100644 +--- src/libutil/CMakeLists.txt ++++ src/libutil/CMakeLists.txt +@@ -20,8 +20,8 @@ target_link_libraries (OpenImageIO_Util + ${GCC_ATOMIC_LIBRARIES} + ${OPENIMAGEIO_IMATH_DEPENDENCY_VISIBILITY} + ${OPENIMAGEIO_IMATH_TARGETS} ++ fmt::fmt + PRIVATE +- $ +- $ ++ Boost::filesystem Boost::thread Boost::system + $ + ${CMAKE_DL_LIBS} + ) +diff --git src/ptex.imageio/CMakeLists.txt src/ptex.imageio/CMakeLists.txt +index ed42f1c94..82d2b9770 100644 +--- src/ptex.imageio/CMakeLists.txt ++++ src/ptex.imageio/CMakeLists.txt +@@ -2,8 +2,9 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Ptex_FOUND) ++if (USE_PTEX) + add_oiio_plugin (ptexinput.cpp +- LINK_LIBRARIES Ptex::Ptex_dynamic ZLIB::ZLIB ++ LINK_LIBRARIES ${ptex_LIBRARIES} ZLIB::ZLIB ++ INCLUDE_DIRS ${ptex_INCLUDE_DIRS} + DEFINITIONS "-DUSE_PTEX") + endif () diff --git a/packages/conan/recipes/oiio/patches/2.4.7.1-cmake-targets.patch b/packages/conan/recipes/oiio/patches/2.4.7.1-cmake-targets.patch new file mode 100644 index 00000000..0d61414f --- /dev/null +++ b/packages/conan/recipes/oiio/patches/2.4.7.1-cmake-targets.patch @@ -0,0 +1,429 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4465c824c..7b23fb444 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -140,7 +140,7 @@ message(STATUS "Setting Namespace to: ${PROJ_NAMESPACE_V}") + add_definitions (-DOIIO_INTERNAL=1) + + list (APPEND CMAKE_MODULE_PATH +- "${PROJECT_SOURCE_DIR}/src/cmake/modules" ++ #"${PROJECT_SOURCE_DIR}/src/cmake/modules" + "${PROJECT_SOURCE_DIR}/src/cmake") + + include (GNUInstallDirs) +@@ -220,7 +220,7 @@ if (OIIO_BUILD_TOOLS AND NOT BUILD_OIIOUTIL_ONLY) + add_subdirectory (src/iinfo) + add_subdirectory (src/maketx) + add_subdirectory (src/oiiotool) +- add_subdirectory (src/testtex) ++ #add_subdirectory (src/testtex) + add_subdirectory (src/iv) + endif () + +diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake +index 48e871418..21f709b1d 100644 +--- a/src/cmake/externalpackages.cmake ++++ b/src/cmake/externalpackages.cmake +@@ -48,11 +48,11 @@ endif () + if (MSVC) + # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: + if (NOT Boost_USE_STATIC_LIBS) +- add_definitions (-DBOOST_ALL_DYN_LINK=1) ++ #add_definitions (-DBOOST_ALL_DYN_LINK=1) + endif () + endif () + +-set (Boost_COMPONENTS thread) ++set (Boost_COMPONENTS filesystem system thread container) + if (NOT USE_STD_FILESYSTEM) + list (APPEND Boost_COMPONENTS filesystem) + endif () +@@ -104,9 +104,9 @@ checked_find_package (OpenEXR REQUIRED + # install version of 2.x. + include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) + if (MSVC AND NOT LINKSTATIC) +- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? ++ #add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? + endif () +-if (OPENEXR_VERSION VERSION_GREATER_EQUAL 3.0) ++if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.0) + set (OIIO_USING_IMATH 3) + else () + set (OIIO_USING_IMATH 2) +@@ -136,12 +136,15 @@ set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL + "Exclude find_dependency(Imath) from the exported OpenImageIOConfig.cmake") + + # JPEG -- prefer Turbo-JPEG to regular libjpeg +-checked_find_package (JPEGTurbo +- DEFINITIONS -DUSE_JPEG_TURBO=1 +- PRINT JPEG_INCLUDES JPEG_INCLUDE_DIRS +- JPEG_LIBRARIES JPEG_VERSION) +-if (NOT JPEG_FOUND) # Try to find the non-turbo version ++if (USE_JPEGTURBO) ++ checked_find_package (libjpeg-turbo REQUIRED ++ DEFINITIONS -DUSE_JPEG_TURBO=1 ++ PRINT libjpeg-turbo_INCLUDES libjpeg-turbo_LIBRARIES) ++ add_library(JPEG::JPEG ALIAS libjpeg-turbo::libjpeg-turbo) ++elseif (USE_JPEG) # Try to find the non-turbo version + checked_find_package (JPEG REQUIRED) ++else () ++ message(FATAL_ERROR "JPEG library was not found!") + endif () + + # Pugixml setup. Normally we just use the version bundled with oiio, but +@@ -157,96 +160,102 @@ else () + endif() + + # From pythonutils.cmake +-find_python() ++#find_python() + + + ########################################################################### + # Dependencies for optional formats and features. If these are not found, + # we will continue building, but the related functionality will be disabled. + +-checked_find_package (PNG) +- +-checked_find_package (BZip2) # Used by ffmpeg and freetype +-if (NOT BZIP2_FOUND) +- set (BZIP2_LIBRARIES "") # TODO: why does it break without this? +-endif () ++if (USE_LIBPNG) ++ checked_find_package (PNG) ++endif() + +-checked_find_package (Freetype ++if (USE_FREETYPE) ++ checked_find_package (Freetype + DEFINITIONS -DUSE_FREETYPE=1 ) ++endif() + +-checked_find_package (OpenColorIO +- DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 +- # PREFER_CONFIG +- ) +-if (NOT OpenColorIO_FOUND) +- set (OpenColorIO_FOUND 0) +-endif () +-checked_find_package (OpenCV 3.0 ++if (USE_OPENCOLORIO) ++ checked_find_package (OpenColorIO ++ DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 ++ # PREFER_CONFIG ++ ) ++ if (NOT OpenColorIO_FOUND) ++ set (OpenColorIO_FOUND 0) ++ endif () ++endif() ++if (USE_OPENCV) ++ checked_find_package (OpenCV 3.0 + DEFINITIONS -DUSE_OPENCV=1) ++endif() + +-# Intel TBB +-set (TBB_USE_DEBUG_BUILD OFF) +-checked_find_package (TBB 2017 +- SETVARIABLES OIIO_TBB +- PREFER_CONFIG) +- +-checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images +-checked_find_package (FFmpeg VERSION_MIN 3.0) +-checked_find_package (GIF +- VERSION_MIN 4 +- RECOMMEND_MIN 5.0 +- RECOMMEND_MIN_REASON "for stability and thread safety") +- ++if (USE_TBB)# Intel TBB ++ set (TBB_USE_DEBUG_BUILD OFF) ++ checked_find_package (TBB 2017 ++ SETVARIABLES OIIO_TBB ++ PREFER_CONFIG) ++endif() ++if (USE_DCMTK) ++ checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images ++endif() ++if (USE_FFMPEG) ++ checked_find_package (ffmpeg VERSION_MIN 3.0) ++endif() ++if (USE_GIF) ++ checked_find_package (GIF ++ VERSION_MIN 4 ++ RECOMMEND_MIN 5.0 ++ RECOMMEND_MIN_REASON "for stability and thread safety") ++endif() + # For HEIF/HEIC/AVIF formats +-checked_find_package (Libheif VERSION_MIN 1.3 ++if (USE_LIBHEIF) ++checked_find_package (libheif REQUIRED VERSION_MIN 1.3 + RECOMMEND_MIN 1.7 + RECOMMEND_MIN_REASON "for AVIF support") +-if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) +- message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") +- set (Libheif_FOUND 0) +-endif () ++endif() ++if (USE_LIBRAW) ++ checked_find_package (LibRaw ++ RECOMMEND_MIN 0.18 ++ RECOMMEND_MIN_REASON "for ACES support and better camera metadata" ++ PRINT LibRaw_r_LIBRARIES) ++endif() + +-checked_find_package (LibRaw +- RECOMMEND_MIN 0.18 +- RECOMMEND_MIN_REASON "for ACES support and better camera metadata" +- PRINT LibRaw_r_LIBRARIES) +-if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) +- message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}") +- # Currently, we issue the above warning and let them take their chances. +- # If we wish to disable the LibRaw<0.20/C++17 combination that may fail, +- # just uncomment the following two lines. +- # set (LibRaw_FOUND 0) +- # set (LIBRAW_FOUND 0) +-endif () ++if (USE_OPENJPEG) ++ checked_find_package (OpenJPEG VERSION_MIN 2.0 ++ RECOMMEND_MIN 2.2 ++ RECOMMEND_MIN_REASON "for multithreading support") ++ # Note: Recent OpenJPEG versions have exported cmake configs, but we don't ++ # find them reliable at all, so we stick to our FindOpenJPEG.cmake module. ++endif() ++if (USE_OPENVDB) ++ checked_find_package (OpenVDB ++ VERSION_MIN 5.0 ++ DEPS TBB ++ DEFINITIONS -DUSE_OPENVDB=1) ++endif() + +-checked_find_package (OpenJPEG VERSION_MIN 2.0 +- RECOMMEND_MIN 2.2 +- RECOMMEND_MIN_REASON "for multithreading support") +-# Note: Recent OpenJPEG versions have exported cmake configs, but we don't +-# find them reliable at all, so we stick to our FindOpenJPEG.cmake module. +- +-checked_find_package (OpenVDB +- VERSION_MIN 5.0 +- DEPS TBB +- DEFINITIONS -DUSE_OPENVDB=1) +- +-checked_find_package (Ptex PREFER_CONFIG) +-if (NOT Ptex_FOUND OR NOT Ptex_VERSION) +- # Fallback for inadequate Ptex exported configs. This will eventually +- # disappear when we can 100% trust Ptex's exports. +- unset (Ptex_FOUND) +- checked_find_package (Ptex) +-endif () ++if (USE_PTEX) ++ checked_find_package (ptex PREFER_CONFIG) ++endif() + +-checked_find_package (WebP) ++if (USE_LIBWEBP) ++ checked_find_package (WebP) ++endif() + + option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) +-checked_find_package (R3DSDK) # RED camera ++if (USE_R3DSDK) ++ checked_find_package (R3DSDK REQUIRED) # RED camera ++endif () + + set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") +-checked_find_package (Nuke) ++if (USE_NUKE) ++ checked_find_package (Nuke REQUIRED) ++endif () + +-checked_find_package (OpenGL) # used for iv ++if (USE_OPENGL) ++ checked_find_package (OpenGL REQUIRED) # used for iv ++endif () + + # Qt -- used for iv + set (qt5_modules Core Gui Widgets) +@@ -254,7 +263,9 @@ if (OPENGL_FOUND) + list (APPEND qt5_modules OpenGL) + endif () + option (USE_QT "Use Qt if found" ON) +-checked_find_package (Qt5 COMPONENTS ${qt5_modules}) ++if (USE_QT) ++ checked_find_package (Qt5 COMPONENTS ${qt5_modules}) ++endif() + if (USE_QT AND NOT Qt5_FOUND AND APPLE) + message (STATUS " If you think you installed qt5 with Homebrew and it still doesn't work,") + message (STATUS " try: export PATH=/usr/local/opt/qt5/bin:$PATH") +@@ -275,13 +286,13 @@ macro (find_or_download_robin_map) + # for an installed version. Still prefer a copy that seems to be + # locally installed in this tree. + if (NOT BUILD_ROBINMAP_FORCE) +- find_package (Robinmap QUIET) ++ find_package (tsl-robin-map REQUIRED) + endif () + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then + # download and build it. + # Download the headers from github +- if ((BUILD_MISSING_ROBINMAP AND NOT ROBINMAP_FOUND) OR BUILD_ROBINMAP_FORCE) ++ if ((BUILD_MISSING_ROBINMAP AND NOT tsl-robin-map_FOUND) OR BUILD_ROBINMAP_FORCE) + message (STATUS "Downloading local Tessil/robin-map") + set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map") + set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map") +@@ -299,7 +310,7 @@ macro (find_or_download_robin_map) + endif () + set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}/include") + endif () +- checked_find_package (Robinmap REQUIRED) ++ checked_find_package (tsl-robin-map REQUIRED) + endmacro() + + +diff --git a/src/ffmpeg.imageio/CMakeLists.txt b/src/ffmpeg.imageio/CMakeLists.txt +index 58402060e..5dea82369 100644 +--- a/src/ffmpeg.imageio/CMakeLists.txt ++++ b/src/ffmpeg.imageio/CMakeLists.txt +@@ -2,13 +2,11 @@ + # SPDX-License-Identifier: BSD-3-Clause + # https://github.com/OpenImageIO/oiio + +-if (FFmpeg_FOUND) ++if (ffmpeg_FOUND) + add_oiio_plugin (ffmpeginput.cpp +- INCLUDE_DIRS ${FFMPEG_INCLUDES} +- LINK_LIBRARIES ${FFMPEG_LIBRARIES} +- ${BZIP2_LIBRARIES} ++ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale + DEFINITIONS "-DUSE_FFMPEG" +- "-DOIIO_FFMPEG_VERSION=\"${FFMPEG_VERSION}\"") ++ "-DOIIO_FFMPEG_VERSION=\"${ffmpeg_VERSION}\"") + else() + message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") + endif() +diff --git src/heif.imageio/CMakeLists.txt src/heif.imageio/CMakeLists.txt +index ece763a27..83abdea66 100644 +--- src/heif.imageio/CMakeLists.txt ++++ src/heif.imageio/CMakeLists.txt +@@ -2,10 +2,10 @@ + # SPDX-License-Identifier: BSD-3-Clause + # https://github.com/OpenImageIO/oiio + +-if (Libheif_FOUND) ++if (USE_LIBHEIF) + add_oiio_plugin (heifinput.cpp heifoutput.cpp +- INCLUDE_DIRS ${LIBHEIF_INCLUDES} +- LINK_LIBRARIES ${LIBHEIF_LIBRARIES} ++ #INCLUDE_DIRS ${LIBHEIF_INCLUDES} ++ LINK_LIBRARIES libheif::heif + DEFINITIONS "-DUSE_HEIF=1") + else () + message (WARNING "heif plugin will not be built") +diff --git a/src/include/CMakeLists.txt b/src/include/CMakeLists.txt +index 52b0936a6..611eadb4e 100644 +--- a/src/include/CMakeLists.txt ++++ b/src/include/CMakeLists.txt +@@ -65,14 +65,15 @@ install (FILES ${detail_headers} + COMPONENT developer) + + if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) ++ set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") + set (fmt_headers + ${FMT_INCLUDES}/fmt/core.h + ${FMT_INCLUDES}/fmt/format-inl.h + ${FMT_INCLUDES}/fmt/format.h + ${FMT_INCLUDES}/fmt/ostream.h + ${FMT_INCLUDES}/fmt/printf.h ) +- file (COPY ${fmt_headers} +- DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) ++ #file (COPY ${fmt_headers} ++ # DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) + else () + set (fmt_headers + ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt/format.h +diff --git a/src/include/OpenImageIO/detail/fmt.h b/src/include/OpenImageIO/detail/fmt.h +index f0cfcb300..1958d824e 100644 +--- a/src/include/OpenImageIO/detail/fmt.h ++++ b/src/include/OpenImageIO/detail/fmt.h +@@ -38,9 +38,9 @@ OIIO_PRAGMA_WARNING_PUSH + # pragma GCC diagnostic ignored "-Wtautological-constant-compare" + #endif + +-#include +-#include +-#include ++#include ++#include ++#include + + OIIO_PRAGMA_WARNING_POP + +diff --git a/src/jpeg2000.imageio/CMakeLists.txt b/src/jpeg2000.imageio/CMakeLists.txt +index 1f47269bf..85b90d66a 100644 +--- a/src/jpeg2000.imageio/CMakeLists.txt ++++ b/src/jpeg2000.imageio/CMakeLists.txt +@@ -4,8 +4,7 @@ + + if (OPENJPEG_FOUND) + add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp +- INCLUDE_DIRS ${OPENJPEG_INCLUDES} +- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} ++ LINK_LIBRARIES openjp2 + DEFINITIONS "-DUSE_OPENJPEG") + else() + message (WARNING "Jpeg-2000 plugin will not be built") +diff --git a/src/libOpenImageIO/CMakeLists.txt b/src/libOpenImageIO/CMakeLists.txt +index 456aab81a..eb5bb00fc 100644 +--- a/src/libOpenImageIO/CMakeLists.txt ++++ b/src/libOpenImageIO/CMakeLists.txt +@@ -141,12 +141,17 @@ target_link_libraries (OpenImageIO + $ + ${BZIP2_LIBRARIES} + ZLIB::ZLIB +- $ ++ tsl::robin_map ++ Boost::filesystem Boost::thread Boost::system Boost::container + ${CMAKE_DL_LIBS} + ) + ++if (OpenCV_FOUND) ++ target_link_libraries (OpenImageIO PUBLIC opencv::opencv_core opencv::opencv_imgproc opencv::opencv_videoio) ++endif () ++ + if (FREETYPE_FOUND) +- target_link_libraries (OpenImageIO PRIVATE ${FREETYPE_LIBRARIES}) ++ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) + endif() + + if (WIN32) +diff --git a/src/libutil/CMakeLists.txt b/src/libutil/CMakeLists.txt +index 09b9139d0..a2d39982e 100644 +--- a/src/libutil/CMakeLists.txt ++++ b/src/libutil/CMakeLists.txt +@@ -15,8 +15,8 @@ target_link_libraries (OpenImageIO_Util + $ + ${GCC_ATOMIC_LIBRARIES} + ${OPENIMAGEIO_IMATH_DEPENDENCY_VISIBILITY} + ${OPENIMAGEIO_IMATH_TARGETS} ++ fmt::fmt + PRIVATE +- $ +- $ ++ Boost::filesystem Boost::thread Boost::system + $ + ${CMAKE_DL_LIBS} + ) +diff --git a/src/ptex.imageio/CMakeLists.txt b/src/ptex.imageio/CMakeLists.txt +index d7f0a9582..7cfce4a35 100644 +--- a/src/ptex.imageio/CMakeLists.txt ++++ b/src/ptex.imageio/CMakeLists.txt +@@ -2,8 +2,9 @@ + # SPDX-License-Identifier: BSD-3-Clause + # https://github.com/OpenImageIO/oiio + +-if (Ptex_FOUND) ++if (ptex_FOUND) + add_oiio_plugin (ptexinput.cpp +- LINK_LIBRARIES Ptex::Ptex_dynamic ZLIB::ZLIB ++ LINK_LIBRARIES ${ptex_LIBRARIES} ZLIB::ZLIB ++ INCLUDE_DIRS ${ptex_INCLUDE_DIRS} + DEFINITIONS "-DUSE_PTEX") + endif () diff --git a/packages/conan/recipes/oiio/patches/2.4.7.1-fix-msvc2017.patch b/packages/conan/recipes/oiio/patches/2.4.7.1-fix-msvc2017.patch new file mode 100644 index 00000000..8ee0b869 --- /dev/null +++ b/packages/conan/recipes/oiio/patches/2.4.7.1-fix-msvc2017.patch @@ -0,0 +1,22 @@ +diff --git a/src/libutil/strutil.cpp b/src/libutil/strutil.cpp +index 213b1c0bf..24670fe8f 100644 +--- a/src/libutil/strutil.cpp ++++ b/src/libutil/strutil.cpp +@@ -921,9 +921,17 @@ Strutil::utf16_to_utf8(const std::u16string& str) noexcept + try { + OIIO_PRAGMA_WARNING_PUSH + OIIO_CLANG_PRAGMA(GCC diagnostic ignored "-Wdeprecated-declarations") ++ // https://stackoverflow.com/a/35103224 ++#if defined _MSC_VER && _MSC_VER >= 1900 && _MSC_VER < 1930 ++ std::wstring_convert, int16_t> convert; ++ auto p = reinterpret_cast(str.data()); ++ OIIO_PRAGMA_WARNING_POP ++ return convert.to_bytes(p, p + str.size()); ++#else + std::wstring_convert, char16_t> conv; + OIIO_PRAGMA_WARNING_POP + return conv.to_bytes(str); ++#endif + } catch (const std::exception&) { + return std::string(); + } diff --git a/packages/conan/recipes/oiio/patches/2.5.14.0-cmake-targets.patch b/packages/conan/recipes/oiio/patches/2.5.14.0-cmake-targets.patch new file mode 100644 index 00000000..859c8562 --- /dev/null +++ b/packages/conan/recipes/oiio/patches/2.5.14.0-cmake-targets.patch @@ -0,0 +1,521 @@ +diff --git CMakeLists.txt CMakeLists.txt +index 3ff009229..d38941db0 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -154,7 +154,7 @@ endif () + add_definitions (-DOIIO_INTERNAL=1) + + list (APPEND CMAKE_MODULE_PATH +- "${PROJECT_SOURCE_DIR}/src/cmake/modules" ++ #"${PROJECT_SOURCE_DIR}/src/cmake/modules" + "${PROJECT_SOURCE_DIR}/src/cmake") + + include (GNUInstallDirs) +@@ -233,7 +233,7 @@ if (OIIO_BUILD_TOOLS AND NOT BUILD_OIIOUTIL_ONLY) + add_subdirectory (src/iinfo) + add_subdirectory (src/maketx) + add_subdirectory (src/oiiotool) +- add_subdirectory (src/testtex) ++ #add_subdirectory (src/testtex) + add_subdirectory (src/iv) + endif () + +diff --git src/cmake/externalpackages.cmake src/cmake/externalpackages.cmake +index fe581e723..ab2fbb7f5 100644 +--- src/cmake/externalpackages.cmake ++++ src/cmake/externalpackages.cmake +@@ -48,14 +48,14 @@ if (NOT DEFINED Boost_USE_STATIC_LIBS) + set (Boost_USE_STATIC_LIBS "${LINKSTATIC}") + endif () + +-if (MSVC) +- # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: +- if (NOT Boost_USE_STATIC_LIBS) +- add_definitions (-DBOOST_ALL_DYN_LINK=1) +- endif () +-endif () +- +-set (Boost_COMPONENTS thread) ++#if (MSVC) ++# # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: ++# if (NOT Boost_USE_STATIC_LIBS) ++# add_definitions (-DBOOST_ALL_DYN_LINK=1) ++# endif () ++#endif () ++ ++set (Boost_COMPONENTS filesystem system thread container) + if (NOT USE_STD_FILESYSTEM) + list (APPEND Boost_COMPONENTS filesystem) + endif () +@@ -111,9 +111,9 @@ checked_find_package (OpenEXR REQUIRED + # building against Imath/OpenEXR 3.x when there is still a system-level + # install version of 2.x. + include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) +-if (MSVC AND NOT LINKSTATIC) +- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? +-endif () ++#if (MSVC AND NOT LINKSTATIC) ++# add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? ++#endif () + if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.0) + set (OIIO_USING_IMATH 3) + else () +@@ -140,11 +140,15 @@ set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL + "Exclude find_dependency(Imath) from the exported OpenImageIOConfig.cmake") + + # JPEG -- prefer JPEG-Turbo to regular libjpeg +-checked_find_package (libjpeg-turbo +- VERSION_MIN 2.1 +- DEFINITIONS -DUSE_JPEG_TURBO=1) +-if (NOT TARGET libjpeg-turbo::jpeg) # Try to find the non-turbo version ++if (USE_JPEGTURBO) ++ checked_find_package (libjpeg-turbo REQUIRED ++ DEFINITIONS -DUSE_JPEG_TURBO=1 ++ PRINT libjpeg-turbo_INCLUDES libjpeg-turbo_LIBRARIES) ++ add_library(JPEG::JPEG ALIAS libjpeg-turbo::libjpeg-turbo) ++elseif (USE_JPEG) # Try to find the non-turbo version + checked_find_package (JPEG REQUIRED) ++else () ++ message(FATAL_ERROR "JPEG library was not found!") + endif () + + # Pugixml setup. Normally we just use the version bundled with oiio, but +@@ -160,7 +164,7 @@ else () + endif() + + # From pythonutils.cmake +-find_python() ++#find_python() + if (USE_PYTHON) + checked_find_package (pybind11 REQUIRED VERSION_MIN 2.4.2) + endif () +@@ -170,111 +174,107 @@ endif () + # Dependencies for optional formats and features. If these are not found, + # we will continue building, but the related functionality will be disabled. + +-checked_find_package (PNG) ++if (USE_LIBPNG) ++ checked_find_package (PNG REQUIRED) ++endif() + +-checked_find_package (BZip2) # Used by ffmpeg and freetype +-if (NOT BZIP2_FOUND) +- set (BZIP2_LIBRARIES "") # TODO: why does it break without this? +-endif () ++if (USE_FREETYPE) ++ checked_find_package (Freetype REQUIRED ++ DEFINITIONS -DUSE_FREETYPE=1 ) ++endif() + +-checked_find_package (Freetype +- DEFINITIONS -DUSE_FREETYPE=1 ) +- +-checked_find_package (OpenColorIO +- DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 +- # PREFER_CONFIG +- ) +-if (OpenColorIO_FOUND) +- option (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS +- "For deveoper debugging/testing ONLY! Disable OCIO 2.2 builtin configs." OFF) +- if (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS OR "$ENV{OIIO_DISABLE_BUILTIN_OCIO_CONFIGS}") +- add_compile_definitions(OIIO_DISABLE_BUILTIN_OCIO_CONFIGS) +- endif () +-else () +- set (OpenColorIO_FOUND 0) ++if (USE_OPENCOLORIO) ++ checked_find_package (OpenColorIO REQUIRED ++ DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 ++ # PREFER_CONFIG ++ ) + endif () + +-checked_find_package (OpenCV 3.0 +- DEFINITIONS -DUSE_OPENCV=1) ++if (USE_OPENCV) ++ checked_find_package (OpenCV REQUIRED 3.0 ++ DEFINITIONS -DUSE_OPENCV=1) ++endif() + + # Intel TBB +-set (TBB_USE_DEBUG_BUILD OFF) +-checked_find_package (TBB 2017 +- SETVARIABLES OIIO_TBB +- PREFER_CONFIG) ++if (USE_TBB)# Intel TBB ++ set (TBB_USE_DEBUG_BUILD OFF) ++ checked_find_package (TBB 2017 REQUIRED ++ SETVARIABLES OIIO_TBB ++ PREFER_CONFIG) ++endif() + + # DCMTK is used to read DICOM images +-checked_find_package (DCMTK VERSION_MIN 3.6.1 +- PREFER_CONFIG) ++if (USE_DCMTK) ++ checked_find_package (DCMTK REQUIRED VERSION_MIN 3.6.1) # For DICOM images ++endif() + +-checked_find_package (FFmpeg VERSION_MIN 3.0) +-checked_find_package (GIF +- VERSION_MIN 4 +- RECOMMEND_MIN 5.0 +- RECOMMEND_MIN_REASON "for stability and thread safety") ++if (USE_FFMPEG) ++ checked_find_package (ffmpeg REQUIRED VERSION_MIN 3.0) ++endif() ++if (USE_GIF) ++ checked_find_package (GIF REQUIRED ++ VERSION_MIN 4 ++ RECOMMEND_MIN 5.0 ++ RECOMMEND_MIN_REASON "for stability and thread safety") ++endif() + + # For HEIF/HEIC/AVIF formats +-checked_find_package (Libheif VERSION_MIN 1.3 +- RECOMMEND_MIN 1.16 +- RECOMMEND_MIN_REASON "for orientation support") +-if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) +- message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") +- set (Libheif_FOUND 0) +-endif () ++if (USE_LIBHEIF) ++ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 ++ RECOMMEND_MIN 1.7 ++ RECOMMEND_MIN_REASON "for AVIF support") ++endif() + +-checked_find_package (LibRaw +- VERSION_MIN 0.18 +- PRINT LibRaw_r_LIBRARIES) +-if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) +- message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}") +- # Currently, we issue the above warning and let them take their chances. +- # If we wish to disable the LibRaw<0.20/C++17 combination that may fail, +- # just uncomment the following two lines. +- # set (LibRaw_FOUND 0) +- # set (LIBRAW_FOUND 0) +-endif () ++if (USE_LIBRAW) ++ checked_find_package (LibRaw REQUIRED ++ RECOMMEND_MIN 0.18 ++ RECOMMEND_MIN_REASON "for ACES support and better camera metadata" ++ PRINT LibRaw_r_LIBRARIES) ++endif() + +-checked_find_package (OpenJPEG VERSION_MIN 2.0 +- RECOMMEND_MIN 2.2 +- RECOMMEND_MIN_REASON "for multithreading support") +-# Note: Recent OpenJPEG versions have exported cmake configs, but we don't +-# find them reliable at all, so we stick to our FindOpenJPEG.cmake module. +- +-checked_find_package (OpenVDB +- VERSION_MIN 5.0 +- DEPS TBB +- DEFINITIONS -DUSE_OPENVDB=1) +-if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 10.1 AND CMAKE_CXX_STANDARD VERSION_LESS 17) +- message (WARNING "${ColorYellow}OpenVDB >= 10.1 (we found ${OpenVDB_VERSION}) can only be used when we build with C++17 or higher. Disabling OpenVDB support.${ColorReset}") +- set (OpenVDB_FOUND 0) +- add_compile_definitions(DISABLE_OPENVDB=1) +-endif () ++if (USE_OPENJPEG) ++ checked_find_package (OpenJPEG REQUIRED ++ VERSION_MIN 2.0 ++ RECOMMEND_MIN 2.2 ++ RECOMMEND_MIN_REASON "for multithreading support") ++ # Note: Recent OpenJPEG versions have exported cmake configs, but we don't ++ # find them reliable at all, so we stick to our FindOpenJPEG.cmake module. ++endif() + +-checked_find_package (Ptex PREFER_CONFIG) +-if (NOT Ptex_FOUND OR NOT Ptex_VERSION) +- # Fallback for inadequate Ptex exported configs. This will eventually +- # disappear when we can 100% trust Ptex's exports. +- unset (Ptex_FOUND) +- checked_find_package (Ptex) +-endif () ++if (USE_OPENVDB) ++ checked_find_package (OpenVDB REQUIRED ++ VERSION_MIN 5.0 ++ DEPS TBB ++ DEFINITIONS -DUSE_OPENVDB=1) ++ # Upstream contains a version check to ensure that CXX 17 or newer is used with ++ # OpenVDB >= 10.1. This is ensured by the conanfile for openvdb ++endif() + +-checked_find_package (WebP) +-# Note: When WebP 1.1 (released late 2019) is our minimum, we can use their +-# exported configs and remove our FindWebP.cmake module. ++if (USE_PTEX) ++ checked_find_package (ptex REQUIRED PREFER_CONFIG) ++endif() ++ ++if (USE_LIBWEBP) ++ checked_find_package (WebP REQUIRED) ++endif() + + option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) +-checked_find_package (R3DSDK NO_RECORD_NOTFOUND) # RED camera ++if (USE_R3DSDK) ++ checked_find_package (R3DSDK REQUIRED) # RED camera ++endif () + + set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") +-checked_find_package (Nuke NO_RECORD_NOTFOUND) ++if (USE_NUKE) ++ checked_find_package (Nuke REQUIRED) ++endif () + + + # Qt -- used for iv + option (USE_QT "Use Qt if found" ON) +-if (USE_QT) +- checked_find_package (OpenGL) # used for iv ++if (USE_OPENGL) ++ checked_find_package (OpenGL REQUIRED) # used for iv + endif () +-if (USE_QT AND OPENGL_FOUND) ++if (USE_QT AND USE_OPENGL) + checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets) + if (NOT Qt6_FOUND) + checked_find_package (Qt5 COMPONENTS Core Gui Widgets OpenGL) +@@ -298,13 +298,13 @@ macro (find_or_download_robin_map) + # for an installed version. Still prefer a copy that seems to be + # locally installed in this tree. + if (NOT BUILD_ROBINMAP_FORCE) +- find_package (Robinmap QUIET) ++ find_package (tsl-robin-map REQUIRED) + endif () + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then + # download and build it. + # Download the headers from github +- if ((BUILD_MISSING_ROBINMAP AND NOT ROBINMAP_FOUND) OR BUILD_ROBINMAP_FORCE) ++ if ((BUILD_MISSING_ROBINMAP AND NOT tsl-robin-map_FOUND) OR BUILD_ROBINMAP_FORCE) + message (STATUS "Downloading local Tessil/robin-map") + set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map") + set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map") +@@ -322,7 +322,7 @@ macro (find_or_download_robin_map) + endif () + set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}/include") + endif () +- checked_find_package (Robinmap REQUIRED) ++ checked_find_package (tsl-robin-map REQUIRED) + endmacro() + + find_or_download_robin_map () +@@ -341,7 +341,7 @@ macro (find_or_download_fmt) + # for an installed version. Still prefer a copy that seems to be + # locally installed in this tree. + if (NOT BUILD_FMT_FORCE) +- find_package (fmt QUIET) ++ find_package (fmt REQUIRED) + endif () + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then +@@ -376,7 +376,7 @@ macro (find_or_download_fmt) + set (fmt_VERSION "${FMT_VERSION_MAJOR}.${FMT_VERSION_MINOR}.${FMT_VERSION_PATCH}") + list (APPEND CFP_ALL_BUILD_DEPS_FOUND "${pkgname} ${${pkgname}_VERSION}") + else () +- get_target_property(FMT_INCLUDE_DIR fmt::fmt-header-only INTERFACE_INCLUDE_DIRECTORIES) ++ get_target_property(FMT_INCLUDE_DIR fmt::fmt INTERFACE_INCLUDE_DIRECTORIES) + set (OIIO_USING_FMT_LOCAL FALSE) + checked_find_package (fmt REQUIRED + VERSION_MIN 7.0) +diff --git src/ffmpeg.imageio/CMakeLists.txt src/ffmpeg.imageio/CMakeLists.txt +index 8e47a8443..900d23101 100644 +--- src/ffmpeg.imageio/CMakeLists.txt ++++ src/ffmpeg.imageio/CMakeLists.txt +@@ -2,7 +2,7 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (FFmpeg_FOUND) ++if (USE_FFMPEG) + if (LINKSTATIC) + set (_static_suffixes .lib .a) + set (_static_libraries_found 0) +@@ -26,11 +26,9 @@ if (FFmpeg_FOUND) + endif() + + add_oiio_plugin (ffmpeginput.cpp +- INCLUDE_DIRS ${FFMPEG_INCLUDES} +- LINK_LIBRARIES ${FFMPEG_LIBRARIES} +- ${BZIP2_LIBRARIES} ++ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale + DEFINITIONS "-DUSE_FFMPEG" +- "-DOIIO_FFMPEG_VERSION=\"${FFMPEG_VERSION}\"") ++ "-DOIIO_FFMPEG_VERSION=\"${ffmpeg_VERSION}\"") + else() + message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") + endif() +diff --git src/heif.imageio/CMakeLists.txt src/heif.imageio/CMakeLists.txt +index 5b6c30a85..e5bc55ef1 100644 +--- src/heif.imageio/CMakeLists.txt ++++ src/heif.imageio/CMakeLists.txt +@@ -2,32 +2,31 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Libheif_FOUND) +- if (LINKSTATIC) +- set (_static_suffixes .lib .a) +- set (_static_libraries_found 0) ++if (USE_LIBHEIF) ++ # if (LINKSTATIC) ++ # set (_static_suffixes .lib .a) ++ # set (_static_libraries_found 0) + +- foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) +- get_filename_component (_ext ${_libeheif_library} LAST_EXT) +- list (FIND _static_suffixes ${_ext} _index) +- if (${_index} GREATER -1) +- MATH (EXPR _static_libraries_found "${static_libraries_found}+1") +- endif() +- endforeach() ++ # foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) ++ # get_filename_component (_ext ${_libeheif_library} LAST_EXT) ++ # list (FIND _static_suffixes ${_ext} _index) ++ # if (${_index} GREATER -1) ++ # MATH (EXPR _static_libraries_found "${static_libraries_found}+1") ++ # endif() ++ # endforeach() + +- if (${_static_libraries_found} GREATER 0) +- message (STATUS "${ColorYellow}") +- message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") +- message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") +- message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") +- message (STATUS "dynamically-linked libheif.") +- message ("${ColorReset}") +- endif() +- endif() ++ # if (${_static_libraries_found} GREATER 0) ++ # message (STATUS "${ColorYellow}") ++ # message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") ++ # message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") ++ # message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") ++ # message (STATUS "dynamically-linked libheif.") ++ # message ("${ColorReset}") ++ # endif() ++ # endif() + + add_oiio_plugin (heifinput.cpp heifoutput.cpp +- INCLUDE_DIRS ${LIBHEIF_INCLUDES} +- LINK_LIBRARIES ${LIBHEIF_LIBRARIES} ++ LINK_LIBRARIES libheif::heif + DEFINITIONS "-DUSE_HEIF=1") + else () + message (WARNING "heif plugin will not be built") +diff --git src/include/CMakeLists.txt src/include/CMakeLists.txt +index 18b7632a3..c558c4780 100644 +--- src/include/CMakeLists.txt ++++ src/include/CMakeLists.txt +@@ -64,7 +64,8 @@ install (FILES ${detail_headers} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/detail + COMPONENT developer) + +-if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) ++if (0) # Don't try to copy fmt libraries to target install folder ++ set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") + set (fmt_headers_base_names) + foreach (header_name core.h format-inl.h format.h ostream.h printf.h + std.h base.h chrono.h) +diff --git src/jpeg2000.imageio/CMakeLists.txt src/jpeg2000.imageio/CMakeLists.txt +index 560e8d486..24348fe66 100644 +--- src/jpeg2000.imageio/CMakeLists.txt ++++ src/jpeg2000.imageio/CMakeLists.txt +@@ -2,10 +2,9 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (OPENJPEG_FOUND) ++if (USE_OPENJPEG) + add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp +- INCLUDE_DIRS ${OPENJPEG_INCLUDES} +- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} ++ LINK_LIBRARIES openjp2 + DEFINITIONS "-DUSE_OPENJPEG") + else() + message (WARNING "Jpeg-2000 plugin will not be built") +diff --git src/libOpenImageIO/CMakeLists.txt src/libOpenImageIO/CMakeLists.txt +index aeb7b7f93..9a32e4cf2 100644 +--- src/libOpenImageIO/CMakeLists.txt ++++ src/libOpenImageIO/CMakeLists.txt +@@ -154,19 +154,27 @@ target_link_libraries (OpenImageIO + ${OPENIMAGEIO_IMATH_TARGETS} + PRIVATE + ${OPENIMAGEIO_OPENEXR_TARGETS} +- ${OpenCV_LIBRARIES} + ${format_plugin_libs} # Add all the target link libraries from the plugins + $ + $ + $ + $ +- $ + ${BZIP2_LIBRARIES} + ZLIB::ZLIB +- $ ++ tsl::robin_map ++ Boost::filesystem Boost::thread Boost::system Boost::container + ${CMAKE_DL_LIBS} + ) + ++if (USE_OPENCV) ++ target_link_libraries (OpenImageIO PRIVATE opencv::opencv_core ++ opencv::opencv_imgproc ++ opencv::opencv_videoio) ++endif () ++if (USE_FREETYPE) ++ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) ++endif() ++ + if (WIN32) + target_link_libraries (OpenImageIO PRIVATE psapi) + endif() +diff --git src/libutil/CMakeLists.txt src/libutil/CMakeLists.txt +index f873b3eed..cf5d4e74c 100644 +--- src/libutil/CMakeLists.txt ++++ src/libutil/CMakeLists.txt +@@ -20,20 +20,13 @@ target_link_libraries (OpenImageIO_Util + ${GCC_ATOMIC_LIBRARIES} + ${OPENIMAGEIO_IMATH_DEPENDENCY_VISIBILITY} + ${OPENIMAGEIO_IMATH_TARGETS} ++ fmt::fmt + PRIVATE +- $ +- $ ++ Boost::filesystem Boost::thread Boost::system + $ + ${CMAKE_DL_LIBS} + ) + +-if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) +- add_dependencies(OpenImageIO_Util fmt_internal_target) +-else () +- target_link_libraries (OpenImageIO_Util +- PUBLIC fmt::fmt-header-only) +-endif () +- + if (WIN32) + add_definitions(-DWIN32_LEAN_AND_MEAN -DNOMINMAX -DNOGDI -DVC_EXTRALEAN) + target_link_libraries (OpenImageIO_Util PRIVATE psapi) +diff --git src/ptex.imageio/CMakeLists.txt src/ptex.imageio/CMakeLists.txt +index 16634fedb..82060ac29 100644 +--- src/ptex.imageio/CMakeLists.txt ++++ src/ptex.imageio/CMakeLists.txt +@@ -2,12 +2,9 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Ptex_FOUND) +- set(ptex_target Ptex::Ptex_dynamic) +- if (TARGET Ptex::Ptex_static AND (NOT TARGET Ptex::Ptex_dynamic OR LINKSTATIC)) +- set(ptex_target Ptex::Ptex_static) +- endif() ++if (USE_PTEX) + add_oiio_plugin (ptexinput.cpp +- LINK_LIBRARIES ${ptex_target} ZLIB::ZLIB ++ LINK_LIBRARIES ${ptex_LIBRARIES} ZLIB::ZLIB ++ INCLUDE_DIRS ${ptex_INCLUDE_DIRS} + DEFINITIONS "-DUSE_PTEX") + endif () diff --git a/packages/conan/recipes/oiio/patches/2.5.17.0-cmake-targets.patch b/packages/conan/recipes/oiio/patches/2.5.17.0-cmake-targets.patch new file mode 100644 index 00000000..4b94fb40 --- /dev/null +++ b/packages/conan/recipes/oiio/patches/2.5.17.0-cmake-targets.patch @@ -0,0 +1,540 @@ +diff --git CMakeLists.txt CMakeLists.txt +index d99dd79ac..bfda2778a 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -156,7 +156,7 @@ endif () + add_definitions (-DOIIO_INTERNAL=1) + + list (APPEND CMAKE_MODULE_PATH +- "${PROJECT_SOURCE_DIR}/src/cmake/modules" ++ #"${PROJECT_SOURCE_DIR}/src/cmake/modules" + "${PROJECT_SOURCE_DIR}/src/cmake") + + include (GNUInstallDirs) +@@ -235,7 +235,7 @@ if (OIIO_BUILD_TOOLS AND NOT BUILD_OIIOUTIL_ONLY) + add_subdirectory (src/iinfo) + add_subdirectory (src/maketx) + add_subdirectory (src/oiiotool) +- add_subdirectory (src/testtex) ++ #add_subdirectory (src/testtex) + add_subdirectory (src/iv) + endif () + +diff --git src/cmake/externalpackages.cmake src/cmake/externalpackages.cmake +index 6556cd2eb..b9c4cd958 100644 +--- src/cmake/externalpackages.cmake ++++ src/cmake/externalpackages.cmake +@@ -48,14 +48,15 @@ if (NOT DEFINED Boost_USE_STATIC_LIBS) + set (Boost_USE_STATIC_LIBS "${LINKSTATIC}") + endif () + +-if (MSVC) +- # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: +- if (NOT Boost_USE_STATIC_LIBS) +- add_definitions (-DBOOST_ALL_DYN_LINK=1) +- endif () +-endif () ++# if (MSVC) ++# # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: ++# if (NOT Boost_USE_STATIC_LIBS) ++# add_definitions (-DBOOST_ALL_DYN_LINK=1) ++# endif () ++# endif () + + set (Boost_COMPONENTS thread) ++# set (Boost_COMPONENTS filesystem system thread container) + if (NOT USE_STD_FILESYSTEM) + list (APPEND Boost_COMPONENTS filesystem) + endif () +@@ -111,9 +112,9 @@ checked_find_package (OpenEXR REQUIRED + # building against Imath/OpenEXR 3.x when there is still a system-level + # install version of 2.x. + include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) +-if (MSVC AND NOT LINKSTATIC) +- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? +-endif () ++# if (MSVC AND NOT LINKSTATIC) ++# add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? ++# endif () + if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.0) + set (OIIO_USING_IMATH 3) + else () +@@ -140,17 +141,21 @@ set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL + "Exclude find_dependency(Imath) from the exported OpenImageIOConfig.cmake") + + # JPEG -- prefer JPEG-Turbo to regular libjpeg +-checked_find_package (libjpeg-turbo +- VERSION_MIN 2.1 +- DEFINITIONS -DUSE_JPEG_TURBO=1) +-if (NOT TARGET libjpeg-turbo::jpeg) # Try to find the non-turbo version ++if (USE_JPEGTURBO) ++ checked_find_package (libjpeg-turbo REQUIRED ++ DEFINITIONS -DUSE_JPEG_TURBO=1 ++ PRINT libjpeg-turbo_INCLUDES libjpeg-turbo_LIBRARIES) ++ add_library(JPEG::JPEG ALIAS libjpeg-turbo::libjpeg-turbo) ++elseif (USE_JPEG) # Try to find the non-turbo version + checked_find_package (JPEG REQUIRED) ++else () ++ message(FATAL_ERROR "JPEG library was not found!") + endif () + + # Pugixml setup. Normally we just use the version bundled with oiio, but + # some linux distros are quite particular about having separate packages so we + # allow this to be overridden to use the distro-provided package if desired. +-option (USE_EXTERNAL_PUGIXML "Use an externally built shared library version of the pugixml library" OFF) ++option (USE_EXTERNAL_PUGIXML "Use an externally built shared library version of the pugixml library" ON) + if (USE_EXTERNAL_PUGIXML) + checked_find_package (pugixml REQUIRED + VERSION_MIN 1.8 +@@ -160,7 +165,7 @@ else () + endif() + + # From pythonutils.cmake +-find_python() ++#find_python() + if (USE_PYTHON) + checked_find_package (pybind11 REQUIRED VERSION_MIN 2.4.2) + endif () +@@ -170,15 +175,21 @@ endif () + # Dependencies for optional formats and features. If these are not found, + # we will continue building, but the related functionality will be disabled. + +-checked_find_package (PNG) ++if (USE_LIBPNG) ++ checked_find_package (PNG REQUIRED) ++endif() + +-checked_find_package (Freetype +- DEFINITIONS -DUSE_FREETYPE=1 ) ++if (USE_FREETYPE) ++ checked_find_package (Freetype REQUIRED ++ DEFINITIONS -DUSE_FREETYPE=1 ) ++endif() + +-checked_find_package (OpenColorIO +- DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 +- # PREFER_CONFIG +- ) ++if (USE_OPENCOLORIO) ++ checked_find_package (OpenColorIO REQUIRED ++ DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 ++ # PREFER_CONFIG ++ ) ++endif() + if (OpenColorIO_FOUND) + option (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS + "For deveoper debugging/testing ONLY! Disable OCIO 2.2 builtin configs." OFF) +@@ -189,79 +200,104 @@ else () + set (OpenColorIO_FOUND 0) + endif () + +-checked_find_package (OpenCV 3.0 +- DEFINITIONS -DUSE_OPENCV=1) ++if (USE_OPENCV) ++ checked_find_package (OpenCV REQUIRED 3.0 ++ DEFINITIONS -DUSE_OPENCV=1) ++endif() + + # Intel TBB +-set (TBB_USE_DEBUG_BUILD OFF) +-checked_find_package (TBB 2017 +- SETVARIABLES OIIO_TBB +- PREFER_CONFIG) ++if (USE_TBB) ++ set (TBB_USE_DEBUG_BUILD OFF) ++ checked_find_package (TBB 2017 REQUIRED ++ SETVARIABLES OIIO_TBB ++ PREFER_CONFIG) ++endif() + + # DCMTK is used to read DICOM images +-checked_find_package (DCMTK VERSION_MIN 3.6.1 +- PREFER_CONFIG) ++if (USE_DCMTK) ++ checked_find_package (DCMTK REQUIRED VERSION_MIN 3.6.1 ++ PREFER_CONFIG) ++endif() + +-checked_find_package (FFmpeg VERSION_MIN 3.0) +-checked_find_package (GIF +- VERSION_MIN 4 +- RECOMMEND_MIN 5.0 +- RECOMMEND_MIN_REASON "for stability and thread safety") ++if (USE_FFMPEG) ++ checked_find_package (ffmpeg REQUIRED VERSION_MIN 3.0) ++endif() ++if (USE_GIF) ++ checked_find_package (GIF REQUIRED ++ VERSION_MIN 4 ++ RECOMMEND_MIN 5.0 ++ RECOMMEND_MIN_REASON "for stability and thread safety") ++endif() + + # For HEIF/HEIC/AVIF formats +-checked_find_package (Libheif VERSION_MIN 1.3 +- RECOMMEND_MIN 1.16 +- RECOMMEND_MIN_REASON "for orientation support") +-if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) +- message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") +- set (Libheif_FOUND 0) ++if (USE_LIBHEIF) ++ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 ++ RECOMMEND_MIN 1.16 ++ RECOMMEND_MIN_REASON "for orientation support") ++ #if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) ++ # message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") ++ # set (Libheif_FOUND 0) + endif () + +-checked_find_package (LibRaw +- VERSION_MIN 0.18 +- PRINT LibRaw_r_LIBRARIES) +-if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) +- message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}") +- # Currently, we issue the above warning and let them take their chances. +- # If we wish to disable the LibRaw<0.20/C++17 combination that may fail, +- # just uncomment the following two lines. +- # set (LibRaw_FOUND 0) +- # set (LIBRAW_FOUND 0) +-endif () ++if (USE_LIBRAW) ++ checked_find_package (LibRaw REQUIRED ++ VERSION_MIN 0.18 ++ PRINT LibRaw_r_LIBRARIES) ++endif() ++#if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) ++# message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}") ++# # Currently, we issue the above warning and let them take their chances. ++# # If we wish to disable the LibRaw<0.20/C++17 combination that may fail, ++# # just uncomment the following two lines. ++# # set (LibRaw_FOUND 0) ++# # set (LIBRAW_FOUND 0) ++#endif () ++ ++if (USE_OPENJPEG) ++ checked_find_package (OpenJPEG REQUIRED VERSION_MIN 2.0 ++ RECOMMEND_MIN 2.2 ++ RECOMMEND_MIN_REASON "for multithreading support") ++ # Note: Recent OpenJPEG versions have exported cmake configs, but we don't ++ # find them reliable at all, so we stick to our FindOpenJPEG.cmake module. ++endif() + +-checked_find_package (OpenJPEG VERSION_MIN 2.0 +- RECOMMEND_MIN 2.2 +- RECOMMEND_MIN_REASON "for multithreading support") +-# Note: Recent OpenJPEG versions have exported cmake configs, but we don't +-# find them reliable at all, so we stick to our FindOpenJPEG.cmake module. +- +-checked_find_package (OpenVDB +- VERSION_MIN 5.0 +- DEPS TBB +- DEFINITIONS -DUSE_OPENVDB=1) +-if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 10.1 AND CMAKE_CXX_STANDARD VERSION_LESS 17) +- message (WARNING "${ColorYellow}OpenVDB >= 10.1 (we found ${OpenVDB_VERSION}) can only be used when we build with C++17 or higher. Disabling OpenVDB support.${ColorReset}") +- set (OpenVDB_FOUND 0) +- add_compile_definitions(DISABLE_OPENVDB=1) +-endif () ++if (USE_OPENVDB) ++ checked_find_package (OpenVDB REQUIRED ++ VERSION_MIN 5.0 ++ DEPS TBB ++ DEFINITIONS -DUSE_OPENVDB=1) ++ #if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 10.1 AND CMAKE_CXX_STANDARD VERSION_LESS 17) ++ # message (WARNING "${ColorYellow}OpenVDB >= 10.1 (we found ${OpenVDB_VERSION}) can only be used when we build with C++17 or higher. Disabling OpenVDB support.${ColorReset}") ++ # set (OpenVDB_FOUND 0) ++ # add_compile_definitions(DISABLE_OPENVDB=1) ++ #endif () ++endif() + +-checked_find_package (Ptex PREFER_CONFIG) +-if (NOT Ptex_FOUND OR NOT Ptex_VERSION) +- # Fallback for inadequate Ptex exported configs. This will eventually +- # disappear when we can 100% trust Ptex's exports. +- unset (Ptex_FOUND) +- checked_find_package (Ptex) +-endif () ++if (USE_PTEX) ++ checked_find_package (ptex REQUIRED PREFER_CONFIG) ++ # if (NOT Ptex_FOUND OR NOT Ptex_VERSION) ++ # # Fallback for inadequate Ptex exported configs. This will eventually ++ # # disappear when we can 100% trust Ptex's exports. ++ # unset (Ptex_FOUND) ++ # checked_find_package (Ptex) ++ # endif () ++endif() + +-checked_find_package (WebP) +-# Note: When WebP 1.1 (released late 2019) is our minimum, we can use their +-# exported configs and remove our FindWebP.cmake module. ++if (USE_LIBWEBP) ++ checked_find_package (WebP REQUIRED) ++ # Note: When WebP 1.1 (released late 2019) is our minimum, we can use their ++ # exported configs and remove our FindWebP.cmake module. ++endif() + + option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) +-checked_find_package (R3DSDK NO_RECORD_NOTFOUND) # RED camera ++if (USE_R3DSDK) ++ checked_find_package (R3DSDK NO_RECORD_NOTFOUND) # RED camera ++endif() + + set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") +-checked_find_package (Nuke NO_RECORD_NOTFOUND) ++if (USE_NUKE) ++ checked_find_package (Nuke NO_RECORD_NOTFOUND) ++endif() + + if (FFmpeg_FOUND OR FREETYPE_FOUND) + checked_find_package (BZip2) # Used by ffmpeg and freetype +@@ -273,8 +309,8 @@ endif() + + # Qt -- used for iv + option (USE_QT "Use Qt if found" ON) +-if (USE_QT) +- checked_find_package (OpenGL) # used for iv ++if (USE_OPENGL) ++ checked_find_package (OpenGL REQUIRED) # used for iv + endif () + if (USE_QT AND OPENGL_FOUND) + checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets) +@@ -300,13 +336,13 @@ macro (find_or_download_robin_map) + # for an installed version. Still prefer a copy that seems to be + # locally installed in this tree. + if (NOT BUILD_ROBINMAP_FORCE) +- find_package (Robinmap QUIET) ++ find_package (tsl-robin-map REQUIRED) + endif () + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then + # download and build it. + # Download the headers from github +- if ((BUILD_MISSING_ROBINMAP AND NOT ROBINMAP_FOUND) OR BUILD_ROBINMAP_FORCE) ++ if ((BUILD_MISSING_ROBINMAP AND NOT tsl-robin-map_FOUND) OR BUILD_ROBINMAP_FORCE) + message (STATUS "Downloading local Tessil/robin-map") + set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map") + set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map") +@@ -324,7 +360,7 @@ macro (find_or_download_robin_map) + endif () + set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}/include") + endif () +- checked_find_package (Robinmap REQUIRED) ++ checked_find_package (tsl-robin-map REQUIRED) + endmacro() + + find_or_download_robin_map () +@@ -343,7 +379,7 @@ macro (find_or_download_fmt) + # for an installed version. Still prefer a copy that seems to be + # locally installed in this tree. + if (NOT BUILD_FMT_FORCE) +- find_package (fmt QUIET) ++ find_package (fmt REQUIRED) + endif () + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then +@@ -378,7 +414,7 @@ macro (find_or_download_fmt) + set (fmt_VERSION "${FMT_VERSION_MAJOR}.${FMT_VERSION_MINOR}.${FMT_VERSION_PATCH}") + list (APPEND CFP_ALL_BUILD_DEPS_FOUND "${pkgname} ${${pkgname}_VERSION}") + else () +- get_target_property(FMT_INCLUDE_DIR fmt::fmt-header-only INTERFACE_INCLUDE_DIRECTORIES) ++ get_target_property(FMT_INCLUDE_DIR fmt::fmt INTERFACE_INCLUDE_DIRECTORIES) + set (OIIO_USING_FMT_LOCAL FALSE) + checked_find_package (fmt REQUIRED + VERSION_MIN 7.0) +diff --git src/ffmpeg.imageio/CMakeLists.txt src/ffmpeg.imageio/CMakeLists.txt +index 8e47a8443..900d23101 100644 +--- src/ffmpeg.imageio/CMakeLists.txt ++++ src/ffmpeg.imageio/CMakeLists.txt +@@ -2,7 +2,7 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (FFmpeg_FOUND) ++if (USE_FFMPEG) + if (LINKSTATIC) + set (_static_suffixes .lib .a) + set (_static_libraries_found 0) +@@ -26,11 +26,9 @@ if (FFmpeg_FOUND) + endif() + + add_oiio_plugin (ffmpeginput.cpp +- INCLUDE_DIRS ${FFMPEG_INCLUDES} +- LINK_LIBRARIES ${FFMPEG_LIBRARIES} +- ${BZIP2_LIBRARIES} ++ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale + DEFINITIONS "-DUSE_FFMPEG" +- "-DOIIO_FFMPEG_VERSION=\"${FFMPEG_VERSION}\"") ++ "-DOIIO_FFMPEG_VERSION=\"${ffmpeg_VERSION}\"") + else() + message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") + endif() +diff --git src/heif.imageio/CMakeLists.txt src/heif.imageio/CMakeLists.txt +index 5b6c30a85..e5bc55ef1 100644 +--- src/heif.imageio/CMakeLists.txt ++++ src/heif.imageio/CMakeLists.txt +@@ -2,32 +2,31 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Libheif_FOUND) +- if (LINKSTATIC) +- set (_static_suffixes .lib .a) +- set (_static_libraries_found 0) ++if (USE_LIBHEIF) ++ # if (LINKSTATIC) ++ # set (_static_suffixes .lib .a) ++ # set (_static_libraries_found 0) + +- foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) +- get_filename_component (_ext ${_libeheif_library} LAST_EXT) +- list (FIND _static_suffixes ${_ext} _index) +- if (${_index} GREATER -1) +- MATH (EXPR _static_libraries_found "${static_libraries_found}+1") +- endif() +- endforeach() ++ # foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) ++ # get_filename_component (_ext ${_libeheif_library} LAST_EXT) ++ # list (FIND _static_suffixes ${_ext} _index) ++ # if (${_index} GREATER -1) ++ # MATH (EXPR _static_libraries_found "${static_libraries_found}+1") ++ # endif() ++ # endforeach() + +- if (${_static_libraries_found} GREATER 0) +- message (STATUS "${ColorYellow}") +- message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") +- message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") +- message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") +- message (STATUS "dynamically-linked libheif.") +- message ("${ColorReset}") +- endif() +- endif() ++ # if (${_static_libraries_found} GREATER 0) ++ # message (STATUS "${ColorYellow}") ++ # message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") ++ # message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") ++ # message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") ++ # message (STATUS "dynamically-linked libheif.") ++ # message ("${ColorReset}") ++ # endif() ++ # endif() + + add_oiio_plugin (heifinput.cpp heifoutput.cpp +- INCLUDE_DIRS ${LIBHEIF_INCLUDES} +- LINK_LIBRARIES ${LIBHEIF_LIBRARIES} ++ LINK_LIBRARIES libheif::heif + DEFINITIONS "-DUSE_HEIF=1") + else () + message (WARNING "heif plugin will not be built") +diff --git src/include/CMakeLists.txt src/include/CMakeLists.txt +index 18b7632a3..c558c4780 100644 +--- src/include/CMakeLists.txt ++++ src/include/CMakeLists.txt +@@ -64,7 +64,8 @@ install (FILES ${detail_headers} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/detail + COMPONENT developer) + +-if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) ++if (0) # Don't try to copy fmt libraries to target install folder ++ set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") + set (fmt_headers_base_names) + foreach (header_name core.h format-inl.h format.h ostream.h printf.h + std.h base.h chrono.h) +diff --git src/jpeg2000.imageio/CMakeLists.txt src/jpeg2000.imageio/CMakeLists.txt +index 560e8d486..24348fe66 100644 +--- src/jpeg2000.imageio/CMakeLists.txt ++++ src/jpeg2000.imageio/CMakeLists.txt +@@ -2,10 +2,9 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (OPENJPEG_FOUND) ++if (USE_OPENJPEG) + add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp +- INCLUDE_DIRS ${OPENJPEG_INCLUDES} +- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} ++ LINK_LIBRARIES openjp2 + DEFINITIONS "-DUSE_OPENJPEG") + else() + message (WARNING "Jpeg-2000 plugin will not be built") +diff --git src/libOpenImageIO/CMakeLists.txt src/libOpenImageIO/CMakeLists.txt +index aeb7b7f93..9a32e4cf2 100644 +--- src/libOpenImageIO/CMakeLists.txt ++++ src/libOpenImageIO/CMakeLists.txt +@@ -154,19 +154,27 @@ target_link_libraries (OpenImageIO + ${OPENIMAGEIO_IMATH_TARGETS} + PRIVATE + ${OPENIMAGEIO_OPENEXR_TARGETS} +- ${OpenCV_LIBRARIES} + ${format_plugin_libs} # Add all the target link libraries from the plugins + $ + $ + $ + $ +- $ + ${BZIP2_LIBRARIES} + ZLIB::ZLIB +- $ ++ tsl::robin_map ++ Boost::filesystem Boost::thread Boost::system Boost::container + ${CMAKE_DL_LIBS} + ) + ++if (USE_OPENCV) ++ target_link_libraries (OpenImageIO PRIVATE opencv::opencv_core ++ opencv::opencv_imgproc ++ opencv::opencv_videoio) ++endif () ++if (USE_FREETYPE) ++ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) ++endif() ++ + if (WIN32) + target_link_libraries (OpenImageIO PRIVATE psapi) + endif() +diff --git src/libutil/CMakeLists.txt src/libutil/CMakeLists.txt +index f873b3eed..cf5d4e74c 100644 +--- src/libutil/CMakeLists.txt ++++ src/libutil/CMakeLists.txt +@@ -20,20 +20,13 @@ target_link_libraries (OpenImageIO_Util + ${GCC_ATOMIC_LIBRARIES} + ${OPENIMAGEIO_IMATH_DEPENDENCY_VISIBILITY} + ${OPENIMAGEIO_IMATH_TARGETS} ++ fmt::fmt + PRIVATE +- $ +- $ ++ Boost::filesystem Boost::thread Boost::system + $ + ${CMAKE_DL_LIBS} + ) + +-if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) +- add_dependencies(OpenImageIO_Util fmt_internal_target) +-else () +- target_link_libraries (OpenImageIO_Util +- PUBLIC fmt::fmt-header-only) +-endif () +- + if (WIN32) + add_definitions(-DWIN32_LEAN_AND_MEAN -DNOMINMAX -DNOGDI -DVC_EXTRALEAN) + target_link_libraries (OpenImageIO_Util PRIVATE psapi) +diff --git src/ptex.imageio/CMakeLists.txt src/ptex.imageio/CMakeLists.txt +index 16634fedb..82060ac29 100644 +--- src/ptex.imageio/CMakeLists.txt ++++ src/ptex.imageio/CMakeLists.txt +@@ -2,12 +2,9 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Ptex_FOUND) +- set(ptex_target Ptex::Ptex_dynamic) +- if (TARGET Ptex::Ptex_static AND (NOT TARGET Ptex::Ptex_dynamic OR LINKSTATIC)) +- set(ptex_target Ptex::Ptex_static) +- endif() ++if (USE_PTEX) + add_oiio_plugin (ptexinput.cpp +- LINK_LIBRARIES ${ptex_target} ZLIB::ZLIB ++ LINK_LIBRARIES ${ptex_LIBRARIES} ZLIB::ZLIB ++ INCLUDE_DIRS ${ptex_INCLUDE_DIRS} + DEFINITIONS "-DUSE_PTEX") + endif () diff --git a/packages/conan/recipes/oiio/patches/3.0.4.0-cmake-fmt.patch b/packages/conan/recipes/oiio/patches/3.0.4.0-cmake-fmt.patch new file mode 100644 index 00000000..f20601c0 --- /dev/null +++ b/packages/conan/recipes/oiio/patches/3.0.4.0-cmake-fmt.patch @@ -0,0 +1,13 @@ +diff --git src/cmake/externalpackages.cmake src/cmake/externalpackages.cmake +index d99dd79ac..bfda2778a 100644 +--- src/cmake/externalpackages.cmake ++++ src/cmake/externalpackages.cmake +@@ -233,6 +233,8 @@ + BUILD_LOCAL missing + ) + get_target_property(FMT_INCLUDE_DIR fmt::fmt-header-only INTERFACE_INCLUDE_DIRECTORIES) ++# Get rid of generator expression from Conan ++string(REGEX REPLACE "^\\$<\\$:(.*)>$" "\\1" FMT_INCLUDE_DIR "${FMT_INCLUDE_DIR}") + + + ########################################################################### diff --git a/packages/conan/recipes/oiio/patches/3.0.4.0-imath-includes.txt b/packages/conan/recipes/oiio/patches/3.0.4.0-imath-includes.txt new file mode 100644 index 00000000..dd0b13d6 --- /dev/null +++ b/packages/conan/recipes/oiio/patches/3.0.4.0-imath-includes.txt @@ -0,0 +1,62 @@ +diff --git src/iconvert/CMakeLists.txt src/iconvert/CMakeLists.txt +index d99dd79ac..bfda2778a 100644 +--- src/iconvert/CMakeLists.txt ++++ src/iconvert/CMakeLists.txt +@@ -2,4 +2,6 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-fancy_add_executable (LINK_LIBRARIES OpenImageIO) +\ No newline at end of file ++fancy_add_executable (INCLUDE_DIRS ${Imath_INCLUDE_DIR} ++ LINK_LIBRARIES OpenImageIO ++ ) +diff --git src/idiff/CMakeLists.txt src/idiff/CMakeLists.txt +index d99dd79ac..bfda2778a 100644 +--- src/idiff/CMakeLists.txt ++++ src/idiff/CMakeLists.txt +@@ -2,4 +2,6 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-fancy_add_executable (LINK_LIBRARIES OpenImageIO) +\ No newline at end of file ++fancy_add_executable (INCLUDE_DIRS ${Imath_INCLUDE_DIR} ++ LINK_LIBRARIES OpenImageIO ++ ) +diff --git src/iinfo/CMakeLists.txt src/iinfo/CMakeLists.txt +index d99dd79ac..bfda2778a 100644 +--- src/iinfo/CMakeLists.txt ++++ src/iinfo/CMakeLists.txt +@@ -2,4 +2,6 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-fancy_add_executable (LINK_LIBRARIES OpenImageIO) ++fancy_add_executable (INCLUDE_DIRS ${Imath_INCLUDE_DIR} ++ LINK_LIBRARIES OpenImageIO ++ ) +diff --git src/maketx/CMakeLists.txt src/maketx/CMakeLists.txt +index d99dd79ac..bfda2778a 100644 +--- src/maketx/CMakeLists.txt ++++ src/maketx/CMakeLists.txt +@@ -2,4 +2,6 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-fancy_add_executable (LINK_LIBRARIES OpenImageIO) ++fancy_add_executable (INCLUDE_DIRS ${Imath_INCLUDE_DIR} ++ LINK_LIBRARIES OpenImageIO ++ ) +diff --git src/testtex/CMakeLists.txt src/testtex/CMakeLists.txt +index d99dd79ac..bfda2778a 100644 +--- src/testtex/CMakeLists.txt ++++ src/testtex/CMakeLists.txt +@@ -9,5 +9,5 @@ + set (ENABLE_INSTALL_testtex OFF PARENT_SCOPE) + + fancy_add_executable (NAME testtex +- INCLUDE_DIRS ${ROBINMAP_INCLUDES} ++ INCLUDE_DIRS ${ROBINMAP_INCLUDES} ${Imath_INCLUDE_DIR} + LINK_LIBRARIES OpenImageIO ) + diff --git a/packages/conan/recipes/oiio/patches/3.0.5.0-cmake-fmt.patch b/packages/conan/recipes/oiio/patches/3.0.5.0-cmake-fmt.patch new file mode 100644 index 00000000..40c23729 --- /dev/null +++ b/packages/conan/recipes/oiio/patches/3.0.5.0-cmake-fmt.patch @@ -0,0 +1,15 @@ +diff --git src/cmake/externalpackages.cmake src/cmake/externalpackages.cmake +index d99dd79ac..bfda2778a 100644 +--- src/cmake/externalpackages.cmake ++++ src/cmake/externalpackages.cmake +@@ -234,7 +234,9 @@ + VERSION_MIN 7.0 + BUILD_LOCAL missing + ) +-get_target_property(FMT_INCLUDE_DIR fmt::fmt-header-only INTERFACE_INCLUDE_DIRECTORIES) ++get_target_property(FMT_INCLUDE_DIR fmt::fmt INTERFACE_INCLUDE_DIRECTORIES) ++# Get rid of generator expression from Conan ++string(REGEX REPLACE "^\\$<\\$:(.*)>$" "\\1" FMT_INCLUDE_DIR "${FMT_INCLUDE_DIR}") + + + ########################################################################### diff --git a/packages/conan/recipes/oiio/patches/3.0.5.0-imath-includes.txt b/packages/conan/recipes/oiio/patches/3.0.5.0-imath-includes.txt new file mode 100644 index 00000000..dd0b13d6 --- /dev/null +++ b/packages/conan/recipes/oiio/patches/3.0.5.0-imath-includes.txt @@ -0,0 +1,62 @@ +diff --git src/iconvert/CMakeLists.txt src/iconvert/CMakeLists.txt +index d99dd79ac..bfda2778a 100644 +--- src/iconvert/CMakeLists.txt ++++ src/iconvert/CMakeLists.txt +@@ -2,4 +2,6 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-fancy_add_executable (LINK_LIBRARIES OpenImageIO) +\ No newline at end of file ++fancy_add_executable (INCLUDE_DIRS ${Imath_INCLUDE_DIR} ++ LINK_LIBRARIES OpenImageIO ++ ) +diff --git src/idiff/CMakeLists.txt src/idiff/CMakeLists.txt +index d99dd79ac..bfda2778a 100644 +--- src/idiff/CMakeLists.txt ++++ src/idiff/CMakeLists.txt +@@ -2,4 +2,6 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-fancy_add_executable (LINK_LIBRARIES OpenImageIO) +\ No newline at end of file ++fancy_add_executable (INCLUDE_DIRS ${Imath_INCLUDE_DIR} ++ LINK_LIBRARIES OpenImageIO ++ ) +diff --git src/iinfo/CMakeLists.txt src/iinfo/CMakeLists.txt +index d99dd79ac..bfda2778a 100644 +--- src/iinfo/CMakeLists.txt ++++ src/iinfo/CMakeLists.txt +@@ -2,4 +2,6 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-fancy_add_executable (LINK_LIBRARIES OpenImageIO) ++fancy_add_executable (INCLUDE_DIRS ${Imath_INCLUDE_DIR} ++ LINK_LIBRARIES OpenImageIO ++ ) +diff --git src/maketx/CMakeLists.txt src/maketx/CMakeLists.txt +index d99dd79ac..bfda2778a 100644 +--- src/maketx/CMakeLists.txt ++++ src/maketx/CMakeLists.txt +@@ -2,4 +2,6 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-fancy_add_executable (LINK_LIBRARIES OpenImageIO) ++fancy_add_executable (INCLUDE_DIRS ${Imath_INCLUDE_DIR} ++ LINK_LIBRARIES OpenImageIO ++ ) +diff --git src/testtex/CMakeLists.txt src/testtex/CMakeLists.txt +index d99dd79ac..bfda2778a 100644 +--- src/testtex/CMakeLists.txt ++++ src/testtex/CMakeLists.txt +@@ -9,5 +9,5 @@ + set (ENABLE_INSTALL_testtex OFF PARENT_SCOPE) + + fancy_add_executable (NAME testtex +- INCLUDE_DIRS ${ROBINMAP_INCLUDES} ++ INCLUDE_DIRS ${ROBINMAP_INCLUDES} ${Imath_INCLUDE_DIR} + LINK_LIBRARIES OpenImageIO ) + diff --git a/packages/conan/recipes/oiio/test_package/CMakeLists.txt b/packages/conan/recipes/oiio/test_package/CMakeLists.txt new file mode 100644 index 00000000..63c056b2 --- /dev/null +++ b/packages/conan/recipes/oiio/test_package/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/openimageio/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +find_package(OpenImageIO REQUIRED CONFIG) +find_package(fmt REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +# ASWF: when building test package, Conan package name is part of target +target_link_libraries(${PROJECT_NAME} PRIVATE oiio::OpenImageIO + oiio::OpenImageIO_Util + fmt::fmt) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/packages/conan/recipes/oiio/test_package/conanfile.py b/packages/conan/recipes/oiio/test_package/conanfile.py new file mode 100644 index 00000000..dd6689a5 --- /dev/null +++ b/packages/conan/recipes/oiio/test_package/conanfile.py @@ -0,0 +1,31 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/openimageio/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.cmake import cmake_layout, CMake +from conan.tools.build import can_run +import os + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/oiio/test_package/test_package.cpp b/packages/conan/recipes/oiio/test_package/test_package.cpp new file mode 100644 index 00000000..8708a0e1 --- /dev/null +++ b/packages/conan/recipes/oiio/test_package/test_package.cpp @@ -0,0 +1,17 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/openimageio/all/test_package/test_package.cpp +*/ + +#include + +int main() +{ + std::cout << "OpenImageIO " << OIIO_VERSION_STRING << "\n"; + + std::string formats = OIIO::get_string_attribute("format_list"); + std::cout << "Supported formats:\n" << formats << "\n"; +} diff --git a/packages/conan/recipes/openal-soft/conanfile.py b/packages/conan/recipes/openal-soft/conanfile.py new file mode 100644 index 00000000..b236994b --- /dev/null +++ b/packages/conan/recipes/openal-soft/conanfile.py @@ -0,0 +1,22 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/openal/all/conanfile.py + +from conan import ConanFile + +class SystemOpenALSoftConan(ConanFile): + name = "openal-soft" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include/AL"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["openal"] + + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "OpenAL") + self.cpp_info.set_property("cmake_target_name", "OpenAL::OpenAL") diff --git a/packages/conan/recipes/openexr/conandata.yml b/packages/conan/recipes/openexr/conandata.yml index d2beba39..58366fa1 100644 --- a/packages/conan/recipes/openexr/conandata.yml +++ b/packages/conan/recipes/openexr/conandata.yml @@ -1,11 +1,76 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/cceee569179c10fa56d1fd9c3582f3371944ba59/recipes/openexr/3.x/conandata.yml + sources: - "3.2.2": - url: "https://github.com/AcademySoftwareFoundation/OpenEXR/archive/v3.2.2.tar.gz" - sha256: "65de6459c245a4977ce4d7777e70b30d7ef48ec38e0cfb10205706ca50a8bf2e" - "3.2.3": - url: "https://github.com/AcademySoftwareFoundation/OpenEXR/archive/v3.2.3.tar.gz" - sha256: "f3f6c4165694d5c09e478a791eae69847cadb1333a2948ca222aa09f145eba63" + "3.3.3": + url: "https://github.com/AcademySoftwareFoundation/openexr/releases/download/v3.3.3/openexr-3.3.3.tar.gz" + sha256: "d819b9f76cbe63cc6b7476267659900f00aab79b636a83f0ecac2be669ca97b5" + "3.3.2": + url: "https://github.com/AcademySoftwareFoundation/openexr/releases/download/v3.3.2/openexr-3.3.2.tar.gz" + sha256: "4fb4c643b39f04b67e8f4138e4d5a7804b62fdc15b8f6bcdd32ccc8ecd515683" + "3.3.1": + url: "https://github.com/AcademySoftwareFoundation/openexr/releases/download/v3.3.1/openexr-v3.3.1.tar.gz" + sha256: "2d602128b53f6f9df84482bdfdf1d19dc0cb552c9fba0af9205a8937dd2633e9" + "3.3.0": + url: "https://github.com/AcademySoftwareFoundation/OpenEXR/archive/v3.3.0.tar.gz" + sha256: "58b00f50d2012f3107573c4b7371f70516d2972c2b301a50925e1b4a60a7be6f" "3.2.4": url: "https://github.com/AcademySoftwareFoundation/OpenEXR/archive/v3.2.4.tar.gz" sha256: "81e6518f2c4656fdeaf18a018f135e96a96e7f66dbe1c1f05860dd94772176cc" + "3.2.3": + url: "https://github.com/AcademySoftwareFoundation/OpenEXR/archive/v3.2.3.tar.gz" + sha256: "f3f6c4165694d5c09e478a791eae69847cadb1333a2948ca222aa09f145eba63" + "3.2.2": + url: "https://github.com/AcademySoftwareFoundation/OpenEXR/archive/v3.2.2.tar.gz" + sha256: "65de6459c245a4977ce4d7777e70b30d7ef48ec38e0cfb10205706ca50a8bf2e" + "3.2.1": + url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.2.1.tar.gz" + sha256: "61e175aa2203399fb3c8c2288752fbea3c2637680d50b6e306ea5f8ffdd46a9b" + "3.1.9": + url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.1.9.tar.gz" + sha256: "103e902d3902800ab07b5f3a298be7afd2755312737b2cdbfa01326ff99dac07" + "3.1.7": + url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.1.7.tar.gz" + sha256: "78dbca39115a1c526e6728588753955ee75fa7f5bb1a6e238bed5b6d66f91fd7" patches: + "3.2.4": + - patch_file: "patches/3.2.1-gcc5-bug-workaround.patch" + patch_description: "Workaround for GCC 5 bug" + patch_type: "portability" + patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" + "3.2.3": + - patch_file: "patches/3.2.1-gcc5-bug-workaround.patch" + patch_description: "Workaround for GCC 5 bug" + patch_type: "portability" + patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" + "3.2.2": + - patch_file: "patches/3.2.1-gcc5-bug-workaround.patch" + patch_description: "Workaround for GCC 5 bug" + patch_type: "portability" + patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" + - patch_file: "patches/3.2.1-find-libdeflate.patch" + patch_description: "Use find_package for libdeflate" + patch_type: "backport" + patch_source: "https://github.com/AcademySoftwareFoundation/openexr/pull/1613" + "3.2.1": + - patch_file: "patches/3.2.1-gcc5-bug-workaround.patch" + patch_description: "Workaround for GCC 5 bug" + patch_type: "portability" + patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" + - patch_file: "patches/3.2.1-find-libdeflate.patch" + patch_description: "Use find_package for libdeflate" + patch_type: "backport" + patch_source: "https://github.com/AcademySoftwareFoundation/openexr/pull/1613" + "3.1.9": + - patch_file: "patches/3.1.4-gcc5-bug-workaround.patch" + patch_description: "Workaround for GCC 5 bug" + patch_type: "portability" + patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" + "3.1.7": + - patch_file: "patches/3.1.4-gcc5-bug-workaround.patch" + patch_description: "Workaround for GCC 5 bug" + patch_type: "portability" + patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" diff --git a/packages/conan/recipes/openexr/conanfile.py b/packages/conan/recipes/openexr/conanfile.py index 1b164b5f..84f708ce 100644 --- a/packages/conan/recipes/openexr/conanfile.py +++ b/packages/conan/recipes/openexr/conanfile.py @@ -1,85 +1,118 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. # Copyright (c) Contributors to the aswf-docker Project. All rights reserved. # SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/cceee569179c10fa56d1fd9c3582f3371944ba59/recipes/openexr/3.x/conanfile.py from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import ( - apply_conandata_patches, - copy, - export_conandata_patches, - get, - rmdir, -) -from conan.tools.microsoft import is_msvc +from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rmdir, replace_in_file +from conan.tools.scm import Version import os -required_conan_version = ">=1.38.0" +required_conan_version = ">=1.53.0" class OpenEXRConan(ConanFile): name = "openexr" - description = "The OpenEXR project provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry." - topics = "conan", "openexr", "python", "binding" - homepage = "https://www.qt.io/qt-for-python" - license = "LGPL-3.0" - url = "https://github.com/AcademySoftwareFoundation/aswf-docker" - settings = ( - "os", - "arch", - "compiler", - "build_type", - "python", - ) + description = "OpenEXR is a high dynamic-range (HDR) image file format developed by Industrial Light & " \ + "Magic for use in computer imaging applications." + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/AcademySoftwareFoundation/openexr" + topics = ("openexr", "hdr", "image", "picture") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], } default_options = { - "shared": True, + "shared": False, "fPIC": True, } + @property + def _min_cppstd(self): + if Version(self.version) >= "3.3": + return 17 + return 11 + + @property + def _minimum_compiler_version(self): + return { + "17": { + "gcc": "9" + } + }.get(str(self._min_cppstd), {}) + + @property + def _with_libdeflate(self): + return Version(self.version) >= "3.2" + def export_sources(self): export_conandata_patches(self) + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + def layout(self): cmake_layout(self, src_folder="src") - # We want DSOs in lib64 + # ASWF: DSOs in lib64 self.cpp.package.libdirs = ["lib64"] def requirements(self): - self.requires( - f"python/{os.environ['ASWF_PYTHON_VERSION']}@{self.user}/{self.channel}" - ) - self.requires( - f"boost/{os.environ['ASWF_BOOST_VERSION']}@{self.user}/{self.channel}" - ) - self.requires( - f"imath/{os.environ['ASWF_IMATH_VERSION']}@{self.user}/{self.channel}" - ) - - def build_requirements(self): - self.build_requires( - f"cmake/{os.environ['ASWF_CMAKE_VERSION']}@{self.user}/{self.channel}" - ) + self.requires("zlib/[>=1.2.11 <2]") + # Note: OpenEXR and Imath are versioned independently. + self.requires(f"imath/{os.environ['ASWF_IMATH_VERSION']}@{self.user}/{self.channel}", transitive_headers=True) + if self._with_libdeflate: + self.requires("libdeflate/1.19") + # ASWF: add explicit dependencies on cpython + self.requires(f"cpython/{os.environ['ASWF_CPYTHON_VERSION']}@{self.user}/{self.channel}") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + minimum_version = self._minimum_compiler_version.get(str(self.settings.compiler)) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires {self.settings.compiler} >= {minimum_version}") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) - tc.variables["OPENEXR_BUILD_PYTHON_LIBS"] = "ON" + # ASWF FIXME: does not work for now + # tc.variables["OPENEXR_BUILD_PYTHON"] = True # ASWF Build Python bindings tc.variables["OPENEXR_INSTALL_EXAMPLES"] = False + tc.variables["BUILD_TESTING"] = False tc.variables["BUILD_WEBSITE"] = False tc.variables["DOCS"] = False tc.generate() - - deps = CMakeDeps(self) - deps.generate() + cd = CMakeDeps(self) + cd.generate() def _patch_sources(self): apply_conandata_patches(self) + if Version(self.version) >= "3.2": + # Even with BUILD_WEBSITE, Website target is compiled in 3.2 + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "add_subdirectory(website/src)", + "# add_subdirectory(website/src)") + # ASWF FIXME: pybind11 + # replace_in_file(self, os.path.join(self.source_folder, "src", "wrappers", "python", "CMakeLists.txt"), + # "find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)", + # "find_package(Python3 COMPONENTS Interpreter Development.Module REQUIRED)") + def build(self): self._patch_sources() cmake = CMake(self) @@ -87,15 +120,14 @@ def build(self): cmake.build() def package(self): - copy( - self, - "LICENSE.md", - src=self.source_folder, - dst=os.path.join(self.package_folder, "licenses", self.name), - ) + # ASWF: licenses separate per package + copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) cmake = CMake(self) cmake.install() + rmdir(self, os.path.join(self.package_folder, "share")) + # ASWF: modules in lib64, keep cmake for non-Conan clients rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) @staticmethod def _conan_comp(name): @@ -113,7 +145,7 @@ def package_info(self): self.cpp_info.set_property("pkg_config_name", "OpenEXR") self.cpp_info.names["cmake_find_package"] = "OpenEXR" - self.cpp_info.names["cmake_find_pacakge_multi"] = "OpenEXR" + self.cpp_info.names["cmake_find_package_multi"] = "OpenEXR" self.cpp_info.names["pkg_config"] = "OpenEXR" lib_suffix = "" @@ -146,8 +178,7 @@ def package_info(self): IlmThread = self._add_component("IlmThread") IlmThread.libs = [f"IlmThread{lib_suffix}"] IlmThread.requires = [ - self._conan_comp("IlmThreadConfig"), - self._conan_comp("Iex"), + self._conan_comp("IlmThreadConfig"), self._conan_comp("Iex"), ] if self.settings.os in ["Linux", "FreeBSD"]: IlmThread.system_libs = ["pthread", "m"] @@ -155,10 +186,9 @@ def package_info(self): # OpenEXR::OpenEXRCore OpenEXRCore = self._add_component("OpenEXRCore") OpenEXRCore.libs = [f"OpenEXRCore{lib_suffix}"] - # We assume zlib-devel and libdeflate-devel are installed in base image - # OpenEXRCore.requires = [self._conan_comp("OpenEXRConfig"), "zlib::zlib"] - # if self._with_libdeflate: - # OpenEXRCore.requires.append("libdeflate::libdeflate") + OpenEXRCore.requires = [self._conan_comp("OpenEXRConfig"), "zlib::zlib"] + if self._with_libdeflate: + OpenEXRCore.requires.append("libdeflate::libdeflate") if self.settings.os in ["Linux", "FreeBSD"]: OpenEXRCore.system_libs = ["m"] @@ -166,10 +196,8 @@ def package_info(self): OpenEXR = self._add_component("OpenEXR") OpenEXR.libs = [f"OpenEXR{lib_suffix}"] OpenEXR.requires = [ - self._conan_comp("OpenEXRCore"), - self._conan_comp("IlmThread"), - self._conan_comp("Iex"), - "imath::imath", + self._conan_comp("OpenEXRCore"), self._conan_comp("IlmThread"), + self._conan_comp("Iex"), "imath::imath", ] if self.settings.os in ["Linux", "FreeBSD"]: OpenEXR.system_libs = ["m"] @@ -184,16 +212,9 @@ def package_info(self): # Add tools directory to PATH self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) - self.cpp_info.requires.append("python::PythonLibs") - self.cpp_info.requires.append("boost::python") - - pymajorminor = self.deps_user_info["python"].python_interp - self.env_info.PYTHONPATH.append( - os.path.join(self.package_folder, "lib64", pymajorminor, "site-packages") - ) - self.env_info.CMAKE_PREFIX_PATH.append( - os.path.join(self.package_folder, "lib64", "cmake") - ) - - def deploy(self): - self.copy("*", symlinks=True) + # ASWF: add explicit dependencies to cpython + self.cpp_info.requires.append("cpython::python") + # ASWF: FIXME do we still need this? + # pymajorminor = self.deps_user_info["python"].python_interp + # self.env_info.PYTHONPATH.append(os.path.join(self.package_folder, "lib64", pymajorminor, "site-packages")) + # self.env_info.CMAKE_PREFIX_PATH.append(os.path.join(self.package_folder, "lib64", "cmake")) diff --git a/packages/conan/recipes/openexr/patches/3.1.4-gcc5-bug-workaround.patch b/packages/conan/recipes/openexr/patches/3.1.4-gcc5-bug-workaround.patch new file mode 100644 index 00000000..a09cede5 --- /dev/null +++ b/packages/conan/recipes/openexr/patches/3.1.4-gcc5-bug-workaround.patch @@ -0,0 +1,14 @@ +Workaround for GCC bug #82336, see: +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336 + +--- a/src/lib/OpenEXR/ImfAttribute.h ++++ b/src/lib/OpenEXR/ImfAttribute.h +@@ -119,7 +119,7 @@ class IMF_EXPORT_TEMPLATE_TYPE TypedAttribute: public Attribute + // that the type T is copyable/assignable/moveable. + //------------------------------------------------------------ + +- TypedAttribute () = default; ++ TypedAttribute () {} + TypedAttribute (const T &value); + TypedAttribute (const TypedAttribute &other) = default; + TypedAttribute (TypedAttribute &&other) = default; diff --git a/packages/conan/recipes/openexr/patches/3.2.1-find-libdeflate.patch b/packages/conan/recipes/openexr/patches/3.2.1-find-libdeflate.patch new file mode 100644 index 00000000..713d06bd --- /dev/null +++ b/packages/conan/recipes/openexr/patches/3.2.1-find-libdeflate.patch @@ -0,0 +1,82 @@ +diff --git a/cmake/OpenEXR.pc.in b/cmake/OpenEXR.pc.in +index bce35c2..88ddc9a 100644 +--- a/cmake/OpenEXR.pc.in ++++ b/cmake/OpenEXR.pc.in +@@ -14,7 +14,7 @@ Name: OpenEXR + Description: OpenEXR image library + Version: @OPENEXR_VERSION@ + +-Libs: @exr_pthread_libs@ -L${libdir} -lOpenEXR${libsuffix} -lOpenEXRUtil${libsuffix} -lOpenEXRCore${libsuffix} -lIex${libsuffix} -lIlmThread${libsuffix} @EXR_DEFLATE_LDFLAGS@ ++Libs: @exr_pthread_libs@ -L${libdir} -lOpenEXR${libsuffix} -lOpenEXRUtil${libsuffix} -lOpenEXRCore${libsuffix} -lIex${libsuffix} -lIlmThread${libsuffix} + Cflags: -I${includedir} -I${OpenEXR_includedir} @exr_pthread_cflags@ + Requires: Imath +- ++Requires.private: @EXR_DEFLATE_PKGCONFIG_REQUIRES@ +diff --git a/cmake/OpenEXRSetup.cmake b/cmake/OpenEXRSetup.cmake +index ef5c6c0..0a7dabc 100644 +--- a/cmake/OpenEXRSetup.cmake ++++ b/cmake/OpenEXRSetup.cmake +@@ -160,15 +160,40 @@ set(OPENEXR_DEFLATE_TAG "v1.18" CACHE STRING "Tag to use for libdeflate source r + if(NOT OPENEXR_FORCE_INTERNAL_DEFLATE) + #TODO: ^^ Release should not clone from main, this is a place holder + set(CMAKE_IGNORE_PATH "${CMAKE_CURRENT_BINARY_DIR}/_deps/deflate-src/config;${CMAKE_CURRENT_BINARY_DIR}/_deps/deflate-build/config") +- include(FindPkgConfig) +- pkg_check_modules(deflate IMPORTED_TARGET GLOBAL libdeflate) +- set(CMAKE_IGNORE_PATH) +- if (deflate_FOUND) +- message(STATUS "Using libdeflate from ${deflate_LINK_LIBRARIES}") ++ # First try cmake config ++ find_package(libdeflate CONFIG QUIET) ++ if(libdeflate_FOUND) ++ if(TARGET libdeflate::libdeflate_shared) ++ set(EXR_DEFLATE_LIB libdeflate::libdeflate_shared) ++ else() ++ set(EXR_DEFLATE_LIB libdeflate::libdeflate_static) ++ endif() ++ set(EXR_DEFLATE_VERSION ${libdeflate_VERSION}) ++ message(STATUS "Using libdeflate from ${libdeflate_DIR}") ++ else() ++ # If not found, try pkgconfig ++ find_package(PkgConfig) ++ if(PKG_CONFIG_FOUND) ++ include(FindPkgConfig) ++ pkg_check_modules(deflate IMPORTED_TARGET GLOBAL libdeflate) ++ if(deflate_FOUND) ++ set(EXR_DEFLATE_LIB PkgConfig::deflate) ++ set(EXR_DEFLATE_VERSION ${deflate_VERSION}) ++ message(STATUS "Using libdeflate from ${deflate_LINK_LIBRARIES}") ++ endif() ++ endif() + endif() ++ set(CMAKE_IGNORE_PATH) + endif() + +-if(NOT TARGET PkgConfig::deflate AND NOT deflate_FOUND) ++if(EXR_DEFLATE_LIB) ++ # Using external library ++ set(EXR_DEFLATE_SOURCES) ++ set(EXR_DEFLATE_INCLUDE_DIR) ++ # For OpenEXR.pc.in for static build ++ set(EXR_DEFLATE_PKGCONFIG_REQUIRES "libdeflate >= ${EXR_DEFLATE_VERSION}") ++else() ++ # Using internal deflate + if(OPENEXR_FORCE_INTERNAL_DEFLATE) + message(STATUS "libdeflate forced internal, installing from ${OPENEXR_DEFLATE_REPO} (${OPENEXR_DEFLATE_TAG})") + else() +@@ -213,16 +238,6 @@ if(NOT TARGET PkgConfig::deflate AND NOT deflate_FOUND) + list(TRANSFORM EXR_DEFLATE_SOURCES PREPEND ${deflate_SOURCE_DIR}/) + set(EXR_DEFLATE_INCLUDE_DIR ${deflate_SOURCE_DIR}) + set(EXR_DEFLATE_LIB) +-else() +- set(EXR_DEFLATE_INCLUDE_DIR) +- set(EXR_DEFLATE_LIB ${deflate_LIBRARIES}) +- # set EXR_DEFATE_LDFLAGS for OpenEXR.pc.in for static build +- if (BUILD_SHARED_LIBS) +- set(EXR_DEFLATE_LDFLAGS "") +- else() +- set(EXR_DEFLATE_LDFLAGS "-l${deflate_LIBRARIES}") +- endif() +- set(EXR_DEFLATE_SOURCES) + endif() + + ####################################### diff --git a/packages/conan/recipes/openexr/patches/3.2.1-gcc5-bug-workaround.patch b/packages/conan/recipes/openexr/patches/3.2.1-gcc5-bug-workaround.patch new file mode 100644 index 00000000..fbf062e5 --- /dev/null +++ b/packages/conan/recipes/openexr/patches/3.2.1-gcc5-bug-workaround.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib/OpenEXR/ImfAttribute.h b/src/lib/OpenEXR/ImfAttribute.h +index bccd980..c8438f3 100644 +--- a/src/lib/OpenEXR/ImfAttribute.h ++++ b/src/lib/OpenEXR/ImfAttribute.h +@@ -108,7 +108,7 @@ public: + // that the type T is copyable/assignable/moveable. + //------------------------------------------------------------ + +- TypedAttribute () = default; ++ TypedAttribute () {}; + TypedAttribute (const T& value); + TypedAttribute (const TypedAttribute& other) = default; + TypedAttribute (TypedAttribute&& other) = default; diff --git a/packages/conan/recipes/openexr/patches/dummy.diff b/packages/conan/recipes/openexr/patches/dummy.diff deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/conan/recipes/openexr/test_package/CMakeLists.txt b/packages/conan/recipes/openexr/test_package/CMakeLists.txt index ba810cd7..b454cffb 100644 --- a/packages/conan/recipes/openexr/test_package/CMakeLists.txt +++ b/packages/conan/recipes/openexr/test_package/CMakeLists.txt @@ -1,4 +1,10 @@ -cmake_minimum_required(VERSION 3.12) +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/cceee569179c10fa56d1fd9c3582f3371944ba59/recipes/openexr/3.x/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.8) project(test_package LANGUAGES CXX) find_package(OpenEXR REQUIRED CONFIG) diff --git a/packages/conan/recipes/openexr/test_package/conanfile.py b/packages/conan/recipes/openexr/test_package/conanfile.py index 4f6caaf5..6b963644 100644 --- a/packages/conan/recipes/openexr/test_package/conanfile.py +++ b/packages/conan/recipes/openexr/test_package/conanfile.py @@ -1,15 +1,16 @@ # Copyright (c) Contributors to the conan-center-index Project. All rights reserved. # Copyright (c) Contributors to the aswf-docker Project. All rights reserved. # SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/cceee569179c10fa56d1fd9c3582f3371944ba59/recipes/openexr/3.x/test_package/conanfile.py from conan import ConanFile from conan.tools.build import can_run from conan.tools.cmake import CMake, cmake_layout import os - class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch", "python" + settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" test_type = "explicit" @@ -26,5 +27,5 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindir, "test_package") + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/opengl/conanfile.py b/packages/conan/recipes/opengl/conanfile.py new file mode 100644 index 00000000..e3bb6dd9 --- /dev/null +++ b/packages/conan/recipes/opengl/conanfile.py @@ -0,0 +1,42 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/4622ac85d1cec8cb7a2fcc8a1796d4b73bff285e/recipes/opengl/all/conanfile.py + +from conan import ConanFile +from conan.tools.system import package_manager +from conan.tools.gnu import PkgConfig + +required_conan_version = ">=1.50.0" + + +class SysConfigOpenGLConan(ConanFile): + name = "opengl" + version = "system" + description = "cross-platform virtual conan package for the OpenGL support" + topics = ("opengl", "gl") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.opengl.org/" + license = "MIT" + package_type = "shared-library" + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + # TODO: Workaround for #2311 until a better solution can be found + self.cpp_info.filenames["cmake_find_package"] = "opengl_system" + self.cpp_info.filenames["cmake_find_package_multi"] = "opengl_system" + + self.cpp_info.set_property("cmake_file_name", "opengl_system") + + self.cpp_info.bindirs = [] + self.cpp_info.includedirs = [] + self.cpp_info.libdirs = [] + if self.settings.os == "Macos": + self.cpp_info.defines.append("GL_SILENCE_DEPRECATION=1") + self.cpp_info.frameworks.append("OpenGL") + elif self.settings.os == "Windows": + self.cpp_info.system_libs = ["opengl32"] + elif self.settings.os in ["Linux", "FreeBSD", "SunOS"]: + pkg_config = PkgConfig(self, 'gl') + pkg_config.fill_cpp_info(self.cpp_info, is_system=self.settings.os != "FreeBSD") \ No newline at end of file diff --git a/packages/conan/recipes/opengl/test_cmake_module_package/CMakeLists.txt b/packages/conan/recipes/opengl/test_cmake_module_package/CMakeLists.txt new file mode 100644 index 00000000..1f463640 --- /dev/null +++ b/packages/conan/recipes/opengl/test_cmake_module_package/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/4622ac85d1cec8cb7a2fcc8a1796d4b73bff285e/recipes/opengl/all/test_cmake_module_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.10) +project(test_package) + +find_package(OpenGL REQUIRED) + +set(SOURCES ../test_package/test_package.cpp) + +if(WIN32) + list(APPEND SOURCES ../test_package/win.cpp) +endif() + +if(APPLE) + list(APPEND SOURCES ../test_package/osx.mm) + set_source_files_properties(../test_package/osx.mm PROPERTIES COMPILE_FLAGS "-x objective-c++") + + list(APPEND PLATFORM_LIBS "objc") + + find_library(APPKIT_LIBRARY AppKit) + find_library(FOUNDATION_LIBRARY Foundation) + + if(APPKIT_LIBRARY) + list(APPEND PLATFORM_LIBS ${APPKIT_LIBRARY}) + endif() + + if(FOUNDATION_LIBRARY) + list(APPEND PLATFORM_LIBS ${FOUNDATION_LIBRARY}) + endif() +endif() + +add_executable(${PROJECT_NAME} ${SOURCES}) +target_link_libraries(${PROJECT_NAME} PRIVATE OpenGL::GL ${PLATFORM_LIBS}) \ No newline at end of file diff --git a/packages/conan/recipes/opengl/test_cmake_module_package/conanfile.py b/packages/conan/recipes/opengl/test_cmake_module_package/conanfile.py new file mode 100644 index 00000000..0b810cf5 --- /dev/null +++ b/packages/conan/recipes/opengl/test_cmake_module_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/master/recipes/opengl/all/test_cmake_module_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") \ No newline at end of file diff --git a/packages/conan/recipes/opengl/test_package/CMakeLists.txt b/packages/conan/recipes/opengl/test_package/CMakeLists.txt new file mode 100644 index 00000000..9512ad62 --- /dev/null +++ b/packages/conan/recipes/opengl/test_package/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/4622ac85d1cec8cb7a2fcc8a1796d4b73bff285e/recipes/opengl/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.10) +project(test_package) + +find_package(opengl_system REQUIRED CONFIG) + +set(SOURCES test_package.cpp) + +if(WIN32) + list(APPEND SOURCES win.cpp) +endif() + +if(APPLE) + list(APPEND SOURCES osx.mm) + set_source_files_properties(osx.mm PROPERTIES COMPILE_FLAGS "-x objective-c++") + + list(APPEND PLATFORM_LIBS "objc") + + find_library(APPKIT_LIBRARY AppKit) + find_library(FOUNDATION_LIBRARY Foundation) + + if(APPKIT_LIBRARY) + list(APPEND PLATFORM_LIBS ${APPKIT_LIBRARY}) + endif() + + if(FOUNDATION_LIBRARY) + list(APPEND PLATFORM_LIBS ${FOUNDATION_LIBRARY}) + endif() +endif() + +add_executable(${PROJECT_NAME} ${SOURCES}) +target_link_libraries(${PROJECT_NAME} PRIVATE opengl::opengl ${PLATFORM_LIBS}) \ No newline at end of file diff --git a/packages/conan/recipes/opengl/test_package/conanfile.py b/packages/conan/recipes/opengl/test_package/conanfile.py new file mode 100644 index 00000000..38bd3912 --- /dev/null +++ b/packages/conan/recipes/opengl/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/4622ac85d1cec8cb7a2fcc8a1796d4b73bff285e/recipes/opengl/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") \ No newline at end of file diff --git a/packages/conan/recipes/opengl/test_package/osx.mm b/packages/conan/recipes/opengl/test_package/osx.mm new file mode 100644 index 00000000..0f9c1c0d --- /dev/null +++ b/packages/conan/recipes/opengl/test_package/osx.mm @@ -0,0 +1,39 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/4622ac85d1cec8cb7a2fcc8a1796d4b73bff285e/recipes/opengl/all/test_package/osx.mm +*/ + +#include "TargetConditionals.h" + +#if TARGET_OS_TV || TARGET_OS_WATCH || TARGET_OS_IPHONE +#else +#import +#import +#endif + +bool init_context() +{ +#if TARGET_OS_TV || TARGET_OS_WATCH || TARGET_OS_IPHONE + return true; +#else + NSOpenGLPixelFormatAttribute pixelFormatAttributes[] = + { + NSOpenGLPFAColorSize, 24, + NSOpenGLPFAAlphaSize, 8, + NSOpenGLPFADoubleBuffer, + 0 + }; + NSOpenGLPixelFormat *pixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:pixelFormatAttributes]; + if (!pixelFormat) + return false; + + NSOpenGLContext *context = [[NSOpenGLContext alloc] initWithFormat:pixelFormat shareContext:nil]; + if (!context) + return false; + [context makeCurrentContext]; + return true; +#endif +} \ No newline at end of file diff --git a/packages/conan/recipes/opengl/test_package/test_package.cpp b/packages/conan/recipes/opengl/test_package/test_package.cpp new file mode 100644 index 00000000..1956cdd6 --- /dev/null +++ b/packages/conan/recipes/opengl/test_package/test_package.cpp @@ -0,0 +1,55 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/4622ac85d1cec8cb7a2fcc8a1796d4b73bff285e/recipes/opengl/all/test_package/test_package.cpp +*/ + +#include + +#ifdef __APPLE__ + +#include + +#else + +#ifdef _WIN32 +#include +#endif + +#if defined(__linux__) or defined(__FreeBSD__) + +bool init_context() { return true; } + +#endif + +#include + +#endif + +bool init_context(); + +int main() +{ + if (!init_context()) + { + // std::cerr << "failed to initialize OpenGL context!" << std::endl; + // return -1; + + // Don't fail if we can't init the context - won't work on a headless CI + // Instead, if we made it this far, then we were able to #include and link, + // count that as a success! + std::cout << "Linked test, but failed to initialize OpenGL context (headless platform?)" << std::endl; + return 0; + } + const char * gl_vendor = (const char *) glGetString(GL_VENDOR); + const char * gl_renderer = (const char *) glGetString(GL_RENDERER); + const char * gl_version = (const char *) glGetString(GL_VERSION); + const char * gl_extensions = (const char *) glGetString(GL_EXTENSIONS); + std::cout << "GL_VENDOR: " << (gl_vendor ? gl_vendor : "(null)") << std::endl; + std::cout << "GL_RENDERER: " << (gl_renderer ? gl_renderer : "(null)") << std::endl; + std::cout << "GL_VERSION: " << (gl_version ? gl_version : "(null)") << std::endl; + std::cout << "GL_EXTENSIONS: " << (gl_extensions ? gl_extensions : "(null)") << std::endl; + return 0; +} \ No newline at end of file diff --git a/packages/conan/recipes/opengl/test_package/win.cpp b/packages/conan/recipes/opengl/test_package/win.cpp new file mode 100644 index 00000000..8b37fc4f --- /dev/null +++ b/packages/conan/recipes/opengl/test_package/win.cpp @@ -0,0 +1,66 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/4622ac85d1cec8cb7a2fcc8a1796d4b73bff285e/recipes/opengl/all/test_package/win.cpp +*/ + +#include + +static LRESULT CALLBACK WndProc(HWND hwnd, + UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + LRESULT res = 1; + switch (uMsg) + { + case WM_DESTROY: + ::PostQuitMessage (0); + break; + default: + res = ::DefWindowProc(hwnd, uMsg, wParam, lParam); + } + return res; +} + +bool init_context() +{ + static const wchar_t * class_name = L"ConanOpenGL"; + static const wchar_t * window_name = L"Conan OpenGL"; + WNDCLASSEXW wc = {0}; + wc.cbSize = sizeof(WNDCLASSEXW); + wc.style = CS_HREDRAW | CS_VREDRAW; + wc.lpfnWndProc = WndProc; + wc.hInstance = ::GetModuleHandle(NULL); + wc.hIcon = ::LoadIcon(0, IDI_APPLICATION); + wc.hCursor = ::LoadCursor(0, IDC_ARROW); + wc.hbrBackground = (HBRUSH) ::GetStockObject(WHITE_BRUSH); + wc.lpszClassName = class_name; + if (!::RegisterClassExW(&wc)) + return false; + HWND hWnd = ::CreateWindowExW(0, class_name, window_name, + WS_OVERLAPPEDWINDOW, 0, 0, 0, 0, NULL, NULL, wc.hInstance, NULL); + if (!hWnd) + return false; + HDC hDC = ::GetDC(hWnd); + if (!hDC) + return false; + PIXELFORMATDESCRIPTOR pfd = {0}; + pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR); + pfd.nVersion = 1; + pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; + pfd.iPixelType = PFD_TYPE_RGBA; + pfd.dwLayerMask = PFD_MAIN_PLANE; + pfd.cColorBits = 32; + pfd.cDepthBits = 16; + int pixel_format = ::ChoosePixelFormat(hDC, &pfd); + if(0 == pixel_format) + return false; + if (!::SetPixelFormat(hDC, pixel_format, &pfd)) + return false; + HGLRC hGLRC = ::wglCreateContext(hDC); + if (!hGLRC) + return false; + ::wglMakeCurrent(hDC, hGLRC); + return true; +} \ No newline at end of file diff --git a/packages/conan/recipes/openjpeg/conanfile.py b/packages/conan/recipes/openjpeg/conanfile.py new file mode 100644 index 00000000..2c36a2b4 --- /dev/null +++ b/packages/conan/recipes/openjpeg/conanfile.py @@ -0,0 +1,21 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/openjpeg/all/conanfile.py + +from conan import ConanFile + +class SystemOpenjpegConan(ConanFile): + name = "openjpeg" + version = "2.4.0" # for OIIO recipe + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["openjp2"] + + self.cpp_info.set_property("cmake_file_name", "OpenJPEG") + self.cpp_info.set_property("cmake_target_name", "openjp2") diff --git a/packages/conan/recipes/openssl/conanfile.py b/packages/conan/recipes/openssl/conanfile.py new file mode 100644 index 00000000..403e21bf --- /dev/null +++ b/packages/conan/recipes/openssl/conanfile.py @@ -0,0 +1,24 @@ +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT + +from conan import ConanFile + +class SystemOpenSSLConan(ConanFile): + name = "openssl" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + } + default_options = { + "shared": True, + } + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["ssl", "crypto"] + + self.cpp_info.set_property("cmake_file_name", "OpenSSL") + self.cpp_info.set_property("cmake_target_name", "OpenSSL::OpenSSL") diff --git a/packages/conan/recipes/opensubdiv/conandata.yml b/packages/conan/recipes/opensubdiv/conandata.yml index edf2a602..9ca7b618 100644 --- a/packages/conan/recipes/opensubdiv/conandata.yml +++ b/packages/conan/recipes/opensubdiv/conandata.yml @@ -1,10 +1,36 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/opensubdiv/all/conandata.yml + sources: "3.6.0": url: "https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v3_6_0.tar.gz" sha256: "bebfd61ab6657a4f4ff27845fb66a167d00395783bfbd253254d87447ed1d879" + "3.5.0": + url: "https://github.com/PixarAnimationStudios/OpenSubdiv/archive/refs/tags/v3_5_0.tar.gz" + sha256: "8f5044f453b94162755131f77c08069004f25306fd6dc2192b6d49889efb8095" + "3.4.4": + url: "https://github.com/PixarAnimationStudios/OpenSubdiv/archive/refs/tags/v3_4_4.tar.gz" + sha256: "20d49f80a2b778ad4d01f091ad88d8c2f91cf6c7363940c6213241ce6f1048fb" patches: "3.6.0": + - patch_file: "patches/3.6.0-0002-cmake-no-rpath.patch" + patch_description: "CMake: do not populate rpath with absolute paths" + patch_type: "conan" - patch_file: "patches/cmake-no-versions.diff" patch_description: "Override TBB and Ptex version requirements" - patch_file: "patches/cmake-ptex-lib64.diff" patch_description: "Find Ptex DSO in lib64" + "3.5.0": + - patch_file: "patches/3.4.4-0002-cmake-no-rpath.patch" + patch_description: "CMake: do not populate rpath with absolute paths" + patch_type: "conan" + "3.4.4": + - patch_file: "patches/3.4.4-0001-cmake-minimum-required.patch" + patch_description: "CMake: Fix position of cmake_minimum_required()" + patch_type: "conan" + - patch_file: "patches/3.4.4-0002-cmake-no-rpath.patch" + patch_description: "CMake: do not populate rpath with absolute paths" + patch_type: "conan" diff --git a/packages/conan/recipes/opensubdiv/conanfile.py b/packages/conan/recipes/opensubdiv/conanfile.py index 9058b70b..cb7d3bd9 100644 --- a/packages/conan/recipes/opensubdiv/conanfile.py +++ b/packages/conan/recipes/opensubdiv/conanfile.py @@ -1,36 +1,29 @@ # Copyright (c) Contributors to the conan-center-index Project. All rights reserved. # Copyright (c) Contributors to the aswf-docker Project. All rights reserved. # SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/opensubdiv/all/conanfile.py from conan import ConanFile -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import ( - apply_conandata_patches, - copy, - export_conandata_patches, - get, - rmdir, -) -from conan.tools.microsoft import is_msvc +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd, valid_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir +from conan.tools.scm import Version import os -import subprocess -required_conan_version = ">=1.38.0" +required_conan_version = ">=1.54.0" class OpenSubdivConan(ConanFile): name = "opensubdiv" - description = "An Open-Source subdivision surface library." - topics = "conan", "opensubdiv", "vfx" + license = "LicenseRef-LICENSE.txt" homepage = "https://github.com/PixarAnimationStudios/OpenSubdiv" - license = "Apache-2.0" - url = "https://github.com/AcademySoftwareFoundation/aswf-docker" - settings = ( - "os", - "arch", - "compiler", - "build_type", - ) + url = "https://github.com/conan-io/conan-center-index" + description = "An Open-Source subdivision surface library" + topics = ("cgi", "vfx", "animation", "subdivision surface") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -46,45 +39,60 @@ class OpenSubdivConan(ConanFile): default_options = { "shared": False, "fPIC": True, - "with_tbb": True, - "with_opengl": True, + "with_tbb": True, # ASWF + "with_opengl": True, # ASWF "with_omp": False, - "with_cuda": True, + "with_cuda": True, # ASWF "with_clew": False, "with_opencl": False, "with_dx": False, "with_metal": False, } + short_paths = True + + @property + def _min_cppstd(self): + if self.options.get_safe("with_metal"): + return "14" + return "11" + + @property + def _minimum_compilers_version(self): + return { + "Visual Studio": "15", + "msvc": "191", + "gcc": "5", + "clang": "11", + "apple-clang": "11.0", + } + def export_sources(self): export_conandata_patches(self) + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + else: + del self.options.with_dx + if self.settings.os != "Macos": + del self.options.with_metal + def configure(self): if self.options.shared: self.options.rm_safe("fPIC") def layout(self): cmake_layout(self, src_folder="src") - # We want DSOs in lib64 + # ASWF: DSOs in lib64 self.cpp.package.libdirs = ["lib64"] def requirements(self): if self.options.with_opengl: - self.requires( - f"glfw/{os.environ['ASWF_GLFW_VERSION']}@{self.user}/{self.channel}" - ) - self.requires( - f"glew/{os.environ['ASWF_GLEW_VERSION']}@{self.user}/{self.channel}" - ) + self.requires(f"glfw/{os.environ['ASWF_GLFW_VERSION']}@{self.user}/{self.channel}") + self.requires(f"glew/{os.environ['ASWF_GLEW_VERSION']}@{self.user}/{self.channel}") if self.options.with_tbb: - self.requires( - f"tbb/{os.environ['ASWF_TBB_VERSION']}@{self.user}/{self.channel}" - ) - - def build_requirements(self): - self.build_requires( - f"cmake/{os.environ['ASWF_CMAKE_VERSION']}@{self.user}/{self.channel}" - ) + self.requires(f"tbb/{os.environ['ASWF_TBB_VERSION']}@{self.user}/{self.channel}") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -103,6 +111,8 @@ def _osd_gpu_enabled(self): def generate(self): tc = CMakeToolchain(self) + if not valid_min_cppstd(self, self._min_cppstd): + tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd tc.variables["NO_TBB"] = not self.options.with_tbb tc.variables["NO_OPENGL"] = not self.options.with_opengl tc.variables["BUILD_SHARED_LIBS"] = self.options.get_safe("shared") @@ -112,9 +122,7 @@ def generate(self): tc.variables["NO_METAL"] = not self.options.get_safe("with_metal") tc.variables["NO_CLEW"] = not self.options.with_clew tc.variables["NO_OPENCL"] = not self.options.with_opencl - tc.variables[ - "NO_PTEX" - ] = True # Note: PTEX is for examples only, but we skip them.. + tc.variables["NO_PTEX"] = True # Note: PTEX is for examples only, but we skip them.. tc.variables["NO_DOC"] = True tc.variables["NO_EXAMPLES"] = True tc.variables["NO_TUTORIALS"] = True @@ -122,65 +130,60 @@ def generate(self): tc.variables["NO_TESTS"] = True tc.variables["NO_GLTESTS"] = True tc.variables["NO_MACOS_FRAMEWORK"] = True + tc.variables["CMAKE_LIBDIR_BASE"] = "lib64" # ASWF: DSOs in lib64 tc.generate() def _patch_sources(self): apply_conandata_patches(self) + if self.settings.os == "Macos" and not self._osd_gpu_enabled: + path = os.path.join(self.source_folder, "opensubdiv", "CMakeLists.txt") + replace_in_file(self, path, "$", "") + # No warnings as errors + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "/WX", "") def build(self): self._patch_sources() cmake = CMake(self) cmake.configure() - cmake.build() + # ASWF: https://github.com/PixarAnimationStudios/OpenSubdiv/issues/1313 + # CUDA build fails with high parallelism, limit to 16 threads + # seems to help + cmake.build(cli_args=["--parallel","4"]) def package(self): - copy( - self, - "LICENSE.txt", - src=self.source_folder, - dst=os.path.join(self.package_folder, "licenses", self.name), - ) + # ASWF: license files in package subdir + copy(self, "LICENSE.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) if self.options.shared: - rm(self, "*.a", os.path.join(self.package_folder, "lib")) + # ASWF: libraries in lib64 + rm(self, "*.a", os.path.join(self.package_folder, "lib64")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "OpenSubdiv") target_suffix = "" if self.options.shared else "_static" - self.cpp_info.components["osdcpu"].set_property( - "cmake_target_name", f"OpenSubdiv::osdcpu{target_suffix}" - ) + self.cpp_info.components["osdcpu"].set_property("cmake_target_name", f"OpenSubdiv::osdcpu{target_suffix}") self.cpp_info.components["osdcpu"].libs = ["osdCPU"] if self.options.with_tbb: + # ASWF: until we rename to onetbb self.cpp_info.components["osdcpu"].requires = ["tbb::tbb"] if self._osd_gpu_enabled: - self.cpp_info.components["osdgpu"].set_property( - "cmake_target_name", f"OpenSubdiv::osdgpu{target_suffix}" - ) + self.cpp_info.components["osdgpu"].set_property("cmake_target_name", f"OpenSubdiv::osdgpu{target_suffix}") self.cpp_info.components["osdgpu"].libs = ["osdGPU"] dl_required = self.options.with_opengl or self.options.with_opencl if self.settings.os in ["Linux", "FreeBSD"] and dl_required: self.cpp_info.components["osdgpu"].system_libs = ["dl"] + # ASWF: building with_opengl + if self.options.with_opengl: + self.cpp_info.components["osdgpu"].requires = ["glew::glew", "glfw::glfw"] # TODO: to remove in conan v2 self.cpp_info.names["cmake_find_package"] = "OpenSubdiv" self.cpp_info.names["cmake_find_package_multi"] = "OpenSubdiv" - self.cpp_info.components["osdcpu"].names[ - "cmake_find_package" - ] = f"osdcpu{target_suffix}" - self.cpp_info.components["osdcpu"].names[ - "cmake_find_package_multi" - ] = f"osdcpu{target_suffix}" - self.cpp_info.components["osdgpu"].names[ - "cmake_find_package" - ] = f"osdgpu{target_suffix}" - self.cpp_info.components["osdgpu"].names[ - "cmake_find_package_multi" - ] = f"osdgpu{target_suffix}" - - def deploy(self): - self.copy("*", symlinks=True) + self.cpp_info.components["osdcpu"].names["cmake_find_package"] = f"osdcpu{target_suffix}" + self.cpp_info.components["osdcpu"].names["cmake_find_package_multi"] = f"osdcpu{target_suffix}" + self.cpp_info.components["osdgpu"].names["cmake_find_package"] = f"osdgpu{target_suffix}" + self.cpp_info.components["osdgpu"].names["cmake_find_package_multi"] = f"osdgpu{target_suffix}" diff --git a/packages/conan/recipes/opensubdiv/patches/3.4.4-0001-cmake-minimum-required.patch b/packages/conan/recipes/opensubdiv/patches/3.4.4-0001-cmake-minimum-required.patch new file mode 100644 index 00000000..b5cdfb82 --- /dev/null +++ b/packages/conan/recipes/opensubdiv/patches/3.4.4-0001-cmake-minimum-required.patch @@ -0,0 +1,13 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -22,9 +22,9 @@ + # language governing permissions and limitations under the Apache License. + # + ++cmake_minimum_required(VERSION 3.1) + project(OpenSubdiv) + +-cmake_minimum_required(VERSION 2.8.6) + + # Turn on folder support + set_property(GLOBAL PROPERTY USE_FOLDERS ON) diff --git a/packages/conan/recipes/opensubdiv/patches/3.4.4-0002-cmake-no-rpath.patch b/packages/conan/recipes/opensubdiv/patches/3.4.4-0002-cmake-no-rpath.patch new file mode 100644 index 00000000..28d5b935 --- /dev/null +++ b/packages/conan/recipes/opensubdiv/patches/3.4.4-0002-cmake-no-rpath.patch @@ -0,0 +1,15 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -146,12 +146,10 @@ if (NOT CMAKE_COMPILER_IS_ICC) + # sequences of ':' that this command causes. The consequence is that examples + # built and installed using icc will not have an rpath pointing to the built + # OSD library which they depend on and will have to set LD_LIBRARY_PATH instead. +- list(APPEND CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") + endif() + + # add the automatically determined parts of the RPATH + # which point to directories outside the build tree to the install RPATH +-SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + + # ensure that ARC is shown as enabled in the Xcode UI + if(CMAKE_GENERATOR STREQUAL "Xcode") diff --git a/packages/conan/recipes/opensubdiv/patches/3.6.0-0002-cmake-no-rpath.patch b/packages/conan/recipes/opensubdiv/patches/3.6.0-0002-cmake-no-rpath.patch new file mode 100644 index 00000000..e8cb72fb --- /dev/null +++ b/packages/conan/recipes/opensubdiv/patches/3.6.0-0002-cmake-no-rpath.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8620cf3..aba7a90 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -157,12 +157,12 @@ if (NOT CMAKE_COMPILER_IS_ICC) + # sequences of ':' that this command causes. The consequence is that examples + # built and installed using icc will not have an rpath pointing to the built + # OSD library which they depend on and will have to set LD_LIBRARY_PATH instead. +- list(APPEND CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") ++# list(APPEND CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") + endif() + + # add the automatically determined parts of the RPATH + # which point to directories outside the build tree to the install RPATH +-SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) ++#SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + + # ensure that ARC is shown as enabled in the Xcode UI + if(CMAKE_GENERATOR STREQUAL "Xcode") diff --git a/packages/conan/recipes/opensubdiv/test_package/CMakeLists.txt b/packages/conan/recipes/opensubdiv/test_package/CMakeLists.txt new file mode 100644 index 00000000..52542bac --- /dev/null +++ b/packages/conan/recipes/opensubdiv/test_package/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/opensubdiv/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES CXX) + +find_package(OpenSubdiv REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +if(TARGET OpenSubdiv::osdcpu_static) + target_link_libraries(${PROJECT_NAME} PRIVATE OpenSubdiv::osdcpu_static) +else() + target_link_libraries(${PROJECT_NAME} PRIVATE OpenSubdiv::osdcpu) +endif() diff --git a/packages/conan/recipes/opensubdiv/test_package/conanfile.py b/packages/conan/recipes/opensubdiv/test_package/conanfile.py new file mode 100644 index 00000000..10dc5986 --- /dev/null +++ b/packages/conan/recipes/opensubdiv/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/opensubdiv/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/opensubdiv/test_package/test_package.cpp b/packages/conan/recipes/opensubdiv/test_package/test_package.cpp new file mode 100644 index 00000000..8e5a1cd9 --- /dev/null +++ b/packages/conan/recipes/opensubdiv/test_package/test_package.cpp @@ -0,0 +1,49 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/opensubdiv/all/test_package/test_package.cpp +*/ + +#include + +static int g_nverts = 8, + g_nfaces = 6; + +static int g_vertsperface[6] = {4, 4, 4, 4, 4, 4}; + +static int g_vertIndices[24] = {0, 1, 3, 2, + 2, 3, 5, 4, + 4, 5, 7, 6, + 6, 7, 1, 0, + 1, 7, 5, 3, + 6, 0, 2, 4}; + +using namespace OpenSubdiv; + +//------------------------------------------------------------------------------ +int main(int, char **) { + typedef Far::TopologyDescriptor Descriptor; + + Sdc::SchemeType type = OpenSubdiv::Sdc::SCHEME_CATMARK; + + Sdc::Options options; + options.SetVtxBoundaryInterpolation(Sdc::Options::VTX_BOUNDARY_EDGE_ONLY); + + Descriptor desc; + desc.numVertices = g_nverts; + desc.numFaces = g_nfaces; + desc.numVertsPerFace = g_vertsperface; + desc.vertIndicesPerFace = g_vertIndices; + + Far::TopologyRefiner *refiner = + Far::TopologyRefinerFactory::Create(desc, + Far::TopologyRefinerFactory::Options(type, + options)); + + refiner->RefineUniform(Far::TopologyRefiner::UniformOptions(2)); + + delete refiner; + return 0; +} diff --git a/packages/conan/recipes/opus/conanfile.py b/packages/conan/recipes/opus/conanfile.py new file mode 100644 index 00000000..3c620e66 --- /dev/null +++ b/packages/conan/recipes/opus/conanfile.py @@ -0,0 +1,23 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/opus/all/conanfile.py + +from conan import ConanFile + +class SystemOpusConan(ConanFile): + name = "opus" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.libdirs = ["/usr/lib64"] + + self.cpp_info.set_property("cmake_file_name", "Opus") + self.cpp_info.set_property("cmake_target_name", "Opus::opus") + self.cpp_info.set_property("pkg_config_name", "opus") + self.cpp_info.libs = ["opus"] + self.cpp_info.includedirs.append("/usr/include/opus") + self.cpp_info.system_libs.append("m") diff --git a/packages/conan/recipes/partio/conandata.yml b/packages/conan/recipes/partio/conandata.yml index b226907d..dd142eb4 100644 --- a/packages/conan/recipes/partio/conandata.yml +++ b/packages/conan/recipes/partio/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.17.3": + url: "https://github.com/wdas/partio/archive/v1.17.3.tar.gz" + sha256: "08a571ca75cf133f373415dfd50b7d0e33a0dd1811dfb63409f0ae46652033c1" "1.17.1": url: "https://github.com/wdas/partio/archive/v1.17.1.tar.gz" sha256: "5d00fbfc55817acb310bcaf61212a78b2c602e08b839060dfee69570b4b82464" diff --git a/packages/conan/recipes/partio/conanfile.py b/packages/conan/recipes/partio/conanfile.py index 0eaa0b5e..57f34e13 100644 --- a/packages/conan/recipes/partio/conanfile.py +++ b/packages/conan/recipes/partio/conanfile.py @@ -4,14 +4,7 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import ( - apply_conandata_patches, - collect_libs, - copy, - export_conandata_patches, - get, - rmdir, -) +from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rmdir from conan.tools.microsoft import is_msvc import os @@ -36,7 +29,7 @@ class PartioConan(ConanFile): "fPIC": [True, False], } default_options = { - "shared": True, + "shared": False, "fPIC": True, } @@ -45,24 +38,19 @@ def export_sources(self): def layout(self): cmake_layout(self, src_folder="src") - # We want DSOs in lib64 + # ASWF: DSOs in lib64 self.cpp.package.libdirs = ["lib64"] def requirements(self): - self.requires( - f"python/{os.environ['ASWF_PYTHON_VERSION']}@{self.user}/{self.channel}" - ) - - def build_requirements(self): - self.build_requires( - f"cmake/{os.environ['ASWF_CMAKE_VERSION']}@{self.user}/{self.channel}" - ) + self.requires(f"cpython/{os.environ['ASWF_CPYTHON_VERSION']}@{self.user}/{self.channel}") + self.requires("zlib/[>=1.2.11 <2]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) + tc.variables["CMAKE_INSTALL_LIBDIR"] = "lib64" # ASWF: DSOs in lib64 tc.generate() deps = CMakeDeps(self) @@ -75,15 +63,10 @@ def build(self): self._patch_sources() cmake = CMake(self) cmake.configure() - cmake.build() + cmake.build(cli_args=["--verbose"]) # ASWF FIXME def package(self): - copy( - self, - "LICENSE", - src=self.source_folder, - dst=os.path.join(self.package_folder, "licenses", self.name), - ) + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) @@ -92,6 +75,4 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "Partio::Partio") self.cpp_info.includedirs = ["include"] self.cpp_info.libs = collect_libs(self) - - def deploy(self): - self.copy("*", symlinks=True) + self.cpp_info.requires = ["zlib::zlib", "cpython::cpython"] diff --git a/packages/conan/recipes/pcre2/conanfile.py b/packages/conan/recipes/pcre2/conanfile.py new file mode 100644 index 00000000..fbb773d3 --- /dev/null +++ b/packages/conan/recipes/pcre2/conanfile.py @@ -0,0 +1,25 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/pcre2/all/conanfile.py + +from conan import ConanFile + +class SystemPCRE2Conan(ConanFile): + name = "pcre2" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + + self.cpp_info.set_property("cmake_file_name", "PCRE2") + self.cpp_info.components["pcre2-8"].set_property("cmake_target_name", "PCRE2::8BIT") + self.cpp_info.components["pcre2-8"].libs = ["pcre2-8"] + self.cpp_info.components["pcre2-posix"].set_property("cmake_target_name", "PCRE2::POSIX") + self.cpp_info.components["pcre2-posix"].libs = ["pcre2-posix"] + + diff --git a/packages/conan/recipes/ptex/conandata.yml b/packages/conan/recipes/ptex/conandata.yml index 70c9ce94..922827ea 100644 --- a/packages/conan/recipes/ptex/conandata.yml +++ b/packages/conan/recipes/ptex/conandata.yml @@ -1,5 +1,23 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/ptex/all/conandata.yml + sources: + "2.4.3": + url: "https://github.com/wdas/ptex/archive/v2.4.3.tar.gz" + sha256: "435aa2ee1781ff24859bd282b7616bfaeb86ca10604b13d085ada8aa7602ad27" "2.4.2": url: "https://github.com/wdas/ptex/archive/v2.4.2.tar.gz" sha256: "c8235fb30c921cfb10848f4ea04d5b662ba46886c5e32ad5137c5086f3979ee1" + "2.4.0": + url: "https://github.com/wdas/ptex/archive/refs/tags/v2.4.0.tar.gz" + sha256: "690d66b72f34a92488d63134ad1f5736078677356b0004070b0169b9e3240f8e" patches: + "2.4.3": + - patch_file: "patches/2.4.2-0001-fix-cmake.patch" + "2.4.2": + - patch_file: "patches/2.4.2-0001-fix-cmake.patch" + "2.4.0": + - patch_file: "patches/2.4.0-0001-fix-cmake.patch" diff --git a/packages/conan/recipes/ptex/conanfile.py b/packages/conan/recipes/ptex/conanfile.py index e26da2e4..68dcd07a 100644 --- a/packages/conan/recipes/ptex/conanfile.py +++ b/packages/conan/recipes/ptex/conanfile.py @@ -1,73 +1,76 @@ # Copyright (c) Contributors to the conan-center-index Project. All rights reserved. # Copyright (c) Contributors to the aswf-docker Project. All rights reserved. # SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/ptex/all/conanfile.py from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import ( - apply_conandata_patches, - collect_libs, - copy, - export_conandata_patches, - get, - rmdir, -) -from conan.tools.microsoft import is_msvc +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save import os -required_conan_version = ">=1.38.0" +from conan.tools.gnu import PkgConfigDeps + +required_conan_version = ">=1.53.0" class PtexConan(ConanFile): name = "ptex" - description = "Per-Face Texture Mapping for Production Rendering." - topics = "conan", "ptex", "vfx" - homepage = "https://github.com/wdas/ptex" + description = "Ptex is a texture mapping system developed by Walt Disney " \ + "Animation Studios for production-quality rendering." license = "BSD-3-Clause" - url = "https://github.com/AcademySoftwareFoundation/aswf-docker" - settings = ( - "os", - "arch", - "compiler", - "build_type", - ) + topics = ("texture-mapping") + homepage = "https://ptex.us" + url = "https://github.com/conan-io/conan-center-index" + + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], } default_options = { - "shared": True, + "shared": False, "fPIC": True, } def export_sources(self): export_conandata_patches(self) + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + def layout(self): cmake_layout(self, src_folder="src") - # We want DSOs in lib64 + # ASWF: DSOs in lib64 self.cpp.package.libdirs = ["lib64"] def requirements(self): - pass - - def build_requirements(self): - self.build_requires( - f"cmake/{os.environ['ASWF_CMAKE_VERSION']}@{self.user}/{self.channel}" - ) + self.requires("zlib/[>=1.2.11 <2]") def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder, strip_root=True) def generate(self): tc = CMakeToolchain(self) + tc.variables["PTEX_BUILD_STATIC_LIBS"] = not self.options.shared + tc.variables["PTEX_BUILD_SHARED_LIBS"] = self.options.shared tc.generate() - - deps = CMakeDeps(self) - deps.generate() + cd = CMakeDeps(self) + cd.generate() def _patch_sources(self): apply_conandata_patches(self) + # disable subdirs + save(self, os.path.join(self.source_folder, "src", "utils", "CMakeLists.txt"), "") + save(self, os.path.join(self.source_folder, "src", "tests", "CMakeLists.txt"), "") + save(self, os.path.join(self.source_folder, "src", "doc", "CMakeLists.txt"), "") def build(self): self._patch_sources() @@ -76,20 +79,30 @@ def build(self): cmake.build() def package(self): - copy( - self, - "LICENSE", - src=self.source_folder, - dst=os.path.join(self.package_folder, "licenses", self.name), - ) + # ASWF: license files in package subdirs + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) cmake = CMake(self) cmake.install() + # ASWF: modules in lib64 rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) def package_info(self): - self.cpp_info.set_property("cmake_target_name", "Ptex::Ptex") - self.cpp_info.includedirs = ["include"] - self.cpp_info.libs = collect_libs(self) - - def deploy(self): - self.copy("*", symlinks=True) + cmake_target = "Ptex_dynamic" if self.options.shared else "Ptex_static" + self.cpp_info.set_property("cmake_file_name", "ptex") + self.cpp_info.set_property("cmake_target_name", f"Ptex::{cmake_target}") + # TODO: back to global scope once cmake_find_package* generators removed + self.cpp_info.components["_ptex"].libs = ["Ptex"] + if not self.options.shared: + self.cpp_info.components["_ptex"].defines.append("PTEX_STATIC") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["_ptex"].system_libs.append("pthread") + self.cpp_info.components["_ptex"].requires = ["zlib::zlib"] + + # TODO: to remove in conan v2 once cmake_find_package* generators removed + self.cpp_info.filenames["cmake_find_package"] = "ptex" + self.cpp_info.filenames["cmake_find_package_multi"] = "ptex" + self.cpp_info.names["cmake_find_package"] = "Ptex" + self.cpp_info.names["cmake_find_package_multi"] = "Ptex" + self.cpp_info.components["_ptex"].set_property("cmake_target_name", f"Ptex::{cmake_target}") + self.cpp_info.components["_ptex"].names["cmake_find_package"] = cmake_target + self.cpp_info.components["_ptex"].names["cmake_find_package_multi"] = cmake_target diff --git a/packages/conan/recipes/ptex/patches/2.4.0-0001-fix-cmake.patch b/packages/conan/recipes/ptex/patches/2.4.0-0001-fix-cmake.patch new file mode 100644 index 00000000..df8361be --- /dev/null +++ b/packages/conan/recipes/ptex/patches/2.4.0-0001-fix-cmake.patch @@ -0,0 +1,49 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -33,6 +33,10 @@ enable_testing() + # Setup platform-specific threading flags. + find_package(Threads REQUIRED) + ++find_package(ZLIB REQUIRED) ++add_library(PkgConfig::Ptex_ZLIB INTERFACE IMPORTED) ++set_property(TARGET PkgConfig::Ptex_ZLIB PROPERTY INTERFACE_LINK_LIBRARIES ZLIB::ZLIB) ++if(0) + # Use pkg-config to create a PkgConfig::Ptex_ZLIB imported target + find_package(PkgConfig REQUIRED) + pkg_checK_modules(Ptex_ZLIB REQUIRED zlib IMPORTED_TARGET) +@@ -59,6 +63,7 @@ if (NOT DEFINED PTEX_VER) + OUTPUT_STRIP_TRAILING_WHITESPACE) + endif () + endif () ++endif() + # Provide a fallback version when the Git repository is unavailable. + if (NOT PTEX_VER) + set(PTEX_VER "v2.3.X") +@@ -76,7 +81,7 @@ endif () + list(GET PTEX_VER_LIST 0 PTEX_MAJOR_VERSION) + list(GET PTEX_VER_LIST 1 PTEX_MINOR_VERSION) + +-if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) ++if (0) + # Detect the build type from the $FLAVOR environment variable + # Default to optimized Release builds when unspecified. + if ("$ENV{FLAVOR}" MATCHES "debug") +--- a/src/ptex/CMakeLists.txt ++++ b/src/ptex/CMakeLists.txt +@@ -21,6 +21,7 @@ if(PTEX_BUILD_STATIC_LIBS) + $ + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}) ++ target_compile_definitions(Ptex_static PUBLIC PTEX_STATIC) + target_link_libraries(Ptex_static + PUBLIC Threads::Threads PkgConfig::Ptex_ZLIB) + install(TARGETS Ptex_static EXPORT Ptex DESTINATION ${CMAKE_INSTALL_LIBDIR}) +@@ -39,7 +40,7 @@ if(PTEX_BUILD_SHARED_LIBS) + target_compile_definitions(Ptex_dynamic PRIVATE PTEX_EXPORTS) + target_link_libraries(Ptex_dynamic + PUBLIC Threads::Threads PkgConfig::Ptex_ZLIB) +- install(TARGETS Ptex_dynamic EXPORT Ptex DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(TARGETS Ptex_dynamic EXPORT Ptex RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + + install(FILES diff --git a/packages/conan/recipes/ptex/patches/2.4.2-0001-fix-cmake.patch b/packages/conan/recipes/ptex/patches/2.4.2-0001-fix-cmake.patch new file mode 100644 index 00000000..cfb56ff2 --- /dev/null +++ b/packages/conan/recipes/ptex/patches/2.4.2-0001-fix-cmake.patch @@ -0,0 +1,19 @@ +--- a/src/ptex/CMakeLists.txt ++++ b/src/ptex/CMakeLists.txt +@@ -22,6 +22,7 @@ if(PTEX_BUILD_STATIC_LIBS) + $ + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}) ++ target_compile_definitions(Ptex_static PUBLIC PTEX_STATIC) + target_link_libraries(Ptex_static + PUBLIC Threads::Threads ZLIB::ZLIB) + install(TARGETS Ptex_static EXPORT Ptex DESTINATION ${CMAKE_INSTALL_LIBDIR}) +@@ -40,7 +41,7 @@ if(PTEX_BUILD_SHARED_LIBS) + target_compile_definitions(Ptex_dynamic PRIVATE PTEX_EXPORTS) + target_link_libraries(Ptex_dynamic + PUBLIC Threads::Threads ZLIB::ZLIB) +- install(TARGETS Ptex_dynamic EXPORT Ptex DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(TARGETS Ptex_dynamic EXPORT Ptex RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + + install(FILES diff --git a/packages/conan/recipes/ptex/patches/dummy.diff b/packages/conan/recipes/ptex/patches/dummy.diff deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/conan/recipes/ptex/test_package/CMakeLists.txt b/packages/conan/recipes/ptex/test_package/CMakeLists.txt new file mode 100644 index 00000000..a6bf66cf --- /dev/null +++ b/packages/conan/recipes/ptex/test_package/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/ptex/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES CXX) + +find_package(ptex REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +if(TARGET Ptex::Ptex_static) + target_link_libraries(${PROJECT_NAME} PRIVATE Ptex::Ptex_static) +else() + target_link_libraries(${PROJECT_NAME} PRIVATE Ptex::Ptex_dynamic) +endif() diff --git a/packages/conan/recipes/ptex/test_package/conanfile.py b/packages/conan/recipes/ptex/test_package/conanfile.py new file mode 100644 index 00000000..68a79d41 --- /dev/null +++ b/packages/conan/recipes/ptex/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/ptex/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/ptex/test_package/test_package.cpp b/packages/conan/recipes/ptex/test_package/test_package.cpp new file mode 100644 index 00000000..500569dc --- /dev/null +++ b/packages/conan/recipes/ptex/test_package/test_package.cpp @@ -0,0 +1,14 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/ptex/all/test_package/test_package.cpp +*/ + +#include + +int main() { + PtexPtr c(PtexCache::create(0, 1024 * 1024)); + return 0; +} diff --git a/packages/conan/recipes/pugixml/conandata.yml b/packages/conan/recipes/pugixml/conandata.yml new file mode 100644 index 00000000..81739184 --- /dev/null +++ b/packages/conan/recipes/pugixml/conandata.yml @@ -0,0 +1,22 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/pugixml/all/conandata.yml + +sources: + "1.14": + url: "https://github.com/zeux/pugixml/releases/download/v1.14/pugixml-1.14.tar.gz" + sha256: "2f10e276870c64b1db6809050a75e11a897a8d7456c4be5c6b2e35a11168a015" + "1.13": + url: "https://github.com/zeux/pugixml/releases/download/v1.13/pugixml-1.13.tar.gz" + sha256: "40c0b3914ec131485640fa57e55bf1136446026b41db91c1bef678186a12abbe" + "1.12.1": + url: "https://github.com/zeux/pugixml/releases/download/v1.12.1/pugixml-1.12.1.tar.gz" + sha256: "dcf671a919cc4051210f08ffd3edf9e4247f79ad583c61577a13ee93af33afc7" + "1.11": + url: "https://github.com/zeux/pugixml/releases/download/v1.11/pugixml-1.11.tar.gz" + sha256: "26913d3e63b9c07431401cf826df17ed832a20d19333d043991e611d23beaa2c" + "1.10": + url: "https://github.com/zeux/pugixml/releases/download/v1.10/pugixml-1.10.tar.gz" + sha256: "55f399fbb470942410d348584dc953bcaec926415d3462f471ef350f29b5870a" diff --git a/packages/conan/recipes/pugixml/conanfile.py b/packages/conan/recipes/pugixml/conanfile.py new file mode 100644 index 00000000..b996ddfe --- /dev/null +++ b/packages/conan/recipes/pugixml/conanfile.py @@ -0,0 +1,128 @@ + +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/pugixml/all/conanfile.py + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import collect_libs, copy, get, load, replace_in_file, rmdir, save +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.54.0" + + +class PugiXmlConan(ConanFile): + name = "pugixml" + description = "Light-weight, simple and fast XML parser for C++ with XPath support" + topics = ("xml-parser", "xpath", "xml", "dom") + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://pugixml.org/" + package_type = "library" + + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "header_only": [True, False], + "wchar_mode": [True, False], + "no_exceptions": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "header_only": False, + "wchar_mode": False, + "no_exceptions": False, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared or self.options.header_only: + self.options.rm_safe("fPIC") + if self.options.header_only: + del self.options.shared + + def layout(self): + if self.options.header_only: + basic_layout(self, src_folder="src") + else: + cmake_layout(self, src_folder="src") + # ASWF: DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def package_id(self): + if self.info.options.header_only: + self.info.clear() + + def validate(self): + if self.options.get_safe("shared") and self.options.wchar_mode: + # The app crashes with error "The procedure entry point ... could not be located in the dynamic link library" + raise ConanInvalidConfiguration("Combination of 'shared' and 'wchar_mode' options is not supported") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + if not self.options.header_only: + tc = CMakeToolchain(self) + tc.variables["BUILD_TESTS"] = False + # For msvc shared + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.generate() + + def build(self): + if not self.options.header_only: + header_file = os.path.join(self.source_folder, "src", "pugiconfig.hpp") + # For the library build mode, options applied via change the configuration file + if self.options.wchar_mode: + replace_in_file(self, header_file, "// #define PUGIXML_WCHAR_MODE", "#define PUGIXML_WCHAR_MODE") + if self.options.no_exceptions: + replace_in_file(self, header_file, "// #define PUGIXML_NO_EXCEPTIONS", "#define PUGIXML_NO_EXCEPTIONS") + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + readme_contents = load(self, os.path.join(self.source_folder, "readme.txt")) + license_contents = readme_contents[readme_contents.find("This library is"):] + # ASWF: license in package sbudir + save(self, os.path.join(self.package_folder, "licenses", self.name, "LICENSE"), license_contents) + if self.options.header_only: + source_dir = os.path.join(self.source_folder, "src") + copy(self, "*", src=source_dir, dst=os.path.join(self.package_folder, "include")) + else: + cmake = CMake(self) + cmake.install() + # ASWF: cmake files in lib64, keep for non-Conan use + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "pugixml") + self.cpp_info.set_property("cmake_target_name", "pugixml::pugixml") + self.cpp_info.set_property("pkg_config_name", "pugixml") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + if self.options.header_only: + # For the "header_only" mode, options applied via global definitions + self.cpp_info.defines.append("PUGIXML_HEADER_ONLY") + if self.options.wchar_mode: + self.cpp_info.defines.append("PUGIXML_WCHAR_MODE") + if self.options.no_exceptions: + self.cpp_info.defines.append("PUGIXML_NO_EXCEPTIONS") + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + else: + self.cpp_info.set_property( + "cmake_target_aliases", + ["pugixml::shared"] if self.options.shared else ["pugixml::static"], + ) + self.cpp_info.libs = collect_libs(self) diff --git a/packages/conan/recipes/pugixml/test_package/CMakeLists.txt b/packages/conan/recipes/pugixml/test_package/CMakeLists.txt new file mode 100644 index 00000000..ab2523cf --- /dev/null +++ b/packages/conan/recipes/pugixml/test_package/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/pugixml/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES CXX) + +find_package(pugixml REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE pugixml::pugixml) diff --git a/packages/conan/recipes/pugixml/test_package/conanfile.py b/packages/conan/recipes/pugixml/test_package/conanfile.py new file mode 100644 index 00000000..dd77d3ad --- /dev/null +++ b/packages/conan/recipes/pugixml/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/pugixml/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/pugixml/test_package/test_package.cpp b/packages/conan/recipes/pugixml/test_package/test_package.cpp new file mode 100644 index 00000000..af88536f --- /dev/null +++ b/packages/conan/recipes/pugixml/test_package/test_package.cpp @@ -0,0 +1,46 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/pugixml/all/test_package/test_package.cpp +*/ + +#include +#include +#include "pugixml.hpp" + +int main() { + const unsigned majorVersion = PUGIXML_VERSION / 1000; + const unsigned minorVersion = PUGIXML_VERSION % 1000 / 10; + const unsigned maintenanceVersion = PUGIXML_VERSION % 1000 % 10; + + std::basic_stringstream version; + version << majorVersion << '.' << minorVersion; + if (maintenanceVersion) + version << '.' << maintenanceVersion; + + pugi::xml_document doc; + pugi::xml_node node = doc.append_child(PUGIXML_TEXT("PugiXml")); + node.append_attribute(PUGIXML_TEXT("Version")) + .set_value(version.str().c_str()); + + node.append_attribute(PUGIXML_TEXT("wchar_mode")) + .set_value(sizeof(PUGIXML_CHAR) != 1); + + node.append_attribute(PUGIXML_TEXT("header_only")) +#ifdef PUGIXML_HEADER_ONLY + .set_value(true); +#else + .set_value(false); +#endif + + node.append_attribute(PUGIXML_TEXT("no_exceptions")) +#ifdef PUGIXML_NO_EXCEPTIONS + .set_value(true); +#else + .set_value(false); +#endif + + doc.print(std::cout); +} diff --git a/packages/conan/recipes/pulseaudio/conanfile.py b/packages/conan/recipes/pulseaudio/conanfile.py new file mode 100644 index 00000000..2fc90581 --- /dev/null +++ b/packages/conan/recipes/pulseaudio/conanfile.py @@ -0,0 +1,22 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/pulseaudio/all/conanfile.py + +from conan import ConanFile + +class SystemPulseAudioConan(ConanFile): + name = "pulseaudio" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64", "/usr/lib64/pulseaudio"] + + self.cpp_info.components["pulse"].libs = ["pulse", "pulsecommon-14.0"] + + self.cpp_info.components["pulse-simple"].libs = ["pulse-simple"] + self.cpp_info.components["pulse-simple"].requires = ["pulse"] diff --git a/packages/conan/recipes/pybind11/conandata.yml b/packages/conan/recipes/pybind11/conandata.yml index e5c66258..e27ebb33 100644 --- a/packages/conan/recipes/pybind11/conandata.yml +++ b/packages/conan/recipes/pybind11/conandata.yml @@ -1,31 +1,67 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/59cab50aa90f922e61a746eef7c488dd788e4989/recipes/pybind11/all/conandata.yml + sources: - "2.4.3": - url: "https://github.com/pybind/pybind11/archive/v2.4.3.tar.gz" - sha256: "1eed57bc6863190e35637290f97a20c81cfe4d9090ac0a24f3bbf08f265eb71d" - "2.5.0": - url: "https://github.com/pybind/pybind11/archive/v2.5.0.tar.gz" - sha256: "97504db65640570f32d3fdf701c25a340c8643037c3b69aec469c10c93dc8504" - "2.6.0": - url: "https://github.com/pybind/pybind11/archive/v2.6.0.tar.gz" - sha256: "90b705137b69ee3b5fc655eaca66d0dc9862ea1759226f7ccd3098425ae69571" - "2.6.1": - url: "https://github.com/pybind/pybind11/archive/v2.6.1.tar.gz" - sha256: "cdbe326d357f18b83d10322ba202d69f11b2f49e2d87ade0dc2be0c5c34f8e2a" - "2.6.2": - url: "https://github.com/pybind/pybind11/archive/v2.6.2.tar.gz" - sha256: "8ff2fff22df038f5cd02cea8af56622bc67f5b64534f1b83b9f133b8366acff2" - "2.8.1": - url: "https://github.com/pybind/pybind11/archive/v2.8.1.tar.gz" - sha256: "f1bcc07caa568eb312411dde5308b1e250bd0e1bc020fae855bf9f43209940cc" - "2.9.2": - url: "https://github.com/pybind/pybind11/archive/v2.9.2.tar.gz" - sha256: "6bd528c4dbe2276635dc787b6b1f2e5316cf6b49ee3e150264e455a0d68d19c1" - "2.11.1": - url: "https://github.com/pybind/pybind11/archive/v2.11.1.tar.gz" - sha256: "d475978da0cdc2d43b73f30910786759d593a9d8ee05b1b6846d1eb16c6d2e0c" + "2.13.6": + url: "https://github.com/pybind/pybind11/archive/v2.13.6.tar.gz" + sha256: "e08cb87f4773da97fa7b5f035de8763abc656d87d5773e62f6da0587d1f0ec20" + "2.13.5": + url: "https://github.com/pybind/pybind11/archive/v2.13.5.tar.gz" + sha256: "b1e209c42b3a9ed74da3e0b25a4f4cd478d89d5efbb48f04b277df427faf6252" + "2.13.4": + url: "https://github.com/pybind/pybind11/archive/v2.13.4.tar.gz" + sha256: "efc901aa0aab439a3fea6efeaf930b5a349fb06394bf845c64ce15a9cf8f0240" + "2.13.2": + url: "https://github.com/pybind/pybind11/archive/v2.13.2.tar.gz" + sha256: "50eebef369d28f07ce1fe1797f38149e5928817be8e539239f2aadfd95b227f3" + "2.13.1": + url: "https://github.com/pybind/pybind11/archive/v2.13.1.tar.gz" + sha256: "51631e88960a8856f9c497027f55c9f2f9115cafb08c0005439838a05ba17bfc" "2.12.0": url: "https://github.com/pybind/pybind11/archive/v2.12.0.tar.gz" sha256: "bf8f242abd1abcd375d516a7067490fb71abd79519a282d22b6e4d19282185a7" + "2.11.1": + url: "https://github.com/pybind/pybind11/archive/v2.11.1.tar.gz" + sha256: "d475978da0cdc2d43b73f30910786759d593a9d8ee05b1b6846d1eb16c6d2e0c" + "2.10.4": + url: "https://github.com/pybind/pybind11/archive/v2.10.4.tar.gz" + sha256: "832e2f309c57da9c1e6d4542dedd34b24e4192ecb4d62f6f4866a737454c9970" + "2.10.1": + url: "https://github.com/pybind/pybind11/archive/v2.10.1.tar.gz" + sha256: "111014b516b625083bef701df7880f78c2243835abdb263065b6b59b960b6bad" + "2.10.0": + url: "https://github.com/pybind/pybind11/archive/v2.10.0.tar.gz" + sha256: "eacf582fa8f696227988d08cfc46121770823839fe9e301a20fbce67e7cd70ec" + "2.9.2": + url: "https://github.com/pybind/pybind11/archive/v2.9.2.tar.gz" + sha256: "6bd528c4dbe2276635dc787b6b1f2e5316cf6b49ee3e150264e455a0d68d19c1" + "2.9.1": + url: "https://github.com/pybind/pybind11/archive/v2.9.1.tar.gz" + sha256: "c6160321dc98e6e1184cc791fbeadd2907bb4a0ce0e447f2ea4ff8ab56550913" + "2.8.1": + url: "https://github.com/pybind/pybind11/archive/v2.8.1.tar.gz" + sha256: "f1bcc07caa568eb312411dde5308b1e250bd0e1bc020fae855bf9f43209940cc" + "2.7.1": + url: "https://github.com/pybind/pybind11/archive/v2.7.1.tar.gz" + sha256: "616d1c42e4cf14fa27b2a4ff759d7d7b33006fdc5ad8fd603bb2c22622f27020" + "2.6.2": + url: "https://github.com/pybind/pybind11/archive/v2.6.2.tar.gz" + sha256: "8ff2fff22df038f5cd02cea8af56622bc67f5b64534f1b83b9f133b8366acff2" + "2.6.1": + url: "https://github.com/pybind/pybind11/archive/v2.6.1.tar.gz" + sha256: "cdbe326d357f18b83d10322ba202d69f11b2f49e2d87ade0dc2be0c5c34f8e2a" + "2.6.0": + url: "https://github.com/pybind/pybind11/archive/v2.6.0.tar.gz" + sha256: "90b705137b69ee3b5fc655eaca66d0dc9862ea1759226f7ccd3098425ae69571" + "2.5.0": + url: "https://github.com/pybind/pybind11/archive/v2.5.0.tar.gz" + sha256: "97504db65640570f32d3fdf701c25a340c8643037c3b69aec469c10c93dc8504" + "2.4.3": + url: "https://github.com/pybind/pybind11/archive/v2.4.3.tar.gz" + sha256: "1eed57bc6863190e35637290f97a20c81cfe4d9090ac0a24f3bbf08f265eb71d" patches: # "2.12.0": # - patch_file: "patches/no-python-module.diff" diff --git a/packages/conan/recipes/pybind11/conanfile.py b/packages/conan/recipes/pybind11/conanfile.py index 21144ea6..c769fb62 100644 --- a/packages/conan/recipes/pybind11/conanfile.py +++ b/packages/conan/recipes/pybind11/conanfile.py @@ -1,18 +1,14 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b8bd958a29ef769d74a40471f1ada0426d1f8fff/recipes/pybind11/all/conanfile.py + from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain -from conan.tools.files import ( - apply_conandata_patches, - collect_libs, - copy, - export_conandata_patches, - get, - replace_in_file, - rm, - rmdir, -) from conan.tools.layout import basic_layout +from conan.tools.files import get, copy, rename, replace_in_file, rm, rmdir from conan.tools.scm import Version -from conans import tools import os @@ -22,120 +18,79 @@ class PyBind11Conan(ConanFile): name = "pybind11" description = "Seamless operability between C++11 and Python" - topics = "pybind11", "python", "binding" - homepage = "https://github.com/pybind/pybind11" license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/pybind/pybind11" + topics = ("pybind11", "python", "binding", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True def requirements(self): - self.requires( - f"python/{os.environ['ASWF_PYTHON_VERSION']}@{self.user}/{self.channel}" - ) - - def export_sources(self): - export_conandata_patches(self) + self.requires(f"cpython/{os.environ['ASWF_CPYTHON_VERSION']}@{self.user}/{self.channel}") def layout(self): basic_layout(self, src_folder="src") - # We want DSOs in lib64 + # ASWF: We want DSOs in lib64 self.cpp.package.libdirs = ["lib64"] + def package_id(self): + self.info.clear() + def source(self): - get( - self, - **self.conan_data["sources"][self.version], - destination=self.source_folder, - strip_root=True, - ) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) tc.variables["PYBIND11_INSTALL"] = True tc.variables["PYBIND11_TEST"] = False - # FIXME: does this belong here? - tc.variables["PYBIND11_CMAKECONFIG_INSTALL_DIR"] = os.path.join( - "lib64", "cmake", "pybind11" - ) - tc.variables["PYBIND11_PYTHON_VERSION"] = os.environ["ASWF_PYTHON_VERSION"] - # FIXME - # tc.variables["PYBIND11_FINDPYTHON"] = "ON" + # ASWF: Cmake modules in lib64 + tc.variables["PYBIND11_CMAKECONFIG_INSTALL_DIR"] = os.path.join("lib64", "cmake", "pybind11") + tc.variables["PYBIND11_PYTHON_VERSION"] = os.environ["ASWF_CPYTHON_VERSION"] tc.generate() - def _patch_sources(self): - apply_conandata_patches(self) - def build(self): - self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() def package(self): - copy( - self, - "LICENSE", - src=self.source_folder, - dst=os.path.join(self.package_folder, "licenses", self.name), - ) + # ASWF: prevent license files from overwritting each other when installing multiple packages + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) cmake = CMake(self) cmake.install() - # Don't remove cmake files for standalone cmake use + # ASWF: don't remove cmake files for standalone cmake use # for filename in ["pybind11Targets.cmake", "pybind11Config.cmake", "pybind11ConfigVersion.cmake"]: - # rm(self, filename, os.path.join(self.package_folder, "lib64", "cmake", "pybind11")) + # rm(self, filename, os.path.join(self.package_folder, "lib64", "cmake", "pybind11")) rmdir(self, os.path.join(self.package_folder, "share")) + # ASWF: stash unmodified copy of pybind11Common.cmake for builds outside Conan + rename(self, src=os.path.join(self.package_folder, "lib64", "cmake", "pybind11", "pybind11Common.cmake"), + dst=os.path.join(self.package_folder, "lib64", "cmake", "pybind11", "pybind11Common.cmake_NO_CONAN")) + copy(self, "pybind11Common.cmake", src=os.path.join(self.source_folder, "tools"), + dst=os.path.join(self.package_folder, "lib64", "cmake", "pybind11"), overwrite_equal = True, keep_path=False) + checked_target = "lto" if self.version < Version("2.11.0") else "pybind11" - - # FIXME Don't mess with cmake files? - replace_in_file( - self, - os.path.join( - self.package_folder, - "lib64", - "cmake", - "pybind11", - "pybind11Common.cmake", - ), - f"if(TARGET pybind11::{checked_target})", - "if(FALSE)", - ) - # FIXME: do we really want to not add_library()? - # replace_in_file(self, os.path.join(self.package_folder, "lib64", "cmake", "pybind11", "pybind11Common.cmake"), - # "add_library(", - # "# add_library(") - # FIXME? This should not be needed, CMake function names are case insensitive - # replace_in_file(self, os.path.join(self.package_folder, "lib64", "cmake", "pybind11", "pybind11NewTools.cmake"), - # "python_add_library(", - # "Python_add_library(") - # replace_in_file(self, os.path.join(self.package_folder, "lib64", "cmake", "pybind11", "pybind11NewTools.cmake"), - # "Development.Module OPTIONAL_COMPONENTS Development.Embed", - # "Development") - - def package_id(self): - self.info.clear() + # ASWF: CMake modules in lib64/cmake + replace_in_file(self, os.path.join(self.package_folder, "lib64", "cmake", "pybind11", "pybind11Common.cmake"), + f"if(TARGET pybind11::{checked_target})", + "if(FALSE)") + replace_in_file(self, os.path.join(self.package_folder, "lib64", "cmake", "pybind11", "pybind11Common.cmake"), + "add_library(", + "# add_library(") def package_info(self): + # ASWF: CMake modules in lib64/cmake cmake_base_path = os.path.join("lib64", "cmake", "pybind11") self.cpp_info.set_property("cmake_target_name", "pybind11_all_do_not_use") self.cpp_info.components["headers"].includedirs = ["include"] - self.cpp_info.components["pybind11_"].set_property( - "cmake_target_name", "pybind11::pybind11" - ) - self.cpp_info.components["pybind11_"].set_property( - "cmake_module_file_name", "pybind11" - ) - self.cpp_info.components["pybind11_"].names["cmake_find_package"] = "pybind11" + self.cpp_info.components["pybind11_"].set_property("cmake_target_name", "pybind11::pybind11") + self.cpp_info.components["pybind11_"].set_property("cmake_module_file_name", "pybind11") self.cpp_info.components["pybind11_"].builddirs = [cmake_base_path] self.cpp_info.components["pybind11_"].requires = ["headers"] cmake_file = os.path.join(cmake_base_path, "pybind11Common.cmake") self.cpp_info.set_property("cmake_build_modules", [cmake_file]) - for generator in ["cmake_find_package", "cmake_find_package_multi"]: - self.cpp_info.components["pybind11_"].build_modules[generator].append( - cmake_file - ) self.cpp_info.components["embed"].requires = ["pybind11_"] self.cpp_info.components["module"].requires = ["pybind11_"] self.cpp_info.components["python_link_helper"].requires = ["pybind11_"] @@ -145,9 +100,5 @@ def package_info(self): self.cpp_info.components["opt_size"].requires = ["pybind11_"] self.cpp_info.components["python2_no_register"].requires = ["pybind11_"] - self.env_info.CMAKE_PREFIX_PATH.append( - os.path.join(self.package_folder, "lib64", "cmake") - ) - - def deploy(self): - self.copy("*", symlinks=True) + # ASWF FIXME: do we need this? + self.env_info.CMAKE_PREFIX_PATH.append(os.path.join(self.package_folder, "lib64", "cmake")) diff --git a/packages/conan/recipes/pybind11/test_package/CMakeLists.txt b/packages/conan/recipes/pybind11/test_package/CMakeLists.txt new file mode 100644 index 00000000..51a2c5d5 --- /dev/null +++ b/packages/conan/recipes/pybind11/test_package/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/59cab50aa90f922e61a746eef7c488dd788e4989/recipes/pybind11/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(Python3 COMPONENTS Interpreter Development) +find_package(pybind11 REQUIRED CONFIG) + +pybind11_add_module(test_package MODULE test_package.cpp) +set_property(TARGET test_package PROPERTY CXX_STANDARD 11) diff --git a/packages/conan/recipes/pybind11/test_package/conanfile.py b/packages/conan/recipes/pybind11/test_package/conanfile.py new file mode 100644 index 00000000..57161ba3 --- /dev/null +++ b/packages/conan/recipes/pybind11/test_package/conanfile.py @@ -0,0 +1,59 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/59cab50aa90f922e61a746eef7c488dd788e4989/recipes/pybind11/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import Environment, VirtualRunEnv +from conan.tools.build import can_run + +import os +from pathlib import PurePath +import sys + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def generate(self): + deps = CMakeDeps(self) + deps.generate() + + toolchain = CMakeToolchain(self) + # Used by FindPython.cmake in CMake + toolchain.variables["Python_EXECUTABLE"] = PurePath(self._python_interpreter).as_posix() + # Used by FindPythonLibsNew.cmake in pybind11 + toolchain.variables["PYTHON_EXECUTABLE"] = PurePath(self._python_interpreter).as_posix() + toolchain.generate() + + env = Environment() + env.append_path("PYTHONPATH", os.path.join(self.build_folder, self.cpp.build.libdirs[0])) + env.vars(self, scope="run").save_script("testrun") + + run = VirtualRunEnv(self) + run.generate() + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + @property + def _python_interpreter(self): + if getattr(sys, "frozen", False): + return "python" + return sys.executable + + def test(self): + if can_run(self): + module_path = os.path.join(self.source_folder, "test.py") + self.run(f"{self._python_interpreter} \"{module_path}\"", env="conanrun") diff --git a/packages/conan/recipes/pybind11/test_package/test.py b/packages/conan/recipes/pybind11/test_package/test.py new file mode 100644 index 00000000..54d51e51 --- /dev/null +++ b/packages/conan/recipes/pybind11/test_package/test.py @@ -0,0 +1,11 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/59cab50aa90f922e61a746eef7c488dd788e4989/recipes/pybind11/all/test_package/test.py + +import test_package + +print("Adding 2 + 3 = {}".format(test_package.add(2, 3))) + +print("Message: '{}'".format(test_package.msg())) diff --git a/packages/conan/recipes/pybind11/test_package_DISABLE/test_package.cpp b/packages/conan/recipes/pybind11/test_package/test_package.cpp similarity index 52% rename from packages/conan/recipes/pybind11/test_package_DISABLE/test_package.cpp rename to packages/conan/recipes/pybind11/test_package/test_package.cpp index 3c603471..b08f65d1 100644 --- a/packages/conan/recipes/pybind11/test_package_DISABLE/test_package.cpp +++ b/packages/conan/recipes/pybind11/test_package/test_package.cpp @@ -1,3 +1,11 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/59cab50aa90f922e61a746eef7c488dd788e4989/recipes/pybind11/all/test_package/test_package.cpp +*/ + #include static int add(int i, int j) { diff --git a/packages/conan/recipes/pybind11/test_package_DISABLE/CMakeLists.txt b/packages/conan/recipes/pybind11/test_package_DISABLE/CMakeLists.txt deleted file mode 100644 index b9b68720..00000000 --- a/packages/conan/recipes/pybind11/test_package_DISABLE/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -cmake_minimum_required(VERSION 3.27) -project(test_package CXX) -find_package(Python COMPONENTS Interpreter Development REQUIRED) -find_package(pybind11 CONFIG REQUIRED) -#if(NOT COMMAND pybind11_add_module) -#foreach(INCDIR IN LISTS pybind11_INCLUDE_DIRS) -# if(EXISTS "${INCDIR}/../lib64/cmake/pybind11/pybind11NewTools.cmake") -# include("${INCDIR}/../lib64/cmake/pybind11/pybind11Config.cmake") -# -# include("${INCDIR}/../lib64/cmake/pybind11/pybind11Common.cmake") -# include("${INCDIR}/../lib64/cmake/pybind11/pybind11NewTools.cmake") -# break() -# elseif(EXISTS "${INCDIR}/../../lib64/cmake/pybind11/pybindNew11Tools.cmake") -# include("${INCDIR}/../../lib64/cmake/pybind11/pybind11Config.cmake") -# include("${INCDIR}/../../lib64/cmake/pybind11/pybind11Common.cmake") -# include("${INCDIR}/../../lib64/cmake/pybind11/pybind11NewTools.cmake") -# break() -# endif() -#endforeach() -#endif() -pybind11_add_module(test_package MODULE test_package.cpp) -set_property(TARGET test_package PROPERTY CXX_STANDARD 17) diff --git a/packages/conan/recipes/pybind11/test_package_DISABLE/conanfile.py b/packages/conan/recipes/pybind11/test_package_DISABLE/conanfile.py deleted file mode 100644 index 0d6c55af..00000000 --- a/packages/conan/recipes/pybind11/test_package_DISABLE/conanfile.py +++ /dev/null @@ -1,91 +0,0 @@ -from conan import ConanFile -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.env import Environment, VirtualRunEnv -from conan.tools.build import can_run - -import os -from pathlib import PurePath -import sys - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - test_type = "explicit" - - def requirements(self): - self.requires(self.tested_reference_str) - self.requires( - f"python/{os.environ['ASWF_PYTHON_VERSION']}@{self.user}/{self.channel}" - ) - - def generate(self): - deps = CMakeDeps(self) - deps.generate() - - toolchain = CMakeToolchain(self) - # Used by FindPython.cmake in CMake - # toolchain.variables["Python_EXECUTABLE"] = PurePath( - # self._python_interpreter - # ).as_posix() - # Used by FindPythonLibsNew.cmake in pybind11 - # FIXME toolchain.variables["PYTHON_EXECUTABLE"] = PurePath( - # self._python_interpreter - # ).as_posix() - # toolchain.variables["Python_INCLUDE_DIRS"] = self.deps_cpp_info[ - # "python" - # ].include_paths[0] - # FIXME toolchain.variables["PYTHON_INCLUDE_DIRS"] = self.deps_cpp_info[ - # "python" - # ].include_paths[0] - # toolchain.variables["Python_LIBRARY_DIR"] = self.deps_cpp_info["python"].lib_paths[0] - # FIXME toolchain.variables["PYTHON_LIBRARIES"] = self.deps_cpp_info[ - # "python" - # ].lib_paths[0] - - # Used by FindPython.cmake in CMake - toolchain.variables["Python_EXECUTABLE"] = PurePath( - self._python_interpreter - ).as_posix() - # Used by FindPythonLibsNew.cmake in pybind11 - toolchain.variables["PYTHON_EXECUTABLE"] = PurePath( - self._python_interpreter - ).as_posix() - - # FIXME: we shouldn't need the following two - # FIXME 2024-06-23: let CMake find python? - # toolchain.variables["PYBIND11_FINDPYTHON"] = "ON" - toolchain.variables["CMAKE_FIND_DEBUG_MODE"] = "ON" - toolchain.generate() - - env = Environment() - # FIXME - env.append_path( - "PYTHONPATH", os.path.join(self.build_folder, self.cpp.build.libdirs[0]) - ) - env.vars(self, scope="run").save_script("testrun") - - run = VirtualRunEnv(self) - run.generate() - - def layout(self): - cmake_layout(self) - - def build(self): - cmake = CMake(self) - cmake.configure() - # FIXME - cmake.build(cli_args=["--verbose"]) - - @property - def _python_interpreter(self): - return os.path.join( - self.deps_cpp_info["python"].bin_paths[0], - self.deps_user_info["python"].python_interp, - ) - - def test(self): - if can_run(self): - module_path = os.path.join(self.source_folder, "test.py") - # FIXME: gross hack, how do we get DSO to have right name? - self.run("mv test_package.cpython-39-x86_64-linux-gnu.so test_package.so") - self.run(f'{self._python_interpreter} "{module_path}"', env="conanrun") diff --git a/packages/conan/recipes/pybind11/test_package_DISABLE/test.py b/packages/conan/recipes/pybind11/test_package_DISABLE/test.py deleted file mode 100644 index 9b04318a..00000000 --- a/packages/conan/recipes/pybind11/test_package_DISABLE/test.py +++ /dev/null @@ -1,5 +0,0 @@ -import test_package - -print("Adding 2 + 3 = {}".format(test_package.add(2, 3))) - -print("Message: '{}'".format(test_package.msg())) diff --git a/packages/conan/recipes/pyside/conandata.yml b/packages/conan/recipes/pyside/conandata.yml index 76b69256..320d34fb 100644 --- a/packages/conan/recipes/pyside/conandata.yml +++ b/packages/conan/recipes/pyside/conandata.yml @@ -11,6 +11,9 @@ sources: "6.5.3": url: "https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-6.5.3-src/pyside-setup-everywhere-src-6.5.3.tar.xz" sha256: "6606b1634fb2981f9ca7ce2e206cc92c252401de328df4ce23f63e8c998de8d3" + "6.5.4": + url: "https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-6.5.4-src/pyside-setup-opensource-src-6.5.4.tar.xz" + sha256: "1bd5e63bede4ac2930579abd09a2803f8a508693d210c77efe7e838c8da360ae" patches: "5.12.6": # typing-patch.zip from https://codereview.qt-project.org/changes/pyside%2Fpyside-setup~271412/revisions/4/patch?zip @@ -22,3 +25,14 @@ patches: "5.15.9": - patch_file: "patches/shiboken_numpy_1_23.diff" base_path: "source_subfolder" + "6.5.4": + - patch_file: "patches/shiboken_sbkcontainer.diff" + base_path: "pyside_src" + - patch_file: "patches/clang_in_lib64.diff" + base_path: "pyside_src" + - patch_file: "patches/pyside_in_lib64.diff" + base_path: "pyside_src" + - patch_file: "patches/shiboken_in_lib64.diff" + base_path: "pyside_src" + - patch_file: "patches/pyside_pysidesignal.diff" + base_path: "pyside_src" diff --git a/packages/conan/recipes/pyside/conanfile.py b/packages/conan/recipes/pyside/conanfile.py index 0dba7663..c55ba6fc 100644 --- a/packages/conan/recipes/pyside/conanfile.py +++ b/packages/conan/recipes/pyside/conanfile.py @@ -5,11 +5,13 @@ import sys import glob import shutil +import platform -from conans import ConanFile, tools -from conans.model.version import Version -from conans.errors import ConanException -from conan.tools.files import get, apply_conandata_patches +from conan import ConanFile +from conan.tools.env import Environment +from conan.tools.scm import Version +from conan.errors import ConanException +from conan.tools.files import copy, get, export_conandata_patches, apply_conandata_patches class PySide6Conan(ConanFile): @@ -44,13 +46,11 @@ def _useOpenGLBackend(self): return self.options.GLBackend == "OpenGL" def requirements(self): - self.requires( - f"python/{os.environ['ASWF_PYTHON_VERSION']}@{self.user}/{self.channel}" - ) + self.requires(f"cpython/{os.environ['ASWF_CPYTHON_VERSION']}@{self.user}/{self.channel}") self.requires(f"qt/{os.environ['ASWF_QT_VERSION']}@{self.user}/{self.channel}") - self.requires( - f"clang/{os.environ['ASWF_PYSIDE_CLANG_VERSION']}@{self.user}/ci_common{os.environ['CI_COMMON_VERSION']}" - ) + self.requires(f"clang/{os.environ['ASWF_PYSIDE_CLANG_VERSION']}@{self.user}/ci_common{os.environ['CI_COMMON_VERSION']}") + self.requires(f"md4c/{os.environ['ASWF_MD4C_VERSION']}@{self.user}/{self.channel}") + self.requires(f"freetype/{os.environ['ASWF_FREETYPE_VERSION']}@{self.user}/{self.channel}") # Avoid Qt picking up older system freetype libs def build_requirements(self): self.tool_requires( @@ -66,6 +66,9 @@ def build_requirements(self): if self.settings.os == "Windows": self.tool_requires(f"pyside-shiboken/{self.version}") + def export_sources(self): + export_conandata_patches(self) + def configure(self): # self.options["qt"].with_webengine = False # self.options["qt"].with_vulkan = True @@ -77,7 +80,7 @@ def _checkout_folder(self): def source(self): destination = os.path.join(self.source_folder, self._checkout_folder) - if self.info.settings.os == "Windows": + if platform.system() == "Windows": # Don't use os.path.join, or it removes the \\?\ prefix, which enables long paths destination = rf"\\?\{self.source_folder}" get( @@ -113,7 +116,7 @@ def _set_r_paths(self, binaries, rpath=""): if rpath != "": rpath = "/" + rpath # Assume installed on system - # patchelfPath = os.path.join(self.deps_cpp_info["patchelf"].bin_paths[0], "patchelf") + # patchelfPath = os.path.join(self.dependencies["patchelf"].cpp_info.bin_paths[0], "patchelf") patchelfPath = "/usr/bin/patchelf" for bin in binaries: self.run(f"{patchelfPath} --set-rpath \$ORIGIN{rpath} {bin}") @@ -147,7 +150,7 @@ def _buildCommand(self, pythonBinPath, srcDir, qmakePath): "--make-spec", "ninja", "--parallel", - str(tools.cpu_count()), + str(os.cpu_count()), "--ignore-git", "--reuse-build", ] @@ -156,28 +159,36 @@ def _buildCommand(self, pythonBinPath, srcDir, qmakePath): return " ".join(args) def _buildLinux(self, srcDir): - qtInfo = self.deps_cpp_info["qt"] - qtBinPath = qtInfo.bin_paths[0] + qtInfo = self.dependencies["qt"] + qtBinPath = qtInfo.cpp_info.bindirs[0] qmakePath = os.path.join(qtBinPath, "qtpaths6") - llvmInfo = self.deps_cpp_info["clang"] + llvmInfo = self.dependencies["clang"] - pythonInfo = self.deps_cpp_info["python"] + pythonInfo = self.dependencies["cpython"] pythonBinPath = os.path.join( - pythonInfo.bin_paths[0], self.deps_user_info["python"].python_interp + pythonInfo.package_folder, + pythonInfo.cpp_info.bindirs[0], + "python" ) # Shiboken finds the C++ includes from gcc-toolset but fails to add C includes, # so cstddef doesn't find stddef.h for instance. # This is not elegant but not clear how to do it differetly. - env = { - "LLVM_INSTALL_DIR": llvmInfo.rootpath, - "LD_LIBRARY_PATH": pythonInfo.lib_paths, - "CMAKE_PREFIX_PATH": qtInfo.rootpath, - "CPATH": f"/opt/rh/gcc-toolset-{os.environ['ASWF_DTS_VERSION']}/root/usr/lib/gcc/x86_64-redhat-linux/{os.environ['ASWF_DTS_VERSION']}/include", - } - - with tools.environment_append(env): + + env = Environment() + env.define("LLVM_INSTALL_DIR", llvmInfo.package_folder) + env.define("LD_LIBRARY_PATH", pythonInfo.cpp_info.libdirs[0]) + # Something in Qt depends on md4c and freetype. This should be fixed in Qt package. + md4cInfo = self.dependencies["md4c"] + env.append("LD_LIBRARY_PATH", md4cInfo.cpp_info.libdirs[0],separator=':') + freetypeInfo = self.dependencies["freetype"] + env.append("LD_LIBRARY_PATH", freetypeInfo.cpp_info.libdirs[0],separator=':') + env.define("CMAKE_PREFIX_PATH", f"{qtInfo.package_folder}:{llvmInfo.package_folder}") + env.define("CPATH", f"/opt/rh/gcc-toolset-{os.environ['ASWF_DTS_VERSION']}/root/usr/lib/gcc/x86_64-redhat-linux/{os.environ['ASWF_DTS_VERSION']}/include") + env_vars = env.vars(self) + + with env_vars.apply(): buildCmd = self._buildCommand(pythonBinPath, srcDir, qmakePath) self.run(buildCmd) @@ -188,44 +199,45 @@ def _buildLinux(self, srcDir): # Copy the shared libraries shiboken needs to be able to run into the package for lib in ("Core", "Gui", "Network", "OpenGL", "Widgets", "Xml"): for f in glob.glob( - os.path.join(qtInfo.rootpath, "lib", f"libQt6{lib}.so*") + os.path.join(qtInfo.package_folder, "lib64", f"libQt6{lib}.so*") ): shutil.copy(f, installBinDir, follow_symlinks=False) for f in glob.glob( - os.path.join(llvmInfo.rootpath, "lib64", "libclang.so*") + os.path.join(llvmInfo.package_folder, "lib64", "libclang.so*") ): shutil.copy(f, installBinDir, follow_symlinks=False) def _buildMac(self, srcDir): - qtInfo = self.deps_cpp_info["qt"] - qtBinPath = qtInfo.bin_paths[0] + qtInfo = self.dependencies["qt"] + qtBinPath = qtInfo.cpp_info.bin_paths[0] qmakePath = os.path.join(qtBinPath, "qtpaths6") - llvmInfo = self.deps_cpp_info["clang"] + llvmInfo = self.dependencies["clang"] - pythonInfo = self.deps_cpp_info["python"] + pythonInfo = self.dependencies["cpython"] pythonBinPath = os.path.join( - pythonInfo.bin_paths[0], self.deps_user_info["python"].python_interp + pythonInfo.cpp_info.bin_paths[0], self.dependencies["cpython"].conf_info.python_interp ) - env = { - "LLVM_INSTALL_DIR": llvmInfo.rootpath, - "CMAKE_PREFIX_PATH": pythonInfo.rootpath, - "CXXFLAGS": f"-I{pythonInfo.include_paths[0]}", - } + env = Environment() + env.define("LLVM_INSTALL_DIR", llvmInfo.package_folder) + env.define("CMAKE_PREFIX_PATH", f"{qtInfo.package_folder}:{llvmInfo.package_folder}") + env.defiine("CXXFLAGS", f"-I{pythonInfo.cpp_info.includedirs[0]}") + env_vars = env.vars(self) - with tools.environment_append(env): + with env_vars.apply(): buildCmd = self._buildCommand(pythonBinPath, srcDir, qmakePath) self.run(buildCmd) def _buildWindows(self, srcDir): - qtInfo = self.deps_cpp_info["qt"] - qtBinPath = qtInfo.bin_paths[0] + qtInfo = self.dependencies["qt"] + qtBinPath = qtInfo.cpp_info.bin_paths[0] qmakePath = os.path.join(qtBinPath, "qtpaths6.exe") - llvmInfo = self.deps_cpp_info["clang"] + + llvmInfo = self.dependencies["clang"] pythonBinPath = os.path.join( - self.pythonLocalRoot, "bin", self.deps_user_info["python"].python_interp + self.pythonLocalRoot, "bin", self.dependencies["cpython"].conf_info.python_interp ) # from Python 3.8 DLL loading is more restrictive, disallowing PATH, see https://bugs.python.org/issue43173 @@ -233,14 +245,14 @@ def _buildWindows(self, srcDir): os.add_dll_directory(qtBinPath) os.environ["PATH"] += os.pathsep + qtBinPath - env = { - "LLVM_INSTALL_DIR": llvmInfo.rootpath, - "CMAKE_PREFIX_PATH": self.pythonLocalRoot, - "CC": "cl.exe", # pick up MSVC rather than clang from LLVM - "CXX": "cl.exe", - } + env = Environment() + env.define("LLVM_INSTALL_DIR", llvmInfo.package_folder) + env.define("CMAKE_PREFIX_PATH", f"{qtInfo.package_folder}:{llvmInfo.package_folder}") + env.define("CC", "cl.exe") # pic up MSVC rather than clang from LLVM + env.define("CXX", "cl.exe") + env_vars = env.vars(self) - with tools.environment_append(env): + with env_vars.apply(): # don't run the full build in one go, as that fails in Debug builds due to a stack overflow # in (Debug) libclang while running shiboken - bring in a release build of shiboken to build PySide6 # seems to be related to https://bugreports.qt.io/browse/PYSIDE-739 @@ -248,9 +260,9 @@ def _buildWindows(self, srcDir): buildCmd = self._buildCommand(pythonBinPath, srcDir, qmakePath) self.run(buildCmd + " --build-type=shiboken") - shibokenInfo = self.deps_cpp_info["pyside-shiboken"] + shibokenInfo = self.dependencies["pyside-shiboken"] installBinDir = os.path.join(self._installDir, "bin") - for f in glob.glob(os.path.join(shibokenInfo.rootpath, "bin", "*")): + for f in glob.glob(os.path.join(shibokenInfo.package_folder, "bin", "*")): shutil.copy(f, installBinDir) self.run(buildCmd + " --build-type=pyside") @@ -268,9 +280,9 @@ def build(self): @property def _installDir(self): - pythonVersion = tools.Version(self.deps_cpp_info["python"].version) + pythonVersion = Version(self.dependencies["cpython"].ref.version) pythonVersionMajorMinor = f"{pythonVersion.major}.{pythonVersion.minor}" - qtVersion = self.deps_cpp_info["qt"].version + qtVersion = self.dependencies["qt"].ref.version src_dir = os.path.join(self.source_folder, self._checkout_folder) @@ -300,18 +312,18 @@ def _configure_package_mac(self): for lib in ("Core", "Gui", "Network", "OpenGL", "Qml", "Widgets", "Xml"): framework = f"Qt{lib}.framework" self.copy( - src=os.path.join(self.deps_cpp_info["qt"].lib_paths[0], framework), + src=os.path.join(self.dependencies["qt"].cpp_info.lib_paths[0], framework), pattern="*", dst=f"bin/{framework}", ) self.copy( - src=os.path.join(self.deps_cpp_info["qt"].lib_paths[0], framework), + src=os.path.join(self.dependencies["qt"].cpp_info.lib_paths[0], framework), pattern="*", - dst=f"lib/{framework}", + dst=f"lib64/{framework}", ) self.copy( - src=os.path.join(self.deps_cpp_info["clang"].rootpath, "lib"), + src=os.path.join(self.dependencies["clang"].package_folder, "lib64"), pattern="libclang.dylib", dst="bin", ) @@ -324,13 +336,13 @@ def _getFilesByExt(searchDir, ext): files.append(fullFilePath) return files - libDir = os.path.join(self.package_folder, "lib") + libDir = os.path.join(self.package_folder, "lib64") libs = _getFilesByExt(libDir, ".dylib") # self._set_r_paths(libs, '@loader_path/../bin') - v = tools.Version(self.deps_cpp_info["python"].version) + v = Version(self.dependencies["cpython"].ref.version) sitePkgDir = os.path.join( - self.package_folder, f"lib/python{v.major}.{v.minor}/site-packages" + self.package_folder, f"lib64/python{v.major}.{v.minor}/site-packages" ) libDir = os.path.join(self.package_folder, sitePkgDir, "shiboken") @@ -343,8 +355,8 @@ def _getFilesByExt(searchDir, ext): # self._set_r_paths(libs, '@loader_path/../../../../bin') def package(self): - self.copy(pattern="*", src=self._installDir, symlinks=True) - self.copy(pattern="*", src="cmake", dst="cmake") + copy(self,pattern="*", src=self._installDir, dst=self.package_folder ) + # copy(self,pattern="*", src="cmake", dst="cmake") if self.settings.os == "Macos": self._configure_package_mac() @@ -357,20 +369,15 @@ def package(self): # let Conan install the right dependencies # # if self.settings.os == "Linux": - # self.copy( - # pattern="*", src=self.deps_cpp_info["clang"].rootpath, dst="clang" - # ) + # copy(self,pattern="*", src=self.deps_cpp_info["clang"].package_folder, dst="clang") def package_info(self): - v = tools.Version(self.deps_cpp_info["python"].version) + v = Version(self.dependencies["cpython"].ref.version) if self.settings.os == "Windows": self.user_info.site_package = os.path.join( - self.package_folder, "lib/site-packages" + self.package_folder, "lib64/site-packages" ) else: self.user_info.site_package = os.path.join( - self.package_folder, f"lib/python{v.major}.{v.minor}/site-packages" + self.package_folder, f"lib64/python{v.major}.{v.minor}/site-packages" ) - - def deploy(self): - self.copy("*", symlinks=True) diff --git a/packages/conan/recipes/pyside/patches/clang_in_lib64.diff b/packages/conan/recipes/pyside/patches/clang_in_lib64.diff new file mode 100644 index 00000000..7bd5c338 --- /dev/null +++ b/packages/conan/recipes/pyside/patches/clang_in_lib64.diff @@ -0,0 +1,13 @@ +diff --git a/sources/shiboken6/ApiExtractor/clangparser/compilerSupport.cpp b/sources/shiboken6/ApiExtractor/clangparser/compilerSupport.cpp +index 996968f..a072dfd 100644 +--- a/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp ++++ b/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp +@@ -261,7 +261,7 @@ + { + for (const char *envVar : {"LLVM_INSTALL_DIR", "CLANG_INSTALL_DIR"}) { + if (qEnvironmentVariableIsSet(envVar)) { +- const QString path = QFile::decodeName(qgetenv(envVar)) + u"/lib"_s; ++ const QString path = QFile::decodeName(qgetenv(envVar)) + u"/lib64"_s; + if (QFileInfo::exists(path)) + return path; + qWarning("%s: %s as pointed to by %s does not exist.", __FUNCTION__, qPrintable(path), envVar); diff --git a/packages/conan/recipes/pyside/patches/pyside_in_lib64.diff b/packages/conan/recipes/pyside/patches/pyside_in_lib64.diff new file mode 100644 index 00000000..6af359b8 --- /dev/null +++ b/packages/conan/recipes/pyside/patches/pyside_in_lib64.diff @@ -0,0 +1,13 @@ +diff --git a/sources/pysides6/cmake/PySideSetup.cmake b/sources/pyside6/cmake/PySideSetup.cmake +index 996968f..a072dfd 100644 +--- a/sources/pyside6/cmake/PySideSetup.cmake ++++ b/sources/pyside6/cmake/PySideSetup.cmake +@@ -99,7 +99,7 @@ + + option(BUILD_TESTS "Build tests." TRUE) + option(ENABLE_VERSION_SUFFIX "Used to use current version in suffix to generated files. This is used to allow multiples versions installed simultaneous." FALSE) +-set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) ++set(LIB_SUFFIX "64" CACHE STRING "Define suffix of directory name (32/64)" ) + set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE) + if(CMAKE_HOST_APPLE) + set(ALTERNATIVE_QT_INCLUDE_DIR "" CACHE PATH "Deprecated. CMake now finds the proper include dir itself.") diff --git a/packages/conan/recipes/pyside/patches/pyside_pysidesignal.diff b/packages/conan/recipes/pyside/patches/pyside_pysidesignal.diff new file mode 100644 index 00000000..42d8c2d5 --- /dev/null +++ b/packages/conan/recipes/pyside/patches/pyside_pysidesignal.diff @@ -0,0 +1,39 @@ +diff --git a/sources/pyside6/libpyside/pysidesignal.cpp b/sources/pyside6/libpyside/pysidesignal.cpp +index 996968f..a072dfd 100644 +--- a/sources/pyside6/libpyside/pysidesignal.cpp ++++ b/sources/pyside6/libpyside/pysidesignal.cpp +@@ -8,6 +8,7 @@ + #include "pysidestaticstrings.h" + #include "pysideweakref.h" + #include "signalmanager.h" ++#include "pysideqobject.h" + + #include + +@@ -799,7 +800,7 @@ + + for (Py_ssize_t idx = 0; idx < n; idx++) { + auto *sub_type = reinterpret_cast(PyTuple_GET_ITEM(mro, idx)); +- AutoDecRef tpDict(PepType_GetDict(sub_type)); ++ Shiboken::AutoDecRef tpDict(PepType_GetDict(sub_type)); + auto *hom = PyDict_GetItem(tpDict, name); + PyObject *realFunc{}; + if (hom && PyCallable_Check(hom) && (realFunc = _getRealCallable(hom))) +@@ -909,7 +910,7 @@ + Py_ssize_t pos = 0; + PyObject *key, *value; + auto *type = reinterpret_cast(mroItem.object()); +- AutoDecRef tpDict(PepType_GetDict(type)); ++ Shiboken::AutoDecRef tpDict(PepType_GetDict(type)); + while (PyDict_Next(tpDict, &pos, &key, &value)) { + if (PyObject_TypeCheck(value, PySideSignal_TypeF())) { + // PYSIDE-1751: We only insert an instance into the instance dict, if a signal +@@ -1118,7 +1119,7 @@ + + static void _addSignalToWrapper(PyTypeObject *wrapperType, const char *signalName, PySideSignal *signal) + { +- AutoDecRef tpDict(PepType_GetDict(wrapperType)); ++ Shiboken::AutoDecRef tpDict(PepType_GetDict(wrapperType)); + auto typeDict = tpDict.object(); + PyObject *homonymousMethod; + if ((homonymousMethod = PyDict_GetItemString(typeDict, signalName))) { diff --git a/packages/conan/recipes/pyside/patches/shiboken_in_lib64.diff b/packages/conan/recipes/pyside/patches/shiboken_in_lib64.diff new file mode 100644 index 00000000..b5857fa8 --- /dev/null +++ b/packages/conan/recipes/pyside/patches/shiboken_in_lib64.diff @@ -0,0 +1,13 @@ +diff --git a/sources/shiboken6/cmake/ShibokenSetup.cmake b/sources/shiboken6/cmake/ShibokenSetup.cmake +index 996968f..a072dfd 100644 +--- a/sources/shiboken6/cmake/ShibokenSetup.cmake ++++ b/sources/shiboken6/cmake/ShibokenSetup.cmake +@@ -92,7 +92,7 @@ + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + +-set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) ++set(LIB_SUFFIX "64" CACHE STRING "Define suffix of directory name (32/64)" ) + set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install \ + prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE) + set(BIN_INSTALL_DIR "bin" CACHE PATH "The subdirectory relative to the install prefix where \ diff --git a/packages/conan/recipes/pyside/patches/shiboken_sbkcontainer.diff b/packages/conan/recipes/pyside/patches/shiboken_sbkcontainer.diff new file mode 100644 index 00000000..596b49fc --- /dev/null +++ b/packages/conan/recipes/pyside/patches/shiboken_sbkcontainer.diff @@ -0,0 +1,12 @@ +diff --git a/sources/shiboken6/libshiboken/sbkcontainer.cpp b/sources/shiboken6/libshiboken/sbkcontainer.cpp +index 996968f..a072dfd 100644 +--- a/sources/shiboken6/libshiboken/sbkcontainer.cpp ++++ b/sources/shiboken6/libshiboken/sbkcontainer.cpp +@@ -3,6 +3,7 @@ + + #include "sbkcontainer.h" + #include "sbkstaticstrings.h" ++#include "autodecref.h" + + namespace Shiboken + { diff --git a/packages/conan/recipes/pystring/CMakeLists.txt b/packages/conan/recipes/pystring/CMakeLists.txt new file mode 100644 index 00000000..bfbccdca --- /dev/null +++ b/packages/conan/recipes/pystring/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/pystring/all/CMakeLists.txt + +cmake_minimum_required(VERSION 3.4) + +project(pystring LANGUAGES CXX) + +include(GNUInstallDirs) + +add_library(pystring ${PYSTRING_SRC_DIR}/pystring.cpp) +set_property(TARGET pystring PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + +install(TARGETS pystring + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + +install(FILES ${PYSTRING_SRC_DIR}/pystring.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/packages/conan/recipes/pystring/conandata.yml b/packages/conan/recipes/pystring/conandata.yml new file mode 100644 index 00000000..70146690 --- /dev/null +++ b/packages/conan/recipes/pystring/conandata.yml @@ -0,0 +1,13 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/pystring/all/conandata.yml + +sources: + "1.1.4": + url: "https://github.com/imageworks/pystring/archive/refs/tags/v1.1.4.tar.gz" + sha256: "49da0fe2a049340d3c45cce530df63a2278af936003642330287b68cefd788fb" + "1.1.3": + url: "https://github.com/imageworks/pystring/archive/refs/tags/v1.1.3.tar.gz" + sha256: "358a56e756e701836b69a31c75d3d9d41c34d447cf7b3775bbd5620dcd3203d9" diff --git a/packages/conan/recipes/pystring/conanfile.py b/packages/conan/recipes/pystring/conanfile.py new file mode 100644 index 00000000..483df90c --- /dev/null +++ b/packages/conan/recipes/pystring/conanfile.py @@ -0,0 +1,69 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/pystring/all/conanfile.py + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get +import os + +required_conan_version = ">=1.53.0" + + +class PystringConan(ConanFile): + name = "pystring" + description = "Pystring is a collection of C++ functions which match the " \ + "interface and behavior of python's string class methods using std::string." + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/imageworks/pystring" + topics = ("python", "string") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + exports_sources = "CMakeLists.txt" + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["PYSTRING_SRC_DIR"] = self.source_folder.replace("\\", "/") + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + cmake.build() + + def package(self): + # ASWF: licenses in package subdirectories + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["pystring"] diff --git a/packages/conan/recipes/pystring/test_package/CMakeLists.txt b/packages/conan/recipes/pystring/test_package/CMakeLists.txt new file mode 100644 index 00000000..3d25d72f --- /dev/null +++ b/packages/conan/recipes/pystring/test_package/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/pystring/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES CXX) + +find_package(pystring REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE pystring::pystring) diff --git a/packages/conan/recipes/pystring/test_package/conanfile.py b/packages/conan/recipes/pystring/test_package/conanfile.py new file mode 100644 index 00000000..8d3d88ce --- /dev/null +++ b/packages/conan/recipes/pystring/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/pystring/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/pystring/test_package/test_package.cpp b/packages/conan/recipes/pystring/test_package/test_package.cpp new file mode 100644 index 00000000..41fdda91 --- /dev/null +++ b/packages/conan/recipes/pystring/test_package/test_package.cpp @@ -0,0 +1,16 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/pystring/all/test_package/test_package.cpp +*/ + +#include + +#include + +int main() { + std::cout << pystring::capitalize("conan-center-index") << std::endl; + return 0; +} diff --git a/packages/conan/recipes/python/conandata.yml b/packages/conan/recipes/python/conandata.yml deleted file mode 100644 index 6fc58730..00000000 --- a/packages/conan/recipes/python/conandata.yml +++ /dev/null @@ -1,26 +0,0 @@ -sources: - 2.7.15: - url: "https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgz" - sha256: "18617d1f15a380a919d517630a9cd85ce17ea602f9bbdc58ddc672df4b0239db" - 3.7.3: - url: "https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz" - sha256: "d62e3015f2f89c970ac52343976b406694931742fbde2fed8d1ce8ebb4e1f8ff" - 3.7.9: - url: "https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tgz" - sha256: "39b018bc7d8a165e59aa827d9ae45c45901739b0bbb13721e4f973f3521c166a" - 3.9.15: - url: "https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz" - sha256: "48d1ccb29d5fbaf1fb8f912271d09f7450e426d4dfe95978ef6aaada70ece4d8" - 3.10.11: - url: "https://www.python.org/ftp/python/3.10.11/Python-3.10.11.tgz" - sha256: "f3db31b668efa983508bd67b5712898aa4247899a346f2eb745734699ccd3859" - 3.11.8: - url: "https://www.python.org/ftp/python/3.11.8/Python-3.11.8.tgz" - sha256: "d3019a613b9e8761d260d9ebe3bd4df63976de30464e5c0189566e1ae3f61889" - 3.11.9: - url: "https://www.python.org/ftp/python/3.11.9/Python-3.11.9.tgz" - sha256: "e7de3240a8bc2b1e1ba5c81bf943f06861ff494b69fda990ce2722a504c6153d" - 3.11.10: - url: "https://www.python.org/ftp/python/3.11.10/Python-3.11.10.tgz" - sha256: "92f2faf242681bfa406d53a51e17d42c5373affe23a130cd9697e132ef574706" -patches: diff --git a/packages/conan/recipes/python/conanfile.py b/packages/conan/recipes/python/conanfile.py deleted file mode 100644 index 07fb8dec..00000000 --- a/packages/conan/recipes/python/conanfile.py +++ /dev/null @@ -1,266 +0,0 @@ -from conans import AutoToolsBuildEnvironment, ConanFile, tools -from contextlib import contextmanager -from conan.tools.files.symlinks import absolute_to_relative_symlinks -from conan.tools.files import ( - apply_conandata_patches, - collect_libs, - copy, - export_conandata_patches, - get, - rmdir, -) -from jinja2 import Environment, FileSystemLoader - -from semver import SemVer -import os -import sysconfig -import re - - -class PythonConan(ConanFile): - name = "python" - description = "Python is a programming language that lets you work quickly and integrate systems more effectively." - topics = ("conan", "python") - license = "Python (PSF-2.0 license) and numpy (BSD-3-Clause license)" - homepage = "https://python.org/" - url = "https://github.com/AcademySoftwareFoundation/aswf-docker" - settings = ( - "os", - "arch", - "compiler", - "build_type", - "python", - ) - options = {"with_numpy": [True, False]} - default_options = {"with_numpy": True} - generators = "pkg_config" - exports_sources = "*.cmake" - - _autotools = None - - def configure(self): - python_version = tools.Version(self.version) - self.major_minor = f"{python_version.major}.{python_version.minor}" - if "ASWF_NUMPY_VERSION" not in os.environ: - self.options.with_numpy.value = False - - def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) - - def export_sources(self): - export_conandata_patches(self) - self.copy("run-with-system-python") - self.copy("yum") - - @contextmanager - def _build_context(self): - if self.settings.compiler == "Visual Studio": - with tools.vcvars(self.settings): - env = { - "AR": "{} lib".format( - tools.unix_path(self.deps_user_info["automake"].ar_lib) - ), - "CC": "{} cl -nologo".format( - tools.unix_path(self.deps_user_info["automake"].compile) - ), - "CXX": "{} cl -nologo".format( - tools.unix_path(self.deps_user_info["automake"].compile) - ), - "NM": "dumpbin -symbols", - "OBJDUMP": ":", - "RANLIB": ":", - "STRIP": ":", - } - with tools.environment_append(env): - yield - else: - yield - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment( - self, win_bash=tools.os_info.is_windows - ) - if self.settings.os == "Windows": - self._autotools.defines.append("PYTHON_BUILD_DLL") - if self.settings.compiler == "Visual Studio": - self._autotools.flags.append("-FS") - self._autotools.cxx_flags.append("-EHsc") - yes_no = lambda v: "yes" if v else "no" - conf_args = [ - "--enable-shared=yes", - "--enable-static=no", - "--enable-debug={}".format(yes_no(self.settings.build_type == "Debug")), - "--enable-doxygen=no", - "--enable-dot=no", - "--enable-werror=no", - "--enable-html-docs=no", - "--with-platlibdir=lib64", - "--libdir=${prefix}/lib64", - ] - self._autotools.configure(args=conf_args) - return self._autotools - - def _patch_sources(self): - apply_conandata_patches(self) - - def build(self): - with self._build_context(): - self._patch_sources() - autotools = self._configure_autotools() - autotools.make() - - @property - def _abi_suffix(self): - v = SemVer(self.version, False) - if self.settings.os == "Windows": - return f"{v.major}{v.minor}{self._exe_suffix}" - else: - return "{}.{}{}{}".format( - v.major, - v.minor, - "d" if self.settings.build_type == "Debug" and v.major >= 3 else "", - "m" if (v.major >= 3 and v.minor < 8) or v.major > 3 else "", - ) - - def _produce_config_files(self): - p = os.path.join(self.package_folder, "lib64", "cmake", "python") - if not os.path.exists(p): - os.makedirs(p, exist_ok=True) - - pyver = SemVer(self.version, False) - file_loader = FileSystemLoader(self.source_folder) - env = Environment(loader=file_loader) - - def _configure(file_name): - data = { - "version_major": str(pyver.major), - "version_minor": str(pyver.minor), - "version_patch": str(pyver.patch), - "os": self.settings.os, - "bt": self.settings.build_type, - "abi_suffix": self._abi_suffix, - } - - interpreter_template = env.get_template(file_name) - interpreter_template.stream(data).dump( - os.path.join(self.package_folder, "lib64", "cmake", "python", file_name) - ) - - _configure("Python_InterpreterTargets.cmake") - _configure("Python_DevelopmentTargets.cmake") - _configure("Python_Macros.cmake") - _configure("PythonConfig.cmake") - _configure("PythonConfigVersion.cmake") - - def package(self): - self._produce_config_files() - - copy( - self, - "COPYING", - src=self.source_folder, - dst=os.path.join(self.package_folder, "licenses", self.name), - ) - - self.copy("yum", dst="bin") - self.copy("run-with-system-python", dst="bin") - - with self._build_context(): - autotools = self._configure_autotools() - autotools.install() - - python_version = tools.Version(self.version) - if python_version.major == "3": - tools.download( - "https://bootstrap.pypa.io/get-pip.py", "get-pip.py", overwrite=True - ) - else: - tools.download( - "https://bootstrap.pypa.io/pip/2.7/get-pip.py", - "get-pip.py", - overwrite=True, - ) - - py_exe = os.path.join(self.package_folder, "bin", f"python{self.major_minor}") - py_exe_nover = os.path.join(self.package_folder, "bin", "python") - self.run(f"ln -s {py_exe} {py_exe_nover}") - - with tools.environment_append( - { - "PATH": os.path.join(self.package_folder, "bin"), - "LD_LIBRARY_PATH": os.path.join(self.package_folder, "lib64"), - } - ): - self.run(f"{py_exe} get-pip.py") - - # Replace first line of pip to fix the hardcoded shebang line - def _replaceShebang(script_prefix): - script_folder = os.path.join(self.package_folder, "bin") - for name in os.listdir(script_folder): - if not name.startswith(script_prefix): - continue - script = os.path.join(script_folder, name) - with open(script) as f: - lines = f.readlines() - lines[0] = "#!/usr/bin/env python3\n" - with open(script, "w") as f: - f.writelines(lines) - - _replaceShebang("pip") - _replaceShebang("wheel") - _replaceShebang("2to3-") - - # FIXME: how do you convince pip to write to lib64 instead of lib? - self.run(f"{py_exe} -m pip install nose coverage docutils epydoc") - if self.options.get_safe("with_numpy"): - self.run( - f"{py_exe} -m pip install numpy=={os.environ['ASWF_NUMPY_VERSION']}" - ) - - absolute_to_relative_symlinks(self, self.package_folder) - - def package_info(self): - self.cpp_info.filenames["pkg_config"] = "python" - self.user_info.python_interp = f"python{self.major_minor}" - - self.cpp_info.components["PythonInterp"].bindirs = ["bin"] - - self.cpp_info.components["PythonLibs"].requires = ["PythonInterp"] - python_version = tools.Version(self.version) - if python_version > "3.6" and python_version < 3.9: - suffix = "m" - else: - suffix = "" - self.cpp_info.components["PythonLibs"].includedirs = [ - f"include/python{self.major_minor}{suffix}" - ] - self.cpp_info.components["PythonLibs"].libs = [ - f"python{self.major_minor}{suffix}" - ] - self.cpp_info.components["PythonLibs"].libdirs = [ - "lib64", - "lib", - ] - if self.settings.os == "Windows": - self.cpp_info.components["PythonLibs"].defines.append("PYTHON_DLL") - - def deploy(self): - self.copy("*", symlinks=True) - - # Something of a hack: the generated _sysconfigdata__PLATFORM.py embeds build paths - # This breaks tools that use sysconfig to find Python's INCLUDEDIR such as Qt. - # deploy() is only called by conan install package_reference - - tools.replace_in_file( - os.path.join( - self.install_folder, - f"lib64/python{self.major_minor}/_sysconfigdata__{sysconfig.get_config_var('MACHDEP')}_{sysconfig.get_config_var('MULTIARCH')}.py", - ), - re.sub( - r"^/opt/conan_home", r"/tmp/c", self.package_folder - ), # FIXME is there a better way? aswfdocker defines CONAN_USER_HOME - self.install_folder, - strict=False, # don't complain if it was already done in persistent cache - ) diff --git a/packages/conan/recipes/python/patches/dummy.diff b/packages/conan/recipes/python/patches/dummy.diff deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/conan/recipes/python/test_package/CMakeLists.txt b/packages/conan/recipes/python/test_package/CMakeLists.txt deleted file mode 100644 index 14196e68..00000000 --- a/packages/conan/recipes/python/test_package/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -cmake_minimum_required(VERSION 3.12) -project(testpy_exe C) - -find_package(Python COMPONENTS Interpreter Development) - -add_executable(${PROJECT_NAME} testpy${Python_VERSION_MAJOR}.c) - -target_include_directories(${PROJECT_NAME} PRIVATE ${Python_INCLUDE_DIRS}) - -target_link_libraries(${PROJECT_NAME} ${Python_LIBRARIES}) diff --git a/packages/conan/recipes/python/test_package/conanfile.py b/packages/conan/recipes/python/test_package/conanfile.py deleted file mode 100644 index e4b9e24e..00000000 --- a/packages/conan/recipes/python/test_package/conanfile.py +++ /dev/null @@ -1,24 +0,0 @@ -from conans import ConanFile, tools, CMake -import os - - -class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch", "python" - generators = "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - with tools.environment_append(tools.RunEnvironment(self).vars): - cmake.configure() - cmake.build(args=["--", "VERBOSE=1"]) - - def test(self): - self.run("./testpy_exe", run_environment=True) - self.run( - "{} {}".format( - self.deps_user_info["python"].python_interp, - os.path.join(self.source_folder, "testpy.py"), - ), - run_environment=True, - ) - self.run("pip --version", run_environment=True) diff --git a/packages/conan/recipes/python/test_package/testpy.py b/packages/conan/recipes/python/test_package/testpy.py deleted file mode 100644 index 4af7a023..00000000 --- a/packages/conan/recipes/python/test_package/testpy.py +++ /dev/null @@ -1,4 +0,0 @@ -import sys - -print(sys.version_info) -print(sys.path) diff --git a/packages/conan/recipes/python/test_package/testpy2.c b/packages/conan/recipes/python/test_package/testpy2.c deleted file mode 100644 index 5e5d839b..00000000 --- a/packages/conan/recipes/python/test_package/testpy2.c +++ /dev/null @@ -1,12 +0,0 @@ -#include - -int -main(int argc, char *argv[]) -{ - Py_SetProgramName(argv[0]); /* optional but recommended */ - Py_Initialize(); - PyRun_SimpleString("from time import time,ctime\n" - "print 'Today is',ctime(time())\n"); - Py_Finalize(); - return 0; -} diff --git a/packages/conan/recipes/python/test_package/testpy3.c b/packages/conan/recipes/python/test_package/testpy3.c deleted file mode 100644 index b4a62a62..00000000 --- a/packages/conan/recipes/python/test_package/testpy3.c +++ /dev/null @@ -1,18 +0,0 @@ -#include - -int -main(int argc, char *argv[]) -{ - wchar_t *program = Py_DecodeLocale(argv[0], NULL); - if (program == NULL) { - fprintf(stderr, "Fatal error: cannot decode argv[0]\n"); - exit(1); - } - Py_SetProgramName(program); /* optional but recommended */ - Py_Initialize(); - PyRun_SimpleString("from time import time,ctime\n" - "print('Today is', ctime(time()))\n"); - Py_Finalize(); - PyMem_RawFree(program); - return 0; -} diff --git a/packages/conan/recipes/python/yum b/packages/conan/recipes/python/yum deleted file mode 100755 index a084340d..00000000 --- a/packages/conan/recipes/python/yum +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -# This runs yum with system python -exec "${ASWF_INSTALL_PREFIX}/bin/run-with-system-python" /usr/bin/yum "$@" diff --git a/packages/conan/recipes/qt/conandata.yml b/packages/conan/recipes/qt/conandata.yml index 887330e2..9ea306fa 100644 --- a/packages/conan/recipes/qt/conandata.yml +++ b/packages/conan/recipes/qt/conandata.yml @@ -1,56 +1,314 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/qt/6.x.x/conandata.yml + sources: - "5.12.6": + "6.7.3": url: - #- "https://download.qt.io/archive/qt/5.12/5.12.6/single/qt-everywhere-src-5.12.6.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/5.12/5.12.6/single/qt-everywhere-src-5.12.6.tar.xz" - - "https://www.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/5.12/5.12.6/single/qt-everywhere-src-5.12.6.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/5.12/5.12.6/single/qt-everywhere-src-5.12.6.tar.xz" - sha256: "a06c34222f4f049e8bd8da170178260aea1438b510cc064d16229dd340bfe592" - "5.15.2": + - "https://download.qt.io/official_releases/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://download.qt.io/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://mirrors.20i.com/pub/qt.io/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://ftp.nluug.nl/languages/qt/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://mirror.netcologne.de/qtproject/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://qt-mirror.dannhauer.de/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://ftp.fau.de/qtproject/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://mirrors.dotsrc.org/qtproject/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://ftp.icm.edu.pl/packages/qt/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://qt.mirror.constant.com/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://mirrors.sau.edu.cn/qt/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://mirrors.cloud.tencent.com/qt/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://mirror.bjtu.edu.cn/qt/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/6.7/6.7.3/single/qt-everywhere-src-6.7.3.tar.xz" + sha256: "a3f1d257cbb14c6536585ffccf7c203ce7017418e1a0c2ed7c316c20c729c801" + "6.6.3": url: - #- "https://download.qt.io/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz" - - "https://www.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz" - sha256: "3a530d1b243b5dec00bc54937455471aaa3e56849d2593edb8ded07228202240" - "5.15.9": + - "https://download.qt.io/official_releases/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://download.qt.io/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://qt.mirror.constant.com/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://mirrors.20i.com/pub/qt.io/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://ftp.nluug.nl/languages/qt/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://mirror.netcologne.de/qtproject/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://qt-mirror.dannhauer.de/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://ftp.fau.de/qtproject/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://mirrors.dotsrc.org/qtproject/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://ftp.icm.edu.pl/packages/qt/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://qtproject.mirror.liquidtelecom.com/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://mirrors.sau.edu.cn/qt/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://mirrors.tuna.tsinghua.edu.cn/qt/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + sha256: "69d0348fef415da98aa890a34651e9cfb232f1bffcee289b7b4e21386bf36104" + "6.5.4": url: - #- "https://download.qt.io/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - - "https://www.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - sha256: "26d5f36134db03abe4a6db794c7570d729c92a3fc1b0bf9b1c8f86d0573cd02f" + - "https://download.qt.io/official_releases/qt/6.5/6.5.4/src/single/qt-everywhere-opensource-src-6.5.4.tar.xz" + - "https://download.qt.io/archive/qt/6.5/6.5.4/src/single/qt-everywhere-opensource-src-6.5.4.tar.xz" + - "https://mirrors.20i.com/pub/qt.io/archive/qt/6.5/6.5.4/src/single/qt-everywhere-opensource-src-6.5.4.tar.xz" + - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.5/6.5.4/src/single/qt-everywhere-opensource-src-6.5.4.tar.xz" + - "https://ftp.nluug.nl/languages/qt/archive/qt/6.5/6.5.4/src/single/qt-everywhere-opensource-src-6.5.4.tar.xz" + - "https://mirror.netcologne.de/qtproject/archive/qt/6.5/6.5.4/src/single/qt-everywhere-opensource-src-6.5.4.tar.xz" + - "https://qt-mirror.dannhauer.de/archive/qt/6.5/6.5.4/src/single/qt-everywhere-opensource-src-6.5.4.tar.xz" + - "https://ftp.fau.de/qtproject/archive/qt/6.5/6.5.4/src/single/qt-everywhere-opensource-src-6.5.4.tar.xz" + - "https://mirrors.dotsrc.org/qtproject/archive/qt/6.5/6.5.4/src/single/qt-everywhere-opensource-src-6.5.4.tar.xz" + - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/6.5/6.5.4/src/single/qt-everywhere-opensource-src-6.5.4.tar.xz" + - "https://mirror.web4africa.ng/qt/archive/qt/6.5/6.5.4/src/single/qt-everywhere-opensource-src-6.5.4.tar.xz" + - "https://qtproject.mirror.liquidtelecom.com/archive/qt/6.5/6.5.4/src/single/qt-everywhere-opensource-src-6.5.4.tar.xz" + - "https://qt.mirror.constant.com/archive/qt/6.5/6.5.4/src/single/qt-everywhere-opensource-src-6.5.4.tar.xz" + - "https://mirrors.cloud.tencent.com/qt/archive/qt/6.5/6.5.4/src/single/qt-everywhere-opensource-src-6.5.4.tar.xz" + - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/6.5/6.5.4/src/single/qt-everywhere-opensource-src-6.5.4.tar.xz" + - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/6.5/6.5.4/src/single/qt-everywhere-opensource-src-6.5.4.tar.xz" + - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/6.5/6.5.4/src/single/qt-everywhere-opensource-src-6.5.4.tar.xz" + sha256: "28c04f5fb4db234e7f30308c6af97904cb6516e5b63a7633edf2a54a2bb0b54d" "6.5.3": url: - - "https://mirrors.ocf.berkeley.edu/qt/official_releases/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" - - "https://qt.mirror.constant.com/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" + - "https://download.qt.io/official_releases/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" + - "https://download.qt.io/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" + - "https://mirrors.20i.com/pub/qt.io/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" + - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" + - "https://ftp.nluug.nl/languages/qt/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" + - "https://mirror.netcologne.de/qtproject/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" - "https://qt-mirror.dannhauer.de/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" - - "https://www.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" - "https://ftp.fau.de/qtproject/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" + - "https://mirrors.dotsrc.org/qtproject/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" + - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" + - "https://mirror.web4africa.ng/qt/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" + - "https://qtproject.mirror.liquidtelecom.com/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" + - "https://qt.mirror.constant.com/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" + - "https://mirrors.cloud.tencent.com/qt/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" + - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" + - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" + - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" sha256: "7cda4d119aad27a3887329cfc285f2aba5da85601212bcb0aea27bd6b7b544cb" patches: - "5.12.6": - - patch_file: "patches/c72097e.diff" - base_path: "qt5/qtwebengine" - "5.15.2": - - patch_file: "patches/aa2a39dea5.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/fix-macdeployqt.diff" - base_path: "qt5/qttools" - - patch_file: "patches/QTBUG-88625.diff" - base_path: "qt5/qtwebengine" - "5.15.9": - - patch_file: "patches/qt-everywhere-opensource-src-5.15.9-kf5-1.diff" - base_path: "qt5" - - patch_file: "patches/qtsan_impl.diff" - base_path: "qt5" + "6.7.3": + - "base_path": "qtwebengine" + "patch_description": "Workaround for too long .rps file name" + "patch_file": "patches/c72097e_6.6.0.diff" + "patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" + "patch_type": "bugfix" + "6.6.3": + - "base_path": "qtwebengine" + "patch_description": "Workaround for too long .rps file name" + "patch_file": "patches/c72097e_6.6.0.diff" + "patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" + "patch_type": "bugfix" + "6.5.4": + # Fixed in 6.5.4 + # - "base_path": "qtbase" + # "patch_file": "patches/0001-CVE-2023-51714-qtbase-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/0001-CVE-2023-51714-qtbase-6.5.diff" + # "patch_description": "CVE-2023-51714 https vulnerability" + # - "base_path": "qtbase" + # "patch_file": "patches/0002-CVE-2023-51714-qtbase-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/0002-CVE-2023-51714-qtbase-6.5.diff" + # "patch_description": "CVE-2023-51714 http2 vulnerability" + # Does not apply against 6.5.3, http2 vulnerability + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2024-39936-qtbase-6.5.patch" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2024-39936-qtbase-6.5.patch" + - "base_path": "qtnetworkauth" + "patch_file": "patches/CVE-2024-36048-qtnetworkauth-6.5.diff" + "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2024-36048-qtnetworkauth-6.5.diff" + "patch_description": "CVE-2024-36048 vulnerability in QAbstractOAuth" + # Does not apply against 6.5.3 + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2024-33861-qtbase-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2024-33861-qtbase-6.5.diff" + # "patch_description": "CVE-2024-33861 vulnerability in QStringConverter" + # CVE 2024-30161 applies to 6.5.4 but patch is wrong + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2024-30161-qtbase-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2024-30161-qtbase-6.5.diff" + # "patch_description": "CVE-2024-30161 vulnerability in QNetworkReply" + - "base_path": "qtbase" + "patch_file": "patches/CVE-2024-25580-qtbase-6.5.diff" + "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2024-25580-qtbase-6.5.diff" + "patch_description": "CVE-2024-25580 buffer overflow in KTX image parsing" + # Does not apply against 6.5.3 + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2023-43114-6.5.patch" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2023-43114-6.5.patch" + # "patch_description": "CVE-2023-43114 Windows GDI font engine patch" + # Already fixed in 6.5.3 + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2023-38197-qtbase-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2023-38197-qtbase-6.5.diff" + # "patch_description": "CVE-2023-38197 potential infinite loop" + # Already fixed in 6.5.2 + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2023-37369-qtbase-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2023-37369-qtbase-6.5.diff" + # "patch_description": "CVE-2023-37369 crash in QXmlStreamReader + # Already fixed in 6.5.2 + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2023-34410-qtbase-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2023-34410-qtbase-6.5.diff" + # "patch_description": "CVE-2023-34410: certificate validation in TLS" + # Already fixed in 6.5.1 + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2023-33285-qtbase-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2023-33285-qtbase-6.5.diff" + # "patch_description": "CVE-2023-33285 DNS lookup vuln + # Already fixed in 6.5.1 + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2023-32763-qtbase-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2023-32763-qtbase-6.5.diff" + # "patch_description": "CVE-2023-32763 SVG parsing buffer overflow + # Already fixed in 6.5.1 + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2023-32762-qtbase-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2023-32762-qtbase-6.5.diff" + # "patch_description": "CVE-2023-32762 HSTS network header parsing + # Already fixed in 6.5.1 + # - "base_path": "qtsvg" + # "patch_file": "patches/CVE-2023-32573-qtsvg-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2023-32573-qtsvg-6.5.diff" + # "patch_description": "CVE-2023-32573 SVG font parsing + # We don't currently build against WebP or on Windows + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2023-4863-6.5.patch" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2023-4863-6.5.patch" + # "patch_description": "GDI Font Engine & WebP image format" + - "base_path": "qtwebengine" + "patch_description": "issue with spellcheck_buildflags.h not found" + "patch_file": "patches/spellcheck_buildflags.diff" + - "base_path": "qtwebengine" + "patch_file": "patches/0001-ninja-1.12-build.diff" + "patch_source": "https://gitweb.gentoo.org/repo/gentoo.git/patch/?id=865b42c15b520af89040fd4a6e6e6c4cd54125c2" + "patch_description": "build failures due to change of build order in Ninja 1.12" + - "base_path": "qtbase" + "patch_description": "ls is a shell script in RHEL" + "patch_file": "patches/qtbase-core-cmake_6.5.4.diff" + - "base_path": "qtbase" + "patch_description": "Recent CMake unhappy with code to find system Harfbuzz" + "patch_file": "patches/qtbase-system-harfbuzz.diff" + - "base_path": "qtwebengine" + "patch_description": "Workaround for too long .rps file name" + "patch_file": "patches/c72097e.diff" + "patch_type": "bugfix" + "patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" + - "base_path": "qtbase" + "patch_description": "Fix build error with lambda on GCC 9.2" + "patch_file": "patches/32fa63f_6.5.0.patch" + "patch_type": "bugfix" + "patch_source": "https://bugreports.qt.io/browse/QTBUG-112920" + - "base_path": "qtbase" + "patch_description": "Use absolute path in the generated header files to avoid relative path longer than 250 characters (not supported on by msvc compiler)" + "patch_file": "patches/fix-long-path-on-windows_6.5.4.patch" + "patch_type": "bugfix" + "patch_source": "https://code.qt.io/cgit/qt/qtbase.git/commit/?id=b4246a5c28472de3c4b6a85a3daf4a1d578894ab" "6.5.3": - - patch_file: "patches/qtbase-core-cmake.diff" - base_path: "qtbase" - patch_description: "ls is a shell script in RHEL" - - patch_file: "patches/qtbase-system-harfbuzz.diff" - base_path: "qtbase" - patch_description: "Recent CMake unhappy with code to find system Harfbuzz" - - patch_file: "patches/c72097e.diff" - base_path: "qtwebengine" - patch_description: "Workaround for too long .rps file name" + - "base_path": "qtbase" + "patch_file": "patches/0001-CVE-2023-51714-qtbase-6.5.diff" + "patch_source": "https://download.qt.io/archive/qt/6.5/0001-CVE-2023-51714-qtbase-6.5.diff" + "patch_description": "CVE-2023-51714 https vulnerability" + - "base_path": "qtbase" + "patch_file": "patches/0002-CVE-2023-51714-qtbase-6.5.diff" + "patch_source": "https://download.qt.io/archive/qt/6.5/0002-CVE-2023-51714-qtbase-6.5.diff" + "patch_description": "CVE-2023-51714 http2 vulnerability" + # Does not apply against 6.5.3, http2 vulnerability + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2024-39936-qtbase-6.5.patch" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2024-39936-qtbase-6.5.patch" + - "base_path": "qtnetworkauth" + "patch_file": "patches/CVE-2024-36048-qtnetworkauth-6.5.diff" + "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2024-36048-qtnetworkauth-6.5.diff" + "patch_description": "CVE-2024-36048 vulnerability in QAbstractOAuth" + # Does not apply against 6.5.3 + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2024-33861-qtbase-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2024-33861-qtbase-6.5.diff" + # "patch_description": "CVE-2024-33861 vulnerability in QStringConverter" + # Only in 6.5.4, 6.5.5 and 6.6.2 + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2024-30161-qtbase-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2024-30161-qtbase-6.5.diff" + # "patch_description": "CVE-2024-30161 vulnerability in QNetworkReply" + - "base_path": "qtbase" + "patch_file": "patches/CVE-2024-25580-qtbase-6.5.diff" + "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2024-25580-qtbase-6.5.diff" + "patch_description": "CVE-2024-25580 buffer overflow in KTX image parsing" + # Does not apply against 6.5.3 + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2023-43114-6.5.patch" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2023-43114-6.5.patch" + # "patch_description": "CVE-2023-43114 Windows GDI font engine patch" + # Already fixed in 6.5.3 + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2023-38197-qtbase-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2023-38197-qtbase-6.5.diff" + # "patch_description": "CVE-2023-38197 potential infinite loop" + # Already fixed in 6.5.2 + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2023-37369-qtbase-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2023-37369-qtbase-6.5.diff" + # "patch_description": "CVE-2023-37369 crash in QXmlStreamReader + # Already fixed in 6.5.2 + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2023-34410-qtbase-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2023-34410-qtbase-6.5.diff" + # "patch_description": "CVE-2023-34410: certificate validation in TLS" + # Already fixed in 6.5.1 + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2023-33285-qtbase-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2023-33285-qtbase-6.5.diff" + # "patch_description": "CVE-2023-33285 DNS lookup vuln + # Already fixed in 6.5.1 + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2023-32763-qtbase-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2023-32763-qtbase-6.5.diff" + # "patch_description": "CVE-2023-32763 SVG parsing buffer overflow + # Already fixed in 6.5.1 + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2023-32762-qtbase-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2023-32762-qtbase-6.5.diff" + # "patch_description": "CVE-2023-32762 HSTS network header parsing + # Already fixed in 6.5.1 + # - "base_path": "qtsvg" + # "patch_file": "patches/CVE-2023-32573-qtsvg-6.5.diff" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2023-32573-qtsvg-6.5.diff" + # "patch_description": "CVE-2023-32573 SVG font parsing + # We don't currently build against WebP or on Windows + # - "base_path": "qtbase" + # "patch_file": "patches/CVE-2023-4863-6.5.patch" + # "patch_source": "https://download.qt.io/archive/qt/6.5/CVE-2023-4863-6.5.patch" + # "patch_description": "GDI Font Engine & WebP image format" + - "base_path": "qtwebengine" + "patch_description": "issue with spellcheck_buildflags.h not found" + "patch_file": "patches/spellcheck_buildflags.diff" + - "base_path": "qtwebengine" + "patch_file": "patches/0001-ninja-1.12-build.diff" + "patch_source": "https://gitweb.gentoo.org/repo/gentoo.git/patch/?id=865b42c15b520af89040fd4a6e6e6c4cd54125c2" + "patch_description": "build failures due to change of build order in Ninja 1.12" + - "base_path": "qtbase" + "patch_description": "ls is a shell script in RHEL" + "patch_file": "patches/qtbase-core-cmake.diff" + - "base_path": "qtbase" + "patch_description": "Recent CMake unhappy with code to find system Harfbuzz" + "patch_file": "patches/qtbase-system-harfbuzz.diff" + - "base_path": "qtwebengine" + "patch_description": "Workaround for too long .rps file name" + "patch_file": "patches/c72097e.diff" + "patch_type": "bugfix" + "patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" + - "base_path": "qtbase" + "patch_description": "Fix build error with lambda on GCC 9.2" + "patch_file": "patches/32fa63f_6.5.0.patch" + "patch_type": "bugfix" + "patch_source": "https://bugreports.qt.io/browse/QTBUG-112920" + - "base_path": "qtbase" + "patch_description": "Use absolute path in the generated header files to avoid relative path longer than 250 characters (not supported on by msvc compiler)" + "patch_file": "patches/fix-long-path-on-windows_6.5.3.patch" + "patch_type": "bugfix" + "patch_source": "https://code.qt.io/cgit/qt/qtbase.git/commit/?id=b4246a5c28472de3c4b6a85a3daf4a1d578894ab" diff --git a/packages/conan/recipes/qt/conanfile.py b/packages/conan/recipes/qt/conanfile.py index 4d1fd397..bf61ba6e 100644 --- a/packages/conan/recipes/qt/conanfile.py +++ b/packages/conan/recipes/qt/conanfile.py @@ -1,84 +1,46 @@ # Copyright (c) Contributors to the conan-center-index Project. All rights reserved. # Copyright (c) Contributors to the aswf-docker Project. All rights reserved. # SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/2a3cb93885141024c1b405a01a79fb3abc239b12/recipes/qt/6.x.x/conanfile.py import configparser import glob import os +import platform import textwrap -from conan import ConanFile +from conan import ConanFile, conan_version from conan.tools.apple import is_apple_os -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.build import cross_building, check_min_cppstd, default_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv, VirtualRunEnv, Environment -from conan.tools.files import ( - copy, - get, - replace_in_file, - apply_conandata_patches, - save, - rm, - rmdir, - export_conandata_patches, -) +from conan.tools.files import copy, get, replace_in_file, apply_conandata_patches, save, rm, rmdir, export_conandata_patches from conan.tools.gnu import PkgConfigDeps from conan.tools.microsoft import msvc_runtime_flag, is_msvc from conan.tools.scm import Version -from conan.errors import ConanInvalidConfiguration +from conan.errors import ConanException, ConanInvalidConfiguration required_conan_version = ">=1.55.0" class QtConan(ConanFile): - _submodules = [ - "qtsvg", - "qtdeclarative", - "qttools", - "qttranslations", - "qtdoc", - "qtwayland", - "qtquickcontrols2", - "qtquicktimeline", - "qtquick3d", - "qtshadertools", - "qt5compat", - "qtactiveqt", - "qtcharts", - "qtdatavis3d", - "qtlottie", - "qtscxml", - "qtvirtualkeyboard", - "qt3d", - "qtimageformats", - "qtnetworkauth", - "qtcoap", - "qtmqtt", - "qtopcua", - "qtmultimedia", - "qtlocation", - "qtsensors", - "qtconnectivity", - "qtserialbus", - "qtserialport", - "qtwebsockets", - "qtwebchannel", - "qtwebengine", - "qtwebview", - "qtremoteobjects", - "qtpositioning", - "qtlanguageserver", - "qtspeech", - "qthttpserver", - "qtquick3dphysics", - "qtgrpc", - "qtquickeffectmaker", - ] + _submodules = ["qtsvg", "qtdeclarative", "qttools", "qttranslations", "qtdoc", + "qtwayland", "qtquickcontrols2", "qtquicktimeline", "qtquick3d", "qtshadertools", "qt5compat", + "qtactiveqt", "qtcharts", "qtdatavis3d", "qtlottie", "qtscxml", "qtvirtualkeyboard", + "qt3d", "qtimageformats", "qtnetworkauth", "qtcoap", "qtmqtt", "qtopcua", + "qtmultimedia", "qtlocation", "qtsensors", "qtconnectivity", "qtserialbus", + "qtserialport", "qtwebsockets", "qtwebchannel", "qtwebengine", "qtwebview", + "qtremoteobjects", "qtpositioning", "qtlanguageserver", + "qtspeech", "qthttpserver", "qtquick3dphysics", "qtgrpc", "qtquickeffectmaker"] + _submodules += ["qtgraphs"] # new modules for qt 6.6.0 + + _module_statuses = ["essential", "addon", "deprecated", "preview"] name = "qt" description = "Qt is a cross-platform framework for graphical user interfaces." topics = ("framework", "ui") - url = "https://github.com/AcademySoftwareFoundation/aswf-docker" + url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.qt.io" license = "LGPL-3.0-only" settings = "os", "arch", "compiler", "build_type" @@ -111,8 +73,11 @@ class QtConan(ConanFile): "with_gssapi": [True, False], "with_md4c": [True, False], "with_x11": [True, False], + "with_egl": [True, False], + "gui": [True, False], "widgets": [True, False], + "device": [None, "ANY"], "cross_compile": [None, "ANY"], "sysroot": [None, "ANY"], @@ -120,14 +85,15 @@ class QtConan(ConanFile): "disabled_features": [None, "ANY"], } options.update({module: [True, False] for module in _submodules}) + options.update({f"{status}_modules": [True, False] for status in _module_statuses}) # this significantly speeds up windows builds no_copy_source = True default_options = { - "shared": True, + "shared": False, "opengl": "desktop", - "with_vulkan": True, + "with_vulkan": True, # ASWF: for OpenRV "openssl": True, "with_pcre2": True, "with_glib": True, @@ -135,8 +101,8 @@ class QtConan(ConanFile): "with_freetype": True, "with_fontconfig": True, "with_icu": True, - "with_harfbuzz": False, - "with_libjpeg": "libjpeg", + "with_harfbuzz": False, # ASWF: we would need harfbuzz 2.0 + "with_libjpeg": "libjpeg-turbo", # ASWF: EL distros have -turbo "with_libpng": True, "with_sqlite3": True, "with_mysql": False, @@ -144,7 +110,7 @@ class QtConan(ConanFile): "with_odbc": False, "with_zstd": True, "with_brotli": True, - "with_dbus": False, + "with_dbus": True, # ASWF: for OpenRV "with_libalsa": False, "with_openal": True, "with_gstreamer": False, @@ -152,15 +118,20 @@ class QtConan(ConanFile): "with_gssapi": False, "with_md4c": True, "with_x11": True, + "with_egl": False, + "gui": True, "widgets": True, + "device": None, "cross_compile": None, "sysroot": None, "multiconfiguration": False, "disabled_features": "", } - default_options.update({module: False for module in _submodules}) + # essential_modules, addon_modules, deprecated_modules, preview_modules: + # these are only provided for convenience, set to False by default + default_options.update({f"{status}_modules": False for status in _module_statuses}) short_paths = True @@ -182,23 +153,18 @@ def _get_module_tree(self): section = str(s) assert section.startswith("submodule ") assert section.count('"') == 2 - modulename = section[section.find('"') + 1 : section.rfind('"')] + modulename = section[section.find('"') + 1: section.rfind('"')] + if modulename in ["qtbase", "qtqa", "qtrepotools"]: + continue status = str(config.get(section, "status")) if status not in ["obsolete", "ignore", "additionalLibrary"]: - self._submodules_tree[modulename] = { - "status": status, - "path": str(config.get(section, "path")), - "depends": [], - } + if status not in self._module_statuses: + raise ConanException(f"module {modulename} has status {status} which is not in self._module_statuses {self._module_statuses}") + assert modulename in self._submodules, f"module {modulename} not in self._submodules" + self._submodules_tree[modulename] = {"status": status, + "path": str(config.get(section, "path")), "depends": []} if config.has_option(section, "depends"): - self._submodules_tree[modulename]["depends"] = [ - str(i) for i in config.get(section, "depends").split() - ] - - for m in self._submodules_tree: - assert ( - m in ["qtbase", "qtqa", "qtrepotools"] or m in self._submodules - ), f"module {m} not in self._submodules" + self._submodules_tree[modulename]["depends"] = [str(i) for i in config.get(section, "depends").split()] return self._submodules_tree @@ -206,12 +172,7 @@ def export_sources(self): export_conandata_patches(self) def export(self): - copy( - self, - f"qtmodules{self.version}.conf", - self.recipe_folder, - self.export_folder, - ) + copy(self, f"qtmodules{self.version}.conf", self.recipe_folder, self.export_folder) def config_options(self): if self.settings.os not in ["Linux", "FreeBSD"]: @@ -220,6 +181,7 @@ def config_options(self): self.options.with_glib = False del self.options.with_libalsa del self.options.with_x11 + del self.options.with_egl if self.settings.os == "Windows": self.options.opengl = "dynamic" @@ -227,23 +189,29 @@ def config_options(self): if self.settings.os != "Linux": self.options.qtwayland = False - for m in self._submodules: - if m not in self._get_module_tree: - delattr(self.options, m) + for submodule in self._submodules: + if submodule not in self._get_module_tree: + self._debug_output(f"Qt6: Removing {submodule} option as it is not in the module tree for this version, or is marked as obsolete or ignore") + self.options.rm_safe(submodule) @property def _minimum_compilers_version(self): # Qt6 requires C++17 return { "Visual Studio": "16", + "msvc": "192", "gcc": "8", "clang": "9", - "apple-clang": "12" if Version(self.version) >= "6.5.0" else "11", + "apple-clang": "12" if Version(self.version) >= "6.5.0" else "11" } + def _debug_output(self, message): + if Version(conan_version) >= "2": + self.output.debug(message) + def configure(self): - # Define the submodules we need for ASWF build and PySide in particular + # ASWF: Define the submodules we need for ASWF build and PySide in particular self.options.qtdeclarative = True self.options.qttools = True self.options.qtlanguageserver = True @@ -251,6 +219,10 @@ def configure(self): self.options.qtshadertools = True self.options.qtactiveqt = True self.options.qtsvg = True + self.options.qtwebengine = True + self.options.qtwebchannel = True + self.options.qtwebsockets = True + self.options.qtmultimedia = True if not self.options.gui: del self.options.opengl @@ -262,6 +234,54 @@ def configure(self): del self.options.with_libpng del self.options.with_md4c self.options.rm_safe("with_x11") + self.options.rm_safe("with_egl") + + if self.options.multiconfiguration: + del self.settings.build_type + + # Requested modules: + # - any module for non-removed options that have 'True' value + # - any enabled via `xxx_modules` that does not have a 'False' value + # Note that at this point, the submodule options dont have a value unless one is given externally + # to the recipe (e.g. via the command line, a profile, or a consumer) + requested_modules = set([module for module in self._submodules if self.options.get_safe(module)]) + for module in [m for m in self._submodules if m in self._get_module_tree]: + status = self._get_module_tree[module]['status'] + is_disabled = self.options.get_safe(module) == False + if self.options.get_safe(f"{status}_modules"): + if not is_disabled: + requested_modules.add(module) + else: + self.output.warning(f"qt6: {module} requested because {status}_modules=True" + f" but it has been explicitly disabled with {module}=False") + + self.output.info(f"qt6: requested modules {list(requested_modules)}") + + required_modules = {} + for module in requested_modules: + deps = self._get_module_tree[module]["depends"] + for dep in deps: + required_modules.setdefault(dep,[]).append(module) + + required_but_disabled = [m for m in required_modules.keys() if self.options.get_safe(m) == False] + if required_modules: + self._debug_output(f"qt6: required_modules modules {list(required_modules.keys())}") + if required_but_disabled: + required_by = set() + for m in required_but_disabled: + required_by.update(required_modules[m]) + raise ConanInvalidConfiguration(f"Modules {required_but_disabled} are explicitly disabled, " + f"but are required by {list(required_by)}, enabled by other options") + + enabled_modules = requested_modules.union(set(required_modules.keys())) + enabled_modules.discard("qtbase") + + for module in list(enabled_modules): + setattr(self.options, module, True) + + for module in self._submodules: + if module in self.options and not self.options.get_safe(module): + setattr(self.options, module, False) if not self.options.get_safe("qtmultimedia"): self.options.rm_safe("with_libalsa") @@ -273,329 +293,189 @@ def configure(self): if self.options.get_safe("qtwebengine"): self.options.with_fontconfig = True - if self.options.multiconfiguration: - del self.settings.build_type + for status in self._module_statuses: + # These are convenience only, should not affect package_id + option_name = f"{status}_modules" + self._debug_output(f"qt6 removing convenience option: {option_name}," + f" see individual module options") + self.options.rm_safe(option_name) - def _enablemodule(mod): - if mod != "qtbase": - setattr(self.options, mod, True) - for req in self._get_module_tree[mod]["depends"]: - _enablemodule(req) - - for module in self._get_module_tree: - if self.options.get_safe(module): - _enablemodule(module) + for option in self.options.items(): + self._debug_output(f"qt6 option: {option}") def validate(self): - # if os.getenv('NOT_ON_C3I', '0') == '0': - # if self.info.settings.compiler == "gcc" and Version(self.info.settings.compiler.version) >= "11" or \ - # self.info.settings.compiler == "clang" and Version(self.info.settings.compiler.version) >= "12": - # raise ConanInvalidConfiguration("qt is not supported on gcc11 and clang >= 12 on C3I until conan-io/conan-center-index#13472 is fixed\n"\ - # "If your distro is modern enough (xcb >= 1.12), set environment variable NOT_ON_C3I=1") + if os.getenv('CONAN_CENTER_BUILD_SERVICE') is not None: + if self.info.settings.compiler == "gcc" and Version(self.info.settings.compiler.version) >= "11" or \ + self.info.settings.compiler == "clang" and Version(self.info.settings.compiler.version) >= "12": + raise ConanInvalidConfiguration("qt is not supported on gcc11 and clang >= 12 on C3I until conan-io/conan-center-index#13472 is fixed") # C++ minimum standard required if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 17) - minimum_version = self._minimum_compilers_version.get( - str(self.settings.compiler), False - ) + minimum_version = self._minimum_compilers_version.get(str(self.settings.compiler), False) if not minimum_version: - self.output.warning( - "C++17 support required. Your compiler is unknown. Assuming it supports C++17." - ) + self.output.warning("C++17 support required. Your compiler is unknown. Assuming it supports C++17.") elif Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration( - "C++17 support required, which your compiler does not support." - ) - - if ( - Version(self.version) >= "6.5.0" - and self.settings.compiler == "gcc" - and Version(self.settings.compiler.version) == "9" - ): - raise ConanInvalidConfiguration( - "qt 6.5.0 cannot be built with gcc 9, cf QTBUG-112920" - ) - - if ( - Version(self.version) >= "6.4.0" - and self.settings.compiler == "apple-clang" - and Version(self.settings.compiler.version) < "12" - ): + raise ConanInvalidConfiguration("C++17 support required, which your compiler does not support.") + + if Version(self.version) >= "6.4.0" and self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "12": raise ConanInvalidConfiguration("apple-clang >= 12 required by qt >= 6.4.0") - if self.settings.compiler == "clang" and "libstdc++" in str( - self.settings.compiler.libcxx - ): - raise ConanInvalidConfiguration( - "Qt needs recent libstdc++, with charconv. please switch to gcc, or to libc++" - ) - - if ( - self.settings.os == "Macos" - and self.dependencies["double-conversion"].options.shared - ): - raise ConanInvalidConfiguration( - "Test recipe fails because of Macos' SIP. Contributions are welcome." - ) + if Version(self.version) >= "6.6.1" and self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "13.1": + raise ConanInvalidConfiguration("apple-clang >= 13.1 is required by qt >= 6.6.1 cf QTBUG-119490") if self.options.get_safe("qtwebengine"): if not self.options.shared: - raise ConanInvalidConfiguration( - "Static builds of Qt WebEngine are not supported" - ) + raise ConanInvalidConfiguration("Static builds of Qt WebEngine are not supported") - if not ( - self.options.gui - and self.options.qtdeclarative - and self.options.qtwebchannel - ): - raise ConanInvalidConfiguration( - "option qt:qtwebengine requires also qt:gui, qt:qtdeclarative and qt:qtwebchannel" - ) + if not (self.options.gui and self.options.qtdeclarative and self.options.qtwebchannel): + raise ConanInvalidConfiguration("option qt:qtwebengine requires also qt:gui, qt:qtdeclarative and qt:qtwebchannel") if not self.options.with_dbus and self.settings.os == "Linux": - raise ConanInvalidConfiguration( - "option qt:webengine requires also qt:with_dbus on Linux" - ) + raise ConanInvalidConfiguration("option qt:webengine requires also qt:with_dbus on Linux") - if hasattr(self, "settings_build") and cross_building( - self, skip_x64_x86=True - ): - raise ConanInvalidConfiguration( - "Cross compiling Qt WebEngine is not supported" - ) + if hasattr(self, "settings_build") and cross_building(self, skip_x64_x86=True): + raise ConanInvalidConfiguration("Cross compiling Qt WebEngine is not supported") if self.options.widgets and not self.options.gui: - raise ConanInvalidConfiguration( - "using option qt:widgets without option qt:gui is not possible. " - "You can either disable qt:widgets or enable qt:gui" - ) - if ( - self.settings.os == "Android" - and self.options.get_safe("opengl", "no") == "desktop" - ): - raise ConanInvalidConfiguration( - "OpenGL desktop is not supported on Android." - ) - - if ( - self.settings.os != "Windows" - and self.options.get_safe("opengl", "no") == "dynamic" - ): - raise ConanInvalidConfiguration( - "Dynamic OpenGL is supported only on Windows." - ) - - if self.options.get_safe( - "with_fontconfig", False - ) and not self.options.get_safe("with_freetype", False): - raise ConanInvalidConfiguration( - "with_fontconfig cannot be enabled if with_freetype is disabled." - ) - - if ( - "MT" in self.settings.get_safe("compiler.runtime", default="") - and self.options.shared - ): - raise ConanInvalidConfiguration( - "Qt cannot be built as shared library with static runtime" - ) - - if self.options.get_safe("with_pulseaudio", False) or self.options.get_safe( - "with_libalsa", False - ): - raise ConanInvalidConfiguration( - "alsa and pulseaudio are not supported (QTBUG-95116), please disable them." - ) + raise ConanInvalidConfiguration("using option qt:widgets without option qt:gui is not possible. " + "You can either disable qt:widgets or enable qt:gui") + if self.settings.os == "Android" and self.options.get_safe("opengl", "no") == "desktop": + raise ConanInvalidConfiguration("OpenGL desktop is not supported on Android.") + + if self.settings.os != "Windows" and self.options.get_safe("opengl", "no") == "dynamic": + raise ConanInvalidConfiguration("Dynamic OpenGL is supported only on Windows.") + + if self.options.get_safe("with_fontconfig", False) and not self.options.get_safe("with_freetype", False): + raise ConanInvalidConfiguration("with_fontconfig cannot be enabled if with_freetype is disabled.") + + if "MT" in self.settings.get_safe("compiler.runtime", default="") and self.options.shared: + raise ConanInvalidConfiguration("Qt cannot be built as shared library with static runtime") + + if self.options.get_safe("with_pulseaudio", False) or self.options.get_safe("with_libalsa", False): + raise ConanInvalidConfiguration("alsa and pulseaudio are not supported (QTBUG-95116), please disable them.") if not self.options.with_pcre2: - raise ConanInvalidConfiguration( - "pcre2 is actually required by qt (QTBUG-92454). please use option qt:with_pcre2=True" - ) - - if self.settings.os in ["Linux", "FreeBSD"] and self.options.with_gssapi: - raise ConanInvalidConfiguration( - "gssapi cannot be enabled until conan-io/conan-center-index#4102 is closed" - ) - - # if ( - # self.options.get_safe("with_x11", False) - # and not self.dependencies.direct_host["xkbcommon"].options.with_x11 - # ): - # raise ConanInvalidConfiguration( - # "The 'with_x11' option for the 'xkbcommon' package must be enabled when the 'with_x11' option is enabled" - # ) - # if ( - # self.options.get_safe("qtwayland", False) - # and not self.dependencies.direct_host["xkbcommon"].options.with_wayland - # ): - # raise ConanInvalidConfiguration( - # "The 'with_wayland' option for the 'xkbcommon' package must be enabled when the 'qtwayland' option is enabled" - # ) + raise ConanInvalidConfiguration("pcre2 is actually required by qt (QTBUG-92454). please use option qt:with_pcre2=True") + + if self.settings.os in ['Linux', 'FreeBSD'] and self.options.with_gssapi: + raise ConanInvalidConfiguration("gssapi cannot be enabled until conan-io/conan-center-index#4102 is closed") + + if self.options.get_safe("with_x11", False) and not self.dependencies.direct_host["xkbcommon"].options.with_x11: + raise ConanInvalidConfiguration("The 'with_x11' option for the 'xkbcommon' package must be enabled when the 'with_x11' option is enabled") + if self.options.get_safe("qtwayland", False) and not self.dependencies.direct_host["xkbcommon"].options.with_wayland: + raise ConanInvalidConfiguration("The 'with_wayland' option for the 'xkbcommon' package must be enabled when the 'qtwayland' option is enabled") if cross_building(self): - raise ConanInvalidConfiguration( - "cross compiling qt 6 is not yet supported. Contributions are welcome" - ) - - # if ( - # self.options.with_sqlite3 - # and not self.dependencies["sqlite3"].options.enable_column_metadata - # ): - # raise ConanInvalidConfiguration( - # "sqlite3 option enable_column_metadata must be enabled for qt" - # ) + raise ConanInvalidConfiguration("cross compiling qt 6 is not yet supported. Contributions are welcome") + + if self.options.with_sqlite3 and not self.dependencies["sqlite3"].options.enable_column_metadata: + raise ConanInvalidConfiguration("sqlite3 option enable_column_metadata must be enabled for qt") if self.options.get_safe("qtspeech") and not self.options.qtdeclarative: - raise ConanInvalidConfiguration( - "qtspeech requires qtdeclarative, cf QTBUG-108381" - ) + raise ConanInvalidConfiguration("qtspeech requires qtdeclarative, cf QTBUG-108381") def layout(self): cmake_layout(self, src_folder="src") + # ASWF: DSOs in lib64 + self.cpp.build.libdirs = ["lib64"] + self.cpp.package.libdirs = ["lib64"] def requirements(self): - # self.requires("zlib/[>=1.2.11 <2]") + self.requires("zlib/[>=1.2.11 <2]") # if self.options.openssl: # self.requires("openssl/[>=1.1 <4]") - # if self.options.with_pcre2: - # self.requires("pcre2/10.42") - # if self.options.get_safe("with_vulkan"): - # self.requires("vulkan-loader/1.3.239.0") - # if is_apple_os(self): - # self.requires("moltenvk/1.2.2") - # if self.options.with_glib: - # self.requires("glib/2.77.0") - # if self.options.with_doubleconversion and not self.options.multiconfiguration: - # self.requires("double-conversion/3.3.0") - # if ( - # self.options.get_safe("with_freetype", False) - # and not self.options.multiconfiguration - # ): - # self.requires("freetype/2.13.0") - # if self.options.get_safe("with_fontconfig", False): - # self.requires("fontconfig/2.14.2") - # if self.options.get_safe("with_icu", False): - # self.requires("icu/73.2") - # if ( - # self.options.get_safe("with_harfbuzz", False) - # and not self.options.multiconfiguration - # ): - # self.requires("harfbuzz/8.2.1") - # if ( - # self.options.get_safe("with_libjpeg", False) - # and not self.options.multiconfiguration - # ): - # if self.options.with_libjpeg == "libjpeg-turbo": - # self.requires("libjpeg-turbo/2.1.5") - # else: - # self.requires("libjpeg/9e") - # if ( - # self.options.get_safe("with_libpng", False) - # and not self.options.multiconfiguration - # ): - # self.requires("libpng/1.6.40") - # if self.options.with_sqlite3 and not self.options.multiconfiguration: - # self.requires("sqlite3/3.42.0") + if self.options.with_pcre2: + self.requires("pcre2/10.42") + if self.options.get_safe("with_vulkan"): + # Note: the versions of vulkan-loader and moltenvk + # must be exactly part of the same Vulkan SDK version + # do not update either without checking both + # require exactly the same version of vulkan-headers + self.requires("vulkan-loader/1.3.239.0") + self.requires("vulkan-headers/1.3.239.0", transitive_headers=True) + if is_apple_os(self): + self.requires("moltenvk/1.2.2") + if self.options.with_glib: + self.requires("glib/2.78.3") + if self.options.with_doubleconversion and not self.options.multiconfiguration: + self.requires("double-conversion/3.3.0") + if self.options.get_safe("with_freetype", False) and not self.options.multiconfiguration: + self.requires("freetype/2.13.2", transitive_libs=True) # ASWF: don't pick up system freetype + if self.options.get_safe("with_fontconfig", False): + self.requires("fontconfig/2.15.0") + if self.options.get_safe("with_icu", False): + self.requires("icu/74.2") + if self.options.get_safe("with_harfbuzz", False) and not self.options.multiconfiguration: + self.requires("harfbuzz/8.3.0") + if self.options.get_safe("with_libjpeg", False) and not self.options.multiconfiguration: + if self.options.with_libjpeg == "libjpeg-turbo": + self.requires("libjpeg-turbo/[>=3.0 <3.1]") + else: + self.requires("libjpeg/9e") + if self.options.get_safe("with_libpng", False) and not self.options.multiconfiguration: + self.requires("libpng/[>=1.6 <2]") + if self.options.with_sqlite3 and not self.options.multiconfiguration: + self.requires("sqlite3/[>=3.45.0 <4]") if self.options.get_safe("with_mysql", False): - self.requires("libmysqlclient/8.0.31") + self.requires("libmysqlclient/8.1.0") if self.options.with_pq: - self.requires("libpq/15.3") + self.requires("libpq/15.4") if self.options.with_odbc: if self.settings.os != "Windows": self.requires("odbc/2.3.11") - - # Use from system - # if self.options.get_safe("with_openal", False): - # self.requires( - # f"openal/{os.environ['ASWF_OPENAL_VERSION']}@{self.user}/{self.channel}" - # ) - # if self.options.get_safe("with_libalsa", False): - # self.requires( - # f"libalsa/{os.environ['ASWF_LIBALSA_VERSION']}@{self.user}/{self.channel}" - # ) - # if self.options.get_safe("with_x11", False): - # self.requires("xkbcommon/1.5.0") - # self.requires("xorg/system") - # if ( - # self.settings.os != "Windows" - # and self.options.get_safe("opengl", "no") != "no" - # ): - # self.requires("opengl/system") - # if self.options.with_zstd: - # self.requires("zstd/1.5.5") - # if self.options.qtwayland: - # self.requires("xkbcommon/1.5.0") - # self.requires("wayland/1.22.0") - # if self.options.with_brotli: - # self.requires("brotli/1.1.0") - + if self.options.get_safe("with_openal", False): + self.requires("openal-soft/1.22.2") + if self.options.get_safe("with_libalsa", False): + self.requires("libalsa/1.2.10") + if self.options.get_safe("with_x11") or self.options.qtwayland: + self.requires("xkbcommon/1.5.0") + if self.options.get_safe("with_x11", False): + self.requires("xorg/system") + if self.options.get_safe("with_egl"): + self.requires("egl/system") + if self.settings.os != "Windows" and self.options.get_safe("opengl", "no") != "no": + self.requires("opengl/system") + if self.options.with_zstd: + self.requires("zstd/1.5.5") + if self.options.qtwayland: + self.requires("wayland/1.22.0") + if self.options.with_brotli: + self.requires("brotli/1.1.0") if self.options.get_safe("qtwebengine") and self.settings.os == "Linux": - self.requires( - f"expat/{os.environ['ASWF_EXPAT_VERSION']}@{self.user}/{self.channel}" - ) - - # Use from system - # self.requires( - # f"opus/{os.environ['ASWF_OPUS_VERSION']}@{self.user}/{self.channel}" - # ) - # self.requires( - # f"xorg-proto/{os.environ['ASWF_XORG_PROTO_VERSION']}@{self.user}/{self.channel}" - # ) - # self.requires( - # f"libxshmfence/{os.environ['ASWF_LIBXSHMFENCE_VERSION']}@{self.user}/{self.channel}" - # ) - # self.requires( - # f"nss/{os.environ['ASWF_NSS_VERSION']}@{self.user}/{self.channel}" - # ) - # self.requires( - # f"libdrm/{os.environ['ASWF_LIBDRM_VERSION']}@{self.user}/{self.channel}" - # ) + self.requires("expat/[>=2.6.2 <3]") + self.requires("opus/1.4") + self.requires("xorg-proto/2022.2") + self.requires("libxshmfence/1.3") + self.requires("nss/3.93") + self.requires("libdrm/2.4.119") if self.options.get_safe("with_gstreamer", False): + self.requires("gstreamer/1.19.2") self.requires("gst-plugins-base/1.19.2") if self.options.get_safe("with_pulseaudio", False): self.requires("pulseaudio/14.2") - # Use from system - # if self.options.with_dbus: - # self.requires( - # f"dbus/{os.environ['ASWF_DBUS_VERSION']}@{self.user}/{self.channel}" - # ) - if self.settings.os in ["Linux", "FreeBSD"] and self.options.with_gssapi: - self.requires("krb5/1.18.3") # conan-io/conan-center-index#4102 - # if self.options.get_safe("with_md4c", False): - # self.requires("md4c/0.4.8") + if self.options.with_dbus: + self.requires("dbus/1.15.8") + if self.settings.os in ['Linux', 'FreeBSD'] and self.options.with_gssapi: + self.requires("krb5/1.18.3") # conan-io/conan-center-index#4102 + if self.options.get_safe("with_md4c", False): + self.requires("md4c/0.4.8",transitive_libs=True) # ASWF otherwise does not link def build_requirements(self): - # self.tool_requires("cmake/[>=3.21.1 <4]") - self.build_requires( - f"cmake/{os.environ['ASWF_CMAKE_VERSION']}@{self.user}/{self.channel}" - ) - # self.tool_requires("ninja/1.11.1") - self.build_requires( - f"ninja/{os.environ['ASWF_NINJA_VERSION']}@{self.user}/ci_common{os.environ['CI_COMMON_VERSION']}" - ) - # if not self.conf.get("tools.gnu:pkg_config", check_type=str): - # self.tool_requires("pkgconf/2.0.2") + self.tool_requires("cmake/[>=3.21.1 <4]") + self.tool_requires("ninja/[>=1.12 <2]") + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/[>=2.2 <3]") if self.settings.os == "Windows": - self.tool_requires("strawberryperl/5.32.1.1") - - # Use from system - # if self.options.get_safe("qtwebengine"): - # self.tool_requires( - # f"nodejs/{os.environ['ASWF_NODEJS_VERSION']}@{self.user}/{self.channel}" - # ) - # self.tool_requires( - # f"gperf/{os.environ['ASWF_GPERF_VERSION']}@{self.user}/{self.channel}" - # ) - # # gperf, bison, flex, python >= 2.7.5 & < 3 - # if self.settings.os != "Windows": - # self.tool_requires( - # f"bison/{os.environ['ASWF_BISON_VERSION']}@{self.user}/{self.channel}" - # ) - # self.tool_requires( - # f"flex/{os.environ['ASWF_FLEX_VERSION']}@{self.user}/{self.channel}" - # ) - # else: - # self.tool_requires("winflexbison/2.5.24") + self.tool_requires('strawberryperl/5.32.1.1') + + if self.options.get_safe("qtwebengine"): + self.tool_requires("nodejs/18.15.0") + self.tool_requires("gperf/3.1") + # gperf, bison, flex, python >= 2.7.5 & < 3 + if self._settings_build.os == "Windows": + self.tool_requires("winflexbison/2.5.25") + else: + self.tool_requires("bison/3.8.2") + self.tool_requires("flex/2.6.4") if self.options.qtwayland: self.tool_requires("wayland/1.22.0") @@ -610,22 +490,26 @@ def generate(self): tc.set_property("libdrm", "cmake_file_name", "Libdrm") tc.set_property("libdrm::libdrm_libdrm", "cmake_target_name", "Libdrm::Libdrm") tc.set_property("wayland", "cmake_file_name", "Wayland") - tc.set_property( - "wayland::wayland-client", "cmake_target_name", "Wayland::Client" - ) - tc.set_property( - "wayland::wayland-server", "cmake_target_name", "Wayland::Server" - ) - tc.set_property( - "wayland::wayland-cursor", "cmake_target_name", "Wayland::Cursor" - ) + tc.set_property("wayland::wayland-client", "cmake_target_name", "Wayland::Client") + tc.set_property("wayland::wayland-server", "cmake_target_name", "Wayland::Server") + tc.set_property("wayland::wayland-cursor", "cmake_target_name", "Wayland::Cursor") tc.set_property("wayland::wayland-egl", "cmake_target_name", "Wayland::Egl") + + # override https://github.com/qt/qtbase/blob/dev/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake + tc.set_property("egl", "cmake_file_name", "EGL") + tc.set_property("egl", "cmake_find_mode", "module") + tc.set_property("egl::egl", "cmake_target_name", "EGL::EGL") + + # don't override https://github.com/qt/qtmultimedia/blob/dev/cmake/FindGStreamer.cmake + tc.set_property("gstreamer", "cmake_file_name", "gstreamer_conan") + tc.set_property("gstreamer", "cmake_find_mode", "module") + tc.generate() for f in glob.glob("*.cmake"): - replace_in_file( - self, f, " IMPORTED)\n", " IMPORTED GLOBAL)\n", strict=False - ) + replace_in_file(self, f, + " IMPORTED)\n", + " IMPORTED GLOBAL)\n", strict=False) pc = PkgConfigDeps(self) pc.generate() @@ -655,12 +539,7 @@ def generate(self): tc = CMakeToolchain(self, generator="Ninja") - package_folder = self.package_folder.replace("\\", "/") - tc.variables["INSTALL_MKSPECSDIR"] = f"{package_folder}/res/archdatadir/mkspecs" - tc.variables["INSTALL_ARCHDATADIR"] = f"{package_folder}/res/archdatadir" - tc.variables["INSTALL_LIBEXECDIR"] = f"{package_folder}/bin" - tc.variables["INSTALL_DATADIR"] = f"{package_folder}/res/datadir" - tc.variables["INSTALL_SYSCONFDIR"] = f"{package_folder}/res/sysconfdir" + tc.absolute_paths = True tc.variables["QT_BUILD_TESTS"] = "OFF" tc.variables["QT_BUILD_EXAMPLES"] = "OFF" @@ -670,15 +549,12 @@ def generate(self): if self.options.multiconfiguration: tc.variables["CMAKE_CONFIGURATION_TYPES"] = "Release;Debug" - tc.variables["FEATURE_optimize_size"] = ( - "ON" if self.settings.build_type == "MinSizeRel" else "OFF" - ) + tc.variables["FEATURE_optimize_size"] = ("ON" if self.settings.build_type == "MinSizeRel" else "OFF") for module in self._get_module_tree: - if module != "qtbase": - tc.variables[f"BUILD_{module}"] = ( - "ON" if self.options.get_safe(module) else "OFF" - ) + tc.variables[f"BUILD_{module}"] = ("ON" if getattr(self.options, module) else "OFF") + tc.variables["BUILD_qtqa"] = "OFF" + tc.variables["BUILD_qtrepotools"] = "OFF" tc.variables["FEATURE_system_zlib"] = "ON" @@ -689,18 +565,17 @@ def generate(self): tc.variables["INPUT_openssl"] = "no" else: tc.variables["HAVE_openssl"] = "ON" + # ASWF: avoid openssl package, system one is shared # if self.dependencies["openssl"].options.shared: tc.variables["INPUT_openssl"] = "runtime" tc.variables["QT_FEATURE_openssl_runtime"] = "ON" # else: - # tc.variables["INPUT_openssl"] = "linked" - # tc.variables["QT_FEATURE_openssl_linked"] = "ON" + # tc.variables["INPUT_openssl"] = "linked" + # tc.variables["QT_FEATURE_openssl_linked"] = "ON" # TODO: Remove after fixing https://github.com/conan-io/conan/issues/12012 if is_msvc(self): - tc.cache_variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = str( - self.settings.build_type - ) + tc.cache_variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = str(self.settings.build_type) if self.options.with_dbus: tc.variables["INPUT_dbus"] = "linked" @@ -708,33 +583,42 @@ def generate(self): tc.variables["FEATURE_dbus"] = "OFF" tc.variables["CMAKE_FIND_DEBUG_MODE"] = "FALSE" - for opt, conf_arg in [ - ("with_glib", "glib"), - ("with_icu", "icu"), - ("with_fontconfig", "fontconfig"), - ("with_mysql", "sql_mysql"), - ("with_pq", "sql_psql"), - ("with_odbc", "sql_odbc"), - ("gui", "gui"), - ("widgets", "widgets"), - ("with_zstd", "zstd"), - ("with_vulkan", "vulkan"), - ("with_brotli", "brotli"), - ("with_gssapi", "gssapi"), - ]: - tc.variables[f"FEATURE_{conf_arg}"] = ( - "ON" if self.options.get_safe(opt, False) else "OFF" - ) + if not self.options.with_zstd: + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_WrapZSTD"] = "ON" + + if not self.options.get_safe("with_vulkan"): + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_WrapVulkanHeaders"] = "ON" + + # Prevent finding LibClang from the system + # this is needed by the QDoc tool inside Qt Tools + # See: https://github.com/conan-io/conan-center-index/issues/24729#issuecomment-2255291495 + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_WrapLibClang"] = "ON" + + for opt, conf_arg in [("with_glib", "glib"), + ("with_icu", "icu"), + ("with_fontconfig", "fontconfig"), + ("with_mysql", "sql_mysql"), + ("with_pq", "sql_psql"), + ("with_odbc", "sql_odbc"), + ("gui", "gui"), + ("widgets", "widgets"), + ("with_zstd", "zstd"), + ("with_vulkan", "vulkan"), + ("with_brotli", "brotli"), + ("with_gssapi", "gssapi"), + ("with_egl", "egl"), + ("with_gstreamer", "gstreamer")]: + tc.variables[f"FEATURE_{conf_arg}"] = ("ON" if self.options.get_safe(opt, False) else "OFF") + for opt, conf_arg in [ - ("with_doubleconversion", "doubleconversion"), - ("with_freetype", "freetype"), - ("with_harfbuzz", "harfbuzz"), - ("with_libjpeg", "jpeg"), - ("with_libpng", "png"), - ("with_sqlite3", "sqlite"), - ("with_pcre2", "pcre2"), - ]: + ("with_doubleconversion", "doubleconversion"), + ("with_freetype", "freetype"), + ("with_harfbuzz", "harfbuzz"), + ("with_libjpeg", "jpeg"), + ("with_libpng", "png"), + ("with_sqlite3", "sqlite"), + ("with_pcre2", "pcre2"),]: if self.options.get_safe(opt, False): if self.options.multiconfiguration: tc.variables[f"FEATURE_{conf_arg}"] = "ON" @@ -745,14 +629,13 @@ def generate(self): tc.variables[f"FEATURE_system_{conf_arg}"] = "OFF" for opt, conf_arg in [ - ("with_doubleconversion", "doubleconversion"), - ("with_freetype", "freetype"), - ("with_harfbuzz", "harfbuzz"), - ("with_libjpeg", "libjpeg"), - ("with_libpng", "libpng"), - ("with_md4c", "libmd4c"), - ("with_pcre2", "pcre"), - ]: + ("with_doubleconversion", "doubleconversion"), + ("with_freetype", "freetype"), + ("with_harfbuzz", "harfbuzz"), + ("with_libjpeg", "libjpeg"), + ("with_libpng", "libpng"), + ("with_md4c", "libmd4c"), + ("with_pcre2", "pcre"),]: if self.options.get_safe(opt, False): if self.options.multiconfiguration: tc.variables[f"INPUT_{conf_arg}"] = "qt" @@ -768,12 +651,10 @@ def generate(self): tc.variables["FEATURE_framework"] = "OFF" elif self.settings.os == "Android": tc.variables["CMAKE_ANDROID_NATIVE_API_LEVEL"] = self.settings.os.api_level - tc.variables["ANDROID_ABI"] = { - "armv7": "armeabi-v7a", - "armv8": "arm64-v8a", - "x86": "x86", - "x86_64": "x86_64", - }.get(str(self.settings.arch)) + tc.variables["ANDROID_ABI"] = {"armv7": "armeabi-v7a", + "armv8": "arm64-v8a", + "x86": "x86", + "x86_64": "x86_64"}.get(str(self.settings.arch)) if self.options.sysroot: tc.variables["CMAKE_SYSROOT"] = self.options.sysroot @@ -785,42 +666,42 @@ def generate(self): if xplatform_val: tc.variables["QT_QMAKE_TARGET_MKSPEC"] = xplatform_val else: - self.output.warning( - f"host not supported: {self.settings.os} {self.settings.compiler} {self.settings.compiler.version} {self.settings.arch}" - ) + self.output.warning(f"host not supported: {self.settings.os} {self.settings.compiler} {self.settings.compiler.version} {self.settings.arch}") if self.options.cross_compile: - tc.variables[ - "QT_QMAKE_DEVICE_OPTIONS" - ] = f"CROSS_COMPILE={self.options.cross_compile}" + tc.variables["QT_QMAKE_DEVICE_OPTIONS"] = f"CROSS_COMPILE={self.options.cross_compile}" + if cross_building(self): + tc.variables["QT_HOST_PATH"] = self.dependencies.direct_build["qt"].package_folder tc.variables["FEATURE_pkg_config"] = "ON" - if ( - self.settings.compiler == "gcc" - and self.settings.build_type == "Debug" - and not self.options.shared - ): + if self.settings.compiler == "gcc" and self.settings.build_type == "Debug" and not self.options.shared: tc.variables["BUILD_WITH_PCH"] = "OFF" # disabling PCH to save disk space if self.settings.os == "Windows": - tc.variables["HOST_PERL"] = self.dependencies.build[ - "strawberryperl" - ].conf_info.get("user.strawberryperl:perl", check_type=str) - # "set(QT_EXTRA_INCLUDEPATHS ${CONAN_INCLUDE_DIRS})\n" - # "set(QT_EXTRA_DEFINES ${CONAN_DEFINES})\n" - # "set(QT_EXTRA_LIBDIRS ${CONAN_LIB_DIRS})\n" - - current_cpp_std = self.settings.get_safe( - "compiler.cppstd", default_cppstd(self) - ) + tc.variables["HOST_PERL"] = self.dependencies.build["strawberryperl"].conf_info.get("user.strawberryperl:perl", check_type=str) + #"set(QT_EXTRA_INCLUDEPATHS ${CONAN_INCLUDE_DIRS})\n" + #"set(QT_EXTRA_DEFINES ${CONAN_DEFINES})\n" + #"set(QT_EXTRA_LIBDIRS ${CONAN_LIB_DIRS})\n" + + current_cpp_std = self.settings.get_safe("compiler.cppstd", default_cppstd(self)) current_cpp_std = str(current_cpp_std).replace("gnu", "") - cpp_std_map = {"20": "FEATURE_cxx20"} + cpp_std_map = { + 11: "FEATURE_cxx11", + 14: "FEATURE_cxx14", + 17: "FEATURE_cxx17", + 20: "FEATURE_cxx20" + } if Version(self.version) >= "6.5.0": - cpp_std_map["23"] = "FEATURE_cxx2b" + cpp_std_map[23] = "FEATURE_cxx2b" + + for std, feature in cpp_std_map.items(): + tc.variables[feature] = "ON" if int(current_cpp_std) >= std else "OFF" - tc.variables[cpp_std_map.get(current_cpp_std, "FEATURE_cxx17")] = "ON" tc.variables["QT_USE_VCPKG"] = False tc.cache_variables["QT_USE_VCPKG"] = False + # ASWF: qt cmake configuration doesn't follow layout(), force DSOs in lib64 + tc.variables["INSTALL_LIBDIR"] = "lib64" + tc.generate() def package_id(self): @@ -839,117 +720,64 @@ def package_id(self): def source(self): destination = self.source_folder - if self.info.settings.os == "Windows": + if platform.system() == "Windows": # Don't use os.path.join, or it removes the \\?\ prefix, which enables long paths destination = rf"\\?\{self.source_folder}" - get( - self, - **self.conan_data["sources"][self.version], - strip_root=True, - destination=destination, - ) + get(self, **self.conan_data["sources"][self.version], + strip_root=True, destination=destination) # patching in source method because of no_copy_source attribute - apply_conandata_patches(self) - for f in [ - "renderer", - os.path.join("renderer", "core"), - os.path.join("renderer", "platform"), - ]: - replace_in_file( - self, - os.path.join( - self.source_folder, - "qtwebengine", - "src", - "3rdparty", - "chromium", - "third_party", - "blink", - f, - "BUILD.gn", - ), - " if (enable_precompiled_headers) {\n if (is_win) {", - " if (enable_precompiled_headers) {\n if (false) {", - ) - - replace_in_file( - self, - os.path.join( - self.source_folder, "qtbase", "cmake", "QtInternalTargets.cmake" - ), - "-Zc:wchar_t", - "-Zc:wchar_t -Zc:twoPhase-", - ) + for f in ["renderer", os.path.join("renderer", "core"), os.path.join("renderer", "platform")]: + replace_in_file(self, os.path.join(self.source_folder, "qtwebengine", "src", "3rdparty", "chromium", "third_party", "blink", f, "BUILD.gn"), + " if (enable_precompiled_headers) {\n if (is_win) {", + " if (enable_precompiled_headers) {\n if (false) {" + ) + for f in ["FindPostgreSQL.cmake"]: file = os.path.join(self.source_folder, "qtbase", "cmake", f) if os.path.isfile(file): os.remove(file) # workaround QTBUG-94356 - replace_in_file( - self, - os.path.join( - self.source_folder, "qtbase", "cmake", "FindWrapSystemZLIB.cmake" - ), - '"-lz"', - "ZLIB::ZLIB", - ) - replace_in_file( - self, - os.path.join(self.source_folder, "qtbase", "configure.cmake"), + replace_in_file(self, os.path.join(self.source_folder, "qtbase", "cmake", "FindWrapSystemZLIB.cmake"), '"-lz"', 'ZLIB::ZLIB') + replace_in_file(self, os.path.join(self.source_folder, "qtbase", "configure.cmake"), "set_property(TARGET ZLIB::ZLIB PROPERTY IMPORTED_GLOBAL TRUE)", - "", - ) + "") if Version(self.version) <= "6.4.0": # use official variable name https://cmake.org/cmake/help/latest/module/FindFontconfig.html - replace_in_file( - self, - os.path.join( - self.source_folder, "qtbase", "src", "gui", "configure.cmake" - ), - "FONTCONFIG_FOUND", - "Fontconfig_FOUND", - ) - - replace_in_file( - self, - os.path.join(self.source_folder, "qtbase", "cmake", "QtAutoDetect.cmake"), - "qt_auto_detect_vcpkg()", - "# qt_auto_detect_vcpkg()", + replace_in_file(self, os.path.join(self.source_folder, "qtbase", "src", "gui", "configure.cmake"), "FONTCONFIG_FOUND", "Fontconfig_FOUND") + + replace_in_file(self, + os.path.join(self.source_folder, "qtbase", "cmake", "QtAutoDetect.cmake" if Version(self.version) < "6.6.2" else "QtAutoDetectHelpers.cmake"), + "qt_auto_detect_vcpkg()", + "# qt_auto_detect_vcpkg()") + + # Handle locating moltenvk headers when vulkan is enabled on macOS + replace_in_file(self, os.path.join(self.source_folder, "qtbase", "cmake", "FindWrapVulkanHeaders.cmake"), + "if(APPLE)", "if(APPLE)\n" + " find_package(moltenvk REQUIRED QUIET)\n" + " target_include_directories(WrapVulkanHeaders::WrapVulkanHeaders INTERFACE ${moltenvk_INCLUDE_DIR})" ) def _xplatform(self): if self.settings.os == "Linux": if self.settings.compiler == "gcc": - return { - "x86": "linux-g++-32", - "armv6": "linux-arm-gnueabi-g++", - "armv7": "linux-arm-gnueabi-g++", - "armv7hf": "linux-arm-gnueabi-g++", - "armv8": "linux-aarch64-gnu-g++", - }.get(str(self.settings.arch), "linux-g++") + return {"x86": "linux-g++-32", + "armv6": "linux-arm-gnueabi-g++", + "armv7": "linux-arm-gnueabi-g++", + "armv7hf": "linux-arm-gnueabi-g++", + "armv8": "linux-aarch64-gnu-g++"}.get(str(self.settings.arch), "linux-g++") if self.settings.compiler == "clang": if self.settings.arch == "x86": - return ( - "linux-clang-libc++-32" - if self.settings.compiler.libcxx == "libc++" - else "linux-clang-32" - ) + return "linux-clang-libc++-32" if self.settings.compiler.libcxx == "libc++" else "linux-clang-32" if self.settings.arch == "x86_64": - return ( - "linux-clang-libc++" - if self.settings.compiler.libcxx == "libc++" - else "linux-clang" - ) + return "linux-clang-libc++" if self.settings.compiler.libcxx == "libc++" else "linux-clang" elif self.settings.os == "Macos": - return { - "clang": "macx-clang", - "apple-clang": "macx-clang", - "gcc": "macx-g++", - }.get(str(self.settings.compiler)) + return {"clang": "macx-clang", + "apple-clang": "macx-clang", + "gcc": "macx-g++"}.get(str(self.settings.compiler)) elif self.settings.os == "iOS": if self.settings.compiler == "apple-clang": @@ -985,62 +813,46 @@ def _xplatform(self): "191": "15", "192": "16", }.get(str(self.settings.compiler.version)) - return ( - { - "14": { - "armv7": "winrt-arm-msvc2015", - "x86": "winrt-x86-msvc2015", - "x86_64": "winrt-x64-msvc2015", - }, - "15": { - "armv7": "winrt-arm-msvc2017", - "x86": "winrt-x86-msvc2017", - "x86_64": "winrt-x64-msvc2017", - }, - "16": { - "armv7": "winrt-arm-msvc2019", - "x86": "winrt-x86-msvc2019", - "x86_64": "winrt-x64-msvc2019", - }, + return { + "14": { + "armv7": "winrt-arm-msvc2015", + "x86": "winrt-x86-msvc2015", + "x86_64": "winrt-x64-msvc2015", + }, + "15": { + "armv7": "winrt-arm-msvc2017", + "x86": "winrt-x86-msvc2017", + "x86_64": "winrt-x64-msvc2017", + }, + "16": { + "armv7": "winrt-arm-msvc2019", + "x86": "winrt-x86-msvc2019", + "x86_64": "winrt-x64-msvc2019", } - .get(msvc_version) - .get(str(self.settings.arch)) - ) + }.get(msvc_version).get(str(self.settings.arch)) elif self.settings.os == "FreeBSD": - return {"clang": "freebsd-clang", "gcc": "freebsd-g++"}.get( - str(self.settings.compiler) - ) + return {"clang": "freebsd-clang", + "gcc": "freebsd-g++"}.get(str(self.settings.compiler)) elif self.settings.os == "SunOS": if self.settings.compiler == "sun-cc": if self.settings.arch == "sparc": - return ( - "solaris-cc-stlport" - if self.settings.compiler.libcxx == "libstlport" - else "solaris-cc" - ) + return "solaris-cc-stlport" if self.settings.compiler.libcxx == "libstlport" else "solaris-cc" if self.settings.arch == "sparcv9": - return ( - "solaris-cc64-stlport" - if self.settings.compiler.libcxx == "libstlport" - else "solaris-cc64" - ) + return "solaris-cc64-stlport" if self.settings.compiler.libcxx == "libstlport" else "solaris-cc64" elif self.settings.compiler == "gcc": - return {"sparc": "solaris-g++", "sparcv9": "solaris-g++-64"}.get( - str(self.settings.arch) - ) + return {"sparc": "solaris-g++", + "sparcv9": "solaris-g++-64"}.get(str(self.settings.arch)) elif self.settings.os == "Neutrino" and self.settings.compiler == "qcc": - return { - "armv8": "qnx-aarch64le-qcc", - "armv8.3": "qnx-aarch64le-qcc", - "armv7": "qnx-armle-v7-qcc", - "armv7hf": "qnx-armle-v7-qcc", - "armv7s": "qnx-armle-v7-qcc", - "armv7k": "qnx-armle-v7-qcc", - "x86": "qnx-x86-qcc", - "x86_64": "qnx-x86-64-qcc", - }.get(str(self.settings.arch)) + return {"armv8": "qnx-aarch64le-qcc", + "armv8.3": "qnx-aarch64le-qcc", + "armv7": "qnx-armle-v7-qcc", + "armv7hf": "qnx-armle-v7-qcc", + "armv7s": "qnx-armle-v7-qcc", + "armv7k": "qnx-armle-v7-qcc", + "x86": "qnx-x86-qcc", + "x86_64": "qnx-x86-64-qcc"}.get(str(self.settings.arch)) elif self.settings.os == "Emscripten" and self.settings.arch == "wasm": return "wasm-emscripten" @@ -1056,21 +868,17 @@ def build(self): @property def _cmake_executables_file(self): - return os.path.join( - "lib", "cmake", "Qt6Core", "conan_qt_executables_variables.cmake" - ) + # ASWF: cmake modules in lib64 + return os.path.join("lib64", "cmake", "Qt6Core", "conan_qt_executables_variables.cmake") @property def _cmake_entry_point_file(self): - return os.path.join("lib", "cmake", "Qt6Core", "conan_qt_entry_point.cmake") + # ASWF: cmake modules in lib64 + return os.path.join("lib64", "cmake", "Qt6Core", "conan_qt_entry_point.cmake") def _cmake_qt6_private_file(self, module): - return os.path.join( - "lib", - "cmake", - f"Qt6{module}", - f"conan_qt_qt6_{module.lower()}private.cmake", - ) + # ASWF: cmake modules in lib64 + return os.path.join("lib64", "cmake", f"Qt6{module}", f"conan_qt_qt6_{module.lower()}private.cmake") def package(self): if self.settings.os == "Macos": @@ -1078,38 +886,33 @@ def package(self): save(self, ".qmake.super", "") cmake = CMake(self) cmake.install() - copy( - self, - "*LICENSE*", - self.source_folder, - os.path.join(self.package_folder, "licenses"), - ) + # ASWF: license files in per package dirs + copy(self,"*LICENSE*",self.source_folder,os.path.join(self.package_folder, "licenses",self.name)) for module in self._get_module_tree: if module != "qtbase" and not self.options.get_safe(module): rmdir(self, os.path.join(self.package_folder, "licenses", module)) - rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - # We want to be able to easily consume Conan packages using CMake outside of Conan itself + # ASWF: pkgconfig modules in lib64 + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + # ASWF: We want to be able to easily consume Conan packages using CMake outside of Conan itself # for mask in ["Find*.cmake", "*Config.cmake", "*-config.cmake"]: # rm(self, mask, self.package_folder, recursive=True) - rm(self, "*.la*", os.path.join(self.package_folder, "lib"), recursive=True) + rm(self, "*.la*", os.path.join(self.package_folder, "lib64"), recursive=True) rm(self, "*.pdb*", self.package_folder, recursive=True) rm(self, "ensure_pro_file.cmake", self.package_folder, recursive=True) - os.remove( - os.path.join(self.package_folder, "bin", "qt-cmake-private-install.cmake") - ) + os.remove(os.path.join(self.package_folder, "libexec" if Version(self.version) >= "6.5.0" and self.settings.os != "Windows" else "bin", "qt-cmake-private-install.cmake")) + + # ASWF: cmake modules in lib64 + for m in os.listdir(os.path.join(self.package_folder, "lib64", "cmake")): + if os.path.isfile(os.path.join(self.package_folder, "lib64", "cmake", m, f"{m}Macros.cmake")): + continue + if glob.glob(os.path.join(self.package_folder, "lib64", "cmake", m, "QtPublic*Helpers.cmake")): + continue + if m.endswith("Tools"): + if os.path.isfile(os.path.join(self.package_folder, "lib64", "cmake", m, f"{m[:-5]}Macros.cmake")): + continue - for m in os.listdir(os.path.join(self.package_folder, "lib", "cmake")): - module = os.path.join( - self.package_folder, "lib", "cmake", m, f"{m}Macros.cmake" - ) - helper_modules = glob.glob( - os.path.join( - self.package_folder, "lib", "cmake", m, "QtPublic*Helpers.cmake" - ) - ) - # Same as above, don't limit exported CMake files - # if not os.path.isfile(module) and not helper_modules: - # rmdir(self, os.path.join(self.package_folder, "lib", "cmake", m)) + # ASWF: don't remove cmake modules + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake", m)) extension = "" if self.settings.os == "Windows": @@ -1119,6 +922,8 @@ def package(self): filecontents += f"set(QT_VERSION_MAJOR {ver.major})\n" filecontents += f"set(QT_VERSION_MINOR {ver.minor})\n" filecontents += f"set(QT_VERSION_PATCH {ver.patch})\n" + if self.settings.os == "Macos": + filecontents += 'set(__qt_internal_cmake_apple_support_files_path "${CMAKE_CURRENT_LIST_DIR}/../../../lib/cmake/Qt6/macos")\n' targets = ["moc", "rcc", "tracegen", "cmake_automoc_parser", "qlalr", "qmake"] if self.options.with_dbus: targets.extend(["qdbuscpp2xml", "qdbusxml2cpp"]) @@ -1126,70 +931,53 @@ def package(self): targets.append("qvkgen") if self.options.widgets: targets.append("uic") + if self._settings_build.os == "Macos" and self.settings.os != "iOS": + targets.extend(["macdeployqt"]) + if self.settings.os == "Windows": + targets.extend(["windeployqt"]) if self.options.qttools: targets.extend(["qhelpgenerator", "qtattributionsscanner"]) - if self.settings.os == "Windows": - targets.extend(["windeployqt"]) - targets.extend( - [ - "lconvert", - "lprodump", - "lrelease", - "lrelease-pro", - "lupdate", - "lupdate-pro", - ] - ) + targets.extend(["lconvert", "lprodump", "lrelease", "lrelease-pro", "lupdate", "lupdate-pro"]) if self.options.qtshadertools: targets.append("qsb") if self.options.qtdeclarative: - targets.extend( - ["qmltyperegistrar", "qmlcachegen", "qmllint", "qmlimportscanner"] - ) - targets.extend( - ["qmlformat", "qml", "qmlprofiler", "qmlpreview", "qmltestrunner"] - ) + targets.extend(["qmltyperegistrar", "qmlcachegen", "qmllint", "qmlimportscanner"]) + targets.extend(["qmlformat", "qml", "qmlprofiler", "qmlpreview"]) + # Note: consider "qmltestrunner", see https://github.com/conan-io/conan-center-index/issues/24276 if self.options.get_safe("qtremoteobjects"): targets.append("repc") if self.options.get_safe("qtscxml"): targets.append("qscxmlc") for target in targets: exe_path = None - for path_ in [f"bin/{target}{extension}", f"lib/{target}{extension}"]: + for path_ in [f"bin/{target}{extension}", + f"lib64/{target}{extension}", # ASWF: DSOs in lib64 + f"libexec/{target}{extension}"]: if os.path.isfile(os.path.join(self.package_folder, path_)): exe_path = path_ break + else: + assert False, f"Could not find executable {target}{extension} in {self.package_folder}" if not exe_path: self.output.warning(f"Could not find path to {target}{extension}") - filecontents += textwrap.dedent( - f"""\ + filecontents += textwrap.dedent(f"""\ if(NOT TARGET ${{QT_CMAKE_EXPORT_NAMESPACE}}::{target}) add_executable(${{QT_CMAKE_EXPORT_NAMESPACE}}::{target} IMPORTED) set_target_properties(${{QT_CMAKE_EXPORT_NAMESPACE}}::{target} PROPERTIES IMPORTED_LOCATION ${{CMAKE_CURRENT_LIST_DIR}}/../../../{exe_path}) endif() - """ - ) + """) - filecontents += textwrap.dedent( - f"""\ + filecontents += textwrap.dedent(f"""\ if(NOT DEFINED QT_DEFAULT_MAJOR_VERSION) set(QT_DEFAULT_MAJOR_VERSION {ver.major}) endif() - """ - ) + """) filecontents += 'set(CMAKE_AUTOMOC_MACRO_NAMES "Q_OBJECT" "Q_GADGET" "Q_GADGET_EXPORT" "Q_NAMESPACE" "Q_NAMESPACE_EXPORT")\n' - save( - self, - os.path.join(self.package_folder, self._cmake_executables_file), - filecontents, - ) + save(self, os.path.join(self.package_folder, self._cmake_executables_file), filecontents) def _create_private_module(module, dependencies): - dependencies_string = ";".join( - f"Qt6::{dependency}" for dependency in dependencies - ) - contents = textwrap.dedent( - f"""\ + dependencies_string = ';'.join(f"Qt6::{dependency}" for dependency in dependencies) + contents = textwrap.dedent(f"""\ if(NOT TARGET Qt6::{module}Private) add_library(Qt6::{module}Private INTERFACE IMPORTED) @@ -1203,14 +991,9 @@ def _create_private_module(module, dependencies): INTERFACE_LINK_LIBRARIES "Qt6::{module}Private" _qt_is_versionless_target "TRUE" ) - endif()""" - ) + endif()""") - save( - self, - os.path.join(self.package_folder, self._cmake_qt6_private_file(module)), - contents, - ) + save(self, os.path.join(self.package_folder, self._cmake_qt6_private_file(module)), contents) _create_private_module("Core", ["Core"]) @@ -1222,10 +1005,15 @@ def _create_private_module(module, dependencies): if self.options.qtdeclarative: _create_private_module("Qml", ["CorePrivate", "Qml"]) + # ASWF: cmake modules in lib64 + save(self, os.path.join(self.package_folder, "lib64", "cmake", "Qt6Qml", "conan_qt_qt6_policies.cmake"), textwrap.dedent("""\ + set(QT_KNOWN_POLICY_QTP0001 TRUE) + """)) + if self.options.gui and self.options.qtshadertools: + _create_private_module("Quick", ["CorePrivate", "GuiPrivate", "QmlPrivate", "Quick"]) if self.settings.os in ["Windows", "iOS"]: - contents = textwrap.dedent( - """\ + contents = textwrap.dedent("""\ set(entrypoint_conditions "$>>") list(APPEND entrypoint_conditions "$,EXECUTABLE>") if(WIN32) @@ -1236,13 +1024,8 @@ def _create_private_module(module, dependencies): set_property( TARGET ${QT_CMAKE_EXPORT_NAMESPACE}::Core APPEND PROPERTY INTERFACE_LINK_LIBRARIES "$<${entrypoint_conditions}:${QT_CMAKE_EXPORT_NAMESPACE}::EntryPointPrivate>" - )""" - ) - save( - self, - os.path.join(self.package_folder, self._cmake_entry_point_file), - contents, - ) + )""") + save(self, os.path.join(self.package_folder, self._cmake_entry_point_file), contents) def package_info(self): self.cpp_info.set_property("cmake_file_name", "Qt6") @@ -1252,29 +1035,18 @@ def package_info(self): self.cpp_info.names["cmake_find_package_multi"] = "Qt6" # consumers will need the QT_PLUGIN_PATH defined in runenv - self.runenv_info.define( - "QT_PLUGIN_PATH", - os.path.join(self.package_folder, "res", "archdatadir", "plugins"), - ) - self.buildenv_info.define( - "QT_PLUGIN_PATH", - os.path.join(self.package_folder, "res", "archdatadir", "plugins"), - ) + self.runenv_info.define("QT_PLUGIN_PATH", os.path.join(self.package_folder, "plugins")) + self.buildenv_info.define("QT_PLUGIN_PATH", os.path.join(self.package_folder, "plugins")) self.buildenv_info.define("QT_HOST_PATH", self.package_folder) build_modules = {} - def _add_build_module(component, module): if component not in build_modules: build_modules[component] = [] build_modules[component].append(module) - self.cpp_info.components[component].build_modules[ - "cmake_find_package" - ].append(module) - self.cpp_info.components[component].build_modules[ - "cmake_find_package_multi" - ].append(module) + self.cpp_info.components[component].build_modules["cmake_find_package"].append(module) + self.cpp_info.components[component].build_modules["cmake_find_package_multi"].append(module) libsuffix = "" if self.settings.build_type == "Debug": @@ -1290,71 +1062,42 @@ def _get_corrected_reqs(requires): corrected_req = r else: corrected_req = f"qt{r}" - assert ( - corrected_req in self.cpp_info.components - ), f"{corrected_req} required but not yet present in self.cpp_info.components" + assert corrected_req in self.cpp_info.components, f"{corrected_req} required but not yet present in self.cpp_info.components" reqs.append(corrected_req) return reqs def _create_module(module, requires, has_include_dir=True): componentname = f"qt{module}" - assert ( - componentname not in self.cpp_info.components - ), f"Module {module} already present in self.cpp_info.components" - self.cpp_info.components[componentname].set_property( - "cmake_target_name", f"Qt6::{module}" - ) - self.cpp_info.components[componentname].set_property( - "pkg_config_name", f"Qt6{module}" - ) + assert componentname not in self.cpp_info.components, f"Module {module} already present in self.cpp_info.components" + self.cpp_info.components[componentname].set_property("cmake_target_name", f"Qt6::{module}") + self.cpp_info.components[componentname].set_property("pkg_config_name", f"Qt6{module}") self.cpp_info.components[componentname].names["cmake_find_package"] = module - self.cpp_info.components[componentname].names[ - "cmake_find_package_multi" - ] = module + self.cpp_info.components[componentname].names["cmake_find_package_multi"] = module if module.endswith("Private"): libname = module[:-7] else: libname = module self.cpp_info.components[componentname].libs = [f"Qt6{libname}{libsuffix}"] if has_include_dir: - self.cpp_info.components[componentname].includedirs = [ - "include", - os.path.join("include", f"Qt{module}"), - ] - self.cpp_info.components[componentname].defines = [ - f"QT_{module.upper()}_LIB" - ] + self.cpp_info.components[componentname].includedirs = ["include", os.path.join("include", f"Qt{module}")] + self.cpp_info.components[componentname].defines = [f"QT_{module.upper()}_LIB"] if module != "Core" and "Core" not in requires: requires.append("Core") - self.cpp_info.components[componentname].requires = _get_corrected_reqs( - requires - ) + self.cpp_info.components[componentname].requires = _get_corrected_reqs(requires) def _create_plugin(pluginname, libname, plugintype, requires): componentname = f"qt{pluginname}" - assert ( - componentname not in self.cpp_info.components - ), f"Plugin {pluginname} already present in self.cpp_info.components" - self.cpp_info.components[componentname].set_property( - "cmake_target_name", f"Qt6::{pluginname}" - ) - self.cpp_info.components[componentname].names[ - "cmake_find_package" - ] = pluginname - self.cpp_info.components[componentname].names[ - "cmake_find_package_multi" - ] = pluginname + assert componentname not in self.cpp_info.components, f"Plugin {pluginname} already present in self.cpp_info.components" + self.cpp_info.components[componentname].set_property("cmake_target_name", f"Qt6::{pluginname}") + self.cpp_info.components[componentname].names["cmake_find_package"] = pluginname + self.cpp_info.components[componentname].names["cmake_find_package_multi"] = pluginname if not self.options.shared: self.cpp_info.components[componentname].libs = [libname + libsuffix] - self.cpp_info.components[componentname].libdirs = [ - os.path.join("res", "archdatadir", "plugins", plugintype) - ] + self.cpp_info.components[componentname].libdirs = [os.path.join("plugins", plugintype)] self.cpp_info.components[componentname].includedirs = [] if "Core" not in requires: requires.append("Core") - self.cpp_info.components[componentname].requires = _get_corrected_reqs( - requires - ) + self.cpp_info.components[componentname].requires = _get_corrected_reqs(requires) core_reqs = ["zlib::zlib"] if self.options.with_pcre2: @@ -1367,19 +1110,20 @@ def _create_plugin(pluginname, libname, plugintype, requires): core_reqs.append("zstd::zstd") if self.options.with_glib: core_reqs.append("glib::glib") - if self.options.openssl: - core_reqs.append("openssl::openssl") # used by QCryptographicHash + # ASWF: openssl dependency is tricky + # if self.options.openssl: + # core_reqs.append("openssl::openssl") # used by QCryptographicHash _create_module("Core", core_reqs) pkg_config_vars = [ "bindir=${prefix}/bin", - "libexecdir=${prefix}/bin", + "libexecdir=${prefix}/libexec", "exec_prefix=${prefix}", ] - self.cpp_info.components["qtCore"].set_property( - "pkg_config_custom_content", "\n".join(pkg_config_vars) - ) + self.cpp_info.components["qtCore"].set_property("pkg_config_custom_content", "\n".join(pkg_config_vars)) + if self.settings.build_type != "Debug": + self.cpp_info.components['qtCore'].defines.append('QT_NO_DEBUG') if self.settings.os == "Windows": self.cpp_info.components["qtCore"].system_libs.append("authz") if is_msvc(self): @@ -1387,18 +1131,18 @@ def _create_plugin(pluginname, libname, plugintype, requires): self.cpp_info.components["qtCore"].cxxflags.append("-Zc:__cplusplus") self.cpp_info.components["qtCore"].system_libs.append("synchronization") self.cpp_info.components["qtCore"].system_libs.append("runtimeobject") - self.cpp_info.components["qtPlatform"].set_property( - "cmake_target_name", "Qt6::Platform" - ) + self.cpp_info.components["qtPlatform"].set_property("cmake_target_name", "Qt6::Platform") self.cpp_info.components["qtPlatform"].names["cmake_find_package"] = "Platform" - self.cpp_info.components["qtPlatform"].names[ - "cmake_find_package_multi" - ] = "Platform" - self.cpp_info.components["qtPlatform"].includedirs = [ - os.path.join("res", "archdatadir", "mkspecs", self._xplatform()) - ] + self.cpp_info.components["qtPlatform"].names["cmake_find_package_multi"] = "Platform" + self.cpp_info.components["qtPlatform"].includedirs = [os.path.join("mkspecs", self._xplatform())] if self.options.with_dbus: _create_module("DBus", ["dbus::dbus"]) + if self.settings.os == "Windows": + # https://github.com/qt/qtbase/blob/v6.6.1/src/dbus/CMakeLists.txt#L71-L77 + self.cpp_info.components["qtDBus"].system_libs.append("advapi32") + self.cpp_info.components["qtDBus"].system_libs.append("netapi32") + self.cpp_info.components["qtDBus"].system_libs.append("user32") + self.cpp_info.components["qtDBus"].system_libs.append("ws2_32") if self.options.gui: gui_reqs = [] if self.options.with_dbus: @@ -1414,13 +1158,13 @@ def _create_plugin(pluginname, libname, plugintype, requires): gui_reqs.append("xkbcommon::xkbcommon") if self.options.get_safe("with_x11", False): gui_reqs.append("xorg::xorg") - if ( - self.settings.os != "Windows" - and self.options.get_safe("opengl", "no") != "no" - ): + if self.options.get_safe("with_egl"): + gui_reqs.append("egl::egl") + if self.settings.os != "Windows" and self.options.get_safe("opengl", "no") != "no": gui_reqs.append("opengl::opengl") if self.options.get_safe("with_vulkan", False): gui_reqs.append("vulkan-loader::vulkan-loader") + gui_reqs.append("vulkan-headers::vulkan-headers") if is_apple_os(self): gui_reqs.append("moltenvk::moltenvk") if self.options.with_harfbuzz: @@ -1434,98 +1178,78 @@ def _create_plugin(pluginname, libname, plugintype, requires): _add_build_module("qtGui", self._cmake_qt6_private_file("Gui")) if self.settings.os == "Windows": - self.cpp_info.components["qtGui"].system_libs = [ - "advapi32", - "gdi32", - "ole32", - "shell32", - "user32", - "d3d11", - "dxgi", - "dxguid", - "d2d1", - "dwrite", + # https://github.com/qt/qtbase/blob/v6.6.1/src/gui/CMakeLists.txt#L419-L429 + self.cpp_info.components["qtGui"].system_libs += [ + "advapi32", "gdi32", "ole32", "shell32", "user32", "d3d11", "dxgi", "dxguid" ] + # https://github.com/qt/qtbase/blob/v6.6.1/src/gui/CMakeLists.txt#L729 + self.cpp_info.components["qtGui"].system_libs.append("d2d1") + # https://github.com/qt/qtbase/blob/v6.6.1/src/gui/CMakeLists.txt#L732-L742 + self.cpp_info.components["qtGui"].system_libs.append("dwrite") if self.settings.compiler == "gcc": + # https://github.com/qt/qtbase/blob/v6.6.1/src/gui/CMakeLists.txt#L746 self.cpp_info.components["qtGui"].system_libs.append("uuid") - _create_plugin( - "QWindowsIntegrationPlugin", - "qwindows", - "platforms", - ["Core", "Gui"], - ) - _create_plugin( - "QWindowsVistaStylePlugin", - "qwindowsvistastyle", - "styles", - ["Core", "Gui"], - ) - self.cpp_info.components["qtQWindowsIntegrationPlugin"].system_libs = [ - "advapi32", - "dwmapi", - "gdi32", - "imm32", - "ole32", - "oleaut32", - "shell32", - "shlwapi", - "user32", - "winmm", - "winspool", - "wtsapi32", - ] - elif self.settings.os == "Android": - _create_plugin( - "QAndroidIntegrationPlugin", - "qtforandroid", - "platforms", - ["Core", "Gui"], - ) - self.cpp_info.components["qtQAndroidIntegrationPlugin"].system_libs = [ - "android", - "jnigraphics", - ] - elif self.settings.os == "Macos": - _create_plugin( - "QCocoaIntegrationPlugin", "qcocoa", "platforms", ["Core", "Gui"] - ) - self.cpp_info.components["QCocoaIntegrationPlugin"].frameworks = [ - "AppKit", - "Carbon", - "CoreServices", - "CoreVideo", - "IOKit", - "IOSurface", - "Metal", - "QuartzCore", + if Version(self.version) >= "6.6.0": + # https://github.com/qt/qtbase/blob/v6.6.0/src/gui/CMakeLists.txt#L428 + self.cpp_info.components["qtGui"].system_libs.append("d3d12") + if Version(self.version) >= "6.7.0": + # https://github.com/qt/qtbase/blob/v6.7.0-beta1/src/gui/CMakeLists.txt#L430 + self.cpp_info.components["qtGui"].system_libs.append("uxtheme") + if self.settings.compiler == "gcc": + self.cpp_info.components["qtGui"].system_libs.append("uuid") + # https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/direct2d/CMakeLists.txt#L60-L82 + self.cpp_info.components["qtGui"].system_libs += [ + "advapi32", "d2d1", "d3d11", "dwmapi", "dwrite", "dxgi", "dxguid", "gdi32", "imm32", "ole32", + "oleaut32", "setupapi", "shell32", "shlwapi", "user32", "version", "winmm", "winspool", + "wtsapi32", "shcore", "comdlg32", "d3d9", "runtimeobject" ] - elif self.settings.os in ["iOS", "tvOS"]: - _create_plugin("QIOSIntegrationPlugin", "qios", "platforms", []) - self.cpp_info.components["QIOSIntegrationPlugin"].frameworks = [ - "AudioToolbox", - "Foundation", - "Metal", - "QuartzCore", - "UIKit", + _create_plugin("QWindowsIntegrationPlugin", "qwindows", "platforms", ["Core", "Gui"]) + # https://github.com/qt/qtbase/commit/65d58e6c41e3c549c89ea4f05a8e467466e79ca3 + if Version(self.version) >= "6.7.0": + _create_plugin("QModernWindowsStylePlugin", "qmodernwindowsstyle", "styles", ["Core", "Gui"]) + else: + _create_plugin("QWindowsVistaStylePlugin", "qwindowsvistastyle", "styles", ["Core", "Gui"]) + # https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/windows/CMakeLists.txt#L53-L69 + self.cpp_info.components["qtQWindowsIntegrationPlugin"].system_libs += [ + "advapi32", "dwmapi", "gdi32", "imm32", "ole32", "oleaut32", "setupapi", "shell32", "shlwapi", + "user32", "winmm", "winspool", "wtsapi32", "shcore", "comdlg32", "d3d9", "runtimeobject" ] - elif self.settings.os == "watchOS": - _create_plugin("QMinimalIntegrationPlugin", "qminimal", "platforms", []) + elif self.settings.os == "Android": + _create_plugin("QAndroidIntegrationPlugin", "qtforandroid", "platforms", ["Core", "Gui"]) + # https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/android/CMakeLists.txt#L68-L70 + self.cpp_info.components["qtQAndroidIntegrationPlugin"].system_libs = ["android", "jnigraphics"] + elif is_apple_os(self): + # https://github.com/qt/qtbase/blob/v6.6.1/src/gui/CMakeLists.txt#L388-L394 + self.cpp_info.components["qtGui"].frameworks = ["CoreFoundation", "CoreGraphics", "CoreText", "Foundation", "ImageIO"] + if self.options.get_safe("opengl", "no") != "no": + # https://github.com/qt/qtbase/commit/2ed63e587eefb246dba9e69aa01fdb2abb2def13 + self.cpp_info.components["qtGui"].frameworks.append("AGL") + if self.settings.os == "Macos": + # https://github.com/qt/qtbase/blob/v6.6.1/src/gui/CMakeLists.txt#L362-L370 + self.cpp_info.components["qtGui"].frameworks += ["AppKit", "Carbon"] + _create_plugin("QCocoaIntegrationPlugin", "qcocoa", "platforms", ["Core", "Gui"]) + # https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/cocoa/CMakeLists.txt#L51-L58 + self.cpp_info.components["QCocoaIntegrationPlugin"].frameworks = [ + "AppKit", "Carbon", "CoreServices", "CoreVideo", "IOKit", "IOSurface", "Metal", "QuartzCore" + ] + elif self.settings.os in ["iOS", "tvOS"]: + _create_plugin("QIOSIntegrationPlugin", "qios", "platforms", []) + # https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/ios/CMakeLists.txt#L32-L37 + self.cpp_info.components["QIOSIntegrationPlugin"].frameworks = [ + "AudioToolbox", "Foundation", "Metal", "QuartzCore", "UIKit", "CoreGraphics" + ] + if self.settings.os != "tvOS": + # https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/ios/CMakeLists.txt#L66-L68 + self.cpp_info.components["QIOSIntegrationPlugin"].frameworks += [ + "AssetsLibrary", "UniformTypeIdentifiers", "Photos", + ] + elif self.settings.os == "watchOS": + _create_plugin("QMinimalIntegrationPlugin", "qminimal", "platforms", []) elif self.settings.os == "Emscripten": - _create_plugin( - "QWasmIntegrationPlugin", "qwasm", "platforms", ["Core", "Gui"] - ) + _create_plugin("QWasmIntegrationPlugin", "qwasm", "platforms", ["Core", "Gui"]) elif self.options.get_safe("with_x11", False): - _create_module( - "XcbQpaPrivate", - ["xkbcommon::libxkbcommon-x11", "xorg::xorg"], - has_include_dir=False, - ) - _create_plugin( - "QXcbIntegrationPlugin", - "qxcb", - "platforms", - ["Core", "Gui", "XcbQpaPrivate"], - ) + _create_module("XcbQpaPrivate", ["xkbcommon::libxkbcommon-x11", "xorg::xorg"], has_include_dir=False) + _create_plugin("QXcbIntegrationPlugin", "qxcb", "platforms", ["Core", "Gui", "XcbQpaPrivate"]) _create_plugin("QGifPlugin", "qgif", "imageformats", ["Gui"]) _create_plugin("QIcoPlugin", "qico", "imageformats", ["Gui"]) @@ -1538,24 +1262,22 @@ def _create_plugin(pluginname, libname, plugintype, requires): _create_plugin("QJpegPlugin", "qjpeg", "imageformats", jpeg_reqs) if self.options.with_sqlite3: - _create_plugin( - "QSQLiteDriverPlugin", "qsqlite", "sqldrivers", ["sqlite3::sqlite3"] - ) + _create_plugin("QSQLiteDriverPlugin", "qsqlite", "sqldrivers", ["sqlite3::sqlite3"]) if self.options.with_pq: - _create_plugin( - "QPSQLDriverPlugin", "qsqlpsql", "sqldrivers", ["libpq::libpq"] - ) + _create_plugin("QPSQLDriverPlugin", "qsqlpsql", "sqldrivers", ["libpq::libpq"]) if self.options.with_odbc: + _create_plugin("QODBCDriverPlugin", "qsqlodbc", "sqldrivers", []) if self.settings.os != "Windows": - _create_plugin( - "QODBCDriverPlugin", "qsqlodbc", "sqldrivers", ["odbc::odbc"] - ) + self.cpp_info.components["QODBCDriverPlugin"].requires.append("odbc::odbc") + else: + self.cpp_info.components["QODBCDriverPlugin"].system_libs.append("odbc32") networkReqs = [] - if self.options.openssl: - networkReqs.append("openssl::openssl") + # ASWF: openssl dependency is tricky + # if self.options.openssl: + # networkReqs.append("openssl::openssl") if self.options.with_brotli: networkReqs.append("brotli::brotli") - if self.settings.os in ["Linux", "FreeBSD"] and self.options.with_gssapi: + if self.settings.os in ['Linux', 'FreeBSD'] and self.options.with_gssapi: networkReqs.append("krb5::krb5-gssapi") _create_module("Network", networkReqs) _create_module("Sql", []) @@ -1563,6 +1285,11 @@ def _create_plugin(pluginname, libname, plugintype, requires): if self.options.widgets: _create_module("Widgets", ["Gui"]) _add_build_module("qtWidgets", self._cmake_qt6_private_file("Widgets")) + if self.settings.os == "Windows": + # https://github.com/qt/qtbase/blob/v6.6.1/src/widgets/CMakeLists.txt#L316-L321 + self.cpp_info.components["qtWidgets"].system_libs += [ + "dwmapi", "shell32", "uxtheme", + ] if self.options.gui and self.options.widgets: _create_module("PrintSupport", ["Gui", "Widgets"]) if self.options.get_safe("opengl", "no") != "no" and self.options.gui: @@ -1582,41 +1309,25 @@ def _create_plugin(pluginname, libname, plugintype, requires): _create_module("Qml", ["Network"]) _add_build_module("qtQml", self._cmake_qt6_private_file("Qml")) _create_module("QmlModels", ["Qml"]) - self.cpp_info.components["qtQmlImportScanner"].set_property( - "cmake_target_name", "Qt6::QmlImportScanner" - ) - self.cpp_info.components["qtQmlImportScanner"].names[ - "cmake_find_package" - ] = "QmlImportScanner" # this is an alias for Qml and there to integrate with existing consumers - self.cpp_info.components["qtQmlImportScanner"].names[ - "cmake_find_package_multi" - ] = "QmlImportScanner" - self.cpp_info.components[ - "qtQmlImportScanner" - ].requires = _get_corrected_reqs(["Qml"]) + self.cpp_info.components["qtQmlImportScanner"].set_property("cmake_target_name", "Qt6::QmlImportScanner") + self.cpp_info.components["qtQmlImportScanner"].names["cmake_find_package"] = "QmlImportScanner" # this is an alias for Qml and there to integrate with existing consumers + self.cpp_info.components["qtQmlImportScanner"].names["cmake_find_package_multi"] = "QmlImportScanner" + self.cpp_info.components["qtQmlImportScanner"].requires = _get_corrected_reqs(["Qml"]) if qt_quick_enabled: _create_module("Quick", ["Gui", "Qml", "QmlModels"]) + _add_build_module("qtQuick", self._cmake_qt6_private_file("Quick")) if self.options.widgets: _create_module("QuickWidgets", ["Gui", "Qml", "Quick", "Widgets"]) _create_module("QuickShapes", ["Gui", "Qml", "Quick"]) + _create_module("QuickTest", ["Test", "Quick"]) _create_module("QmlWorkerScript", ["Qml"]) if self.options.qttools and self.options.gui and self.options.widgets: - self.cpp_info.components["qtLinguistTools"].set_property( - "cmake_target_name", "Qt6::LinguistTools" - ) - self.cpp_info.components["qtLinguistTools"].names[ - "cmake_find_package" - ] = "LinguistTools" - self.cpp_info.components["qtLinguistTools"].names[ - "cmake_find_package_multi" - ] = "LinguistTools" + self.cpp_info.components["qtLinguistTools"].set_property("cmake_target_name", "Qt6::LinguistTools") + self.cpp_info.components["qtLinguistTools"].names["cmake_find_package"] = "LinguistTools" + self.cpp_info.components["qtLinguistTools"].names["cmake_find_package_multi"] = "LinguistTools" _create_module("UiPlugin", ["Gui", "Widgets"]) - self.cpp_info.components[ - "qtUiPlugin" - ].libs = ( - [] - ) # this is a collection of abstract classes, so this is header-only + self.cpp_info.components["qtUiPlugin"].libs = [] # this is a collection of abstract classes, so this is header-only self.cpp_info.components["qtUiPlugin"].libdirs = [] _create_module("UiTools", ["UiPlugin", "Gui", "Widgets"]) _create_module("Designer", ["Gui", "UiPlugin", "Widgets", "Xml"]) @@ -1628,20 +1339,17 @@ def _create_plugin(pluginname, libname, plugintype, requires): if self.options.qtquick3d and qt_quick_enabled: _create_module("Quick3DUtils", ["Gui"]) _create_module("Quick3DAssetImport", ["Gui", "Qml", "Quick3DUtils"]) - _create_module( - "Quick3DRuntimeRender", - ["Gui", "Quick", "Quick3DAssetImport", "Quick3DUtils", "ShaderTools"], - ) + _create_module("Quick3DRuntimeRender", ["Gui", "Quick", "Quick3DAssetImport", "Quick3DUtils", "ShaderTools"]) _create_module("Quick3D", ["Gui", "Qml", "Quick", "Quick3DRuntimeRender"]) - if ( - self.options.get_safe("qtquickcontrols2") or self.options.qtdeclarative - ) and qt_quick_enabled: + if (self.options.get_safe("qtquickcontrols2") or self.options.qtdeclarative) and qt_quick_enabled: _create_module("QuickControls2", ["Gui", "Quick"]) _create_module("QuickTemplates2", ["Gui", "Quick"]) if self.options.qtsvg and self.options.gui: _create_module("Svg", ["Gui"]) + _create_plugin("QSvgIconPlugin", "qsvgicon", "iconengines", []) + _create_plugin("QSvgPlugin", "qsvg", "imageformats", []) if self.options.widgets: _create_module("SvgWidgets", ["Gui", "Svg", "Widgets"]) @@ -1665,87 +1373,30 @@ def _create_plugin(pluginname, libname, plugintype, requires): _create_module("StateMachine", []) _create_module("StateMachineQml", ["StateMachine", "Qml"]) _create_module("Scxml", []) - _create_plugin( - "QScxmlEcmaScriptDataModelPlugin", - "qscxmlecmascriptdatamodel", - "scxmldatamodel", - ["Scxml", "Qml"], - ) + _create_plugin("QScxmlEcmaScriptDataModelPlugin", "qscxmlecmascriptdatamodel", "scxmldatamodel", ["Scxml", "Qml"]) _create_module("ScxmlQml", ["Scxml", "Qml"]) if self.options.get_safe("qtvirtualkeyboard") and qt_quick_enabled: _create_module("VirtualKeyboard", ["Gui", "Qml", "Quick"]) - _create_plugin( - "QVirtualKeyboardPlugin", - "qtvirtualkeyboardplugin", - "platforminputcontexts", - ["Gui", "Qml", "VirtualKeyboard"], - ) - _create_plugin( - "QtVirtualKeyboardHangulPlugin", - "qtvirtualkeyboard_hangul", - "virtualkeyboard", - ["Gui", "Qml", "VirtualKeyboard"], - ) - _create_plugin( - "QtVirtualKeyboardMyScriptPlugin", - "qtvirtualkeyboard_myscript", - "virtualkeyboard", - ["Gui", "Qml", "VirtualKeyboard"], - ) - _create_plugin( - "QtVirtualKeyboardThaiPlugin", - "qtvirtualkeyboard_thai", - "virtualkeyboard", - ["Gui", "Qml", "VirtualKeyboard"], - ) + _create_plugin("QVirtualKeyboardPlugin", "qtvirtualkeyboardplugin", "platforminputcontexts", ["Gui", "Qml", "VirtualKeyboard"]) + _create_plugin("QtVirtualKeyboardHangulPlugin", "qtvirtualkeyboard_hangul", "virtualkeyboard", ["Gui", "Qml", "VirtualKeyboard"]) + _create_plugin("QtVirtualKeyboardMyScriptPlugin", "qtvirtualkeyboard_myscript", "virtualkeyboard", ["Gui", "Qml", "VirtualKeyboard"]) + _create_plugin("QtVirtualKeyboardThaiPlugin", "qtvirtualkeyboard_thai", "virtualkeyboard", ["Gui", "Qml", "VirtualKeyboard"]) if self.options.get_safe("qt3d"): _create_module("3DCore", ["Gui", "Network"]) _create_module("3DRender", ["3DCore", "OpenGL"]) _create_module("3DAnimation", ["3DCore", "3DRender", "Gui"]) _create_module("3DInput", ["3DCore", "Gui"]) _create_module("3DLogic", ["3DCore", "Gui"]) - _create_module( - "3DExtras", ["Gui", "3DCore", "3DInput", "3DLogic", "3DRender"] - ) - _create_plugin( - "DefaultGeometryLoaderPlugin", - "defaultgeometryloader", - "geometryloaders", - ["3DCore", "3DRender", "Gui"], - ) - _create_plugin( - "fbxGeometryLoaderPlugin", - "fbxgeometryloader", - "geometryloaders", - ["3DCore", "3DRender", "Gui"], - ) + _create_module("3DExtras", ["Gui", "3DCore", "3DInput", "3DLogic", "3DRender"]) + _create_plugin("DefaultGeometryLoaderPlugin", "defaultgeometryloader", "geometryloaders", ["3DCore", "3DRender", "Gui"]) + _create_plugin("fbxGeometryLoaderPlugin", "fbxgeometryloader", "geometryloaders", ["3DCore", "3DRender", "Gui"]) if qt_quick_enabled: _create_module("3DQuick", ["3DCore", "Gui", "Qml", "Quick"]) - _create_module( - "3DQuickAnimation", - ["3DAnimation", "3DCore", "3DQuick", "3DRender", "Gui", "Qml"], - ) - _create_module( - "3DQuickExtras", - [ - "3DCore", - "3DExtras", - "3DInput", - "3DQuick", - "3DRender", - "Gui", - "Qml", - ], - ) - _create_module( - "3DQuickInput", ["3DCore", "3DInput", "3DQuick", "Gui", "Qml"] - ) - _create_module( - "3DQuickRender", ["3DCore", "3DQuick", "3DRender", "Gui", "Qml"] - ) - _create_module( - "3DQuickScene2D", ["3DCore", "3DQuick", "3DRender", "Gui", "Qml"] - ) + _create_module("3DQuickAnimation", ["3DAnimation", "3DCore", "3DQuick", "3DRender", "Gui", "Qml"]) + _create_module("3DQuickExtras", ["3DCore", "3DExtras", "3DInput", "3DQuick", "3DRender", "Gui", "Qml"]) + _create_module("3DQuickInput", ["3DCore", "3DInput", "3DQuick", "Gui", "Qml"]) + _create_module("3DQuickRender", ["3DCore", "3DQuick", "3DRender", "Gui", "Qml"]) + _create_module("3DQuickScene2D", ["3DCore", "3DQuick", "3DRender", "Gui", "Qml"]) if self.options.get_safe("qtimageformats"): _create_plugin("ICNSPlugin", "qicns", "imageformats", ["Gui"]) _create_plugin("QJp2Plugin", "qjp2", "imageformats", ["Gui"]) @@ -1764,19 +1415,15 @@ def _create_plugin(pluginname, libname, plugintype, requires): _create_module("Mqtt", ["Network"]) if self.options.get_safe("qtopcua"): _create_module("OpcUa", ["Network"]) - _create_plugin( - "QOpen62541Plugin", "open62541_backend", "opcua", ["Network", "OpcUa"] - ) - _create_plugin( - "QUACppPlugin", "uacpp_backend", "opcua", ["Network", "OpcUa"] - ) + _create_plugin("QOpen62541Plugin", "open62541_backend", "opcua", ["Network", "OpcUa"]) + _create_plugin("QUACppPlugin", "uacpp_backend", "opcua", ["Network", "OpcUa"]) if self.options.get_safe("qtmultimedia"): multimedia_reqs = ["Network", "Gui"] if self.options.get_safe("with_libalsa", False): multimedia_reqs.append("libalsa::libalsa") if self.options.with_openal: - multimedia_reqs.append("openal::openal") + multimedia_reqs.append("openal-soft::openal-soft") if self.options.get_safe("with_pulseaudio", False): multimedia_reqs.append("pulseaudio::pulse") _create_module("Multimedia", multimedia_reqs) @@ -1784,48 +1431,23 @@ def _create_plugin(pluginname, libname, plugintype, requires): if self.options.qtdeclarative and qt_quick_enabled: _create_module("MultimediaQuick", ["Multimedia", "Quick"]) if self.options.with_gstreamer: - _create_plugin( - "QGstreamerMediaPlugin", - "gstreamermediaplugin", - "multimedia", - ["gst-plugins-base::gst-plugins-base"], - ) + _create_plugin("QGstreamerMediaPlugin", "gstreamermediaplugin", "multimedia", [ + "gstreamer::gstreamer", + "gst-plugins-base::gst-plugins-base"]) if self.options.get_safe("qtpositioning"): _create_module("Positioning", []) - _create_plugin( - "QGeoPositionInfoSourceFactoryGeoclue2", - "qtposition_geoclue2", - "position", - [], - ) - _create_plugin( - "QGeoPositionInfoSourceFactoryPoll", - "qtposition_positionpoll", - "position", - [], - ) + _create_plugin("QGeoPositionInfoSourceFactoryGeoclue2", "qtposition_geoclue2", "position", []) + _create_plugin("QGeoPositionInfoSourceFactoryPoll", "qtposition_positionpoll", "position", []) if self.options.get_safe("qtsensors"): _create_module("Sensors", []) _create_plugin("genericSensorPlugin", "qtsensors_generic", "sensors", []) - _create_plugin( - "IIOSensorProxySensorPlugin", - "qtsensors_iio-sensor-proxy", - "sensors", - [], - ) + _create_plugin("IIOSensorProxySensorPlugin", "qtsensors_iio-sensor-proxy", "sensors", []) if self.settings.os == "Linux": _create_plugin("LinuxSensorPlugin", "qtsensors_linuxsys", "sensors", []) - _create_plugin( - "QtSensorGesturePlugin", "qtsensorgestures_plugin", "sensorgestures", [] - ) - _create_plugin( - "QShakeSensorGesturePlugin", - "qtsensorgestures_shakeplugin", - "sensorgestures", - [], - ) + _create_plugin("QtSensorGesturePlugin", "qtsensorgestures_plugin", "sensorgestures", []) + _create_plugin("QShakeSensorGesturePlugin", "qtsensorgestures_shakeplugin", "sensorgestures", []) if self.options.get_safe("qtconnectivity"): _create_module("Bluetooth", ["Network"]) @@ -1835,10 +1457,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): _create_module("SerialPort", []) if self.options.get_safe("qtserialbus"): - _create_module( - "SerialBus", - ["SerialPort"] if self.options.get_safe("qtserialport") else [], - ) + _create_module("SerialBus", ["SerialPort"] if self.options.get_safe("qtserialport") else []) _create_plugin("PassThruCanBusPlugin", "qtpassthrucanbus", "canbus", []) _create_plugin("PeakCanBusPlugin", "qtpeakcanbus", "canbus", []) _create_plugin("SocketCanBusPlugin", "qtsocketcanbus", "canbus", []) @@ -1856,22 +1475,11 @@ def _create_plugin(pluginname, libname, plugintype, requires): if self.options.get_safe("qtpositioning"): webenginereqs.append("Positioning") if self.settings.os == "Linux": - webenginereqs.extend( - [ - "expat::expat", - "opus::libopus", - "xorg-proto::xorg-proto", - "libxshmfence::libxshmfence", - "nss::nss", - "libdrm::libdrm", - ] - ) + webenginereqs.extend(["expat::expat", "opus::libopus", "xorg-proto::xorg-proto", "libxshmfence::libxshmfence", \ + "nss::nss", "libdrm::libdrm"]) _create_module("WebEngineCore", webenginereqs) _create_module("WebEngineQuick", ["WebEngineCore"]) - _create_module( - "WebEngineWidgets", - ["WebEngineCore", "Quick", "PrintSupport", "Widgets", "Gui", "Network"], - ) + _create_module("WebEngineWidgets", ["WebEngineCore", "Quick", "PrintSupport", "Widgets", "Gui", "Network"]) if self.options.get_safe("qtremoteobjects"): _create_module("RemoteObjects", []) @@ -1894,162 +1502,157 @@ def _create_plugin(pluginname, libname, plugintype, requires): if self.settings.os in ["Windows", "iOS"]: if self.settings.os == "Windows": - self.cpp_info.components["qtEntryPointImplementation"].set_property( - "cmake_target_name", "Qt6::EntryPointImplementation" - ) - self.cpp_info.components["qtEntryPointImplementation"].names[ - "cmake_find_package" - ] = "EntryPointImplementation" - self.cpp_info.components["qtEntryPointImplementation"].names[ - "cmake_find_package_multi" - ] = "EntryPointImplementation" - self.cpp_info.components["qtEntryPointImplementation"].libs = [ - f"Qt6EntryPoint{libsuffix}" - ] - self.cpp_info.components["qtEntryPointImplementation"].system_libs = [ - "shell32" - ] + self.cpp_info.components["qtEntryPointImplementation"].set_property("cmake_target_name", "Qt6::EntryPointImplementation") + self.cpp_info.components["qtEntryPointImplementation"].names["cmake_find_package"] = "EntryPointImplementation" + self.cpp_info.components["qtEntryPointImplementation"].names["cmake_find_package_multi"] = "EntryPointImplementation" + self.cpp_info.components["qtEntryPointImplementation"].libs = [f"Qt6EntryPoint{libsuffix}"] + self.cpp_info.components["qtEntryPointImplementation"].system_libs = ["shell32"] if self.settings.compiler == "gcc": - self.cpp_info.components["qtEntryPointMinGW32"].set_property( - "cmake_target_name", "Qt6::EntryPointMinGW32" - ) - self.cpp_info.components["qtEntryPointMinGW32"].names[ - "cmake_find_package" - ] = "EntryPointMinGW32" - self.cpp_info.components["qtEntryPointMinGW32"].names[ - "cmake_find_package_multi" - ] = "EntryPointMinGW32" - self.cpp_info.components["qtEntryPointMinGW32"].system_libs = [ - "mingw32" - ] - self.cpp_info.components["qtEntryPointMinGW32"].requires = [ - "qtEntryPointImplementation" - ] - - self.cpp_info.components["qtEntryPointPrivate"].set_property( - "cmake_target_name", "Qt6::EntryPointPrivate" - ) - self.cpp_info.components["qtEntryPointPrivate"].names[ - "cmake_find_package" - ] = "EntryPointPrivate" - self.cpp_info.components["qtEntryPointPrivate"].names[ - "cmake_find_package_multi" - ] = "EntryPointPrivate" + self.cpp_info.components["qtEntryPointMinGW32"].set_property("cmake_target_name", "Qt6::EntryPointMinGW32") + self.cpp_info.components["qtEntryPointMinGW32"].names["cmake_find_package"] = "EntryPointMinGW32" + self.cpp_info.components["qtEntryPointMinGW32"].names["cmake_find_package_multi"] = "EntryPointMinGW32" + self.cpp_info.components["qtEntryPointMinGW32"].system_libs = ["mingw32"] + self.cpp_info.components["qtEntryPointMinGW32"].requires = ["qtEntryPointImplementation"] + + self.cpp_info.components["qtEntryPointPrivate"].set_property("cmake_target_name", "Qt6::EntryPointPrivate") + self.cpp_info.components["qtEntryPointPrivate"].names["cmake_find_package"] = "EntryPointPrivate" + self.cpp_info.components["qtEntryPointPrivate"].names["cmake_find_package_multi"] = "EntryPointPrivate" if self.settings.os == "Windows": if self.settings.compiler == "gcc": - self.cpp_info.components["qtEntryPointPrivate"].defines.append( - "QT_NEEDS_QMAIN" - ) - self.cpp_info.components["qtEntryPointPrivate"].requires.append( - "qtEntryPointMinGW32" - ) + self.cpp_info.components["qtEntryPointPrivate"].defines.append("QT_NEEDS_QMAIN") + self.cpp_info.components["qtEntryPointPrivate"].requires.append("qtEntryPointMinGW32") else: - self.cpp_info.components["qtEntryPointPrivate"].requires.append( - "qtEntryPointImplementation" - ) + self.cpp_info.components["qtEntryPointPrivate"].requires.append("qtEntryPointImplementation") if self.settings.os == "iOS": - self.cpp_info.components["qtEntryPointPrivate"].exelinkflags.append( - "-Wl,-e,_qt_main_wrapper" - ) + self.cpp_info.components["qtEntryPointPrivate"].exelinkflags.append("-Wl,-e,_qt_main_wrapper") if self.settings.os != "Windows": self.cpp_info.components["qtCore"].cxxflags.append("-fPIC") if not self.options.shared: if self.settings.os == "Windows": - self.cpp_info.components["qtCore"].system_libs.append( - "version" - ) # qtcore requires "GetFileVersionInfoW" and "VerQueryValueW" which are in "Version.lib" library - self.cpp_info.components["qtCore"].system_libs.append( - "winmm" - ) # qtcore requires "__imp_timeSetEvent" which is in "Winmm.lib" library - self.cpp_info.components["qtCore"].system_libs.append( - "netapi32" - ) # qtcore requires "NetApiBufferFree" which is in "Netapi32.lib" library - self.cpp_info.components["qtCore"].system_libs.append( - "userenv" - ) # qtcore requires "__imp_GetUserProfileDirectoryW " which is in "UserEnv.Lib" library - self.cpp_info.components["qtCore"].system_libs.append( - "ws2_32" - ) # qtcore requires "WSAStartup " which is in "Ws2_32.Lib" library - self.cpp_info.components["qtNetwork"].system_libs.append( - "dnsapi" - ) # qtnetwork from qtbase requires "DnsFree" which is in "Dnsapi.lib" library + # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L527-L541 + self.cpp_info.components["qtCore"].system_libs.append("advapi32") + self.cpp_info.components["qtCore"].system_libs.append("authz") + self.cpp_info.components["qtCore"].system_libs.append("kernel32") + self.cpp_info.components["qtCore"].system_libs.append("netapi32") + self.cpp_info.components["qtCore"].system_libs.append("ole32") + self.cpp_info.components["qtCore"].system_libs.append("shell32") + self.cpp_info.components["qtCore"].system_libs.append("user32") + self.cpp_info.components["qtCore"].system_libs.append("uuid") + self.cpp_info.components["qtCore"].system_libs.append("version") + self.cpp_info.components["qtCore"].system_libs.append("winmm") + self.cpp_info.components["qtCore"].system_libs.append("ws2_32") + self.cpp_info.components["qtCore"].system_libs.append("mpr") + self.cpp_info.components["qtCore"].system_libs.append("userenv") + # https://github.com/qt/qtbase/blob/v6.6.1/src/network/CMakeLists.txt#L196-L200 + self.cpp_info.components["qtNetwork"].system_libs.append("advapi32") + self.cpp_info.components["qtNetwork"].system_libs.append("dnsapi") self.cpp_info.components["qtNetwork"].system_libs.append("iphlpapi") - self.cpp_info.components["qtNetwork"].system_libs.extend( - ["winhttp", "secur32"] - ) + self.cpp_info.components["qtNetwork"].system_libs.append("secur32") + self.cpp_info.components["qtNetwork"].system_libs.append("winhttp") + # https://github.com/qt/qtbase/blob/v6.6.1/src/printsupport/CMakeLists.txt#L70-L75 + self.cpp_info.components["qtPrintSupport"].system_libs.append("gdi32") + self.cpp_info.components["qtPrintSupport"].system_libs.append("user32") + self.cpp_info.components["qtPrintSupport"].system_libs.append("comdlg32") + self.cpp_info.components["qtPrintSupport"].system_libs.append("winspool") - if self.settings.os == "Macos": - self.cpp_info.components["qtCore"].frameworks.append( - "IOKit" - ) # qtcore requires "_IORegistryEntryCreateCFProperty", "_IOServiceGetMatchingService" and much more which are in "IOKit" framework - self.cpp_info.components["qtCore"].frameworks.append( - "Cocoa" - ) # qtcore requires "_OBJC_CLASS_$_NSApplication" and more, which are in "Cocoa" framework - self.cpp_info.components["qtCore"].frameworks.append( - "Security" - ) # qtcore requires "_SecRequirementCreateWithString" and more, which are in "Security" framework - self.cpp_info.components["qtNetwork"].frameworks.append( - "SystemConfiguration" - ) + if is_apple_os(self): + # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L580-L584 + self.cpp_info.components["qtCore"].frameworks.append("CoreFoundation") + self.cpp_info.components["qtCore"].frameworks.append("Foundation") + self.cpp_info.components["qtCore"].frameworks.append("IOKit") + # https://github.com/qt/qtbase/blob/v6.6.1/src/network/CMakeLists.txt#L205-L214 + self.cpp_info.components["qtNetwork"].frameworks.append("CFNetwork") + # https://github.com/qt/qtbase/blob/v6.6.1/src/network/CMakeLists.txt#L216-L221 + # qtcore requires "_OBJC_CLASS_$_NSApplication" and more, which are in "Cocoa" framework + self.cpp_info.components["qtCore"].frameworks.append("Cocoa") + self.cpp_info.components["qtNetwork"].system_libs.append("resolv") if self.options.with_gssapi: + # https://github.com/qt/qtbase/blob/v6.6.1/src/network/CMakeLists.txt#L250C56-L253 self.cpp_info.components["qtNetwork"].frameworks.append("GSS") if self.options.gui and self.options.widgets: - self.cpp_info.components["qtPrintSupport"].system_libs.append( - "cups" - ) + # https://github.com/qt/qtbase/blob/v6.6.1/src/printsupport/CMakeLists.txt#L52-L63 + self.cpp_info.components["qtPrintSupport"].system_libs.append("cups") + self.cpp_info.components["qtPrintSupport"].frameworks.append("ApplicationServices") + if self.settings.os == "Macos": + # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L598-L606 + self.cpp_info.components["qtCore"].frameworks.append("AppKit") + self.cpp_info.components["qtCore"].frameworks.append("ApplicationServices") + self.cpp_info.components["qtCore"].frameworks.append("CoreServices") + self.cpp_info.components["qtCore"].frameworks.append("CoreServices") + self.cpp_info.components["qtCore"].frameworks.append("Security") + self.cpp_info.components["qtCore"].frameworks.append("DiskArbitration") + else: + # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L969-L972 + self.cpp_info.components["qtCore"].frameworks.append("MobileCoreServices") + if self.settings.os not in ["iOS", "tvOS"]: + self.cpp_info.components["qtNetwork"].frameworks.append("CoreServices") + self.cpp_info.components["qtNetwork"].frameworks.append("SystemConfiguration") + else: + # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L1074-L1077 + self.cpp_info.components["qtCore"].frameworks.append("UIKit") + if self.settings.os == "watchOS": + # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L1079-L1082 + self.cpp_info.components["qtCore"].frameworks.append("WatchKit") - self.cpp_info.components["qtCore"].builddirs.append( - os.path.join("res", "archdatadir", "bin") - ) + self.cpp_info.components["qtCore"].builddirs.append(os.path.join("bin")) _add_build_module("qtCore", self._cmake_executables_file) _add_build_module("qtCore", self._cmake_qt6_private_file("Core")) if self.settings.os in ["Windows", "iOS"]: _add_build_module("qtCore", self._cmake_entry_point_file) - for m in os.listdir(os.path.join("lib", "cmake")): - module = os.path.join("lib", "cmake", m, f"{m}Macros.cmake") + # ASWF: cmake modules in lib64 + for m in os.listdir(os.path.join("lib64", "cmake")): component_name = m.replace("Qt6", "qt") if component_name == "qt": component_name = "qtCore" - if os.path.isfile(module): - _add_build_module(component_name, module) - - for helper_modules in glob.glob( - os.path.join( - self.package_folder, "lib", "cmake", m, "QtPublic*Helpers.cmake" - ) - ): - _add_build_module(component_name, helper_modules) - self.cpp_info.components[component_name].builddirs.append( - os.path.join("lib", "cmake", m) - ) - objects_dirs = glob.glob(os.path.join(self.package_folder, "lib", "objects-*/")) + if component_name in self.cpp_info.components: + # ASWF: cmake modules in lib64 + module = os.path.join("lib64", "cmake", m, f"{m}Macros.cmake") + if os.path.isfile(module): + _add_build_module(component_name, module) + + # ASWF: cmake modules in lib64 + module = os.path.join("lib64", "cmake", m, f"{m}ConfigExtras.cmake") + if os.path.isfile(module): + _add_build_module(component_name, module) + + # ASWF: cmake modules in lib64 + for helper_modules in glob.glob(os.path.join(self.package_folder, "lib64", "cmake", m, "QtPublic*Helpers.cmake")): + _add_build_module(component_name, helper_modules) + self.cpp_info.components[component_name].builddirs.append(os.path.join("lib64", "cmake", m)) + + elif component_name.endswith("Tools") and component_name[:-5] in self.cpp_info.components: + # ASFW: cmake modules in lib64 + module = os.path.join("lib64", "cmake", f"{m}", f"{m[:-5]}Macros.cmake") + if os.path.isfile(module): + _add_build_module(component_name[:-5], module) + self.cpp_info.components[component_name[:-5]].builddirs.append(os.path.join("lib64", "cmake", m)) + + # ASWF: DSOs in lib64 + objects_dirs = glob.glob(os.path.join(self.package_folder, "lib64", "objects-*/")) for object_dir in objects_dirs: for m in os.listdir(object_dir): - component = "qt" + m[: m.find("_")] + component = "qt" + m[:m.find("_")] if component not in self.cpp_info.components: continue - submodules_dir = os.path.join(object_dir, m) - for sub_dir in os.listdir(submodules_dir): - submodule_dir = os.path.join(submodules_dir, sub_dir) - obj_files = [ - os.path.join(submodule_dir, file) - for file in os.listdir(submodule_dir) - ] + for root, _, files in os.walk(os.path.join(object_dir, m)): + obj_files = [os.path.join(root, file) for file in files] self.cpp_info.components[component].exelinkflags.extend(obj_files) - self.cpp_info.components[component].sharedlinkflags.extend( - obj_files - ) + self.cpp_info.components[component].sharedlinkflags.extend(obj_files) build_modules_list = [] + if self.options.qtdeclarative: + # ASWF: cmake modules in lib64 + build_modules_list.append(os.path.join(self.package_folder, "lib64", "cmake", "Qt6Qml", "conan_qt_qt6_policies.cmake")) + def _add_build_modules_for_component(component): for req in self.cpp_info.components[component].requires: - if "::" in req: # not a qt component + if "::" in req: # not a qt component continue _add_build_modules_for_component(req) build_modules_list.extend(build_modules.pop(component, [])) @@ -2058,6 +1661,3 @@ def _add_build_modules_for_component(component): _add_build_modules_for_component(c) self.cpp_info.set_property("cmake_build_modules", build_modules_list) - - def deploy(self): - self.copy("*", symlinks=True) diff --git a/packages/conan/recipes/qt/patches/0001-CVE-2023-51714-qtbase-6.5.diff b/packages/conan/recipes/qt/patches/0001-CVE-2023-51714-qtbase-6.5.diff new file mode 100644 index 00000000..1d740de5 --- /dev/null +++ b/packages/conan/recipes/qt/patches/0001-CVE-2023-51714-qtbase-6.5.diff @@ -0,0 +1,37 @@ +From 1d4788a39668fb2dc5912a8d9c4272dc40e99f92 Mon Sep 17 00:00:00 2001 +From: Marc Mutz +Date: Tue, 12 Dec 2023 20:51:56 +0100 +Subject: [PATCH] HPack: fix a Yoda Condition + +Putting the variable on the LHS of a relational operation makes the +expression easier to read. In this case, we find that the whole +expression is nonsensical as an overflow protection, because if +name.size() + value.size() overflows, the result will exactly _not_ +be > max() - 32, because UB will have happened. + +To be fixed in a follow-up commit. + +As a drive-by, add parentheses around the RHS. + +Pick-to: 6.2 5.15 +Change-Id: I35ce598884c37c51b74756b3bd2734b9aad63c09 +Reviewed-by: Allan Sandfeld Jensen +(cherry picked from commit 658607a34ead214fbacbc2cca44915655c318ea9) +Reviewed-by: Qt Cherry-pick Bot +(cherry picked from commit 4f7efd41740107f90960116700e3134f5e433867) +(cherry picked from commit 13c16b756900fe524f6d9534e8a07aa003c05e0c) +--- + +diff --git a/src/network/access/http2/hpacktable.cpp b/src/network/access/http2/hpacktable.cpp +index cf2e039..311392d 100644 +--- a/src/network/access/http2/hpacktable.cpp ++++ b/src/network/access/http2/hpacktable.cpp +@@ -27,7 +27,7 @@ + // 32 octets of overhead." + + const unsigned sum = unsigned(name.size() + value.size()); +- if (std::numeric_limits::max() - 32 < sum) ++ if (sum > (std::numeric_limits::max() - 32)) + return HeaderSize(); + return HeaderSize(true, quint32(sum + 32)); + } diff --git a/packages/conan/recipes/qt/patches/0001-ninja-1.12-build.diff b/packages/conan/recipes/qt/patches/0001-ninja-1.12-build.diff new file mode 100644 index 00000000..79acd902 --- /dev/null +++ b/packages/conan/recipes/qt/patches/0001-ninja-1.12-build.diff @@ -0,0 +1,10 @@ +--- src/core/configure/BUILD.root.gn.in.orig 2024-12-29 22:07:43.661647014 -0800 ++++ src/core/configure/BUILD.root.gn.in 2024-12-29 22:08:25.534597628 -0800 +@@ -220,6 +220,7 @@ + source_set("devtools_sources") { + configs += [ ":cpp17_config" ] + deps = [ ++ "//chrome/app:generated_resources", + "//components/zoom", + "//third_party/blink/public/mojom:mojom_platform", + ] diff --git a/packages/conan/recipes/qt/patches/0002-CVE-2023-51714-qtbase-6.5.diff b/packages/conan/recipes/qt/patches/0002-CVE-2023-51714-qtbase-6.5.diff new file mode 100644 index 00000000..c0d01933 --- /dev/null +++ b/packages/conan/recipes/qt/patches/0002-CVE-2023-51714-qtbase-6.5.diff @@ -0,0 +1,45 @@ +From 2329523fd07b1abee02cb1d24709d3625ce34538 Mon Sep 17 00:00:00 2001 +From: Marc Mutz +Date: Tue, 12 Dec 2023 22:08:07 +0100 +Subject: [PATCH] HPack: fix incorrect integer overflow check + +This code never worked: + +For the comparison with max() - 32 to trigger, on 32-bit platforms (or +Qt 5) signed interger overflow would have had to happen in the +addition of the two sizes. The compiler can therefore remove the +overflow check as dead code. + +On Qt 6 and 64-bit platforms, the signed integer addition would be +very unlikely to overflow, but the following truncation to uint32 +would yield the correct result only in a narrow 32-value window just +below UINT_MAX, if even that. + +Fix by using the proper tool, qAddOverflow. + +Pick-to: 6.2 5.15 +Change-Id: I7599f2e75ff7f488077b0c60b81022591005661c +Reviewed-by: Allan Sandfeld Jensen +(cherry picked from commit ee5da1f2eaf8932aeca02ffea6e4c618585e29e3) +Reviewed-by: Qt Cherry-pick Bot +(cherry picked from commit debeb8878da2dc706ead04b6072ecbe7e5313860) +Reviewed-by: Thiago Macieira +Reviewed-by: Marc Mutz +(cherry picked from commit 811b9eef6d08d929af8708adbf2a5effb0eb62d7) +--- + +diff --git a/src/network/access/http2/hpacktable.cpp b/src/network/access/http2/hpacktable.cpp +index 311392d..8489ca1 100644 +--- a/src/network/access/http2/hpacktable.cpp ++++ b/src/network/access/http2/hpacktable.cpp +@@ -26,7 +26,9 @@ + // for counting the number of references to the name and value would have + // 32 octets of overhead." + +- const unsigned sum = unsigned(name.size() + value.size()); ++ size_t sum; ++ if (qAddOverflow(size_t(name.size()), size_t(value.size()), &sum)) ++ return HeaderSize(); + if (sum > (std::numeric_limits::max() - 32)) + return HeaderSize(); + return HeaderSize(true, quint32(sum + 32)); diff --git a/packages/conan/recipes/qt/patches/32fa63f_6.5.0.patch b/packages/conan/recipes/qt/patches/32fa63f_6.5.0.patch new file mode 100644 index 00000000..3675cf9d --- /dev/null +++ b/packages/conan/recipes/qt/patches/32fa63f_6.5.0.patch @@ -0,0 +1,28 @@ +From b404930e122013e76ba8fe165f3432288c051438 Mon Sep 17 00:00:00 2001 +From: shjiu +Date: Fri, 17 Nov 2023 09:41:31 +0900 +Subject: [PATCH] Fix build error with lambda on GCC 9.2 + +This patch is specific to the return type of updatePtrSimd function as boolean to avoid the bug of GCC 9.2. + +Fixes: QTBUG-112920 +Pick-to: 6.7 6.6 6.5 +Change-Id: I21cb1f6dda34448b2290ab72ec280b6b2a3732c9 +Reviewed-by: Volker Hilsheimer +--- + src/corelib/text/qstring.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp +index 2dc415584f3..d9e89f8e5bb 100644 +--- a/src/corelib/text/qstring.cpp ++++ b/src/corelib/text/qstring.cpp +@@ -461,7 +461,7 @@ static bool simdTestMask(const char *&ptr, const char *end, quint32 maskval) + if constexpr (UseSse4_1) { + # ifndef Q_OS_QNX // compiler fails in the code below + __m128i mask; +- auto updatePtrSimd = [&](__m128i data) { ++ auto updatePtrSimd = [&](__m128i data) -> bool { + __m128i masked = _mm_and_si128(mask, data); + __m128i comparison = _mm_cmpeq_epi16(masked, _mm_setzero_si128()); + uint result = _mm_movemask_epi8(comparison); diff --git a/packages/conan/recipes/qt/patches/CVE-2024-25580-qtbase-6.5.diff b/packages/conan/recipes/qt/patches/CVE-2024-25580-qtbase-6.5.diff new file mode 100644 index 00000000..13238afc --- /dev/null +++ b/packages/conan/recipes/qt/patches/CVE-2024-25580-qtbase-6.5.diff @@ -0,0 +1,325 @@ +diff --git a/src/gui/util/qktxhandler.cpp b/src/gui/util/qktxhandler.cpp +index ee5e879516..d52d6a8a3c 100644 +--- a/src/gui/util/qktxhandler.cpp ++++ b/src/gui/util/qktxhandler.cpp +@@ -41,7 +41,7 @@ struct KTXHeader { + quint32 bytesOfKeyValueData; + }; + +-static const quint32 qktxh_headerSize = sizeof(KTXHeader); ++static constexpr quint32 qktxh_headerSize = sizeof(KTXHeader); + + // Currently unused, declared for future reference + struct KTXKeyValuePairItem { +@@ -71,11 +71,24 @@ struct KTXMipmapLevel { + */ + }; + +-// Returns the nearest multiple of 'rounding' greater than or equal to 'value' +-constexpr quint32 withPadding(quint32 value, quint32 rounding) ++// Returns the nearest multiple of 4 greater than or equal to 'value' ++static const std::optional nearestMultipleOf4(quint32 value) + { +- Q_ASSERT(rounding > 1); +- return value + (rounding - 1) - ((value + (rounding - 1)) % rounding); ++ constexpr quint32 rounding = 4; ++ quint32 result = 0; ++ if (qAddOverflow(value, rounding - 1, &result)) ++ return std::nullopt; ++ result &= ~(rounding - 1); ++ return result; ++} ++ ++// Returns a view with prechecked bounds ++static QByteArrayView safeView(QByteArrayView view, quint32 start, quint32 length) ++{ ++ quint32 end = 0; ++ if (qAddOverflow(start, length, &end) || end > quint32(view.length())) ++ return {}; ++ return view.sliced(start, length); + } + + QKtxHandler::~QKtxHandler() = default; +@@ -83,8 +96,7 @@ QKtxHandler::~QKtxHandler() = default; + bool QKtxHandler::canRead(const QByteArray &suffix, const QByteArray &block) + { + Q_UNUSED(suffix); +- +- return (qstrncmp(block.constData(), ktxIdentifier, KTX_IDENTIFIER_LENGTH) == 0); ++ return block.startsWith(ktxIdentifier); + } + + QTextureFileData QKtxHandler::read() +@@ -93,55 +105,122 @@ QTextureFileData QKtxHandler::read() + return QTextureFileData(); + + const QByteArray buf = device()->readAll(); +- const quint32 dataSize = quint32(buf.size()); +- if (dataSize < qktxh_headerSize || !canRead(QByteArray(), buf)) { +- qCDebug(lcQtGuiTextureIO, "Invalid KTX file %s", logName().constData()); ++ if (buf.size() > std::numeric_limits::max()) { ++ qWarning(lcQtGuiTextureIO, "Too big KTX file %s", logName().constData()); ++ return QTextureFileData(); ++ } ++ ++ if (!canRead(QByteArray(), buf)) { ++ qWarning(lcQtGuiTextureIO, "Invalid KTX file %s", logName().constData()); + return QTextureFileData(); + } + +- const KTXHeader *header = reinterpret_cast(buf.data()); +- if (!checkHeader(*header)) { +- qCDebug(lcQtGuiTextureIO, "Unsupported KTX file format in %s", logName().constData()); ++ if (buf.size() < qsizetype(qktxh_headerSize)) { ++ qWarning(lcQtGuiTextureIO, "Invalid KTX header size in %s", logName().constData()); ++ return QTextureFileData(); ++ } ++ ++ KTXHeader header; ++ memcpy(&header, buf.data(), qktxh_headerSize); ++ if (!checkHeader(header)) { ++ qWarning(lcQtGuiTextureIO, "Unsupported KTX file format in %s", logName().constData()); + return QTextureFileData(); + } + + QTextureFileData texData; + texData.setData(buf); + +- texData.setSize(QSize(decode(header->pixelWidth), decode(header->pixelHeight))); +- texData.setGLFormat(decode(header->glFormat)); +- texData.setGLInternalFormat(decode(header->glInternalFormat)); +- texData.setGLBaseInternalFormat(decode(header->glBaseInternalFormat)); ++ texData.setSize(QSize(decode(header.pixelWidth), decode(header.pixelHeight))); ++ texData.setGLFormat(decode(header.glFormat)); ++ texData.setGLInternalFormat(decode(header.glInternalFormat)); ++ texData.setGLBaseInternalFormat(decode(header.glBaseInternalFormat)); + +- texData.setNumLevels(decode(header->numberOfMipmapLevels)); +- texData.setNumFaces(decode(header->numberOfFaces)); ++ texData.setNumLevels(decode(header.numberOfMipmapLevels)); ++ texData.setNumFaces(decode(header.numberOfFaces)); ++ ++ const quint32 bytesOfKeyValueData = decode(header.bytesOfKeyValueData); ++ quint32 headerKeyValueSize; ++ if (qAddOverflow(qktxh_headerSize, bytesOfKeyValueData, &headerKeyValueSize)) { ++ qWarning(lcQtGuiTextureIO, "Overflow in size of key value data in header of KTX file %s", ++ logName().constData()); ++ return QTextureFileData(); ++ } + +- const quint32 bytesOfKeyValueData = decode(header->bytesOfKeyValueData); +- if (qktxh_headerSize + bytesOfKeyValueData < quint64(buf.size())) // oob check +- texData.setKeyValueMetadata(decodeKeyValues( +- QByteArrayView(buf.data() + qktxh_headerSize, bytesOfKeyValueData))); +- quint32 offset = qktxh_headerSize + bytesOfKeyValueData; ++ if (headerKeyValueSize >= quint32(buf.size())) { ++ qWarning(lcQtGuiTextureIO, "OOB request in KTX file %s", logName().constData()); ++ return QTextureFileData(); ++ } ++ ++ // File contains key/values ++ if (bytesOfKeyValueData > 0) { ++ auto keyValueDataView = safeView(buf, qktxh_headerSize, bytesOfKeyValueData); ++ if (keyValueDataView.isEmpty()) { ++ qWarning(lcQtGuiTextureIO, "Invalid view in KTX file %s", logName().constData()); ++ return QTextureFileData(); ++ } ++ ++ auto keyValues = decodeKeyValues(keyValueDataView); ++ if (!keyValues) { ++ qWarning(lcQtGuiTextureIO, "Could not parse key values in KTX file %s", ++ logName().constData()); ++ return QTextureFileData(); ++ } ++ ++ texData.setKeyValueMetadata(*keyValues); ++ } ++ ++ // Technically, any number of levels is allowed but if the value is bigger than ++ // what is possible in KTX V2 (and what makes sense) we return an error. ++ // maxLevels = log2(max(width, height, depth)) ++ const int maxLevels = (sizeof(quint32) * 8) ++ - qCountLeadingZeroBits(std::max( ++ { header.pixelWidth, header.pixelHeight, header.pixelDepth })); ++ ++ if (texData.numLevels() > maxLevels) { ++ qWarning(lcQtGuiTextureIO, "Too many levels in KTX file %s", logName().constData()); ++ return QTextureFileData(); ++ } + +- constexpr int MAX_ITERATIONS = 32; // cap iterations in case of corrupt data ++ if (texData.numFaces() != 1 && texData.numFaces() != 6) { ++ qWarning(lcQtGuiTextureIO, "Invalid number of faces in KTX file %s", logName().constData()); ++ return QTextureFileData(); ++ } + +- for (int level = 0; level < qMin(texData.numLevels(), MAX_ITERATIONS); level++) { +- if (offset + sizeof(quint32) > dataSize) // Corrupt file; avoid oob read +- break; ++ quint32 offset = headerKeyValueSize; ++ for (int level = 0; level < texData.numLevels(); level++) { ++ const auto imageSizeView = safeView(buf, offset, sizeof(quint32)); ++ if (imageSizeView.isEmpty()) { ++ qWarning(lcQtGuiTextureIO, "OOB request in KTX file %s", logName().constData()); ++ return QTextureFileData(); ++ } + +- const quint32 imageSize = decode(qFromUnaligned(buf.data() + offset)); +- offset += sizeof(quint32); ++ const quint32 imageSize = decode(qFromUnaligned(imageSizeView.data())); ++ offset += sizeof(quint32); // overflow checked indirectly above + +- for (int face = 0; face < qMin(texData.numFaces(), MAX_ITERATIONS); face++) { ++ for (int face = 0; face < texData.numFaces(); face++) { + texData.setDataOffset(offset, level, face); + texData.setDataLength(imageSize, level, face); + + // Add image data and padding to offset +- offset += withPadding(imageSize, 4); ++ const auto padded = nearestMultipleOf4(imageSize); ++ if (!padded) { ++ qWarning(lcQtGuiTextureIO, "Overflow in KTX file %s", logName().constData()); ++ return QTextureFileData(); ++ } ++ ++ quint32 offsetNext; ++ if (qAddOverflow(offset, *padded, &offsetNext)) { ++ qWarning(lcQtGuiTextureIO, "OOB request in KTX file %s", logName().constData()); ++ return QTextureFileData(); ++ } ++ ++ offset = offsetNext; + } + } + + if (!texData.isValid()) { +- qCDebug(lcQtGuiTextureIO, "Invalid values in header of KTX file %s", logName().constData()); ++ qWarning(lcQtGuiTextureIO, "Invalid values in header of KTX file %s", ++ logName().constData()); + return QTextureFileData(); + } + +@@ -187,33 +266,83 @@ bool QKtxHandler::checkHeader(const KTXHeader &header) + return is2D && (isCubeMap || isCompressedImage); + } + +-QMap QKtxHandler::decodeKeyValues(QByteArrayView view) const ++std::optional> QKtxHandler::decodeKeyValues(QByteArrayView view) const + { + QMap output; + quint32 offset = 0; +- while (offset < view.size() + sizeof(quint32)) { ++ while (offset < quint32(view.size())) { ++ const auto keyAndValueByteSizeView = safeView(view, offset, sizeof(quint32)); ++ if (keyAndValueByteSizeView.isEmpty()) { ++ qWarning(lcQtGuiTextureIO, "Invalid view in KTX key-value"); ++ return std::nullopt; ++ } ++ + const quint32 keyAndValueByteSize = +- decode(qFromUnaligned(view.constData() + offset)); +- offset += sizeof(quint32); ++ decode(qFromUnaligned(keyAndValueByteSizeView.data())); + +- if (offset + keyAndValueByteSize > quint64(view.size())) +- break; // oob read ++ quint32 offsetKeyAndValueStart; ++ if (qAddOverflow(offset, quint32(sizeof(quint32)), &offsetKeyAndValueStart)) { ++ qWarning(lcQtGuiTextureIO, "Overflow in KTX key-value"); ++ return std::nullopt; ++ } ++ ++ quint32 offsetKeyAndValueEnd; ++ if (qAddOverflow(offsetKeyAndValueStart, keyAndValueByteSize, &offsetKeyAndValueEnd)) { ++ qWarning(lcQtGuiTextureIO, "Overflow in KTX key-value"); ++ return std::nullopt; ++ } ++ ++ const auto keyValueView = safeView(view, offsetKeyAndValueStart, keyAndValueByteSize); ++ if (keyValueView.isEmpty()) { ++ qWarning(lcQtGuiTextureIO, "Invalid view in KTX key-value"); ++ return std::nullopt; ++ } + + // 'key' is a UTF-8 string ending with a null terminator, 'value' is the rest. + // To separate the key and value we convert the complete data to utf-8 and find the first + // null terminator from the left, here we split the data into two. +- const auto str = QString::fromUtf8(view.constData() + offset, keyAndValueByteSize); +- const int idx = str.indexOf('\0'_L1); +- if (idx == -1) +- continue; +- +- const QByteArray key = str.left(idx).toUtf8(); +- const size_t keySize = key.size() + 1; // Actual data size +- const QByteArray value = QByteArray::fromRawData(view.constData() + offset + keySize, +- keyAndValueByteSize - keySize); +- +- offset = withPadding(offset + keyAndValueByteSize, 4); +- output.insert(key, value); ++ ++ const int idx = keyValueView.indexOf('\0'); ++ if (idx == -1) { ++ qWarning(lcQtGuiTextureIO, "Invalid key in KTX key-value"); ++ return std::nullopt; ++ } ++ ++ const QByteArrayView keyView = safeView(view, offsetKeyAndValueStart, idx); ++ if (keyView.isEmpty()) { ++ qWarning(lcQtGuiTextureIO, "Overflow in KTX key-value"); ++ return std::nullopt; ++ } ++ ++ const quint32 keySize = idx + 1; // Actual data size ++ ++ quint32 offsetValueStart; ++ if (qAddOverflow(offsetKeyAndValueStart, keySize, &offsetValueStart)) { ++ qWarning(lcQtGuiTextureIO, "Overflow in KTX key-value"); ++ return std::nullopt; ++ } ++ ++ quint32 valueSize; ++ if (qSubOverflow(keyAndValueByteSize, keySize, &valueSize)) { ++ qWarning(lcQtGuiTextureIO, "Underflow in KTX key-value"); ++ return std::nullopt; ++ } ++ ++ const QByteArrayView valueView = safeView(view, offsetValueStart, valueSize); ++ if (valueView.isEmpty()) { ++ qWarning(lcQtGuiTextureIO, "Invalid view in KTX key-value"); ++ return std::nullopt; ++ } ++ ++ output.insert(keyView.toByteArray(), valueView.toByteArray()); ++ ++ const auto offsetNext = nearestMultipleOf4(offsetKeyAndValueEnd); ++ if (!offsetNext) { ++ qWarning(lcQtGuiTextureIO, "Overflow in KTX key-value"); ++ return std::nullopt; ++ } ++ ++ offset = *offsetNext; + } + + return output; +diff --git a/src/gui/util/qktxhandler_p.h b/src/gui/util/qktxhandler_p.h +index 0fd2487393..1142aa8dc0 100644 +--- a/src/gui/util/qktxhandler_p.h ++++ b/src/gui/util/qktxhandler_p.h +@@ -17,6 +17,8 @@ + + #include "qtexturefilehandler_p.h" + ++#include ++ + QT_BEGIN_NAMESPACE + + struct KTXHeader; +@@ -33,7 +35,7 @@ public: + + private: + bool checkHeader(const KTXHeader &header); +- QMap decodeKeyValues(QByteArrayView view) const; ++ std::optional> decodeKeyValues(QByteArrayView view) const; + quint32 decode(quint32 val) const; + + bool inverseEndian = false; diff --git a/packages/conan/recipes/qt/patches/CVE-2024-30161-qtbase-6.5.diff b/packages/conan/recipes/qt/patches/CVE-2024-30161-qtbase-6.5.diff new file mode 100644 index 00000000..689b9e6a --- /dev/null +++ b/packages/conan/recipes/qt/patches/CVE-2024-30161-qtbase-6.5.diff @@ -0,0 +1,33 @@ +diff --git a/src/corelib/kernel/qeventdispatcher_wasm_p.h b/src/corelib/kernel/qeventdispatcher_wasm_p.h +index 94550e6..1e5b520 100644 +--- a/src/corelib/kernel/qeventdispatcher_wasm_p.h ++++ b/src/corelib/kernel/qeventdispatcher_wasm_p.h +@@ -50,6 +50,7 @@ + void interrupt() override; + void wakeUp() override; + ++ static void runOnMainThread(std::function fn); + static void runOnMainThreadAsync(std::function fn); + static void socketSelect(int timeout, int socket, bool waitForRead, bool waitForWrite, + bool *selectForRead, bool *selectForWrite, bool *socketDisconnect); +@@ -87,7 +88,6 @@ + + static void run(std::function fn); + static void runAsync(std::function fn); +- static void runOnMainThread(std::function fn); + + static QEventDispatcherWasm *g_mainThreadEventDispatcher; + +diff --git a/src/network/access/qnetworkreplywasmimpl.cpp b/src/network/access/qnetworkreplywasmimpl.cpp +index 63a676e..43f007a 100644 +--- a/src/network/access/qnetworkreplywasmimpl.cpp ++++ b/src/network/access/qnetworkreplywasmimpl.cpp +@@ -297,7 +297,7 @@ + attr.destinationPath = destinationPath.constData(); + + auto url = request.url().toString().toUtf8(); +- QEventDispatcherWasm::runOnMainThreadAsync([attr, url]() mutable { ++ QEventDispatcherWasm::runOnMainThread([attr, url]() mutable { + emscripten_fetch(&attr, url); + }); + state = Working; diff --git a/packages/conan/recipes/qt/patches/CVE-2024-36048-qtnetworkauth-6.5.diff b/packages/conan/recipes/qt/patches/CVE-2024-36048-qtnetworkauth-6.5.diff new file mode 100644 index 00000000..f5579211 --- /dev/null +++ b/packages/conan/recipes/qt/patches/CVE-2024-36048-qtnetworkauth-6.5.diff @@ -0,0 +1,53 @@ +diff --git a/src/oauth/qabstractoauth.cpp b/src/oauth/qabstractoauth.cpp +index 8e29d36..de6f4ab 100644 +--- a/src/oauth/qabstractoauth.cpp ++++ b/src/oauth/qabstractoauth.cpp +@@ -11,7 +11,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -20,6 +19,9 @@ + #include + #include + ++#include ++#include ++ + #include + + QT_BEGIN_NAMESPACE +@@ -262,15 +264,19 @@ void QAbstractOAuthPrivate::setStatus(QAbstractOAuth::Status newStatus) + } + } + ++Q_CONSTINIT static QBasicMutex prngMutex; ++Q_GLOBAL_STATIC_WITH_ARGS(std::mt19937, prng, (*QRandomGenerator::system())) ++ + QByteArray QAbstractOAuthPrivate::generateRandomString(quint8 length) + { +- const char characters[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; +- static std::mt19937 randomEngine(QDateTime::currentDateTime().toMSecsSinceEpoch()); ++ constexpr char characters[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + std::uniform_int_distribution distribution(0, sizeof(characters) - 2); + QByteArray data; + data.reserve(length); ++ auto lock = qt_unique_lock(prngMutex); + for (quint8 i = 0; i < length; ++i) +- data.append(characters[distribution(randomEngine)]); ++ data.append(characters[distribution(*prng)]); ++ lock.unlock(); + return data; + } + +@@ -580,6 +586,7 @@ void QAbstractOAuth::resourceOwnerAuthorization(const QUrl &url, const QMultiMap + } + + /*! ++ \threadsafe + Generates a random string which could be used as state or nonce. + The parameter \a length determines the size of the generated + string. diff --git a/packages/conan/recipes/qt/patches/fix-long-path-on-windows_6.5.3.patch b/packages/conan/recipes/qt/patches/fix-long-path-on-windows_6.5.3.patch new file mode 100644 index 00000000..2b9a861e --- /dev/null +++ b/packages/conan/recipes/qt/patches/fix-long-path-on-windows_6.5.3.patch @@ -0,0 +1,16 @@ +--- a/src/tools/syncqt/main.cpp ++++ b/src/tools/syncqt/main.cpp +@@ -851,12 +851,7 @@ + + bool headerFileExists = std::filesystem::exists(headerFile); + +- std::filesystem::path headerFileRootName = +- std::filesystem::weakly_canonical(headerFile, ec).root_name(); +- std::string aliasedFilepath = !ec && headerFileRootName == m_outputRootName +- ? std::filesystem::relative(headerFile, outputDir).generic_string() +- : headerFile.generic_string(); +- ec.clear(); ++ std::string aliasedFilepath = headerFile.generic_string(); + + std::string aliasPath = outputDir + '/' + m_currentFilename; + diff --git a/packages/conan/recipes/qt/patches/fix-long-path-on-windows_6.5.4.patch b/packages/conan/recipes/qt/patches/fix-long-path-on-windows_6.5.4.patch new file mode 100644 index 00000000..a9441890 --- /dev/null +++ b/packages/conan/recipes/qt/patches/fix-long-path-on-windows_6.5.4.patch @@ -0,0 +1,16 @@ +--- a/src/tools/syncqt/main.cpp ++++ b/src/tools/syncqt/main.cpp +@@ -842,12 +842,7 @@ + + bool headerFileExists = std::filesystem::exists(headerFile); + +- std::filesystem::path headerFileRootName = +- std::filesystem::weakly_canonical(headerFile, ec).root_name(); +- std::string aliasedFilepath = !ec && headerFileRootName == m_outputRootName +- ? std::filesystem::relative(headerFile, outputDir).generic_string() +- : headerFile.generic_string(); +- ec.clear(); ++ std::string aliasedFilepath = headerFile.generic_string(); + + std::string aliasPath = outputDir + '/' + m_currentFilename; + diff --git a/packages/conan/recipes/qt/patches/qtbase-core-cmake_6.5.4.diff b/packages/conan/recipes/qt/patches/qtbase-core-cmake_6.5.4.diff new file mode 100644 index 00000000..99c73c96 --- /dev/null +++ b/packages/conan/recipes/qt/patches/qtbase-core-cmake_6.5.4.diff @@ -0,0 +1,14 @@ +On RHEL and derivatives /bin/ls is a shell script. + +diff -u -r a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt +--- a/src/corelib/CMakeLists.txt ++++ b/src/corelib/CMakeLists.txt +@@ -403,7 +403,7 @@ + # Find ELF interpreter and define a macro for that: + if ((LINUX OR HURD) AND NOT CMAKE_CROSSCOMPILING AND BUILD_SHARED_LIBS) + if (NOT DEFINED ELF_INTERPRETER) +- execute_process(COMMAND ${CMAKE_COMMAND} -E env LC_ALL=C readelf -l /bin/ls ++ execute_process(COMMAND ${CMAKE_COMMAND} -E env LC_ALL=C readelf -l /bin/grep + RESULT_VARIABLE readelf_ok + OUTPUT_VARIABLE readelf_output + ) diff --git a/packages/conan/recipes/qt/patches/spellcheck_buildflags.diff b/packages/conan/recipes/qt/patches/spellcheck_buildflags.diff new file mode 100644 index 00000000..363ff2b4 --- /dev/null +++ b/packages/conan/recipes/qt/patches/spellcheck_buildflags.diff @@ -0,0 +1,10 @@ +--- src/3rdparty/chromium/content/browser/BUILD.gn.orig 2023-02-27 18:57:08.000000000 +0000 ++++ src/3rdparty/chromium/content/browser/BUILD.gn +@@ -40,6 +40,7 @@ jumbo_static_library("devtools_protocol" + + deps = [ + "//base", ++ "//components/spellcheck:buildflags", + "//content/browser/devtools:devtools_background_services_proto", + "//content/browser/devtools:protocol_sources", + "//content/common:buildflags", diff --git a/packages/conan/recipes/qt/qtmodules6.5.4.conf b/packages/conan/recipes/qt/qtmodules6.5.4.conf new file mode 100644 index 00000000..5fbcab62 --- /dev/null +++ b/packages/conan/recipes/qt/qtmodules6.5.4.conf @@ -0,0 +1,332 @@ +[submodule "qtbase"] + path = qtbase + url = ../qtbase.git + branch = 6.5.4 + status = essential +[submodule "qtsvg"] + depends = qtbase + path = qtsvg + url = ../qtsvg.git + branch = 6.5.4 + status = addon +[submodule "qtdeclarative"] + depends = qtbase + recommends = qtimageformats qtshadertools qtsvg qtlanguageserver + path = qtdeclarative + url = ../qtdeclarative.git + branch = 6.5.4 + status = essential +[submodule "qtactiveqt"] + depends = qtbase + path = qtactiveqt + url = ../qtactiveqt.git + branch = 6.5.4 + status = addon +[submodule "qtmultimedia"] + depends = qtbase qtshadertools + recommends = qtdeclarative qtquick3d + path = qtmultimedia + url = ../qtmultimedia.git + branch = 6.5.4 + status = addon +[submodule "qttools"] + depends = qtbase + recommends = qtdeclarative qtactiveqt + path = qttools + url = ../qttools.git + branch = 6.5.4 + status = essential +[submodule "qtxmlpatterns"] + depends = qtbase + recommends = qtdeclarative + path = qtxmlpatterns + url = ../qtxmlpatterns.git + branch = dev + status = ignore +[submodule "qttranslations"] + depends = qttools + path = qttranslations + url = ../qttranslations.git + branch = 6.5.4 + status = essential + priority = 30 +[submodule "qtdoc"] + depends = qtdeclarative qttools + recommends = qtmultimedia qtshadertools qtwebengine + path = qtdoc + url = ../qtdoc.git + branch = 6.5.4 + status = essential + priority = 40 +[submodule "qtrepotools"] + path = qtrepotools + url = ../qtrepotools.git + branch = master + status = essential + project = - +[submodule "qtqa"] + depends = qtbase + path = qtqa + url = ../qtqa.git + branch = dev + status = essential + priority = 50 +[submodule "qtlocation"] + depends = qtbase qtpositioning + recommends = qtdeclarative + path = qtlocation + url = ../qtlocation.git + branch = 6.5.4 + status = preview +[submodule "qtpositioning"] + depends = qtbase + recommends = qtdeclarative qtserialport + path = qtpositioning + url = ../qtpositioning.git + branch = 6.5.4 + status = addon +[submodule "qtsensors"] + depends = qtbase + recommends = qtdeclarative + path = qtsensors + url = ../qtsensors.git + branch = 6.5.4 + status = addon +[submodule "qtsystems"] + depends = qtbase + recommends = qtdeclarative + path = qtsystems + url = ../qtsystems.git + branch = dev + status = ignore +[submodule "qtfeedback"] + depends = qtdeclarative + recommends = qtmultimedia + path = qtfeedback + url = ../qtfeedback.git + branch = master + status = ignore +[submodule "qtpim"] + depends = qtdeclarative + path = qtpim + url = ../qtpim.git + branch = dev + status = ignore +[submodule "qtconnectivity"] + depends = qtbase + recommends = qtdeclarative + path = qtconnectivity + url = ../qtconnectivity.git + branch = 6.5.4 + status = addon +[submodule "qtwayland"] + depends = qtbase + recommends = qtdeclarative + path = qtwayland + url = ../qtwayland.git + branch = 6.5.4 + status = addon +[submodule "qt3d"] + depends = qtbase + recommends = qtdeclarative qtshadertools + path = qt3d + url = ../qt3d.git + branch = 6.5.4 + status = addon +[submodule "qtimageformats"] + depends = qtbase + path = qtimageformats + url = ../qtimageformats.git + branch = 6.5.4 + status = addon +[submodule "qtserialbus"] + depends = qtbase + recommends = qtserialport + path = qtserialbus + url = ../qtserialbus.git + branch = 6.5.4 + status = addon +[submodule "qtserialport"] + depends = qtbase + path = qtserialport + url = ../qtserialport.git + branch = 6.5.4 + status = addon +[submodule "qtwebsockets"] + depends = qtbase + recommends = qtdeclarative + path = qtwebsockets + url = ../qtwebsockets.git + branch = 6.5.4 + status = addon +[submodule "qtwebchannel"] + depends = qtbase + recommends = qtdeclarative qtwebsockets + path = qtwebchannel + url = ../qtwebchannel.git + branch = 6.5.4 + status = addon +[submodule "qtwebengine"] + depends = qtdeclarative + recommends = qtwebchannel qttools qtpositioning + path = qtwebengine + url = ../qtwebengine.git + branch = 6.5.4 + status = addon + priority = 10 +[submodule "qtcanvas3d"] + depends = qtdeclarative + path = qtcanvas3d + url = ../qtcanvas3d.git + branch = dev + status = ignore +[submodule "qtwebview"] + depends = qtdeclarative + recommends = qtwebengine + path = qtwebview + url = ../qtwebview.git + branch = 6.5.4 + status = addon +[submodule "qtcharts"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtcharts + url = ../qtcharts.git + branch = 6.5.4 + status = addon +[submodule "qtdatavis3d"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtdatavis3d + url = ../qtdatavis3d.git + branch = 6.5.4 + status = addon +[submodule "qtvirtualkeyboard"] + depends = qtbase qtdeclarative qtsvg + recommends = qtmultimedia + path = qtvirtualkeyboard + url = ../qtvirtualkeyboard.git + branch = 6.5.4 + status = addon +[submodule "qtgamepad"] + depends = qtbase + recommends = qtdeclarative + path = qtgamepad + url = ../qtgamepad.git + branch = dev + status = ignore +[submodule "qtscxml"] + depends = qtbase qtdeclarative + path = qtscxml + url = ../qtscxml.git + branch = 6.5.4 + status = addon +[submodule "qtspeech"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtspeech + url = ../qtspeech.git + branch = 6.5.4 + status = addon +[submodule "qtnetworkauth"] + depends = qtbase + path = qtnetworkauth + url = ../qtnetworkauth.git + branch = 6.5.4 + status = addon +[submodule "qtremoteobjects"] + depends = qtbase + recommends = qtdeclarative + path = qtremoteobjects + url = ../qtremoteobjects.git + branch = 6.5.4 + status = addon +[submodule "qtwebglplugin"] + depends = qtbase qtwebsockets + recommends = qtdeclarative + path = qtwebglplugin + url = ../qtwebglplugin.git + branch = dev + status = ignore +[submodule "qtlottie"] + depends = qtbase qtdeclarative + path = qtlottie + url = ../qtlottie.git + branch = 6.5.4 + status = addon +[submodule "qtquicktimeline"] + depends = qtbase qtdeclarative + path = qtquicktimeline + url = ../qtquicktimeline + branch = 6.5.4 + status = addon +[submodule "qtquick3d"] + depends = qtbase qtdeclarative qtshadertools + recommends = qtquicktimeline + path = qtquick3d + url = ../qtquick3d.git + branch = 6.5.4 + status = addon +[submodule "qtshadertools"] + depends = qtbase + path = qtshadertools + url = ../qtshadertools.git + branch = 6.5.4 + status = addon +[submodule "qt5compat"] + depends = qtbase qtdeclarative + path = qt5compat + url = ../qt5compat.git + branch = 6.5.4 + status = deprecated +[submodule "qtcoap"] + depends = qtbase + path = qtcoap + url = ../qtcoap.git + branch = 6.5.4 + status = addon +[submodule "qtmqtt"] + depends = qtbase qtdeclarative + path = qtmqtt + url = ../qtmqtt.git + branch = 6.5.4 + status = addon +[submodule "qtopcua"] + depends = qtbase qtdeclarative + path = qtopcua + url = ../qtopcua.git + branch = 6.5.4 + status = addon +[submodule "qtlanguageserver"] + depends = qtbase + path = qtlanguageserver + url = ../qtlanguageserver.git + branch = 6.5.4 + status = preview +[submodule "qthttpserver"] + depends = qtbase + recommends = qtwebsockets + path = qthttpserver + url = ../qthttpserver.git + branch = 6.5.4 + status = preview +[submodule "qtquick3dphysics"] + depends = qtbase qtdeclarative qtquick3d qtshadertools + path = qtquick3dphysics + url = ../qtquick3dphysics.git + branch = 6.5.4 + status = addon +[submodule "qtgrpc"] + depends = qtbase + recommends = qtdeclarative + path = qtgrpc + url = ../qtgrpc.git + branch = 6.5.4 + status = preview +[submodule "qtquickeffectmaker"] + depends = qtbase qtdeclarative qtshadertools + recommends = qtquick3d + path = qtquickeffectmaker + url = ../qtquickeffectmaker.git + branch = 6.5.4 + status = addon diff --git a/packages/conan/recipes/qt/test_package/CMakeLists.txt b/packages/conan/recipes/qt/test_package/CMakeLists.txt new file mode 100644 index 00000000..7b6cb2f7 --- /dev/null +++ b/packages/conan/recipes/qt/test_package/CMakeLists.txt @@ -0,0 +1,24 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/qt/6.x.x/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(Qt6 COMPONENTS Core Network Sql Concurrent Xml REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp greeter.h example.qrc) +target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Network Qt6::Sql Qt6::Concurrent Qt6::Xml Qt6::Widgets) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +set_target_properties(${PROJECT_NAME} PROPERTIES AUTOMOC ON AUTORCC ON) + +# Only running this Qt macros in macOS +if (APPLE) + # Related to https://github.com/conan-io/conan-center-index/issues/20574 + qt_standard_project_setup() + qt_add_executable(test_macos_bundle MACOSX_BUNDLE test_macos_bundle.cpp) + target_link_libraries(test_macos_bundle PRIVATE Qt6::Core) + target_compile_features(test_macos_bundle PRIVATE cxx_std_17) +endif() diff --git a/packages/conan/recipes/qt/test_package/conanfile.py b/packages/conan/recipes/qt/test_package/conanfile.py new file mode 100644 index 00000000..5eda269f --- /dev/null +++ b/packages/conan/recipes/qt/test_package/conanfile.py @@ -0,0 +1,53 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/qt/6.x.x/test_package/conanfile.py + +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.env import VirtualRunEnv +from conan.tools.files import copy, save + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualBuildEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str, run=can_run(self)) + + def build_requirements(self): + if not can_run(self): + self.tool_requires(self.tested_reference_str) + + def generate(self): + path = self.dependencies["qt"].package_folder.replace("\\", "/") + save(self, "qt.conf", f"""[Paths] +Prefix = {path}""") + + VirtualRunEnv(self).generate() + if can_run(self): + VirtualRunEnv(self).generate(scope="build") + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + copy(self, "qt.conf", src=self.generators_folder, dst=os.path.join(self.cpp.build.bindirs[0])) + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") + # Related to https://github.com/conan-io/conan-center-index/issues/20574 + if self.settings.os == "Macos": + bin_macos_path = os.path.join(self.cpp.build.bindirs[0], "test_macos_bundle.app", "Contents", "MacOS", "test_macos_bundle") + self.run(bin_macos_path, env="conanrun") diff --git a/packages/conan/recipes/qt/test_package_DISABLE/example.qrc b/packages/conan/recipes/qt/test_package/example.qrc similarity index 100% rename from packages/conan/recipes/qt/test_package_DISABLE/example.qrc rename to packages/conan/recipes/qt/test_package/example.qrc diff --git a/packages/conan/recipes/qt/test_package_DISABLE/greeter.h b/packages/conan/recipes/qt/test_package/greeter.h similarity index 54% rename from packages/conan/recipes/qt/test_package_DISABLE/greeter.h rename to packages/conan/recipes/qt/test_package/greeter.h index 85052e08..60484007 100644 --- a/packages/conan/recipes/qt/test_package_DISABLE/greeter.h +++ b/packages/conan/recipes/qt/test_package/greeter.h @@ -1,3 +1,11 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/qt/6.x.x/test_package/greeter.h +*/ + #include #include #include diff --git a/packages/conan/recipes/qt/test_package_DISABLE/resource.txt b/packages/conan/recipes/qt/test_package/resource.txt similarity index 100% rename from packages/conan/recipes/qt/test_package_DISABLE/resource.txt rename to packages/conan/recipes/qt/test_package/resource.txt diff --git a/packages/conan/recipes/qt/test_package/test_macosbundle.cpp b/packages/conan/recipes/qt/test_package/test_macosbundle.cpp new file mode 100644 index 00000000..1a65af97 --- /dev/null +++ b/packages/conan/recipes/qt/test_package/test_macosbundle.cpp @@ -0,0 +1,15 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/qt/6.x.x/test_package/test_macos_bundle.cpp +*/ + +#include + +int main(int argc, char *argv[]) +{ + QCoreApplication app(argc, argv); + return 0; + } diff --git a/packages/conan/recipes/qt/test_package_DISABLE/test_package.cpp b/packages/conan/recipes/qt/test_package/test_package.cpp similarity index 76% rename from packages/conan/recipes/qt/test_package_DISABLE/test_package.cpp rename to packages/conan/recipes/qt/test_package/test_package.cpp index 5374ecf4..c86184b2 100644 --- a/packages/conan/recipes/qt/test_package_DISABLE/test_package.cpp +++ b/packages/conan/recipes/qt/test_package/test_package.cpp @@ -1,3 +1,11 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/qt/6.x.x/test_package/test_package.cpp +*/ + #include #include #include diff --git a/packages/conan/recipes/qt/test_package_DISABLE/CMakeLists.txt b/packages/conan/recipes/qt/test_package_DISABLE/CMakeLists.txt deleted file mode 100644 index 337604f1..00000000 --- a/packages/conan/recipes/qt/test_package_DISABLE/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) - -find_package(Qt6 COMPONENTS Core Network Sql Concurrent Xml REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} WIN32 test_package.cpp greeter.h example.qrc) -target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Network Qt6::Sql Qt6::Concurrent Qt6::Xml) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) -set_target_properties(${PROJECT_NAME} PROPERTIES AUTOMOC ON AUTORCC ON) diff --git a/packages/conan/recipes/qt/test_package_DISABLE/conanfile.py b/packages/conan/recipes/qt/test_package_DISABLE/conanfile.py deleted file mode 100644 index 0cc84063..00000000 --- a/packages/conan/recipes/qt/test_package_DISABLE/conanfile.py +++ /dev/null @@ -1,172 +0,0 @@ -import os -from conan import ConanFile -from conan.errors import ConanInvalidConfiguration -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.build import check_min_cppstd -from conan.tools.scm import Version -from conan.tools.files import apply_conandata_patches, copy, get, rmdir - -required_conan_version = ">=1.52.0" - - -class Catch2Conan(ConanFile): - name = "catch2" - description = ( - "A modern, C++-native, header-only, framework for unit-tests, TDD and BDD" - ) - topics = ("catch2", "unit-test", "tdd", "bdd") - license = "BSL-1.0" - homepage = "https://github.com/catchorg/Catch2" - url = "https://github.com/conan-io/conan-center-index" - settings = "os", "arch", "compiler", "build_type" - options = { - "fPIC": [True, False], - "with_prefix": [True, False], - "default_reporter": "ANY", - } - default_options = { - "fPIC": True, - "with_prefix": False, - "default_reporter": None, - } - - @property - def _default_reporter_str(self): - return '"{}"'.format(str(self.options.default_reporter).strip('"')) - - def export_sources(self): - for p in self.conan_data.get("patches", {}).get(self.version, []): - copy(self, p["patch_file"], self.recipe_folder, self.export_sources_folder) - - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - - @property - def _compilers_minimum_version(self): - return { - "gcc": "7", - "Visual Studio": "15", - "clang": "5", - "apple-clang": "10", - } - - def layout(self): - cmake_layout(self, src_folder="src") - - def validate(self): - if self.info.settings.compiler.cppstd: - check_min_cppstd(self, "14") - minimum_version = self._compilers_minimum_version.get( - str(self.settings.compiler), False - ) - if minimum_version: - if Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration( - "{}/{}: Unsupported compiler: {}-{} " - "(https://github.com/p-ranav/structopt#compiler-compatibility).".format( - self.name, - self.version, - self.settings.compiler, - self.settings.compiler.version, - ) - ) - else: - self.output.warn( - "{}/{} requires C++14. Your compiler is unknown. Assuming it supports C++14.".format( - self.name, self.version - ) - ) - - def source(self): - get( - self, - **self.conan_data["sources"][self.version], - destination=self.source_folder, - strip_root=True, - ) - - def generate(self): - tc = CMakeToolchain(self) - tc.variables["BUILD_TESTING"] = False - tc.variables["CATCH_INSTALL_DOCS"] = False - tc.variables["CATCH_INSTALL_HELPERS"] = True - tc.variables["CATCH_CONFIG_PREFIX_ALL"] = self.options.with_prefix - if self.options.default_reporter: - tc.variables["CATCH_CONFIG_DEFAULT_REPORTER"] = self._default_reporter_str - tc.generate() - - def build(self): - # apply_conandata_patches(self) - cmake = CMake(self) - cmake.configure() - cmake.build() - - def package(self): - copy( - self, - "LICENSE.txt", - src=self.source_folder, - dst=os.path.join(self.package_folder, "licenses"), - ) - - cmake = CMake(self) - cmake.install() - - rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - rmdir(self, os.path.join(self.package_folder, "share")) - for cmake_file in [ - "ParseAndAddCatchTests.cmake", - "Catch.cmake", - "CatchAddTests.cmake", - ]: - self.copy( - cmake_file, - src=os.path.join(self.source_folder, "extras"), - dst=os.path.join("lib", "cmake", "Catch2"), - ) - - def package_info(self): - self.cpp_info.set_property("cmake_file_name", "Catch2") - self.cpp_info.set_property("cmake_target_name", "Catch2::Catch2WithMain") - self.cpp_info.set_property("pkg_config_name", "catch2-with-main") - self.cpp_info.names["cmake_find_package"] = "Catch2" - self.cpp_info.names["cmake_find_package_multi"] = "Catch2" - - lib_suffix = "d" if self.settings.build_type == "Debug" else "" - self.cpp_info.components["_catch2"].set_property( - "cmake_target_name", "Catch2::Catch2" - ) - self.cpp_info.components["_catch2"].set_property("pkg_config_name", "catch2") - self.cpp_info.components["_catch2"].names["cmake_find_package"] = "Catch2" - self.cpp_info.components["_catch2"].names["cmake_find_package_multi"] = "Catch2" - self.cpp_info.components["_catch2"].libs = ["Catch2" + lib_suffix] - - self.cpp_info.components["catch2_with_main"].builddirs = [ - os.path.join("lib", "cmake", "Catch2") - ] - self.cpp_info.components["catch2_with_main"].libs = ["Catch2Main" + lib_suffix] - self.cpp_info.components["catch2_with_main"].requires = ["_catch2"] - self.cpp_info.components["catch2_with_main"].system_libs = ( - ["log"] if self.settings.os == "Android" else [] - ) - self.cpp_info.components["catch2_with_main"].set_property( - "cmake_target_name", "Catch2::Catch2WithMain" - ) - self.cpp_info.components["catch2_with_main"].set_property( - "pkg_config_name", "catch2-with-main" - ) - self.cpp_info.components["catch2_with_main"].names[ - "cmake_find_package" - ] = "Catch2WithMain" - self.cpp_info.components["catch2_with_main"].names[ - "cmake_find_package_multi" - ] = "Catch2WithMain" - defines = self.cpp_info.components["catch2_with_main"].defines - - if self.options.with_prefix: - defines.append("CATCH_CONFIG_PREFIX_ALL") - if self.options.default_reporter: - defines.append( - "CATCH_CONFIG_DEFAULT_REPORTER={}".format(self._default_reporter_str) - ) diff --git a/packages/conan/recipes/qt/test_package_DISABLE/meson.build b/packages/conan/recipes/qt/test_package_DISABLE/meson.build deleted file mode 100644 index 32053f32..00000000 --- a/packages/conan/recipes/qt/test_package_DISABLE/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -project('test_package', 'cpp') -qt5 = import('qt5') -qt5_dep = dependency('qt5', modules: ['Core', 'Network', 'Sql', 'Concurrent', 'Xml', 'DBus']) -moc_files = qt5.preprocess(moc_headers : 'greeter.h', qresources : 'example.qrc') -executable('test_package', 'test_package.cpp', moc_files, - dependencies : qt5_dep) diff --git a/packages/conan/recipes/qt/test_package_DISABLE/test_package.pro b/packages/conan/recipes/qt/test_package_DISABLE/test_package.pro deleted file mode 100644 index 855282f1..00000000 --- a/packages/conan/recipes/qt/test_package_DISABLE/test_package.pro +++ /dev/null @@ -1,14 +0,0 @@ -SOURCES += test_package.cpp - -HEADERS += greeter.h - -RESOURCES = example.qrc - -QT -= gui -QT += network sql concurrent xml dbus - -CONFIG += console - -CONFIG += conan_basic_setup -include($$OUT_PWD/../conanbuildinfo.pri) -LIBS -= $$CONAN_LIBS_QT diff --git a/packages/conan/recipes/snappy/conandata.yml b/packages/conan/recipes/snappy/conandata.yml new file mode 100644 index 00000000..4b896a9e --- /dev/null +++ b/packages/conan/recipes/snappy/conandata.yml @@ -0,0 +1,78 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/snappy/all/conandata.yml + +sources: + "1.2.1": + url: "https://github.com/google/snappy/archive/1.2.1.tar.gz" + sha256: "736aeb64d86566d2236ddffa2865ee5d7a82d26c9016b36218fcc27ea4f09f86" + "1.2.0": + url: "https://github.com/google/snappy/archive/1.2.0.tar.gz" + sha256: "9b8f10fbb5e3bc112f2e5e64f813cb73faea42ec9c533a5023b5ae08aedef42e" + "1.1.10": + url: "https://github.com/google/snappy/archive/1.1.10.tar.gz" + sha256: "49d831bffcc5f3d01482340fe5af59852ca2fe76c3e05df0e67203ebbe0f1d90" + "1.1.9": + url: "https://github.com/google/snappy/archive/1.1.9.tar.gz" + sha256: "75c1fbb3d618dd3a0483bff0e26d0a92b495bbe5059c8b4f1c962b478b6e06e7" + "1.1.8": + url: "https://github.com/google/snappy/archive/1.1.8.tar.gz" + sha256: "16b677f07832a612b0836178db7f374e414f94657c138e6993cbfc5dcc58651f" + "1.1.7": + url: "https://github.com/google/snappy/archive/1.1.7.tar.gz" + sha256: "3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4" +patches: + "1.2.1": + - patch_file: "patches/1.1.10-0001-fix-inlining-failure.patch" + patch_description: "disable inlining for compilation error" + patch_type: "portability" + - patch_file: "patches/1.1.9-0002-no-Werror.patch" + patch_description: "disable 'warning as error' options" + patch_type: "portability" + - patch_file: "patches/1.2.0-0003-fix-clobber-list-older-llvm.patch" + patch_description: "disable inline asm on apple-clang" + patch_type: "portability" + - patch_file: "patches/1.2.0-0004-rtti-by-default.patch" + patch_description: "remove 'disable rtti'" + patch_type: "conan" + "1.2.0": + - patch_file: "patches/1.1.10-0001-fix-inlining-failure.patch" + patch_description: "disable inlining for compilation error" + patch_type: "portability" + - patch_file: "patches/1.1.9-0002-no-Werror.patch" + patch_description: "disable 'warning as error' options" + patch_type: "portability" + - patch_file: "patches/1.2.0-0003-fix-clobber-list-older-llvm.patch" + patch_description: "disable inline asm on apple-clang" + patch_type: "portability" + - patch_file: "patches/1.2.0-0004-rtti-by-default.patch" + patch_description: "remove 'disable rtti'" + patch_type: "conan" + "1.1.10": + - patch_file: "patches/1.1.10-0001-fix-inlining-failure.patch" + patch_description: "disable inlining for compilation error" + patch_type: "portability" + - patch_file: "patches/1.1.9-0002-no-Werror.patch" + patch_description: "disable 'warning as error' options" + patch_type: "portability" + - patch_file: "patches/1.1.10-0003-fix-clobber-list-older-llvm.patch" + patch_description: "disable inline asm on apple-clang" + patch_type: "portability" + - patch_file: "patches/1.1.9-0004-rtti-by-default.patch" + patch_description: "remove 'disable rtti'" + patch_type: "conan" + "1.1.9": + - patch_file: "patches/1.1.9-0001-fix-inlining-failure.patch" + patch_description: "disable inlining for compilation error" + patch_type: "portability" + - patch_file: "patches/1.1.9-0002-no-Werror.patch" + patch_description: "disable 'warning as error' options" + patch_type: "portability" + - patch_file: "patches/1.1.9-0003-fix-clobber-list-older-llvm.patch" + patch_description: "disable inline asm on apple-clang" + patch_type: "portability" + - patch_file: "patches/1.1.9-0004-rtti-by-default.patch" + patch_description: "remove 'disable rtti'" + patch_type: "conan" diff --git a/packages/conan/recipes/snappy/conanfile.py b/packages/conan/recipes/snappy/conanfile.py new file mode 100644 index 00000000..3df352c3 --- /dev/null +++ b/packages/conan/recipes/snappy/conanfile.py @@ -0,0 +1,116 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/snappy/all/conanfile.py + +from conan import ConanFile +from conan.tools.build import check_min_cppstd, stdcpp_library +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.54.0" + + +class SnappyConan(ConanFile): + name = "snappy" + description = "A fast compressor/decompressor" + topics = ("google", "compressor", "decompressor") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/google/snappy" + license = "BSD-3-Clause" + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_bmi2": [True, False, "auto"], + "with_ssse3": [True, False, "auto"], + } + default_options = { + "shared": False, + "fPIC": True, + "with_bmi2": "auto", + "with_ssse3": "auto", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == 'Windows': + del self.options.fPIC + if self.settings.arch not in ["x86", "x86_64"]: + del self.options.with_bmi2 + del self.options.with_ssse3 + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: we want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["SNAPPY_BUILD_TESTS"] = False + if Version(self.version) >= "1.1.8": + tc.variables["SNAPPY_FUZZING_BUILD"] = False + # Don't use these avx options. These are useless. + # https://github.com/conan-io/conan-center-index/pull/16495 + tc.variables["SNAPPY_REQUIRE_AVX"] = False + tc.variables["SNAPPY_REQUIRE_AVX2"] = False + tc.variables["SNAPPY_INSTALL"] = True + if Version(self.version) >= "1.1.9": + tc.variables["SNAPPY_BUILD_BENCHMARKS"] = False + if self.settings.arch in ["x86", "x86_64"]: + if self.options.with_bmi2 != "auto": + tc.variables["SNAPPY_HAVE_BMI2"] = self.options.with_bmi2 + if self.options.with_ssse3 != "auto": + tc.variables["SNAPPY_HAVE_SSSE3"] = self.options.with_ssse3 + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + # ASWF: separate licenses from multiple package installs + copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + cmake = CMake(self) + cmake.install() + # ASWF: keep cmake files for non-Conan clients + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "Snappy") + self.cpp_info.set_property("cmake_target_name", "Snappy::snappy") + # TODO: back to global scope in conan v2 once cmake_find_package* generators removed + self.cpp_info.components["snappylib"].libs = ["snappy"] + if not self.options.shared: + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["snappylib"].system_libs.append("m") + libcxx = stdcpp_library(self) + if libcxx: + self.cpp_info.components["snappylib"].system_libs.append(libcxx) + + # TODO: to remove in conan v2 once cmake_find_package* generators removed + self.cpp_info.names["cmake_find_package"] = "Snappy" + self.cpp_info.names["cmake_find_package_multi"] = "Snappy" + self.cpp_info.components["snappylib"].names["cmake_find_package"] = "snappy" + self.cpp_info.components["snappylib"].names["cmake_find_package_multi"] = "snappy" + self.cpp_info.components["snappylib"].set_property("cmake_target_name", "Snappy::snappy") diff --git a/packages/conan/recipes/snappy/patches/1.1.10-0001-fix-inlining-failure.patch b/packages/conan/recipes/snappy/patches/1.1.10-0001-fix-inlining-failure.patch new file mode 100644 index 00000000..66b0f055 --- /dev/null +++ b/packages/conan/recipes/snappy/patches/1.1.10-0001-fix-inlining-failure.patch @@ -0,0 +1,13 @@ +diff --git a/snappy-stubs-internal.h b/snappy-stubs-internal.h +index 1548ed7..3b4a9f3 100644 +--- a/snappy-stubs-internal.h ++++ b/snappy-stubs-internal.h +@@ -100,7 +100,7 @@ + + // Inlining hints. + #if HAVE_ATTRIBUTE_ALWAYS_INLINE +-#define SNAPPY_ATTRIBUTE_ALWAYS_INLINE __attribute__((always_inline)) ++#define SNAPPY_ATTRIBUTE_ALWAYS_INLINE + #else + #define SNAPPY_ATTRIBUTE_ALWAYS_INLINE + #endif // HAVE_ATTRIBUTE_ALWAYS_INLINE diff --git a/packages/conan/recipes/snappy/patches/1.1.10-0003-fix-clobber-list-older-llvm.patch b/packages/conan/recipes/snappy/patches/1.1.10-0003-fix-clobber-list-older-llvm.patch new file mode 100644 index 00000000..969ce380 --- /dev/null +++ b/packages/conan/recipes/snappy/patches/1.1.10-0003-fix-clobber-list-older-llvm.patch @@ -0,0 +1,13 @@ +diff --git a/snappy.cc b/snappy.cc +index d414718..e4efb59 100644 +--- a/snappy.cc ++++ b/snappy.cc +@@ -1132,7 +1132,7 @@ inline size_t AdvanceToNextTagX86Optimized(const uint8_t** ip_p, size_t* tag) { + size_t literal_len = *tag >> 2; + size_t tag_type = *tag; + bool is_literal; +-#if defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(__x86_64__) ++#if defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(__x86_64__) && ( (!defined(__clang__) && !defined(__APPLE__)) || (!defined(__APPLE__) && defined(__clang__) && (__clang_major__ >= 9)) || (defined(__APPLE__) && defined(__clang__) && (__clang_major__ > 11)) ) + // TODO clang misses the fact that the (c & 3) already correctly + // sets the zero flag. + asm("and $3, %k[tag_type]\n\t" diff --git a/packages/conan/recipes/snappy/patches/1.1.9-0001-fix-inlining-failure.patch b/packages/conan/recipes/snappy/patches/1.1.9-0001-fix-inlining-failure.patch new file mode 100644 index 00000000..cdc119c0 --- /dev/null +++ b/packages/conan/recipes/snappy/patches/1.1.9-0001-fix-inlining-failure.patch @@ -0,0 +1,14 @@ +Fixes the following error: +error: inlining failed in call to ‘always_inline’ ‘size_t snappy::AdvanceToNextTag(const uint8_t**, size_t*)’: function body can be overwritten at link time + +--- snappy-stubs-internal.h ++++ snappy-stubs-internal.h +@@ -100,7 +100,7 @@ + + // Inlining hints. + #ifdef HAVE_ATTRIBUTE_ALWAYS_INLINE +-#define SNAPPY_ATTRIBUTE_ALWAYS_INLINE __attribute__((always_inline)) ++#define SNAPPY_ATTRIBUTE_ALWAYS_INLINE + #else + #define SNAPPY_ATTRIBUTE_ALWAYS_INLINE + #endif diff --git a/packages/conan/recipes/snappy/patches/1.1.9-0002-no-Werror.patch b/packages/conan/recipes/snappy/patches/1.1.9-0002-no-Werror.patch new file mode 100644 index 00000000..d86e4e0a --- /dev/null +++ b/packages/conan/recipes/snappy/patches/1.1.9-0002-no-Werror.patch @@ -0,0 +1,12 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -69,7 +69,7 @@ +- # Use -Werror for clang only. ++if(0) + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + if(NOT CMAKE_CXX_FLAGS MATCHES "-Werror") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") + endif(NOT CMAKE_CXX_FLAGS MATCHES "-Werror") + endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") +- ++endif() diff --git a/packages/conan/recipes/snappy/patches/1.1.9-0003-fix-clobber-list-older-llvm.patch b/packages/conan/recipes/snappy/patches/1.1.9-0003-fix-clobber-list-older-llvm.patch new file mode 100644 index 00000000..84bc674f --- /dev/null +++ b/packages/conan/recipes/snappy/patches/1.1.9-0003-fix-clobber-list-older-llvm.patch @@ -0,0 +1,12 @@ +asm clobbers do not work for clang < 9 and apple-clang < 11 (found by SpaceIm) +--- snappy.cc ++++ snappy.cc +@@ -1026,7 +1026,7 @@ + size_t literal_len = *tag >> 2; + size_t tag_type = *tag; + bool is_literal; +-#if defined(__GNUC__) && defined(__x86_64__) ++#if defined(__GNUC__) && defined(__x86_64__) && ( (!defined(__clang__) && !defined(__APPLE__)) || (!defined(__APPLE__) && defined(__clang__) && (__clang_major__ >= 9)) || (defined(__APPLE__) && defined(__clang__) && (__clang_major__ > 11)) ) + // TODO clang misses the fact that the (c & 3) already correctly + // sets the zero flag. + asm("and $3, %k[tag_type]\n\t" diff --git a/packages/conan/recipes/snappy/patches/1.1.9-0004-rtti-by-default.patch b/packages/conan/recipes/snappy/patches/1.1.9-0004-rtti-by-default.patch new file mode 100644 index 00000000..c353a489 --- /dev/null +++ b/packages/conan/recipes/snappy/patches/1.1.9-0004-rtti-by-default.patch @@ -0,0 +1,20 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,8 +53,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + add_definitions(-D_HAS_EXCEPTIONS=0) + + # Disable RTTI. +- string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-") + else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + # Use -Wall for clang and gcc. + if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall") +@@ -78,8 +76,6 @@ endif() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") + + # Disable RTTI. +- string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") + endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + + # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make diff --git a/packages/conan/recipes/snappy/patches/1.2.0-0003-fix-clobber-list-older-llvm.patch b/packages/conan/recipes/snappy/patches/1.2.0-0003-fix-clobber-list-older-llvm.patch new file mode 100644 index 00000000..05accb60 --- /dev/null +++ b/packages/conan/recipes/snappy/patches/1.2.0-0003-fix-clobber-list-older-llvm.patch @@ -0,0 +1,13 @@ +diff --git a/snappy.cc b/snappy.cc +index 08c2a98..151de55 100644 +--- a/snappy.cc ++++ b/snappy.cc +@@ -1311,7 +1311,7 @@ inline size_t AdvanceToNextTagX86Optimized(const uint8_t** ip_p, size_t* tag) { + size_t literal_len = *tag >> 2; + size_t tag_type = *tag; + bool is_literal; +-#if defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(__x86_64__) ++#if defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(__x86_64__) && ( (!defined(__clang__) && !defined(__APPLE__)) || (!defined(__APPLE__) && defined(__clang__) && (__clang_major__ >= 9)) || (defined(__APPLE__) && defined(__clang__) && (__clang_major__ > 11)) ) + // TODO clang misses the fact that the (c & 3) already correctly + // sets the zero flag. + asm("and $3, %k[tag_type]\n\t" diff --git a/packages/conan/recipes/snappy/patches/1.2.0-0004-rtti-by-default.patch b/packages/conan/recipes/snappy/patches/1.2.0-0004-rtti-by-default.patch new file mode 100644 index 00000000..7ca0e721 --- /dev/null +++ b/packages/conan/recipes/snappy/patches/1.2.0-0004-rtti-by-default.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 01eb2d7..fb4e6bf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,8 +53,8 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + add_definitions(-D_HAS_EXCEPTIONS=0) + + # Disable RTTI. +- string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-") ++# string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") ++# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-") + else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + # Use -Wall for clang and gcc. + if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall") +@@ -83,8 +83,8 @@ endif() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") + + # Disable RTTI. +- string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") ++# string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") ++# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") + endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + + # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make diff --git a/packages/conan/recipes/snappy/test_package/CMakeLists.txt b/packages/conan/recipes/snappy/test_package/CMakeLists.txt new file mode 100644 index 00000000..f16757b4 --- /dev/null +++ b/packages/conan/recipes/snappy/test_package/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/master/recipes/snappy/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.8) +project(test_package) + +find_package(Snappy REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE Snappy::snappy) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) + +add_executable(${PROJECT_NAME}_c test_package.c) +target_link_libraries(${PROJECT_NAME}_c PRIVATE Snappy::snappy) diff --git a/packages/conan/recipes/snappy/test_package/conanfile.py b/packages/conan/recipes/snappy/test_package/conanfile.py new file mode 100644 index 00000000..a0dc12d2 --- /dev/null +++ b/packages/conan/recipes/snappy/test_package/conanfile.py @@ -0,0 +1,34 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/snappy/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") + bin_path_c = os.path.join(self.cpp.build.bindirs[0], "test_package_c") + self.run(bin_path_c, env="conanrun") diff --git a/packages/conan/recipes/snappy/test_package/test_package.c b/packages/conan/recipes/snappy/test_package/test_package.c new file mode 100644 index 00000000..53ec4db0 --- /dev/null +++ b/packages/conan/recipes/snappy/test_package/test_package.c @@ -0,0 +1,27 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From:https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/snappy/all/test_package/test_package.c +*/ + +#include + +#include +#include +#include +#include + +int main() { + const char *input = "conan-center-index"; + size_t input_length = strlen(input); + size_t output_length = snappy_max_compressed_length(input_length); + char *output = (char*)malloc(output_length); + if (output == NULL) return 0; + if (snappy_compress(input, input_length, output, &output_length) == SNAPPY_OK) { + printf("%s compressed: %s\n", input, output); + } + free(output); + return 0; +} diff --git a/packages/conan/recipes/snappy/test_package/test_package.cpp b/packages/conan/recipes/snappy/test_package/test_package.cpp new file mode 100644 index 00000000..d725b548 --- /dev/null +++ b/packages/conan/recipes/snappy/test_package/test_package.cpp @@ -0,0 +1,24 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/snappy/all/test_package/test_package.cpp +*/ + +#include + +#include +#include +#include + +int main() { + std::string input("conan-enter-index"); + std::string output; + + const size_t result = snappy::Compress(input.c_str(), input.size(), &output); + + std::cout << input << " compressed (" << result << "): " << output << std::endl; + + return EXIT_SUCCESS; +} diff --git a/packages/conan/recipes/sqlite3/conanfile.py b/packages/conan/recipes/sqlite3/conanfile.py new file mode 100644 index 00000000..bef857be --- /dev/null +++ b/packages/conan/recipes/sqlite3/conanfile.py @@ -0,0 +1,29 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/4622ac85d1cec8cb7a2fcc8a1796d4b73bff285e/recipes/sqlite3/all/conanfile.py + +from conan import ConanFile + +class SystemSqlite3Conan(ConanFile): + name = "sqlite3" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + options = { + "enable_column_metadata": [True, False], + "omit_load_extension": [True, False], + } + default_options = { + "enable_column_metadata": True, + "omit_load_extension": False, + } + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["sqlite3"] + + self.cpp_info.set_property("cmake_file_name", "SQLite3") + self.cpp_info.set_property("cmake_target_name", "SQLite::SQLite3") diff --git a/packages/conan/recipes/tbb/conandata.yml b/packages/conan/recipes/tbb/conandata.yml index 420561b5..92e4078c 100644 --- a/packages/conan/recipes/tbb/conandata.yml +++ b/packages/conan/recipes/tbb/conandata.yml @@ -1,13 +1,31 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/cceee569179c10fa56d1fd9c3582f3371944ba59/recipes/onetbb/2020.x/conandata.yml + sources: + "2020_u3.3": + url: "https://github.com/oneapi-src/oneTBB/archive/v2020.3.3.tar.gz" + sha256: "494ac15f60e91d95ed7aec04f4e1d389b8a55bffc581d0fe9116b99336401963" + "2020_u3": + url: "https://github.com/oneapi-src/oneTBB/archive/v2020.3.tar.gz" + sha256: "ebc4f6aa47972daed1f7bf71d100ae5bf6931c2e3144cf299c8cc7d041dca2f3" + "2020_u2": + url: "https://github.com/oneapi-src/oneTBB/archive/v2020.2.tar.gz" + sha256: "4804320e1e6cbe3a5421997b52199e3c1a3829b2ecb6489641da4b8e32faf500" + "2020_u1": + url: "https://github.com/oneapi-src/oneTBB/archive/v2020.1.tar.gz" + sha256: "7c96a150ed22bc3c6628bc3fef9ed475c00887b26d37bca61518d76a56510971" + "2020": + url: "https://github.com/oneapi-src/oneTBB/archive/v2020.0.tar.gz" + sha256: "57714f2d2cf33935db33cee93af57eb3ecd5a7bef40c1fb7ca4a41d79684b118" + "2019_u9": + url: "https://github.com/oneapi-src/oneTBB/archive/2019_U9.tar.gz" + sha256: "3f5ea81b9caa195f1967a599036b473b2e7c347117330cda99b79cfcf5b77c84" + "2019_u6": + url: "https://github.com/oneapi-src/oneTBB/archive/2019_U6.tar.gz" + sha256: "21cd496ac768560e70d35e5423878aa3bcf0285f7194be77935d8febf0b18f47" "2018": url: "https://github.com/oneapi-src/oneTBB/archive/2018.tar.gz" sha256: "d427c58a59863c5f9510fffb3d05cd1bcc7abb94cdde1613407559e88b1263ab" - "2019_U6": - url: "https://github.com/oneapi-src/oneTBB/archive/2019_U6.tar.gz" - sha256: "21cd496ac768560e70d35e5423878aa3bcf0285f7194be77935d8febf0b18f47" - "2020_U2": - url: "https://github.com/oneapi-src/oneTBB/archive/2020_U2.tar.gz" - sha256: "99dcf20cd593f821dd97a9bccc1ea8e9d6155ad45a0e1186839b8d4e98834d59" - "2020_U3": - url: "https://github.com/oneapi-src/oneTBB/archive/2020_U3.tar.gz" - sha256: "2103cc6238c935664f87680618f6684d57501d4a2fa8ea8f6c97ad6ff7dc722a" diff --git a/packages/conan/recipes/tbb/conanfile.py b/packages/conan/recipes/tbb/conanfile.py index a26d5a66..f26aff6f 100644 --- a/packages/conan/recipes/tbb/conanfile.py +++ b/packages/conan/recipes/tbb/conanfile.py @@ -1,64 +1,57 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/cceee569179c10fa56d1fd9c3582f3371944ba59/recipes/onetbb/2020.x/conanfile.py + import os -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration +import re +import textwrap + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import check_min_cppstd +from conan.tools.files import chdir, copy, get, replace_in_file, save +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.intel import IntelCC +from conan.tools.layout import basic_layout +from conan.tools.microsoft import VCVars, msvs_toolset, msvc_runtime_flag, is_msvc +from conan.tools.scm import Version +required_conan_version = ">=1.53.0" -class TBBConan(ConanFile): - name = "tbb" + +class OneTBBConan(ConanFile): + name = "tbb" # ASWF: stick to tbb instead of onetbb for now + description = ( + "oneAPI Threading Building Blocks (oneTBB) lets you easily write parallel " + "C++ programs that take full advantage of multicore performance, that " + "are portable, composable and have future-proof scalability." + ) license = "Apache-2.0" - url = "https://github.com/AcademySoftwareFoundation/aswf-docker" + url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/oneapi-src/oneTBB" - description = """Intel Threading Building Blocks (Intel TBB) lets you easily write parallel C++ -programs that take full advantage of multicore performance, that are portable and composable, and -that have future-proof scalability""" - topics = ("conan", "tbb", "threading", "parallelism", "tbbmalloc") - settings = "os", "compiler", "build_type", "arch" + topics = ("tbb", "threading", "parallelism", "tbbmalloc") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], "tbbmalloc": [True, False], "tbbproxy": [True, False], - "tbbpreview": [True, False], } default_options = { "shared": True, "fPIC": True, - "tbbmalloc": True, - "tbbproxy": True, - "tbbpreview": False, + "tbbmalloc": True, # ASWF: build tbbmalloc + "tbbproxy": True, # ASWF: build tbbproxy } @property - def _source_subfolder(self): - return "source_subfolder" - - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - - def configure(self): - if ( - self.settings.os == "Macos" - and self.settings.compiler == "apple-clang" - and tools.Version(self.settings.compiler.version) < "8.0" - ): - raise ConanInvalidConfiguration( - "%s %s couldn't be built by apple-clang < 8.0" - % (self.name, self.version) - ) - if not self.options.shared: - self.output.warn("Intel-TBB strongly discourages usage of static linkage") - if self.options.tbbproxy and ( - not self.options.shared or not self.options.tbbmalloc - ): - raise ConanInvalidConfiguration( - "tbbproxy needs tbbmalloc and shared options" - ) - - def build_requirements(self): - if tools.os_info.is_windows: - if "CONAN_MAKE_PROGRAM" not in os.environ and not tools.which("make"): - self.build_requires("make/4.2.1") + def _settings_build(self): + return getattr(self, "settings_build", self.settings) @property def _base_compiler(self): @@ -69,102 +62,111 @@ def _base_compiler(self): @property def _is_msvc(self): - return self.settings.compiler == "Visual Studio" + return str(self._base_compiler) in ["Visual Studio", "msvc"] @property - def _is_clanglc(self): + def _is_clang_cl(self): return self.settings.os == "Windows" and self.settings.compiler == "clang" + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + basic_layout(self, src_folder="src") + # ASWF: we want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def package_id(self): + del self.info.options.tbbmalloc + del self.info.options.tbbproxy + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) + if is_apple_os(self): + if self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "8.0": + raise ConanInvalidConfiguration(f"{self.name} {self.version} couldn't be built by apple-clang < 8.0") + if not self.options.shared: + self.output.warning("oneTBB strongly discourages usage of static linkage") + if self.options.tbbproxy and (not self.options.shared or not self.options.tbbmalloc): + raise ConanInvalidConfiguration("tbbproxy needs tbbmaloc and shared options") + + def build_requirements(self): + if self._settings_build.os == "Windows": + if not self.conf_info.get("tools.gnu:make_program", check_type=str): + self.tool_requires("make/4.3") + def source(self): - tools.get(**self.conan_data["sources"][self.version]) - os.rename( - "one{}-{}".format(self.name.upper(), self.version.upper()), - self._source_subfolder, - ) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - self.build_base() - if self.options.tbbpreview: - self.build_base(preview=True) - - def build_base(self, preview=False): - def add_flag(name, value): - if name in os.environ: - os.environ[name] += " " + value - else: - os.environ[name] = value - - # if we're doing a second build (ie, preview), then we the source replacements have already been done... - if not preview: - # Get the version of the current compiler instead of gcc - linux_include = os.path.join(self._source_subfolder, "build", "linux.inc") - tools.replace_in_file(linux_include, "shell gcc", "shell $(CC)") - tools.replace_in_file(linux_include, "= gcc", "= $(CC)") - - if self.version != "2019_u9" and self.settings.build_type == "Debug": - tools.replace_in_file( - os.path.join(self._source_subfolder, "Makefile"), "release", "debug" - ) - - if self._base_compiler == "Visual Studio": - tools.save( - os.path.join(self._source_subfolder, "build", "big_iron_msvc.inc"), + def generate(self): + tc = AutotoolsToolchain(self) + if self._is_msvc: + link_cmd = "xilib" if self.settings.compiler == "intel-cc" else "lib" + save( + self, + os.path.join(self.source_folder, "build", "big_iron_msvc.inc"), # copy of big_iron.inc adapted for MSVC - """ -LIB_LINK_CMD = {}.exe -LIB_OUTPUT_KEY = /OUT: -LIB_LINK_FLAGS = -LIB_LINK_LIBS = -DYLIB_KEY = -override CXXFLAGS += -D__TBB_DYNAMIC_LOAD_ENABLED=0 -D__TBB_SOURCE_DIRECTLY_INCLUDED=1 -ITT_NOTIFY = -DLL = lib -LIBEXT = lib -LIBPREF = -LIBDL = -TBB.DLL = $(LIBPREF)tbb$(DEBUG_SUFFIX).$(LIBEXT) -LINK_TBB.LIB = $(TBB.DLL) -TBB.DEF = -TBB_NO_VERSION.DLL = -MALLOC.DLL = $(LIBPREF)tbbmalloc$(DEBUG_SUFFIX).$(LIBEXT) -LINK_MALLOC.LIB = $(MALLOC.DLL) -MALLOC.DEF = -MALLOC_NO_VERSION.DLL = -MALLOCPROXY.DLL = -MALLOCPROXY.DEF = -""".format( - "xilib" if self.settings.compiler == "intel" else "lib" - ), + textwrap.dedent(f"""\ + LIB_LINK_CMD = {link_cmd}.exe + LIB_OUTPUT_KEY = /OUT: + LIB_LINK_FLAGS = + LIB_LINK_LIBS = + DYLIB_KEY = + override CXXFLAGS += -D__TBB_DYNAMIC_LOAD_ENABLED=0 -D__TBB_SOURCE_DIRECTLY_INCLUDED=1 + ITT_NOTIFY = + DLL = lib + LIBEXT = lib + LIBPREF = + LIBDL = + TBB.DLL = $(LIBPREF)tbb$(DEBUG_SUFFIX).$(LIBEXT) + LINK_TBB.LIB = $(TBB.DLL) + TBB.DEF = + TBB_NO_VERSION.DLL = + MALLOC.DLL = $(LIBPREF)tbbmalloc$(DEBUG_SUFFIX).$(LIBEXT) + LINK_MALLOC.LIB = $(MALLOC.DLL) + MALLOC.DEF = + MALLOC_NO_VERSION.DLL = + MALLOCPROXY.DLL = + MALLOCPROXY.DEF = + """), ) - extra = "" if self.options.shared else "extra_inc=big_iron_msvc.inc" + if not self.options.shared: + tc.make_args.append("extra_inc=big_iron_msvc.inc") else: - extra = "" if self.options.shared else "extra_inc=big_iron.inc" + if not self.options.shared: + tc.make_args.append("extra_inc=big_iron.inc") arch = { "x86": "ia32", "x86_64": "intel64", "armv7": "armv7", - "armv8": "aarch64", + "armv8": "arm64" if is_apple_os(self) else "aarch64", }[str(self.settings.arch)] - extra += " arch=%s" % arch + tc.make_args.append(f"arch={arch}") - if preview: - extra += " tbb_build_prefix=local_preview tbb_cpf=1" + if self.settings.os == "iOS": + tc.make_args.append("target=ios") if str(self._base_compiler) in ("gcc", "clang", "apple-clang"): if str(self._base_compiler.libcxx) in ("libstdc++", "libstdc++11"): - extra += " stdlib=libstdc++" + tc.make_args.append("stdlib=libstdc++") elif str(self._base_compiler.libcxx) == "libc++": - extra += " stdlib=libc++" + tc.make_args.append("stdlib=libc++") - if str(self.settings.compiler) == "intel": - extra += " compiler=icc" + if str(self.settings.compiler) == "intel-cc": + tc.make_args.append("compiler=icc") elif str(self.settings.compiler) in ("clang", "apple-clang"): - extra += " compiler=clang" + tc.make_args.append("compiler=clang") else: - extra += " compiler=gcc" + tc.make_args.append("compiler=gcc") - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: # runtime is supposed to track the version of the c++ stdlib, # the version of glibc, and the version of the linux kernel. # However, it isn't actually used anywhere other than for @@ -172,163 +174,133 @@ def add_flag(name, value): # TBB computes the value of this variable using gcc, which we # don't necessarily want to require when building this recipe. # Setting it to a dummy value prevents TBB from calling gcc. - extra += " runtime=gnu" - elif str(self._base_compiler) == "Visual Studio": - if str(self._base_compiler.runtime) in ("MT", "MTd"): + tc.make_args.append("runtime=gnu") + elif self._is_msvc: + if "MT" in msvc_runtime_flag(self): runtime = "vc_mt" else: - runtime = { - "8": "vc8", - "9": "vc9", - "10": "vc10", - "11": "vc11", - "12": "vc12", - "14": "vc14", - "15": "vc14.1", - "16": "vc14.2", - }[str(self._base_compiler.version)] - extra += " runtime=%s" % runtime - - if self.settings.compiler == "intel": - extra += " compiler=icl" + # Convert MSVC toolset to TBB runtime id + # v140 -> vc14, v141 -> vc14.1, etc + toolset = msvs_toolset(self) + m = re.fullmatch(r"v(\d+)(\d)", toolset) + if m: + runtime = f"vc{m[1]}" + (f".{m[2]}" if m[2] != "0" else "") + else: + self.output.warning(f"Unknown MSVC toolset: {toolset}") + runtime = "vc14.2" + tc.make_args.append(f"runtime={runtime}") + + if self.settings.compiler == "intel-cc": + tc.make_args.append("compiler=icl") else: - extra += " compiler=cl" - - make = tools.get_env( - "CONAN_MAKE_PROGRAM", tools.which("make") or tools.which("mingw32-make") - ) - if not make: - raise ConanInvalidConfiguration( - "This package needs 'make' in the path to build" - ) + tc.make_args.append("compiler=cl") + elif self.is_clang_cl: + tc.extra_cflags.append("-mrtm") + tc.extra_cxxflags.append("-mrtm") + + tc.generate() - with tools.chdir(self._source_subfolder): - # intentionally not using AutoToolsBuildEnvironment for now - it's broken for clang-cl - if self._is_clanglc: - add_flag("CFLAGS", "-mrtm") - add_flag("CXXFLAGS", "-mrtm") - - targets = ["tbb"] - if not preview: - if self.options.tbbmalloc: - targets.append("tbbmalloc") - if self.options.tbbproxy: - targets.append("tbbproxy") - context = tools.no_op() - if self.settings.compiler == "intel": - context = tools.intel_compilervars(self) - elif self._is_msvc: - # intentionally not using vcvars for clang-cl yet - context = tools.vcvars(self) - with context: - self.run("%s %s %s" % (make, extra, " ".join(targets))) + if self.settings.compiler == "intel-cc": + intelcc = IntelCC(self) + intelcc.generate() + elif is_msvc(self): + # intentionally not using vcvars for clang-cl yet + vcvars = VCVars(self) + vcvars.generate() + + def _patch_sources(self): + # Fix LDFLAGS getting incorrectly applied to ar command + linux_include = os.path.join(self.source_folder, "build", "common_rules.inc") + replace_in_file(self, linux_include, "LIB_LINK_FLAGS += $(LDFLAGS)", "") + # Get the version of the current compiler instead of gcc + linux_include = os.path.join(self.source_folder, "build", "linux.inc") + replace_in_file(self, linux_include, "shell gcc", "shell $(CC)") + replace_in_file(self, linux_include, "= gcc", "= $(CC)") + if self.version != "2019_u9" and self.settings.build_type == "Debug": + replace_in_file(self, os.path.join(self.source_folder, "Makefile"), "release", "debug") + + def build(self): + self._patch_sources() + with chdir(self, self.source_folder): + autotools = Autotools(self) + for target in ["tbb", "tbbmalloc", "tbbproxy"]: + autotools.make(target) def package(self): - self.copy( - "LICENSE", - dst=os.path.join("licenses", self.name), - src=self._source_subfolder, - ) - self.copy( - pattern="*.h", dst="include", src="%s/include" % self._source_subfolder - ) - self.copy( - pattern="*", - dst="include/tbb/compat", - src="%s/include/tbb/compat" % self._source_subfolder, - ) - build_folder = "%s/build/" % self._source_subfolder + # ASWF: separate license files per package + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses", self.name), + src=self.source_folder) + + copy(self, "*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include")) + copy(self, "*", + dst=os.path.join(self.package_folder, "include", "tbb", "compat"), + src=os.path.join(self.source_folder, "include", "tbb", "compat")) + + build_folder = os.path.join(self.source_folder, "build") build_type = "debug" if self.settings.build_type == "Debug" else "release" - self.copy( - pattern="*%s*.lib" % build_type, - dst="lib", - src=build_folder, - keep_path=False, - ) - self.copy( - pattern="*%s*.a" % build_type, - dst="lib64", - src=build_folder, - keep_path=False, - ) - self.copy( - pattern="*%s*.dll" % build_type, - dst="bin", - src=build_folder, - keep_path=False, - ) - self.copy( - pattern="*%s*.dylib" % build_type, - dst="lib", - src=build_folder, - keep_path=False, - ) + for extension in ["lib", "a", "dylib"]: + copy(self, f"*{build_type}*.{extension}", + dst=os.path.join(self.package_folder, "lib64"), # ASWF: DSOs in lib64 + src=build_folder, keep_path=False) + copy(self, f"*{build_type}*.dll", + dst=os.path.join(self.package_folder, "bin"), + src=build_folder, keep_path=False) + # Copy also .dlls to lib folder so consumers can link against them directly when using MinGW if self.settings.os == "Windows" and self.settings.compiler == "gcc": - self.copy( - "*%s*.dll" % build_type, dst="lib", src=build_folder, keep_path=False - ) + copy(self, f"*{build_type}*.dll", + dst=os.path.join(self.package_folder, "lib"), + src=build_folder, keep_path=False) - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"] and self.options.shared: extension = "so" - if self.options.shared: - self.copy( - "*%s*.%s.*" % (build_type, extension), - "lib64", - build_folder, - keep_path=False, - ) - outputlibdir = os.path.join(self.package_folder, "lib64") - os.chdir(outputlibdir) - for fpath in os.listdir(outputlibdir): - self.run( - 'ln -s "%s" "%s"' - % ( - fpath, - fpath[ - 0 : fpath.rfind("." + extension) + len(extension) + 1 - ], - ) - ) - - self.copy( - pattern="*.cmake", - dst=os.path.join("lib64", "cmake"), - src=self._source_subfolder, - keep_path=False, - ) + copy(self, f"*{build_type}*.{extension}.*", + dst=os.path.join(self.package_folder, "lib64"), # ASWF: DSOs in lib64 + src=build_folder, keep_path=False) + # Create libtbb.so.2 -> libtbb.so, etc symlinks + with chdir(self, os.path.join(self.package_folder, "lib64")): # ASWF: DSOs in lib64 + for fname in os.listdir("."): + fname_without_version = fname.split(f".{extension}", 1)[0] + f".{extension}" + self.run(f'ln -s "{fname}" "{fname_without_version}"') + + + # ASWF: cmake files for non-Conan clients + copy(self, pattern="*.cmake", + dst=os.path.join(self.package_folder, "lib64", "cmake"), + src=os.path.join(self.source_folder, "cmake")) def package_info(self): - self.cpp_info.names["cmake_find_package"] = "TBB" - self.cpp_info.names["cmake_find_package_multi"] = "TBB" + self.cpp_info.set_property("cmake_file_name", "TBB") + self.cpp_info.set_property("cmake_target_name", "TBB::TBB") + + suffix = "_debug" if self.settings.build_type == "Debug" else "" + # tbb - self._add_component("libtbb", lib="tbb") - if self.settings.os == "Linux": - self.cpp_info.components["libtbb"].system_libs = ["dl", "rt", "pthread"] + self.cpp_info.components["libtbb"].set_property("cmake_target_name", "TBB::tbb") + self.cpp_info.components["libtbb"].libs = [f"tbb{suffix}"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["libtbb"].system_libs = ["m", "dl", "rt", "pthread"] + # tbbmalloc if self.options.tbbmalloc: - self._add_component("tbbmalloc") - if self.settings.os == "Linux": - self.cpp_info.components["tbbmalloc"].system_libs = ["dl", "pthread"] + self.cpp_info.components["tbbmalloc"].set_property("cmake_target_name", "TBB::tbbmalloc") + self.cpp_info.components["tbbmalloc"].libs = [f"tbbmalloc{suffix}"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["tbbmalloc"].system_libs = ["m", "dl", "pthread"] + # tbbmalloc_proxy if self.options.tbbproxy: - self._add_component("tbbmalloc_proxy") + self.cpp_info.components["tbbmalloc_proxy"].set_property("cmake_target_name", "TBB::tbbmalloc_proxy") + self.cpp_info.components["tbbmalloc_proxy"].libs = [f"tbbmalloc_proxy{suffix}"] self.cpp_info.components["tbbmalloc_proxy"].requires = ["tbbmalloc"] - # tbbpreview - if self.options.tbbpreview: - self._add_component("tbb_preview") - - def _lib_name(self, name): - if self.settings.build_type == "Debug": - return name + "_debug" - return name - - def _add_component(self, component_name, lib=""): - if not lib: - lib = component_name - self.cpp_info.components[component_name].names["cmake_find_package"] = lib - self.cpp_info.components[component_name].names["cmake_find_package_multi"] = lib - self.cpp_info.components[component_name].libs = [self._lib_name(lib)] - - def deploy(self): - self.copy("*", symlinks=True) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["tbbmalloc_proxy"].system_libs = ["m"] + + # TODO: to remove in conan v2 once cmake_find_package* generators removed + self.cpp_info.names["cmake_find_package"] = "TBB" + self.cpp_info.names["cmake_find_package_multi"] = "TBB" + self.cpp_info.components["libtbb"].names["cmake_find_package"] = "tbb" + self.cpp_info.components["libtbb"].names["cmake_find_package_multi"] = "tbb" diff --git a/packages/conan/recipes/tbb/test_package/CMakeLists.txt b/packages/conan/recipes/tbb/test_package/CMakeLists.txt index eb792c88..3c58cb5b 100644 --- a/packages/conan/recipes/tbb/test_package/CMakeLists.txt +++ b/packages/conan/recipes/tbb/test_package/CMakeLists.txt @@ -1,9 +1,14 @@ -cmake_minimum_required(VERSION 3.12) -project(testpackage_exe LANGUAGES CXX) +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/cceee569179c10fa56d1fd9c3582f3371944ba59/recipes/onetbb/2020.x/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) find_package(TBB REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) - -target_include_directories(${PROJECT_NAME} PRIVATE ${Tbb_INCLUDE_DIRS}) -target_link_libraries(${PROJECT_NAME} tbb::tbb) +target_link_libraries(${PROJECT_NAME} TBB::tbb) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/packages/conan/recipes/tbb/test_package/conanfile.py b/packages/conan/recipes/tbb/test_package/conanfile.py index 82abe1c4..631f892c 100644 --- a/packages/conan/recipes/tbb/test_package/conanfile.py +++ b/packages/conan/recipes/tbb/test_package/conanfile.py @@ -1,14 +1,25 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. # Copyright (c) Contributors to the aswf-docker Project. All rights reserved. # SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/cceee569179c10fa56d1fd9c3582f3371944ba59/recipes/onetbb/2020.x/test_package/conanfile.py from conan import ConanFile -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -16,4 +27,6 @@ def build(self): cmake.build() def test(self): - self.run("./testpackage_exe", run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/tbb/test_package/test_package.cpp b/packages/conan/recipes/tbb/test_package/test_package.cpp index bdbc6a79..726e6e14 100644 --- a/packages/conan/recipes/tbb/test_package/test_package.cpp +++ b/packages/conan/recipes/tbb/test_package/test_package.cpp @@ -1,3 +1,11 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/cceee569179c10fa56d1fd9c3582f3371944ba59/recipes/onetbb/2020.x/test_package/test_package.cpp +*/ + #include "tbb/task_group.h" #include "tbb/flow_graph.h" #include "tbb/compat/tuple" diff --git a/packages/conan/recipes/tcl/conanfile.py b/packages/conan/recipes/tcl/conanfile.py new file mode 100644 index 00000000..c5750e6c --- /dev/null +++ b/packages/conan/recipes/tcl/conanfile.py @@ -0,0 +1,21 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/4622ac85d1cec8cb7a2fcc8a1796d4b73bff285e/recipes/tcl/all/conanfile.py + +from conan import ConanFile + +class SystemTclConan(ConanFile): + name = "tcl" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["tcl"] + + self.cpp_info.set_property("cmake_file_name", "TCL") + self.cpp_info.set_property("cmake_target_name", "TCL::TCL") diff --git a/packages/conan/recipes/tk/conanfile.py b/packages/conan/recipes/tk/conanfile.py new file mode 100644 index 00000000..94f0c1d1 --- /dev/null +++ b/packages/conan/recipes/tk/conanfile.py @@ -0,0 +1,27 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/4622ac85d1cec8cb7a2fcc8a1796d4b73bff285e/recipes/tk/all/conanfile.py + +import os + +from conan import ConanFile + +class SystemTkConan(ConanFile): + name = "tk" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def requirements(self): + self.requires(f"tcl/{self.version}@{os.environ['ASWF_PKG_ORG']}/{os.environ['ASWF_CONAN_CHANNEL']}", transitive_headers=True, transitive_libs=True) + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["tk"] + self.cpp_info.requires = ["tcl::tcl"] + + self.cpp_info.set_property("cmake_file_name", "TK") + self.cpp_info.set_property("cmake_target_name", "TK::TK") diff --git a/packages/conan/recipes/tsl-robin-map/conandata.yml b/packages/conan/recipes/tsl-robin-map/conandata.yml new file mode 100644 index 00000000..45347996 --- /dev/null +++ b/packages/conan/recipes/tsl-robin-map/conandata.yml @@ -0,0 +1,25 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b8bd958a29ef769d74a40471f1ada0426d1f8fff/recipes/tsl-robin-map/all/conandata.yml + +sources: + "1.3.0": + url: "https://github.com/Tessil/robin-map/archive/v1.3.0.tar.gz" + sha256: "a8424ad3b0affd4c57ed26f0f3d8a29604f0e1f2ef2089f497f614b1c94c7236" + "1.2.2": + url: "https://github.com/Tessil/robin-map/archive/v1.2.2.tar.gz" + sha256: "c72767ecea2a90074c7efbe91620c8f955af666505e22782e82813c652710821" + "1.2.1": + url: "https://github.com/Tessil/robin-map/archive/v1.2.1.tar.gz" + sha256: "2b54d2c1de2f73bea5c51d5dcbd64813a08caf1bfddcfdeee40ab74e9599e8e3" + "1.0.1": + url: "https://github.com/Tessil/robin-map/archive/v1.0.1.tar.gz" + sha256: "b2ffdb623727cea852a66bddcb7fa6d938538a82b40e48294bb581fe086ef005" + "0.6.3": + url: "https://github.com/Tessil/robin-map/archive/v0.6.3.tar.gz" + sha256: "e6654c8c2598f63eb0b1d52ff8bdf39cfcc91d81dd5d05274a6dca91241cd72f" + "0.6.2": + url: "https://github.com/Tessil/robin-map/archive/v0.6.2.tar.gz" + sha256: "c08ec4b1bf1c85eb0d6432244a6a89862229da1cb834f3f90fba8dc35d8c8ef1" diff --git a/packages/conan/recipes/tsl-robin-map/conanfile.py b/packages/conan/recipes/tsl-robin-map/conanfile.py new file mode 100644 index 00000000..9107c8e4 --- /dev/null +++ b/packages/conan/recipes/tsl-robin-map/conanfile.py @@ -0,0 +1,65 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b8bd958a29ef769d74a40471f1ada0426d1f8fff/recipes/tsl-robin-map/all/conanfile.py + +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.50.0" + + +class TslRobinMapConan(ConanFile): + name = "tsl-robin-map" + license = "MIT" + description = "C++ implementation of a fast hash map and hash set using robin hood hashing." + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/Tessil/robin-map" + topics = ("robin-map", "structure", "hash map", "hash set", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + def layout(self): + basic_layout(self, src_folder="src") + # ASWF: We want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + pass + + def package(self): + # ASWF: prevent license files from overwritting each other when installing multiple packages + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + copy(self, "*.h", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "tsl-robin-map") + self.cpp_info.set_property("cmake_target_name", "tsl::robin_map") + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + # TODO: to remove in conan v2 once cmake_find_package* generators removed + self.cpp_info.filenames["cmake_find_package"] = "tsl-robin-map" + self.cpp_info.filenames["cmake_find_package_multi"] = "tsl-robin-map" + self.cpp_info.names["cmake_find_package"] = "tsl" + self.cpp_info.names["cmake_find_package_multi"] = "tsl" + self.cpp_info.components["robin_map"].names["cmake_find_package"] = "robin_map" + self.cpp_info.components["robin_map"].names["cmake_find_package_multi"] = "robin_map" + self.cpp_info.components["robin_map"].set_property("cmake_target_name", "tsl::robin_map") + self.cpp_info.components["robin_map"].bindirs = [] + self.cpp_info.components["robin_map"].libdirs = [] diff --git a/packages/conan/recipes/tsl-robin-map/test_package/CMakeLists.txt b/packages/conan/recipes/tsl-robin-map/test_package/CMakeLists.txt new file mode 100644 index 00000000..429d9c96 --- /dev/null +++ b/packages/conan/recipes/tsl-robin-map/test_package/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b8bd958a29ef769d74a40471f1ada0426d1f8fff/recipes/tsl-robin-map/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(tsl-robin-map REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE tsl::robin_map) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/packages/conan/recipes/tsl-robin-map/test_package/conanfile.py b/packages/conan/recipes/tsl-robin-map/test_package/conanfile.py new file mode 100644 index 00000000..afe90cf1 --- /dev/null +++ b/packages/conan/recipes/tsl-robin-map/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/b8bd958a29ef769d74a40471f1ada0426d1f8fff/recipes/tsl-robin-map/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/tsl-robin-map/test_package/test_package.cpp b/packages/conan/recipes/tsl-robin-map/test_package/test_package.cpp new file mode 100644 index 00000000..8d4a60e3 --- /dev/null +++ b/packages/conan/recipes/tsl-robin-map/test_package/test_package.cpp @@ -0,0 +1,75 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/tree/b8bd958a29ef769d74a40471f1ada0426d1f8fff/recipes/tsl-robin-map/all/test_package +*/ + +#include +#include +#include +#include +#include + + +int main() { + tsl::robin_map map = {{"a", 1}, {"b", 2}}; + map["c"] = 3; + map["d"] = 4; + + map.insert({"e", 5}); + map.erase("b"); + + for(auto it = map.begin(); it != map.end(); ++it) { + //it->second += 2; // Not valid. + it.value() += 2; + } + + // {d, 6} {a, 3} {e, 7} {c, 5} + for(const auto& key_value : map) { + std::cout << "{" << key_value.first << ", " << key_value.second << "}" << std::endl; + } + + + if(map.find("a") != map.end()) { + std::cout << "Found \"a\"." << std::endl; + } + + const std::size_t precalculated_hash = std::hash()("a"); + // If we already know the hash beforehand, we can pass it in parameter to speed-up lookups. + if(map.find("a", precalculated_hash) != map.end()) { + std::cout << "Found \"a\" with hash " << precalculated_hash << "." << std::endl; + } + + + /* + * Calculating the hash and comparing two std::string may be slow. + * We can store the hash of each std::string in the hash map to make + * the inserts and lookups faster by setting StoreHash to true. + */ + tsl::robin_map, + std::equal_to, + std::allocator>, + true> map2; + + map2["a"] = 1; + map2["b"] = 2; + + // {a, 1} {b, 2} + for(const auto& key_value : map2) { + std::cout << "{" << key_value.first << ", " << key_value.second << "}" << std::endl; + } + + + + + tsl::robin_set set; + set.insert({1, 9, 0}); + set.insert({2, -1, 9}); + + // {0} {1} {2} {9} {-1} + for(const auto& key : set) { + std::cout << "{" << key << "}" << std::endl; + } +} diff --git a/packages/conan/recipes/util-linux-libuuid/conanfile.py b/packages/conan/recipes/util-linux-libuuid/conanfile.py new file mode 100644 index 00000000..36dc7c8d --- /dev/null +++ b/packages/conan/recipes/util-linux-libuuid/conanfile.py @@ -0,0 +1,21 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/4622ac85d1cec8cb7a2fcc8a1796d4b73bff285e/recipes/util-linux-libuuid/all/conanfile.py + +from conan import ConanFile + +class SystemUtilLinuxLibuuidConan(ConanFile): + name = "util-linux-libuuid" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["uuid"] + + self.cpp_info.set_property("cmake_file_name", "libuuid") + self.cpp_info.set_property("cmake_target_name", "libuuid::libuuid") diff --git a/packages/conan/recipes/vorbis/conanfile.py b/packages/conan/recipes/vorbis/conanfile.py new file mode 100644 index 00000000..20f97270 --- /dev/null +++ b/packages/conan/recipes/vorbis/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/f83ca9df2f14d01f49b186cb279740c295ae09c9/recipes/vorbis/all/conanfile.py + +from conan import ConanFile + +class SystemVorbisConan(ConanFile): + name = "vorbis" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + + self.cpp_info.set_property("cmake_file_name", "Vorbis") + + # vorbis + self.cpp_info.components["vorbismain"].set_property("cmake_target_name", "Vorbis::vorbis") + self.cpp_info.components["vorbismain"].libs = ["vorbis"] + + # vorbisenc + self.cpp_info.components["vorbisenc"].set_property("cmake_target_name", "Vorbis::vorbisenc") + self.cpp_info.components["vorbisenc"].libs = ["vorbisenc"] + + # vorbisfile + self.cpp_info.components["vorbisfile"].set_property("cmake_target_name", "Vorbis::vorbisfile") + self.cpp_info.components["vorbisfile"].libs = ["vorbisfile"] + diff --git a/packages/conan/recipes/vulkan-headers/conanfile.py b/packages/conan/recipes/vulkan-headers/conanfile.py new file mode 100644 index 00000000..456e0689 --- /dev/null +++ b/packages/conan/recipes/vulkan-headers/conanfile.py @@ -0,0 +1,33 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/vulkan-headers/all/conanfile.py + +from conan import ConanFile + +import os + +class SystemVulkanHeadersConan(ConanFile): + name = "vulkan-headers" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["vulkan"] + self.cpp_info.system_libs = ["dl", "pthread", "m"] + + self.cpp_info.set_property("cmake_file_name", "VulkanHeaders") + self.cpp_info.components["vulkanheaders"].set_property("cmake_target_name", "Vulkan::Headers") + self.cpp_info.components["vulkanheaders"].includedirs = ["/usr/include"] + self.cpp_info.components["vulkanheaders"].bindirs = [] + self.cpp_info.components["vulkanheaders"].libdirs = [] + self.cpp_info.components["vulkanregistry"].set_property("cmake_target_name", "Vulkan::Registry") + self.cpp_info.components["vulkanregistry"].includedirs = ["/usr/share/vulkan/registry"] + self.cpp_info.components["vulkanregistry"].bindirs = [] + self.cpp_info.components["vulkanregistry"].libdirs = [] + self.cpp_info.components["vulkanregistry"].resdirs = ["res"] + diff --git a/packages/conan/recipes/vulkan-loader/conanfile.py b/packages/conan/recipes/vulkan-loader/conanfile.py new file mode 100644 index 00000000..64cca5cd --- /dev/null +++ b/packages/conan/recipes/vulkan-loader/conanfile.py @@ -0,0 +1,25 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/vulkan-loader/all/conanfile.py + +from conan import ConanFile + +class SystemVulkanLoaderConan(ConanFile): + name = "vulkan-loader" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include/vulkan"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["vulkan"] + self.cpp_info.system_libs = ["dl", "pthread", "m"] + + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_module_file_name", "Vulkan") + self.cpp_info.set_property("cmake_file_name", "VulkanLoader") + self.cpp_info.set_property("cmake_module_target_name", "Vulkan::Vulkan") + self.cpp_info.set_property("cmake_target_name", "Vulkan::Loader") diff --git a/packages/conan/recipes/xkbcommon/conanfile.py b/packages/conan/recipes/xkbcommon/conanfile.py new file mode 100644 index 00000000..94aea8eb --- /dev/null +++ b/packages/conan/recipes/xkbcommon/conanfile.py @@ -0,0 +1,40 @@ +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT + +from conan import ConanFile + +class SystemXkbcommonConan(ConanFile): + name = "xkbcommon" + version = "0.9.1" + + settings = "os", "arch", "compiler", "build_type" + options = { + "with_x11": [True, False], + } + default_options = { + "with_x11": True, + } + + def requirements(self): + # self.requires("xkeyboard-config/system") + if self.options.with_x11: + self.requires("xorg/system") + if self.options.get_safe("xkbregistry"): + self.requires("libxml2/[>=2.12.5 <3]") + if self.options.get_safe("with_wayland"): + self.requires("wayland/1.22.0") + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + + self.cpp_info.components["libxkbcommon"].set_property("pkg_config_name", "xkbcommon") + self.cpp_info.components["libxkbcommon"].libs = ["xkbcommon"] + self.cpp_info.components["libxkbcommon"].resdirs = ["res"] + self.cpp_info.components["libxkbcommon"].includedirs = ["/usr/include"] + + self.cpp_info.components["libxkbcommon-x11"].set_property("pkg_config_name", "xkbcommon-x11") + self.cpp_info.components["libxkbcommon-x11"].libs = ["xkbcommon-x11"] + self.cpp_info.components["libxkbcommon-x11"].requires = ["libxkbcommon", "xorg::xcb", "xorg::xcb-xkb"] + self.cpp_info.components["libxkbcommon-x11"].includedirs = ["/usr/include"] + diff --git a/packages/conan/recipes/xorg-proto/conanfile.py b/packages/conan/recipes/xorg-proto/conanfile.py new file mode 100644 index 00000000..094948fe --- /dev/null +++ b/packages/conan/recipes/xorg-proto/conanfile.py @@ -0,0 +1,18 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/xorg-proto/all/conanfile.py + +from conan import ConanFile + +import os + +class SystemXorgProtoConan(ConanFile): + name = "xorg-proto" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.components["xproto"].includedirs.append("/usr/include/X11") diff --git a/packages/conan/recipes/xorg/conanfile.py b/packages/conan/recipes/xorg/conanfile.py new file mode 100644 index 00000000..7be1886b --- /dev/null +++ b/packages/conan/recipes/xorg/conanfile.py @@ -0,0 +1,54 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/4622ac85d1cec8cb7a2fcc8a1796d4b73bff285e/recipes/xorg/all/conanfile.py + +from conan import ConanFile, conan_version +from conan.tools.gnu import PkgConfig +from conan.tools.system import package_manager +from conan.errors import ConanInvalidConfiguration +from conan.tools.scm import Version + +required_conan_version = ">=1.50.0" + + +class SystemXorgConan(ConanFile): + name = "xorg" + version = "system" + package_type = "shared-library" + url = "https://github.com/conan-io/conan-center-index" + license = "MIT" + homepage = "https://www.x.org/wiki/" + description = "The X.Org project provides an open source implementation of the X Window System." + settings = "os", "arch", "compiler", "build_type" + topics = ("x11", "xorg") + + def package_info(self): + if Version(conan_version) >= 2: + self.cpp_info.bindirs = [] + self.cpp_info.includedirs = [] + self.cpp_info.libdirs = [] + + for name in ["x11", "x11-xcb", "fontenc", "ice", "sm", "xau", "xaw7", + "xcomposite", "xcursor", "xdamage", "xdmcp", "xext", "xfixes", "xi", + "xinerama", "xkbfile", "xmu", "xmuu", "xpm", "xrandr", "xrender", "xres", + "xscrnsaver", "xt", "xtst", "xv", "xxf86vm", + "xcb-xkb", "xcb-icccm", "xcb-image", "xcb-keysyms", "xcb-randr", "xcb-render", + "xcb-renderutil", "xcb-shape", "xcb-shm", "xcb-sync", "xcb-xfixes", + "xcb-xinerama", "xcb", "xcb-atom", "xcb-aux", "xcb-event", "xcb-util", + "xcb-dri3", "xcb-cursor", "xcb-dri2", "xcb-dri3", "xcb-glx", "xcb-present", + "xcb-composite", "xcb-ewmh", "xcb-res"] + ([] if self.settings.os == "FreeBSD" else ["uuid"]): + pkg_config = PkgConfig(self, name) + pkg_config.fill_cpp_info( + self.cpp_info.components[name], is_system=self.settings.os != "FreeBSD") + self.cpp_info.components[name].version = pkg_config.version + self.cpp_info.components[name].set_property( + "pkg_config_name", name) + self.cpp_info.components[name].set_property( + "component_version", pkg_config.version) + self.cpp_info.components[name].bindirs = [] + self.cpp_info.components[name].includedirs = [] + self.cpp_info.components[name].libdirs = [] + self.cpp_info.components[name].set_property("pkg_config_custom_content", + "\n".join(f"{key}={value}" for key, value in pkg_config.variables.items() if key not in ["pcfiledir","prefix", "includedir"])) diff --git a/packages/conan/recipes/xorg/test_package/CMakeLists.txt b/packages/conan/recipes/xorg/test_package/CMakeLists.txt new file mode 100644 index 00000000..7c2a2733 --- /dev/null +++ b/packages/conan/recipes/xorg/test_package/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/4622ac85d1cec8cb7a2fcc8a1796d4b73bff285e/recipes/xorg/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(xorg REQUIRED CONFIG) + +add_executable(test_package test_package.c) +target_link_libraries(test_package PRIVATE xorg::xorg) \ No newline at end of file diff --git a/packages/conan/recipes/xorg/test_package/conanfile.py b/packages/conan/recipes/xorg/test_package/conanfile.py new file mode 100644 index 00000000..0a127389 --- /dev/null +++ b/packages/conan/recipes/xorg/test_package/conanfile.py @@ -0,0 +1,40 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/4622ac85d1cec8cb7a2fcc8a1796d4b73bff285e/recipes/xorg/all/test_package/conanfile.py + +import os + +from conan import ConanFile +from conan.tools.build import cross_building +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.gnu import PkgConfigDeps + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeToolchain", "CMakeDeps", "VirtualBuildEnv", "VirtualRunEnv" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + pkg_config_deps = PkgConfigDeps(self) + pkg_config_deps.generate() + pkg_config = self.conf_info.get("tools.gnu:pkg_config", default="pkg-config") + uuid_pkg_config_file = os.path.join(self.generators_folder, "uuid.pc") + self.run(f"{pkg_config} --validate {uuid_pkg_config_file}") + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not cross_building(self): + cmd = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(cmd, env="conanrun") \ No newline at end of file diff --git a/packages/conan/recipes/xorg/test_package/test_package.c b/packages/conan/recipes/xorg/test_package/test_package.c new file mode 100644 index 00000000..ef014e41 --- /dev/null +++ b/packages/conan/recipes/xorg/test_package/test_package.c @@ -0,0 +1,34 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/4622ac85d1cec8cb7a2fcc8a1796d4b73bff285e/recipes/xorg/all/test_package/test_package.c +*/ + +#include +#include + +#include + +#include + +#include + +int main() { + Display *display = XOpenDisplay(NULL); + + if (!display) { + printf("XOpenDisplay failed\n"); + return 0; + } + + { + char *xau_file_name = XauFileName(); + if (xau_file_name) + printf("XauFileName: %s\n", xau_file_name); + } + + XCloseDisplay(display); + SmcSetErrorHandler(NULL); +} \ No newline at end of file diff --git a/packages/conan/recipes/xz_utils/conanfile.py b/packages/conan/recipes/xz_utils/conanfile.py new file mode 100644 index 00000000..5e5c07af --- /dev/null +++ b/packages/conan/recipes/xz_utils/conanfile.py @@ -0,0 +1,21 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/4622ac85d1cec8cb7a2fcc8a1796d4b73bff285e/recipes/xz_utils/all/conanfile.py + +from conan import ConanFile + +class SystemXZUtilsConan(ConanFile): + name = "xz_utils" + version = "system" + + settings = "os", "arch", "compiler", "build_type" + + def package_info(self): + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + self.cpp_info.libs = ["lzma"] + + self.cpp_info.set_property("cmake_file_name", "LibLZMA") + self.cpp_info.set_property("cmake_target_name", "LibLZMA::LibLZMA") diff --git a/packages/conan/recipes/yaml-cpp/conandata.yml b/packages/conan/recipes/yaml-cpp/conandata.yml new file mode 100644 index 00000000..88ee4fa3 --- /dev/null +++ b/packages/conan/recipes/yaml-cpp/conandata.yml @@ -0,0 +1,26 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/yaml-cpp/all/conandata.yml + +sources: + "0.8.0": + url: "https://github.com/jbeder/yaml-cpp/archive/refs/tags/0.8.0.tar.gz" + sha256: "fbe74bbdcee21d656715688706da3c8becfd946d92cd44705cc6098bb23b3a16" + "0.7.0": + url: "https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.7.0.tar.gz" + sha256: "43e6a9fcb146ad871515f0d0873947e5d497a1c9c60c58cb102a97b47208b7c3" + "0.6.3": + url: "https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.6.3.tar.gz" + sha256: "77ea1b90b3718aa0c324207cb29418f5bced2354c2e483a9523d98c3460af1ed" +patches: + "0.7.0": + - patch_file: "patches/0001-install-0.7.0.patch" + patch_description: "trigger installation through add_subdirectory from another CMakeLists.txt" + patch_type: "conan" + patch_source: "https://github.com/jbeder/yaml-cpp/pull/847" + - patch_file: "patches/0002-libcxx-and-gcc.patch" + patch_description: "Adds assert to enable compilation with libcxx + gcc" + patch_type: "portability" + patch_source: "https://github.com/jbeder/yaml-cpp/pull/947" diff --git a/packages/conan/recipes/yaml-cpp/conanfile.py b/packages/conan/recipes/yaml-cpp/conanfile.py new file mode 100644 index 00000000..1a856db1 --- /dev/null +++ b/packages/conan/recipes/yaml-cpp/conanfile.py @@ -0,0 +1,135 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/yaml-cpp/all/conanfile.py + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rmdir, save +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.scm import Version +import os +import textwrap + +required_conan_version = ">=1.53.0" + + +class YamlCppConan(ConanFile): + name = "yaml-cpp" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/jbeder/yaml-cpp" + topics = ("yaml", "yaml-parser", "serialization", "data-serialization") + description = "A YAML parser and emitter in C++" + license = "MIT" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, "11") + if self.options.shared and is_msvc(self) and is_msvc_static_runtime(self): + raise ConanInvalidConfiguration( + f"Visual Studio build for {self.name} shared library with MT runtime is not supported" + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["YAML_CPP_BUILD_TESTS"] = False + tc.variables["YAML_CPP_BUILD_CONTRIB"] = True + tc.variables["YAML_CPP_BUILD_TOOLS"] = False + tc.variables["YAML_CPP_INSTALL"] = True + tc.variables["YAML_BUILD_SHARED_LIBS"] = self.options.shared + if is_msvc(self): + tc.variables["YAML_MSVC_SHARED_RT"] = not is_msvc_static_runtime(self) + tc.preprocessor_definitions["_NOEXCEPT"] = "noexcept" + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + # ASWF: licenses in package subdirectory + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + cmake = CMake(self) + cmake.install() + # ASWF: cmake files in lib64, keep for non-Conan use + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) + rmdir(self, os.path.join(self.package_folder, "CMake")) + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self._create_cmake_module_alias_targets( + os.path.join(self.package_folder, self._module_file_rel_path), + {"yaml-cpp": "yaml-cpp::yaml-cpp"} + ) + + def _create_cmake_module_alias_targets(self, module_file, targets): + content = "" + for alias, aliased in targets.items(): + content += textwrap.dedent(f"""\ + if(TARGET {aliased} AND NOT TARGET {alias}) + add_library({alias} INTERFACE IMPORTED) + set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) + endif() + """) + save(self, module_file, content) + + @property + def _module_file_rel_path(self): + # ASWF: cmake files in lib64 + return os.path.join("lib64", "cmake", f"conan-official-{self.name}-targets.cmake") + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "yaml-cpp") + self.cpp_info.set_property("cmake_target_name", "yaml-cpp::yaml-cpp") + self.cpp_info.set_property("cmake_target_aliases", ["yaml-cpp"]) # CMake imported target before 0.8.0 + self.cpp_info.set_property("pkg_config_name", "yaml-cpp") + self.cpp_info.libs = collect_libs(self) + if self.settings.os in ("Linux", "FreeBSD"): + self.cpp_info.system_libs.append("m") + if is_msvc(self): + self.cpp_info.defines.append("_NOEXCEPT=noexcept") + if Version(self.version) < "0.8.0": + if self.settings.os == "Windows" and self.options.shared: + self.cpp_info.defines.append("YAML_CPP_DLL") + else: + if not self.options.shared: + self.cpp_info.defines.append("YAML_CPP_STATIC_DEFINE") + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] diff --git a/packages/conan/recipes/yaml-cpp/patches/0001-install-0.7.0.patch b/packages/conan/recipes/yaml-cpp/patches/0001-install-0.7.0.patch new file mode 100644 index 00000000..d826281c --- /dev/null +++ b/packages/conan/recipes/yaml-cpp/patches/0001-install-0.7.0.patch @@ -0,0 +1,17 @@ +# see issue https://github.com/jbeder/yaml-cpp/pull/847 +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b230b9e..35dfdca 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -24,9 +24,8 @@ option(YAML_BUILD_SHARED_LIBS "Build yaml-cpp shared library" ${BUILD_SHARED_LIB + cmake_dependent_option(YAML_CPP_BUILD_TESTS + "Enable yaml-cpp tests" ON + "BUILD_TESTING;CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF) +-cmake_dependent_option(YAML_CPP_INSTALL +- "Enable generation of yaml-cpp install targets" ON +- "CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF) ++option(YAML_CPP_INSTALL ++ "Enable generation of yaml-cpp install targets" ON) + cmake_dependent_option(YAML_MSVC_SHARED_RT + "MSVC: Build yaml-cpp with shared runtime libs (/MD)" ON + "MSVC" OFF) diff --git a/packages/conan/recipes/yaml-cpp/patches/0002-libcxx-and-gcc.patch b/packages/conan/recipes/yaml-cpp/patches/0002-libcxx-and-gcc.patch new file mode 100644 index 00000000..2602a4ad --- /dev/null +++ b/packages/conan/recipes/yaml-cpp/patches/0002-libcxx-and-gcc.patch @@ -0,0 +1,23 @@ +From 79aa6d53e5718ca44bc01ef05fdda7a849d353e0 Mon Sep 17 00:00:00 2001 +From: mjvankampen +Date: Thu, 15 Jul 2021 22:09:05 +0100 +Subject: [PATCH] Add assert to enable compilation with libcxx + gcc (#947) + +--- + include/yaml-cpp/node/iterator.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/include/yaml-cpp/node/iterator.h b/include/yaml-cpp/node/iterator.h +index b44723817..1fcf6e400 100644 +--- a/include/yaml-cpp/node/iterator.h ++++ b/include/yaml-cpp/node/iterator.h +@@ -15,6 +15,9 @@ + #include + #include + ++// Assert in place so gcc + libc++ combination properly builds ++static_assert(std::is_constructible::value, "Node must be copy constructable"); ++ + namespace YAML { + namespace detail { + struct iterator_value : public Node, std::pair { diff --git a/packages/conan/recipes/yaml-cpp/test_package/CMakeLists.txt b/packages/conan/recipes/yaml-cpp/test_package/CMakeLists.txt new file mode 100644 index 00000000..674de7c0 --- /dev/null +++ b/packages/conan/recipes/yaml-cpp/test_package/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/yaml-cpp/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(yaml-cpp REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE yaml-cpp::yaml-cpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/packages/conan/recipes/yaml-cpp/test_package/conanfile.py b/packages/conan/recipes/yaml-cpp/test_package/conanfile.py new file mode 100644 index 00000000..7fc10462 --- /dev/null +++ b/packages/conan/recipes/yaml-cpp/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/yaml-cpp/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/yaml-cpp/test_package/test_package.cpp b/packages/conan/recipes/yaml-cpp/test_package/test_package.cpp new file mode 100644 index 00000000..1b3a15b3 --- /dev/null +++ b/packages/conan/recipes/yaml-cpp/test_package/test_package.cpp @@ -0,0 +1,34 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/9a66422e07df06d2c502501de6e00b8b1213b563/recipes/yaml-cpp/all/test_package/test_package.cpp +*/ + +#include +#include + +#include "yaml-cpp/yaml.h" + +void parsing_nodes() { + YAML::Node primes = YAML::Load("[2, 3, 5, 7, 11]"); + std::cout << "Size: " << primes.size() << '\n'; +} + +void building_nodes() { + YAML::Emitter emitter; + emitter << YAML::BeginMap; + emitter << YAML::Key << "name"; + emitter << YAML::Value << "Ryan Braun"; + emitter << YAML::Key << "position"; + emitter << YAML::Value << "LF"; + emitter << YAML::EndMap; + std::cout << emitter.c_str() << '\n'; +} + +int main() { + parsing_nodes(); + building_nodes(); + return 0; +} diff --git a/packages/conan/recipes/zlib/conandata.yml b/packages/conan/recipes/zlib/conandata.yml new file mode 100644 index 00000000..0f1af58b --- /dev/null +++ b/packages/conan/recipes/zlib/conandata.yml @@ -0,0 +1,63 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/7abb9ee39e6009e3dbc45043307a1098246d4ad7/recipes/zlib/all/conandata.yml + +sources: + "1.3.1": + url: + - "https://zlib.net/fossils/zlib-1.3.1.tar.gz" + - "https://github.com/madler/zlib/releases/download/v1.3.1/zlib-1.3.1.tar.gz" + sha256: "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23" + "1.3": + url: + - "https://zlib.net/fossils/zlib-1.3.tar.gz" + - "https://github.com/madler/zlib/releases/download/v1.3/zlib-1.3.tar.gz" + sha256: "ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e" + "1.2.13": + url: + - "https://zlib.net/fossils/zlib-1.2.13.tar.gz" + - "https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz" + sha256: "b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30" + "1.2.12": + url: "https://zlib.net/fossils/zlib-1.2.12.tar.gz" + sha256: "91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9" + "1.2.11": + url: "https://zlib.net/fossils/zlib-1.2.11.tar.gz" + sha256: "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1" +patches: + "1.3.1": + - patch_file: "patches/1.3.1/0001-fix-cmake.patch" + patch_description: "separate static/shared builds, disable debug suffix" + patch_type: "conan" + "1.3": + - patch_file: "patches/1.3/0001-fix-cmake.patch" + patch_description: "separate static/shared builds, disable debug suffix, disable building examples" + patch_type: "conan" + "1.2.13": + - patch_file: "patches/1.2.13/0001-Fix-cmake.patch" + patch_description: "separate static/shared builds, disable debug suffix, disable building examples" + patch_type: "conan" + "1.2.12": + - patch_file: "patches/1.2.x/0001-fix-cmake.patch" + patch_description: "separate static/shared builds, disable debug suffix, disable building examples" + patch_type: "conan" + - patch_file: "patches/1.2.x/0004-Fix-a-bug-when-getting-a-gzip-header-extra-field-wit.patch" + patch_description: "CVE-2022-37434: Fix a bug when getting a gzip header extra field with inflate()" + patch_type: "vulnerability" + patch_source: "https://github.com/madler/zlib/commit/eff308af425b67093bab25f80f1ae950166bece1" + sha256: "15e3c177dc2a034a22e02490a97ba5b1719aae3f8129a06c16d727b661d1650f" + - patch_file: "patches/1.2.x/0005-Fix-extra-field-processing-bug-that-dereferences-NUL.patch" + patch_description: "CVE-2022-37434: Fix extra field processing bug that dereferences NULL state->head" + patch_type: "vulnerability" + patch_source: "https://github.com/madler/zlib/commit/1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d" + sha256: "cdd69eb3251728b1875c8ecae6427b50aa750b4045ef984ab79b6c07b7e6dd3a" + "1.2.11": + - patch_file: "patches/1.2.x/0001-fix-cmake.patch" + patch_description: "separate static/shared builds, disable debug suffix, disable building examples" + patch_type: "conan" + - patch_file: "patches/1.2.x/0003-gzguts-fix-widechar-condition.patch" + patch_description: "fix condition for WIDECHAR usage" + patch_type: "portability" + patch_source: "https://github.com/madler/zlib/issues/268" diff --git a/packages/conan/recipes/zlib/conanfile.py b/packages/conan/recipes/zlib/conanfile.py new file mode 100644 index 00000000..9c8d74dd --- /dev/null +++ b/packages/conan/recipes/zlib/conanfile.py @@ -0,0 +1,118 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/7abb9ee39e6009e3dbc45043307a1098246d4ad7/recipes/zlib/all/conanfile.py + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, load, replace_in_file, save +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.53.0" + + +class ZlibConan(ConanFile): + name = "zlib" + package_type = "library" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://zlib.net" + license = "Zlib" + description = ("A Massively Spiffy Yet Delicately Unobtrusive Compression Library " + "(Also Free, Not to Mention Unencumbered by Patents)") + topics = ("zlib", "compression") + + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _is_mingw(self): + return self.settings.os == "Windows" and self.settings.compiler == "gcc" + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + # ASWF: DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def source(self): + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder, strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["SKIP_INSTALL_ALL"] = False + tc.variables["SKIP_INSTALL_LIBRARIES"] = False + tc.variables["SKIP_INSTALL_HEADERS"] = False + tc.variables["SKIP_INSTALL_FILES"] = True + # Correct for misuse of "${CMAKE_INSTALL_PREFIX}/" in CMakeLists.txt + tc.variables["INSTALL_LIB_DIR"] = "lib64" + tc.variables["INSTALL_INC_DIR"] = "include" + tc.variables["ZLIB_BUILD_EXAMPLES"] = False + tc.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + + is_apple_clang12 = self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) >= "12.0" + if not is_apple_clang12: + for filename in ['zconf.h', 'zconf.h.cmakein', 'zconf.h.in']: + filepath = os.path.join(self.source_folder, filename) + replace_in_file(self, filepath, + '#ifdef HAVE_UNISTD_H ' + '/* may be set to #if 1 by ./configure */', + '#if defined(HAVE_UNISTD_H) && (1-HAVE_UNISTD_H-1 != 0)') + replace_in_file(self, filepath, + '#ifdef HAVE_STDARG_H ' + '/* may be set to #if 1 by ./configure */', + '#if defined(HAVE_STDARG_H) && (1-HAVE_STDARG_H-1 != 0)') + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def _extract_license(self): + tmp = load(self, os.path.join(self.source_folder, "zlib.h")) + license_contents = tmp[2:tmp.find("*/", 1)] + return license_contents + + def package(self): + save(self, os.path.join(self.package_folder, "licenses", self.name, "LICENSE"), self._extract_license()) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "ZLIB") + self.cpp_info.set_property("cmake_target_name", "ZLIB::ZLIB") + self.cpp_info.set_property("pkg_config_name", "zlib") + if self.settings.os == "Windows" and not self._is_mingw: + libname = "zdll" if self.options.shared else "zlib" + else: + libname = "z" + self.cpp_info.libs = [libname] + + self.cpp_info.names["cmake_find_package"] = "ZLIB" + self.cpp_info.names["cmake_find_package_multi"] = "ZLIB" diff --git a/packages/conan/recipes/zlib/patches/1.2.13/0001-Fix-cmake.patch b/packages/conan/recipes/zlib/patches/1.2.13/0001-Fix-cmake.patch new file mode 100644 index 00000000..a0748ec5 --- /dev/null +++ b/packages/conan/recipes/zlib/patches/1.2.13/0001-Fix-cmake.patch @@ -0,0 +1,118 @@ +From 9a709a43549fbe23ca41eeb450d4c71e3b78c8c4 Mon Sep 17 00:00:00 2001 +From: Mikhail Lappo +Date: Fri, 14 Oct 2022 13:29:56 +0200 +Subject: [PATCH] Fix cmake + +--- + CMakeLists.txt | 33 +++++++++++++++++++++------------ + 1 file changed, 21 insertions(+), 12 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b412dc7..a5284ed 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 2.4.4) ++cmake_minimum_required(VERSION 3.0) # it's important to have https://cmake.org/cmake/help/latest/policy/CMP0042.html#policy:CMP0042 + set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON) + + project(zlib C) +@@ -57,7 +57,6 @@ endif() + check_include_file(unistd.h Z_HAVE_UNISTD_H) + + if(MSVC) +- set(CMAKE_DEBUG_POSTFIX "d") + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +@@ -80,7 +79,7 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zlib.pc.cmakein + ${ZLIB_PC} @ONLY) + configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein + ${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY) +-include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}) ++include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + + + #============================================================================ +@@ -120,7 +119,7 @@ set(ZLIB_SRCS + zutil.c + ) + +-if(NOT MINGW) ++if(MSVC) + set(ZLIB_DLL_SRCS + win32/zlib1.rc # If present will override custom build rule below. + ) +@@ -131,7 +130,7 @@ file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents) + string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" + "\\1" ZLIB_FULL_VERSION ${_zlib_h_contents}) + +-if(MINGW) ++if(WIN32 AND NOT MSVC) + # This gets us DLL resource information when compiling on MinGW. + if(NOT CMAKE_RC_COMPILER) + set(CMAKE_RC_COMPILER windres.exe) +@@ -145,12 +144,15 @@ if(MINGW) + -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj + -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) + set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) +-endif(MINGW) ++endif() + ++if(BUILD_SHARED_LIBS) + add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +-add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) + set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) + set_target_properties(zlib PROPERTIES SOVERSION 1) ++else() ++add_library(zlib STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) ++endif() + + if(NOT CYGWIN) + # This property causes shared libraries on Linux to have the full version +@@ -163,19 +165,24 @@ if(NOT CYGWIN) + set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION}) + endif() + +-if(UNIX) ++if(WIN32 AND NOT MINGW) ++ if(BUILD_SHARED_LIBS) ++ set_target_properties(zlib PROPERTIES ARCHIVE_OUTPUT_NAME zdll) ++ endif() ++else() + # On unix-like platforms the library is almost always called libz +- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) ++ set_target_properties(zlib PROPERTIES OUTPUT_NAME z) + if(NOT APPLE) + set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") + endif() +-elseif(BUILD_SHARED_LIBS AND WIN32) ++endif() ++if(BUILD_SHARED_LIBS AND WIN32) + # Creates zlib1.dll when building shared library version +- set_target_properties(zlib PROPERTIES SUFFIX "1.dll") ++ set_target_properties(zlib PROPERTIES PREFIX "" RUNTIME_OUTPUT_NAME "zlib1") + endif() + + if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) +- install(TARGETS zlib zlibstatic ++ install(TARGETS zlib + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) +@@ -194,6 +201,7 @@ endif() + # Example binaries + #============================================================================ + ++if(0) + add_executable(example test/example.c) + target_link_libraries(example zlib) + add_test(example example) +@@ -211,3 +219,4 @@ if(HAVE_OFF64_T) + target_link_libraries(minigzip64 zlib) + set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") + endif() ++endif() +-- +2.24.3 (Apple Git-128) + diff --git a/packages/conan/recipes/zlib/patches/1.2.x/0001-fix-cmake.patch b/packages/conan/recipes/zlib/patches/1.2.x/0001-fix-cmake.patch new file mode 100644 index 00000000..f99f0b52 --- /dev/null +++ b/packages/conan/recipes/zlib/patches/1.2.x/0001-fix-cmake.patch @@ -0,0 +1,104 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 2.4.4) ++cmake_minimum_required(VERSION 3.0) # it's important to have https://cmake.org/cmake/help/latest/policy/CMP0042.html#policy:CMP0042 + set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON) + + project(zlib C) +@@ -60,7 +60,6 @@ endif() + check_include_file(unistd.h Z_HAVE_UNISTD_H) + + if(MSVC) +- set(CMAKE_DEBUG_POSTFIX "d") + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +@@ -83,7 +82,7 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zlib.pc.cmakein + ${ZLIB_PC} @ONLY) + configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein + ${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY) +-include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}) ++include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + + + #============================================================================ +@@ -123,7 +122,7 @@ set(ZLIB_SRCS + zutil.c + ) + +-if(NOT MINGW) ++if(MSVC) + set(ZLIB_DLL_SRCS + win32/zlib1.rc # If present will override custom build rule below. + ) +@@ -167,7 +166,7 @@ file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents) + string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" + "\\1" ZLIB_FULL_VERSION ${_zlib_h_contents}) + +-if(MINGW) ++if(WIN32 AND NOT MSVC) + # This gets us DLL resource information when compiling on MinGW. + if(NOT CMAKE_RC_COMPILER) + set(CMAKE_RC_COMPILER windres.exe) +@@ -181,12 +180,15 @@ if(MINGW) + -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj + -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) + set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) +-endif(MINGW) ++endif() + ++if(BUILD_SHARED_LIBS) + add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +-add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) + set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) + set_target_properties(zlib PROPERTIES SOVERSION 1) ++else() ++add_library(zlib STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) ++endif() + + if(NOT CYGWIN) + # This property causes shared libraries on Linux to have the full version +@@ -199,19 +201,24 @@ if(NOT CYGWIN) + set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION}) + endif() + +-if(UNIX) ++if(WIN32 AND NOT MINGW) ++ if(BUILD_SHARED_LIBS) ++ set_target_properties(zlib PROPERTIES ARCHIVE_OUTPUT_NAME zdll) ++ endif() ++else() + # On unix-like platforms the library is almost always called libz +- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) ++ set_target_properties(zlib PROPERTIES OUTPUT_NAME z) + if(NOT APPLE) + set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") + endif() +-elseif(BUILD_SHARED_LIBS AND WIN32) ++endif() ++if(BUILD_SHARED_LIBS AND WIN32) + # Creates zlib1.dll when building shared library version +- set_target_properties(zlib PROPERTIES SUFFIX "1.dll") ++ set_target_properties(zlib PROPERTIES PREFIX "" RUNTIME_OUTPUT_NAME "zlib1") + endif() + + if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) +- install(TARGETS zlib zlibstatic ++ install(TARGETS zlib + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) +@@ -230,6 +237,7 @@ endif() + # Example binaries + #============================================================================ + ++if(0) + add_executable(example test/example.c) + target_link_libraries(example zlib) + add_test(example example) +@@ -247,3 +255,4 @@ if(HAVE_OFF64_T) + target_link_libraries(minigzip64 zlib) + set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") + endif() ++endif() diff --git a/packages/conan/recipes/zlib/patches/1.2.x/0003-gzguts-fix-widechar-condition.patch b/packages/conan/recipes/zlib/patches/1.2.x/0003-gzguts-fix-widechar-condition.patch new file mode 100644 index 00000000..3de4978c --- /dev/null +++ b/packages/conan/recipes/zlib/patches/1.2.x/0003-gzguts-fix-widechar-condition.patch @@ -0,0 +1,13 @@ +diff --git a/gzguts.h b/gzguts.h +index 990a4d2..6378d46 100644 +--- a/gzguts.h ++++ b/gzguts.h +@@ -39,7 +39,7 @@ + # include + #endif + +-#if defined(_WIN32) || defined(__CYGWIN__) ++#if defined(_WIN32) + # define WIDECHAR + #endif + diff --git a/packages/conan/recipes/zlib/patches/1.2.x/0004-Fix-a-bug-when-getting-a-gzip-header-extra-field-wit.patch b/packages/conan/recipes/zlib/patches/1.2.x/0004-Fix-a-bug-when-getting-a-gzip-header-extra-field-wit.patch new file mode 100644 index 00000000..80eed3e0 --- /dev/null +++ b/packages/conan/recipes/zlib/patches/1.2.x/0004-Fix-a-bug-when-getting-a-gzip-header-extra-field-wit.patch @@ -0,0 +1,35 @@ +From eff308af425b67093bab25f80f1ae950166bece1 Mon Sep 17 00:00:00 2001 +From: Mark Adler +Date: Sat, 30 Jul 2022 15:51:11 -0700 +Subject: [PATCH] Fix a bug when getting a gzip header extra field with + inflate(). + +If the extra field was larger than the space the user provided with +inflateGetHeader(), and if multiple calls of inflate() delivered +the extra header data, then there could be a buffer overflow of the +provided space. This commit assures that provided space is not +exceeded. +--- + inflate.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/inflate.c b/inflate.c +index 7be8c63..7a72897 100644 +--- a/inflate.c ++++ b/inflate.c +@@ -763,9 +763,10 @@ int flush; + copy = state->length; + if (copy > have) copy = have; + if (copy) { ++ len = state->head->extra_len - state->length; + if (state->head != Z_NULL && +- state->head->extra != Z_NULL) { +- len = state->head->extra_len - state->length; ++ state->head->extra != Z_NULL && ++ len < state->head->extra_max) { + zmemcpy(state->head->extra + len, next, + len + copy > state->head->extra_max ? + state->head->extra_max - len : copy); +-- +2.25.1 + diff --git a/packages/conan/recipes/zlib/patches/1.2.x/0005-Fix-extra-field-processing-bug-that-dereferences-NUL.patch b/packages/conan/recipes/zlib/patches/1.2.x/0005-Fix-extra-field-processing-bug-that-dereferences-NUL.patch new file mode 100644 index 00000000..f34c4019 --- /dev/null +++ b/packages/conan/recipes/zlib/patches/1.2.x/0005-Fix-extra-field-processing-bug-that-dereferences-NUL.patch @@ -0,0 +1,32 @@ +From 1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d Mon Sep 17 00:00:00 2001 +From: Mark Adler +Date: Mon, 8 Aug 2022 10:50:09 -0700 +Subject: [PATCH] Fix extra field processing bug that dereferences NULL + state->head. + +The recent commit to fix a gzip header extra field processing bug +introduced the new bug fixed here. +--- + inflate.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/inflate.c b/inflate.c +index 7a72897..2a3c4fe 100644 +--- a/inflate.c ++++ b/inflate.c +@@ -763,10 +763,10 @@ int flush; + copy = state->length; + if (copy > have) copy = have; + if (copy) { +- len = state->head->extra_len - state->length; + if (state->head != Z_NULL && + state->head->extra != Z_NULL && +- len < state->head->extra_max) { ++ (len = state->head->extra_len - state->length) < ++ state->head->extra_max) { + zmemcpy(state->head->extra + len, next, + len + copy > state->head->extra_max ? + state->head->extra_max - len : copy); +-- +2.25.1 + diff --git a/packages/conan/recipes/zlib/patches/1.3.1/0001-fix-cmake.patch b/packages/conan/recipes/zlib/patches/1.3.1/0001-fix-cmake.patch new file mode 100644 index 00000000..036af67b --- /dev/null +++ b/packages/conan/recipes/zlib/patches/1.3.1/0001-fix-cmake.patch @@ -0,0 +1,81 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 15ceebe..2f08574 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -59,7 +59,6 @@ endif() + check_include_file(unistd.h Z_HAVE_UNISTD_H) + + if(MSVC) +- set(CMAKE_DEBUG_POSTFIX "d") + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +@@ -122,7 +121,7 @@ set(ZLIB_SRCS + zutil.c + ) + +-if(NOT MINGW) ++if(MSVC) + set(ZLIB_DLL_SRCS + win32/zlib1.rc # If present will override custom build rule below. + ) +@@ -133,7 +132,7 @@ file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents) + string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" + "\\1" ZLIB_FULL_VERSION ${_zlib_h_contents}) + +-if(MINGW) ++if(WIN32 AND NOT MSVC) + # This gets us DLL resource information when compiling on MinGW. + if(NOT CMAKE_RC_COMPILER) + set(CMAKE_RC_COMPILER windres.exe) +@@ -147,14 +146,16 @@ if(MINGW) + -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj + -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) + set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) +-endif(MINGW) ++endif() + ++if(BUILD_SHARED_LIBS) + add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) + target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +-add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +-target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) + set_target_properties(zlib PROPERTIES SOVERSION 1) ++else() ++add_library(zlib STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) ++endif() + + if(NOT CYGWIN) + # This property causes shared libraries on Linux to have the full version +@@ -167,19 +168,25 @@ if(NOT CYGWIN) + set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION}) + endif() + +-if(UNIX) ++if(WIN32 AND NOT MINGW) ++ if(BUILD_SHARED_LIBS) ++ set_target_properties(zlib PROPERTIES ARCHIVE_OUTPUT_NAME zdll) ++ endif() ++else() + # On unix-like platforms the library is almost always called libz +- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) ++ set_target_properties(zlib PROPERTIES OUTPUT_NAME z) + if(NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX)) + set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") + endif() +-elseif(BUILD_SHARED_LIBS AND WIN32) ++endif() ++if(BUILD_SHARED_LIBS AND WIN32) + # Creates zlib1.dll when building shared library version +- set_target_properties(zlib PROPERTIES SUFFIX "1.dll") ++ set_target_properties(zlib PROPERTIES PREFIX "" RUNTIME_OUTPUT_NAME "zlib1") + endif() + ++ + if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) +- install(TARGETS zlib zlibstatic ++ install(TARGETS zlib + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) diff --git a/packages/conan/recipes/zlib/patches/1.3/0001-fix-cmake.patch b/packages/conan/recipes/zlib/patches/1.3/0001-fix-cmake.patch new file mode 100644 index 00000000..b2aa69d0 --- /dev/null +++ b/packages/conan/recipes/zlib/patches/1.3/0001-fix-cmake.patch @@ -0,0 +1,92 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7f1b69f..618ea02 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -57,7 +57,6 @@ endif() + check_include_file(unistd.h Z_HAVE_UNISTD_H) + + if(MSVC) +- set(CMAKE_DEBUG_POSTFIX "d") + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +@@ -120,7 +119,7 @@ set(ZLIB_SRCS + zutil.c + ) + +-if(NOT MINGW) ++if(MSVC) + set(ZLIB_DLL_SRCS + win32/zlib1.rc # If present will override custom build rule below. + ) +@@ -131,7 +130,7 @@ file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents) + string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" + "\\1" ZLIB_FULL_VERSION ${_zlib_h_contents}) + +-if(MINGW) ++if(WIN32 AND NOT MSVC) + # This gets us DLL resource information when compiling on MinGW. + if(NOT CMAKE_RC_COMPILER) + set(CMAKE_RC_COMPILER windres.exe) +@@ -145,12 +144,16 @@ if(MINGW) + -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj + -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) + set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) +-endif(MINGW) ++endif() + ++if(BUILD_SHARED_LIBS) + add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) + add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) + set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) + set_target_properties(zlib PROPERTIES SOVERSION 1) ++else() ++add_library(zlib STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) ++endif() + + if(NOT CYGWIN) + # This property causes shared libraries on Linux to have the full version +@@ -163,19 +166,24 @@ if(NOT CYGWIN) + set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION}) + endif() + +-if(UNIX) ++if(WIN32 AND NOT MINGW) ++ if(BUILD_SHARED_LIBS) ++ set_target_properties(zlib PROPERTIES ARCHIVE_OUTPUT_NAME zdll) ++ endif() ++else() + # On unix-like platforms the library is almost always called libz +- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) ++ set_target_properties(zlib PROPERTIES OUTPUT_NAME z) + if(NOT APPLE) + set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") + endif() +-elseif(BUILD_SHARED_LIBS AND WIN32) ++endif() ++if(BUILD_SHARED_LIBS AND WIN32) + # Creates zlib1.dll when building shared library version +- set_target_properties(zlib PROPERTIES SUFFIX "1.dll") ++ set_target_properties(zlib PROPERTIES PREFIX "" RUNTIME_OUTPUT_NAME "zlib1") + endif() + + if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) +- install(TARGETS zlib zlibstatic ++ install(TARGETS zlib + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) +@@ -193,7 +201,7 @@ endif() + #============================================================================ + # Example binaries + #============================================================================ +- ++if(0) + add_executable(example test/example.c) + target_link_libraries(example zlib) + add_test(example example) +@@ -211,3 +219,4 @@ if(HAVE_OFF64_T) + target_link_libraries(minigzip64 zlib) + set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") + endif() ++endif() diff --git a/packages/conan/recipes/zlib/test_package/CMakeLists.txt b/packages/conan/recipes/zlib/test_package/CMakeLists.txt new file mode 100644 index 00000000..1954217b --- /dev/null +++ b/packages/conan/recipes/zlib/test_package/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/7abb9ee39e6009e3dbc45043307a1098246d4ad7/recipes/zlib/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(ZLIB REQUIRED) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE ZLIB::ZLIB) diff --git a/packages/conan/recipes/zlib/test_package/conanfile.py b/packages/conan/recipes/zlib/test_package/conanfile.py new file mode 100644 index 00000000..5724bcd4 --- /dev/null +++ b/packages/conan/recipes/zlib/test_package/conanfile.py @@ -0,0 +1,32 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/7abb9ee39e6009e3dbc45043307a1098246d4ad7/recipes/zlib/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/zlib/test_package/test_package.c b/packages/conan/recipes/zlib/test_package/test_package.c new file mode 100644 index 00000000..b127f628 --- /dev/null +++ b/packages/conan/recipes/zlib/test_package/test_package.c @@ -0,0 +1,40 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/7abb9ee39e6009e3dbc45043307a1098246d4ad7/recipes/zlib/all/test_package/test_package.c +*/ + +#include +#include +#include + +#include + +int main(void) { + char buffer_in [32] = {"Conan Package Manager"}; + char buffer_out [32] = {0}; + + z_stream defstream; + defstream.zalloc = Z_NULL; + defstream.zfree = Z_NULL; + defstream.opaque = Z_NULL; + defstream.avail_in = (uInt) strlen(buffer_in); + defstream.next_in = (Bytef *) buffer_in; + defstream.avail_out = (uInt) sizeof(buffer_out); + defstream.next_out = (Bytef *) buffer_out; + + deflateInit(&defstream, Z_BEST_COMPRESSION); + deflate(&defstream, Z_FINISH); + deflateEnd(&defstream); + + printf("Compressed size is: %lu\n", strlen(buffer_in)); + printf("Compressed string is: %s\n", buffer_in); + printf("Compressed size is: %lu\n", strlen(buffer_out)); + printf("Compressed string is: %s\n", buffer_out); + + printf("ZLIB VERSION: %s\n", zlibVersion()); + + return EXIT_SUCCESS; +} diff --git a/packages/conan/recipes/zstd/conandata.yml b/packages/conan/recipes/zstd/conandata.yml new file mode 100644 index 00000000..4afa5fa6 --- /dev/null +++ b/packages/conan/recipes/zstd/conandata.yml @@ -0,0 +1,46 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/zstd/all/conandata.yml + +sources: + "1.5.6": + url: "https://github.com/facebook/zstd/releases/download/v1.5.6/zstd-1.5.6.tar.gz" + sha256: "8c29e06cf42aacc1eafc4077ae2ec6c6fcb96a626157e0593d5e82a34fd403c1" + "1.5.5": + url: "https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-1.5.5.tar.gz" + sha256: "9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4" + "1.5.2": + url: "https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz" + sha256: "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0" + "1.5.0": + url: "https://github.com/facebook/zstd/releases/download/v1.5.0/zstd-1.5.0.tar.gz" + sha256: "5194fbfa781fcf45b98c5e849651aa7b3b0a008c6b72d4a0db760f3002291e94" +patches: + "1.5.6": + - patch_file: "patches/1.5.6-public-scope-windows-shared.patch" + patch_description: "Include zstd.h folder when building shared library on Windows" + patch_type: "bugfix" + patch_source: "https://github.com/facebook/zstd/pull/4009" + "1.5.5": + - patch_file: "patches/1.5.2-cmake-remove-asm-except-x86_64.patch" + patch_description: "use assembler codes only on x86_64" + patch_type: "portability" + - patch_file: "patches/1.5.5-qnx_support.patch" + patch_description: "Add qnx to platform" + patch_type: "portability" + patch_source: "https://github.com/facebook/zstd/pull/3745" + "1.5.2": + - patch_file: "patches/1.5.2-cmake-remove-asm-except-x86_64.patch" + patch_description: "use assembler codes only on x86_64" + patch_type: "portability" + - patch_file: "patches/1.5.0-remove-explicit-standard-setting.patch" + patch_description: "fix strange performance and scalability issues" + patch_type: "bugfix" + patch_source: "https://github.com/facebook/zstd/pull/3167" + "1.5.0": + - patch_file: "patches/1.5.0-remove-explicit-standard-setting.patch" + patch_description: "fix strange performance and scalability issues" + patch_type: "bugfix" + patch_source: "https://github.com/facebook/zstd/pull/3167" diff --git a/packages/conan/recipes/zstd/conanfile.py b/packages/conan/recipes/zstd/conanfile.py new file mode 100644 index 00000000..697c3f4c --- /dev/null +++ b/packages/conan/recipes/zstd/conanfile.py @@ -0,0 +1,112 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/zstd/all/conanfile.py + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, replace_in_file, rmdir, rm +import glob +import os + +required_conan_version = ">=1.53.0" + +class ZstdConan(ConanFile): + name = "zstd" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/facebook/zstd" + description = "Zstandard - Fast real-time compression algorithm" + topics = ("zstandard", "compression", "algorithm", "decoder") + license = "BSD-3-Clause" + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "threading": [True, False], + "build_programs": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "threading": True, + "build_programs": False, # ASWF: otherwise we end up with libzstd_static in generated cmake files + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + # We want DSOs in lib64 + self.cpp.package.libdirs = ["lib64"] + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["ZSTD_BUILD_PROGRAMS"] = self.options.build_programs + tc.variables["ZSTD_BUILD_STATIC"] = not self.options.shared or self.options.build_programs + tc.variables["ZSTD_BUILD_SHARED"] = self.options.shared + tc.variables["ZSTD_MULTITHREAD_SUPPORT"] = self.options.threading + tc.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + # Don't force PIC + replace_in_file(self, os.path.join(self.source_folder, "build", "cmake", "lib", "CMakeLists.txt"), + "POSITION_INDEPENDENT_CODE On", "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, "build", "cmake")) + cmake.build() + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses", self.name)) + cmake = CMake(self) + cmake.install() + # rmdir(self, os.path.join(self.package_folder, "lib64", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib64", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + + if self.options.shared and self.options.build_programs: + # If we build programs we have to build static libs (see logic in generate()), + # but if shared is True, we only want shared lib in package folder. + rm(self, "*_static.*", os.path.join(self.package_folder, "lib64")) + # ASWF: also clean up static libs in lib64 + for lib in glob.glob(os.path.join(self.package_folder, "lib64", "*.a")): + if not lib.endswith(".dll.a"): + os.remove(lib) + + def package_info(self): + zstd_cmake = "libzstd_shared" if self.options.shared else "libzstd_static" + self.cpp_info.set_property("cmake_file_name", "zstd") + self.cpp_info.set_property("cmake_target_name", f"zstd::{zstd_cmake}") + self.cpp_info.set_property("pkg_config_name", "libzstd") + self.cpp_info.components["zstdlib"].libs = collect_libs(self) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["zstdlib"].system_libs.append("pthread") + + # TODO: Remove after dropping Conan 1.x from ConanCenterIndex + self.cpp_info.components["zstdlib"].names["cmake_find_package"] = zstd_cmake + self.cpp_info.components["zstdlib"].names["cmake_find_package_multi"] = zstd_cmake + self.cpp_info.components["zstdlib"].set_property("cmake_target_name", f"zstd::{zstd_cmake}") + self.cpp_info.components["zstdlib"].set_property("pkg_config_name", "libzstd") + if self.options.build_programs: + bindir = os.path.join(self.package_folder, "bin") + self.env_info.PATH.append(bindir) diff --git a/packages/conan/recipes/zstd/patches/1.5.0-remove-explicit-standard-setting.patch b/packages/conan/recipes/zstd/patches/1.5.0-remove-explicit-standard-setting.patch new file mode 100644 index 00000000..cb025cd1 --- /dev/null +++ b/packages/conan/recipes/zstd/patches/1.5.0-remove-explicit-standard-setting.patch @@ -0,0 +1,21 @@ +diff --git a/a/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake b/b/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake +index e23b9d6..8d04458 100644 +--- a/a/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake ++++ b/b/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake +@@ -22,10 +22,12 @@ endfunction() + + macro(ADD_ZSTD_COMPILATION_FLAGS) + if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" OR MINGW) #Not only UNIX but also WIN32 for MinGW +- #Set c++11 by default +- EnableCompilerFlag("-std=c++11" false true) +- #Set c99 by default +- EnableCompilerFlag("-std=c99" true false) ++ # It's possible to select the exact standard used for compilation. ++ # It's not necessary, but can be employed for specific purposes. ++ # Note that zstd source code is compatible with both C++98 and above ++ # and C-gnu90 (c90 + long long + variadic macros ) and above ++ # EnableCompilerFlag("-std=c++11" false true) # Set C++ compilation to c++11 standard ++ # EnableCompilerFlag("-std=c99" true false) # Set C compiation to c99 standard + if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND MSVC) + # clang-cl normally maps -Wall to -Weverything. + EnableCompilerFlag("/clang:-Wall" true true) diff --git a/packages/conan/recipes/zstd/patches/1.5.2-cmake-remove-asm-except-x86_64.patch b/packages/conan/recipes/zstd/patches/1.5.2-cmake-remove-asm-except-x86_64.patch new file mode 100644 index 00000000..ed1ab3fb --- /dev/null +++ b/packages/conan/recipes/zstd/patches/1.5.2-cmake-remove-asm-except-x86_64.patch @@ -0,0 +1,17 @@ +diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt +index 4905bd9..5974725 100644 +--- a/build/cmake/lib/CMakeLists.txt ++++ b/build/cmake/lib/CMakeLists.txt +@@ -26,7 +26,11 @@ if (MSVC) + file(GLOB DecompressSources ${LIBRARY_DIR}/decompress/*.c) + add_compile_options(-DZSTD_DISABLE_ASM) + else () +- file(GLOB DecompressSources ${LIBRARY_DIR}/decompress/*.c ${LIBRARY_DIR}/decompress/*.S) ++ if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") ++ file(GLOB DecompressSources ${LIBRARY_DIR}/decompress/*.c ${LIBRARY_DIR}/decompress/*.S) ++ else() ++ file(GLOB DecompressSources ${LIBRARY_DIR}/decompress/*.c) ++ endif() + endif () + file(GLOB DictBuilderSources ${LIBRARY_DIR}/dictBuilder/*.c) + diff --git a/packages/conan/recipes/zstd/patches/1.5.5-qnx_support.patch b/packages/conan/recipes/zstd/patches/1.5.5-qnx_support.patch new file mode 100644 index 00000000..ba58a24c --- /dev/null +++ b/packages/conan/recipes/zstd/patches/1.5.5-qnx_support.patch @@ -0,0 +1,11 @@ +--- programs/platform.h 2023-04-04 22:13:52.000000000 +0200 ++++ programs/platform.h 2023-09-03 10:01:58.930595800 +0200 +@@ -89,7 +89,7 @@ + */ + # elif !defined(_WIN32) \ + && ( defined(__unix__) || defined(__unix) \ +- || defined(__midipix__) || defined(__VMS) || defined(__HAIKU__) ) ++ || defined(_QNX_SOURCE) || defined(__midipix__) || defined(__VMS) || defined(__HAIKU__) ) + + # if defined(__linux__) || defined(__linux) || defined(__CYGWIN__) + # ifndef _POSIX_C_SOURCE diff --git a/packages/conan/recipes/zstd/patches/1.5.6-public-scope-windows-shared.patch b/packages/conan/recipes/zstd/patches/1.5.6-public-scope-windows-shared.patch new file mode 100644 index 00000000..9862de8a --- /dev/null +++ b/packages/conan/recipes/zstd/patches/1.5.6-public-scope-windows-shared.patch @@ -0,0 +1,13 @@ +diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt +index 5d514cc..1791897 100644 +--- a/build/cmake/lib/CMakeLists.txt ++++ b/build/cmake/lib/CMakeLists.txt +@@ -123,7 +123,7 @@ set(PUBLIC_INCLUDE_DIRS ${LIBRARY_DIR}) + set(library_targets) + if (ZSTD_BUILD_SHARED) + add_library(libzstd_shared SHARED ${Sources} ${Headers} ${PlatformDependResources}) +- target_include_directories(libzstd_shared INTERFACE $) ++ target_include_directories(libzstd_shared PUBLIC $) + list(APPEND library_targets libzstd_shared) + if (ZSTD_MULTITHREAD_SUPPORT) + set_property(TARGET libzstd_shared APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_MULTITHREAD") diff --git a/packages/conan/recipes/zstd/test_package/CMakeLists.txt b/packages/conan/recipes/zstd/test_package/CMakeLists.txt new file mode 100644 index 00000000..c83d1087 --- /dev/null +++ b/packages/conan/recipes/zstd/test_package/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/zstd/all/test_package/CMakeLists.txt + +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(zstd REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +if (TARGET zstd::libzstd_shared) + target_link_libraries(${PROJECT_NAME} PRIVATE zstd::libzstd_shared) +else() + target_link_libraries(${PROJECT_NAME} PRIVATE zstd::libzstd_static) +endif() diff --git a/packages/conan/recipes/zstd/test_package/conanfile.py b/packages/conan/recipes/zstd/test_package/conanfile.py new file mode 100644 index 00000000..410cf0fa --- /dev/null +++ b/packages/conan/recipes/zstd/test_package/conanfile.py @@ -0,0 +1,34 @@ +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/zstd/all/test_package/conanfile.py + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str, run=True) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not can_run(self): + return + + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/packages/conan/recipes/zstd/test_package/test_package.c b/packages/conan/recipes/zstd/test_package/test_package.c new file mode 100644 index 00000000..8e443bdf --- /dev/null +++ b/packages/conan/recipes/zstd/test_package/test_package.c @@ -0,0 +1,20 @@ +/* +# Copyright (c) Contributors to the conan-center-index Project. All rights reserved. +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: MIT +# +# From: https://github.com/conan-io/conan-center-index/blob/6aeda9d870a1253535297cb50b01bebfc8c62910/recipes/zstd/all/test_package/test_package.c +*/ + +#include +#include +#include +#include + +int main() { + const char* originalData = "Sample text"; + size_t compressedSize = ZSTD_compressBound(strlen(originalData) + 1); + printf("%zu\n", compressedSize); + + return 0; +} diff --git a/packages/conan/settings/conan.conf b/packages/conan/settings/conan.conf deleted file mode 100644 index 40b79dc0..00000000 --- a/packages/conan/settings/conan.conf +++ /dev/null @@ -1,23 +0,0 @@ -[log] -run_to_output = True # environment CONAN_LOG_RUN_TO_OUTPUT -run_to_file = False # environment CONAN_LOG_RUN_TO_FILE -level = critical # environment CONAN_LOGGING_LEVEL -print_run_commands = False # environment CONAN_PRINT_RUN_COMMANDS - -[general] -revisions_enabled = 1 -default_profile = vfx2024 -compression_level = 9 # environment CONAN_COMPRESSION_LEVEL -sysrequires_sudo = True # environment CONAN_SYSREQUIRES_SUDO -request_timeout = 60 # environment CONAN_REQUEST_TIMEOUT (seconds) -default_package_id_mode = semver_direct_mode # environment CONAN_DEFAULT_PACKAGE_ID_MODE - -[storage] -path = ../d -download_cache = /tmp/downloads - -[proxies] - -[hooks] -attribute_checker - diff --git a/packages/conan/settings/extensions/plugins/compatibility/compatibility.py b/packages/conan/settings/extensions/plugins/compatibility/compatibility.py new file mode 100644 index 00000000..89b11c0d --- /dev/null +++ b/packages/conan/settings/extensions/plugins/compatibility/compatibility.py @@ -0,0 +1,9 @@ +# This file was generated by Conan. Remove this comment if you edit this file or Conan +# will destroy your changes. +from cppstd_compat import cppstd_compat + + +def compatibility(conanfile): + configs = cppstd_compat(conanfile) + # TODO: Append more configurations for your custom compatibility rules + return configs diff --git a/packages/conan/settings/extensions/plugins/compatibility/cppstd_compat.py b/packages/conan/settings/extensions/plugins/compatibility/cppstd_compat.py new file mode 100644 index 00000000..dc5a570b --- /dev/null +++ b/packages/conan/settings/extensions/plugins/compatibility/cppstd_compat.py @@ -0,0 +1,61 @@ +# This file was generated by Conan. Remove this comment if you edit this file or Conan +# will destroy your changes. +from conan.tools.build import supported_cppstd, supported_cstd +from conan.errors import ConanException + + +def cppstd_compat(conanfile): + # It will try to find packages with all the cppstd versions + extension_properties = getattr(conanfile, "extension_properties", {}) + compiler = conanfile.settings.get_safe("compiler") + compiler_version = conanfile.settings.get_safe("compiler.version") + cppstd = conanfile.settings.get_safe("compiler.cppstd") + if not compiler or not compiler_version: + return [] + factors = [] # List of list, each sublist is a potential combination + if ( + cppstd is not None + and extension_properties.get("compatibility_cppstd") is not False + ): + cppstd_possible_values = supported_cppstd(conanfile) + if cppstd_possible_values is None: + conanfile.output.warning( + f'No cppstd compatibility defined for compiler "{compiler}"' + ) + else: # The current cppst must be included in case there is other factor + factors.append([{"compiler.cppstd": v} for v in cppstd_possible_values]) + + cstd = conanfile.settings.get_safe("compiler.cstd") + if cstd is not None and extension_properties.get("compatibility_cstd") is not False: + cstd_possible_values = supported_cstd(conanfile) + if cstd_possible_values is None: + conanfile.output.warning( + f'No cstd compatibility defined for compiler "{compiler}"' + ) + else: + factors.append( + [{"compiler.cstd": v} for v in cstd_possible_values if v != cstd] + ) + + if compiler == "msvc": + msvc_fallback = {"194": "193"}.get(compiler_version) + if msvc_fallback: + factors.append([{"compiler.version": msvc_fallback}]) + + combinations = [] + for factor in factors: + if not combinations: + combinations = factor + continue + new_combinations = [] + for comb in combinations: + for f in factor: + new_comb = comb.copy() + new_comb.update(f) + new_combinations.append(new_comb) + combinations.extend(new_combinations) + + ret = [] + for comb in combinations: + ret.append({"settings": [(k, v) for k, v in comb.items()]}) + return ret diff --git a/packages/conan/settings/extensions/plugins/profile.py b/packages/conan/settings/extensions/plugins/profile.py new file mode 100644 index 00000000..b43cdc65 --- /dev/null +++ b/packages/conan/settings/extensions/plugins/profile.py @@ -0,0 +1,82 @@ +# This file was generated by Conan. Remove this comment if you edit this file or Conan +# will destroy your changes. + + +def profile_plugin(profile): + settings = profile.settings + if settings.get("compiler") in ("msvc", "clang") and settings.get( + "compiler.runtime" + ): + if settings.get("compiler.runtime_type") is None: + runtime = "Debug" if settings.get("build_type") == "Debug" else "Release" + try: + settings["compiler.runtime_type"] = runtime + except ConanException: + pass + _check_correct_cppstd(settings) + _check_correct_cstd(settings) + + +def _check_correct_cppstd(settings): + from conan.tools.scm import Version + + def _error(compiler, cppstd, min_version, version): + from conan.errors import ConanException + + raise ConanException( + f"The provided compiler.cppstd={cppstd} requires at least {compiler}" + f">={min_version} but version {version} provided" + ) + + cppstd = settings.get("compiler.cppstd") + version = settings.get("compiler.version") + + if cppstd and version: + cppstd = cppstd.replace("gnu", "") + version = Version(version) + mver = None + compiler = settings.get("compiler") + if compiler == "gcc": + mver = {"20": "8", "17": "5", "14": "4.8", "11": "4.3"}.get(cppstd) + elif compiler == "clang": + mver = {"20": "6", "17": "3.5", "14": "3.4", "11": "2.1"}.get(cppstd) + elif compiler == "apple-clang": + mver = {"20": "10", "17": "6.1", "14": "5.1", "11": "4.5"}.get(cppstd) + elif compiler == "msvc": + mver = {"23": "193", "20": "192", "17": "191", "14": "190"}.get(cppstd) + if mver and version < mver: + _error(compiler, cppstd, mver, version) + + +def _check_correct_cstd(settings): + from conan.tools.scm import Version + + def _error(compiler, cstd, min_version, version): + from conan.errors import ConanException + + raise ConanException( + f"The provided compiler.cstd={cstd} requires at least {compiler}" + f">={min_version} but version {version} provided" + ) + + cstd = settings.get("compiler.cstd") + version = settings.get("compiler.version") + + if cstd and version: + cstd = cstd.replace("gnu", "") + version = Version(version) + mver = None + compiler = settings.get("compiler") + if compiler == "gcc": + # TODO: right versions + mver = {}.get(cstd) + elif compiler == "clang": + # TODO: right versions + mver = {}.get(cstd) + elif compiler == "apple-clang": + # TODO: Right versions + mver = {}.get(cstd) + elif compiler == "msvc": + mver = {"17": "192", "11": "192"}.get(cstd) + if mver and version < mver: + _error(compiler, cppstd, mver, version) diff --git a/packages/conan/settings/global.conf b/packages/conan/settings/global.conf new file mode 100644 index 00000000..d6819585 --- /dev/null +++ b/packages/conan/settings/global.conf @@ -0,0 +1,22 @@ +#[log] +#run_to_output = True # environment CONAN_LOG_RUN_TO_OUTPUT +#run_to_file = False # environment CONAN_LOG_RUN_TO_FILE +#level = critical # environment CONAN_LOGGING_LEVEL +#print_run_commands = False # environment CONAN_PRINT_RUN_COMMANDS + +#[general] +#revisions_enabled = 1 +core:default_build_profile = vfx2025 +core:default_profile = vfx2025 +core.gzip:compresslevel = 9 +tools.system.package_manager:sudo = True +core.net.http:timeout = 60 +core.package_id:default_unknown_mode = semver_mode + +# FIXME don't repeat yourself use jinja2 env vars +core.cache:storage_path = /opt/conan_home/d +core.download:download_cache = /tmp/downloads + +#[hooks] +#attribute_checker + diff --git a/packages/conan/settings/profiles/ci_common4 b/packages/conan/settings/profiles/ci_common4 deleted file mode 100644 index 31eed0e7..00000000 --- a/packages/conan/settings/profiles/ci_common4 +++ /dev/null @@ -1,15 +0,0 @@ -[settings] -os=Linux -os_build=Linux -os.version=rhel8 -arch=x86_64 -arch_build=x86_64 -compiler=gcc -compiler.version=11.2 -compiler.libcxx=libstdc++11 -compiler.cppstd=17 -build_type=Release -[options] -[build_requires] -[env] -GCC_INSTALL_PREFIX=/opt/rh/gcc-toolset-11/root/usr diff --git a/packages/conan/settings/profiles/vfx2023 b/packages/conan/settings/profiles/vfx2023 deleted file mode 100644 index ff73131e..00000000 --- a/packages/conan/settings/profiles/vfx2023 +++ /dev/null @@ -1,7 +0,0 @@ -include(ci_common3) - -[settings] -python=3.10 -[options] -[build_requires] -[env] diff --git a/packages/conan/settings/profiles/vfx2024 b/packages/conan/settings/profiles/vfx2024 deleted file mode 100644 index a8f68fe3..00000000 --- a/packages/conan/settings/profiles/vfx2024 +++ /dev/null @@ -1,15 +0,0 @@ -include(ci_common4) - -[settings] -python=3.11 -[options] -# These options affects Qt only. -qt:qtwebengine=True -qt:gui=True -qt:qtdeclarative=True -qt:qtwebchannel=True -qt:with_dbus=True -qt:qtwebsockets=True -qt:qtmultimedia=True -[build_requires] -[env] diff --git a/packages/conan/settings/profiles_aswf/ci_common1 b/packages/conan/settings/profiles_aswf/ci_common1 new file mode 120000 index 00000000..cc367ee6 --- /dev/null +++ b/packages/conan/settings/profiles_aswf/ci_common1 @@ -0,0 +1 @@ +../profiles_aswftesting/ci_common1 \ No newline at end of file diff --git a/packages/conan/settings/profiles_aswf/ci_common2 b/packages/conan/settings/profiles_aswf/ci_common2 new file mode 120000 index 00000000..3800139a --- /dev/null +++ b/packages/conan/settings/profiles_aswf/ci_common2 @@ -0,0 +1 @@ +../profiles_aswftesting/ci_common2 \ No newline at end of file diff --git a/packages/conan/settings/profiles_aswf/ci_common3 b/packages/conan/settings/profiles_aswf/ci_common3 new file mode 120000 index 00000000..a58070e0 --- /dev/null +++ b/packages/conan/settings/profiles_aswf/ci_common3 @@ -0,0 +1 @@ +../profiles_aswftesting/ci_common3 \ No newline at end of file diff --git a/packages/conan/settings/profiles_aswf/ci_common4 b/packages/conan/settings/profiles_aswf/ci_common4 new file mode 120000 index 00000000..33f90588 --- /dev/null +++ b/packages/conan/settings/profiles_aswf/ci_common4 @@ -0,0 +1 @@ +../profiles_aswftesting/ci_common4 \ No newline at end of file diff --git a/packages/conan/settings/profiles_aswf/ci_common5 b/packages/conan/settings/profiles_aswf/ci_common5 new file mode 120000 index 00000000..63ca70a5 --- /dev/null +++ b/packages/conan/settings/profiles_aswf/ci_common5 @@ -0,0 +1 @@ +../profiles_aswftesting/ci_common5 \ No newline at end of file diff --git a/packages/conan/settings/profiles_aswf/vfx2019 b/packages/conan/settings/profiles_aswf/vfx2019 new file mode 120000 index 00000000..a2a0f3a1 --- /dev/null +++ b/packages/conan/settings/profiles_aswf/vfx2019 @@ -0,0 +1 @@ +../profiles_aswftesting/vfx2019 \ No newline at end of file diff --git a/packages/conan/settings/profiles_aswf/vfx2020 b/packages/conan/settings/profiles_aswf/vfx2020 new file mode 120000 index 00000000..75dec7d1 --- /dev/null +++ b/packages/conan/settings/profiles_aswf/vfx2020 @@ -0,0 +1 @@ +../profiles_aswftesting/vfx2020 \ No newline at end of file diff --git a/packages/conan/settings/profiles_aswf/vfx2021 b/packages/conan/settings/profiles_aswf/vfx2021 new file mode 120000 index 00000000..6c7a6b9a --- /dev/null +++ b/packages/conan/settings/profiles_aswf/vfx2021 @@ -0,0 +1 @@ +../profiles_aswftesting/vfx2021 \ No newline at end of file diff --git a/packages/conan/settings/profiles_aswf/vfx2022 b/packages/conan/settings/profiles_aswf/vfx2022 new file mode 120000 index 00000000..449594e1 --- /dev/null +++ b/packages/conan/settings/profiles_aswf/vfx2022 @@ -0,0 +1 @@ +../profiles_aswftesting/vfx2022 \ No newline at end of file diff --git a/packages/conan/settings/profiles_aswf/vfx2023 b/packages/conan/settings/profiles_aswf/vfx2023 new file mode 120000 index 00000000..63a8a476 --- /dev/null +++ b/packages/conan/settings/profiles_aswf/vfx2023 @@ -0,0 +1 @@ +../profiles_aswftesting/vfx2023 \ No newline at end of file diff --git a/packages/conan/settings/profiles_aswf/vfx2024 b/packages/conan/settings/profiles_aswf/vfx2024 new file mode 100644 index 00000000..6d8f9868 --- /dev/null +++ b/packages/conan/settings/profiles_aswf/vfx2024 @@ -0,0 +1,106 @@ +include(ci_common4) + +[settings] +[options] +# Build everything as shared libs by default +*:shared=True +[tool_requires] +[replace_requires] +b2/*: b2/5.2.1@aswf/vfx2024 +boost/*: boost/1.82.0@aswf/vfx2024 +brotli/*: brotli/system@aswf/vfx2024 +bzip2/*: bzip2/1.0.8@aswf/vfx2024 +dbus/*: dbus/system@aswf/vfx2024 +double-conversion/*: double-conversion/system@aswf/vfx2024 +expat/*: expat/2.6.4@aswf/vfx2024 +fmt/*: fmt/11.1.4@aswf/vfx2024 +fontconfig/*: fontconfig/system@aswf/vfx2024 +freetype/*: freetype/2.13.2@aswf/vfx2024 +gdbm/*: gdbm/system@aswf/vfx2024 +giflib/*: giflib/5.1.4@aswf/vfx2024 +glew/*: glew/2.1.0@aswf/vfx2024 +glib/*: glib/2.78.3@aswf/vfx2024 +highway/*: highway/1.2.0@aswf/vfx2024 +icu/*: icu/system@aswf/vfx2024 +imath/*: imath/3.1.12@aswf/vfx2024 +lcms/*: lcms/2.16@aswf/vfx2024 +libaom-av1/*: libaom-av1/system@aswf/vfx2024 +libalsa/*: libalsa/system@aswf/vfx2024 +libbacktrace/*: libbacktrace/cci.20210118@aswf/vfx2024 +libdeflate/*: libdeflate/1.23@aswf/vfx2024 +libdrm/*: libdrm/system@aswf/vfx2024 +libffi/*: libffi/system@aswf/vfx2024 +libiconv/*: libiconv/1.17@aswf/vfx2024 +libjpeg-turbo/*: libjpeg-turbo/3.0.4@aswf/vfx2024 +libjxl/*: libjxl/0.11.1@aswf/vfx2024 +libmp3lame/*: libmp3lame/system@aswf/vfx2024 +libpng/*: libpng/1.6.34@aswf/vfx2024 +libsndfile/*: libsndfile/system@aswf/vfx2024 +libsquish/*: libsquish/system@aswf/vfx2024 +libsvtav1/*: libsvtav1/system@aswf/vfx2024 +libtiff/*: libtiff/4.0.9@aswf/vfx2024 +libuhdr/*: libuhdr/1.4.0@aswf/vfx2024 +libvpx/*: libvpx/system@aswf/vfx2024 +libwebp/*: libwebp/1.5.0@aswf/vfx2024 +libxcrypt/*: libxcrypt/4.4.36@aswf/vfx2024 +libxshmfence/*: libxshmfence/system@aswf/vfx2024 +lz4/*: lz4/1.10.0@aswf/vfx2024 +md4c/*: md4c/0.4.8@aswf/vfx2024 +minizip-ng/*: minizip/4.0.8@aswf/vfx2024 +mpdecimal/*: mpdecimal/system@aswf/vfx2024 +mpg123/*: mpg123/system@aswf/vfx2024 +nasm/*: nasm/system@aswf/vfx2024 +nspr/*: nspr/system@aswf/vfx2024 +nss/*: nss/3.93@aswf/vfx2024 +ocio/*: ocio/2.3.2@aswf/vfx2024 +ogg/*: ogg/system@aswf/vfx2024 +oiio/*: oiio/2.5.18.0@aswf/vfx2024 +openal-soft/*: openal-soft/system@aswf/vfx2024 +openexr/*: openexr/3.2.4@aswf/vfx2024 +opengl/*: opengl/system@aswf/vfx2024 +openjpeg/*: openjpeg/2.4.0@aswf/vfx2024 +openssl/*: openssl/system@aswf/vfx2024 +opus/*: opus/system@aswf/vfx2024 +pcre2/*: pcre2/system@aswf/vfx2024 +ptex/*: ptex/2.4.2@aswf/vfx2024 +pugixml/*: pugixml/1.14@aswf/vfx2024 +pulseaudio/*: pulseaudio/system@aswf/vfx2024 +pystring/*: pystring/1.1.4@aswf/vfx2024 +sqlite3/*: sqlite3/system@aswf/vfx2024 +tcl/*: tcl/system@aswf/vfx2024 +tk/*: tk/system@aswf/vfx2024 +tsl-robin-map/*: tsl-robin-map/1.3.0@aswf/vfx2024 +util-linux-libuuid/*: util-linux-libuuid/system@aswf/vfx2024 +vorbis/*: vorbis/system@aswf/vfx2024 +vulkan-headers/*: vulkan-headers/system@aswf/vfx2024 +vulkan-loader/*: vulkan-loader/system@aswf/vfx2024 +xkbcommon/*: xkbcommon/0.9.1@aswf/vfx2024 +xorg/*: xorg/system@aswf/vfx2024 +xorg-proto/*: xorg-proto/system@aswf/vfx2024 +xz_utils/*: xz_utiles/system@aswf/vfx2024 +yaml-cpp/*: yaml-cpp/0.8.0@aswf/vfx2024 +zlib/*: zlib/1.3.1@aswf/vfx2024 +zstd/*: zstd/1.5.6@aswf/vfx2024 +[replace_tool_requires] +bison/*: bison/3.0.4@system +flex/*: flex/2.6.1@system +gperf/*: gperf/3.1@system +libtool/*: libtool/2.4.6@system +mesno/*: meson/0.58.2@system +ninja/*: ninja/1.12.1@aswf/ci_common5 +nodesj/*: nodejs/18.20.4@system +pkgconf/*: pkgconf/1.4.2@system +wayland/*: wayland/1.21.0@system +wayland-protocols/*: wayland-protocols/1.25@system +[platform_requires] +[platform_tool_requires] +bison/3.0.4 +flex/2.6.1 +gperf/3.1 +libtool/2.4.6 +meson/0.58.2 +nodejs/18.20.4 +pkgconf/1.4.2 +wayland/1.21.0 +wayland-protocols/1.25 +[buildenv] diff --git a/packages/conan/settings/profiles_aswf/vfx2025 b/packages/conan/settings/profiles_aswf/vfx2025 new file mode 100644 index 00000000..5933cda9 --- /dev/null +++ b/packages/conan/settings/profiles_aswf/vfx2025 @@ -0,0 +1,106 @@ +include(ci_common5) + +[settings] +[options] +# Build everything as shared libs by default +*:shared=True +[tool_requires] +[replace_requires] +b2/*: b2/5.2.1@aswf/vfx2025 +boost/*: boost/1.85.0@aswf/vfx2025 +brotli/*: brotli/system@aswf/vfx2025 +bzip2/*: bzip2/1.0.8@aswf/vfx2025 +dbus/*: dbus/system@aswf/vfx2025 +double-conversion/*: double-conversion/system@aswf/vfx2025 +expat/*: expat/2.6.4@aswf/vfx2025 +fmt/*: fmt/11.1.4@aswf/vfx2025 +fontconfig/*: fontconfig/system@aswf/vfx2025 +freetype/*: freetype/2.13.2@aswf/vfx2025 +gdbm/*: gdbm/system@aswf/vfx2025 +giflib/*: giflib/5.1.4@aswf/vfx2025 +glew/*: glew/2.2.0@aswf/vfx2025 +glib/*: glib/2.78.3@aswf/vfx2025 +highway/*: highway/1.2.0@aswf/vfx2024 +icu/*: icu/system@aswf/vfx2025 +imath/*: imath/3.1.12@aswf/vfx2025 +lcms/*: lcms/2.16@aswf/vfx2025 +libalsa/*: libalsa/system@aswf/vfx2025 +libaom-av1/*: libaom/system@aswf/vfx2025 +libbacktrace/*: libbacktrace/cci.20210118@aswf/vfx2025 +libdeflate/*: libdeflate/1.23@aswf/vfx2025 +libdrm/*: libdrm/system@aswf/vfx2025 +libffi/*: libffi/system@aswf/vfx2025 +libiconv/*: libiconv/1.17@aswf/vfx2025 +libjpeg-turbo/*: libjpeg-turbo/3.0.4@aswf/vfx2025 +libjxl/*: libjxl/0.11.1@aswf/vfx2025 +libmp3lame/*: libmp3lame/system@aswf/vfx2025 +libpng/*: libpng/1.6.34@aswf/vfx2025 +libsndfile/*: libsndfile/system@aswf/vfx2025 +libsquish/*: libsquish/system@aswf/vfx2025 +libsvt-av1/*: libsvt-av1/system@aswf/vfx2025 +libtiff/*: libtiff/4.0.9@aswf/vfx2025 +libuhdr/*: libuhdr/1.4.0@aswf/vfx2025 +libvpx/*: libvpx/system@aswf/vfx2025 +libwebp/*: libwebp/1.5.0@aswf/vfx2025 +libxcrypt/*: libxcrypt/4.4.36@aswf/vfx2025 +libxshmfence/*: libxshmfence/system@aswf/vfx2025 +lz4/*: lz4/1.10.0@aswf/vfx2025 +md4c/*: md4c/0.4.8@aswf/vfx2025 +minizip-ng/*: minizip-ng/4.0.8@aswf/vfx2025 +mpdecimal/*: mpdecimal/system@aswf/vfx2025 +mpg123/*: mpg123/system@aswf/vfx2025 +nasm/*: nasm/system@aswf/vfx2025 +nspr/*: nspr/system@aswf/vfx2025 +nss/*: nss/3.93@aswf/vfx2025 +ocio/*: ocio/2.4.2@aswf/vfx2025 +oiio/*: oiio/3.0.5.0@aswf/vfx2025 +ogg/*: ogg/system@aswf/vfx2025 +openal-soft/*: openal-soft/system@aswf/vfx2025 +openexr/*: openexr/3.3.3@aswf/vfx2025 +opengl/*: opengl/system@aswf/vfx2025 +openjpeg/*: openjpeg/2.4.0@aswf/vfx2025 +openssl/*: openssl/system@aswf/vfx2025 +opus/*: opus/system@aswf/vfx2025 +pcre2/*: pcre2/system@aswf/vfx2025 +ptex/*: ptex/2.4.3@aswf/vfx2025 +pugixml/*: pugixml/1.14@aswf/vfx2025 +pulseaudio/*: pulseaudio/system@aswr/vfx2025 +pystring/*: pystring/1.1.4@aswf/vfx2025 +sqlite3/*: sqlite3/system@aswf/vfx2025 +tcl/*: tcl/system@aswf/vfx2025 +tk/*: tk/system@aswf/vfx2025 +tsl-robin-map/*: tsl-robin-map/1.3.0@aswf/vfx2025 +util-linux-libuuid/*: util-linux-libuuid/system@aswf/vfx2025 +vorbis/*: vorbis/system@aswf/vfx2025 +vulkan-headers/*: vulkan-headers/system@aswf/vfx2025 +vulkan-loader/*: vulkan-loader/system@aswf/vfx2025 +xkbcommon/*: xkbcommon/0.9.1@aswf/vfx2025 +xorg/*: xorg/system@aswf/vfx2025 +xorg-proto/*: xorg-proto/system@aswf/vfx2025 +xz_utils/*: xz_utils/system@aswf/vfx2025 +yaml-cpp/*: yaml-cpp/0.8.0@aswf/vfx2025 +zlib/*: zlib/1.3.1@aswf/vfx2025 +zstd/*: zstd/1.5.6@aswf/vfx2025 +[replace_tool_requires] +bison/*: bison/3.0.4@system +flex/*: flex/2.6.1@system +gperf/*: gperf/3.1@system +libtool/*: libtool/2.4.6@system +meson/*: meson/0.58.2@system +ninja/*: ninja/1.12.1@aswf/ci_common5 +nodejs/*: nodejs/18.20.4@system +pkgconf/*: pkgconf/1.4.2@system +wayland/*: wayland/1.21.0@system +wayland-protocols/*: wayland-protocols/1.25@system +[platform_requires] +[platform_tool_requires] +bison/3.0.4 +flex/2.6.1 +gperf/3.1 +libtool/2.4.6 +meson/0.58.2 +nodejs/18.20.4 +pkgconf/1.4.2 +wayland/1.21.0 +wayland-protocols/1.25 +[buildenv] diff --git a/packages/conan/settings/profiles/ci_common1 b/packages/conan/settings/profiles_aswftesting/ci_common1 similarity index 72% rename from packages/conan/settings/profiles/ci_common1 rename to packages/conan/settings/profiles_aswftesting/ci_common1 index af9e2e83..97cb3d91 100644 --- a/packages/conan/settings/profiles/ci_common1 +++ b/packages/conan/settings/profiles_aswftesting/ci_common1 @@ -1,15 +1,12 @@ [settings] os=Linux -os_build=Linux -os.version=rhel7 arch=x86_64 -arch_build=x86_64 compiler=gcc compiler.version=6.3 compiler.libcxx=libstdc++11 compiler.cppstd=14 build_type=Release [options] -[build_requires] -[env] +[tool_requires] +[buildenv] GCC_INSTALL_PREFIX=/opt/rh/devtoolset-6/root/usr diff --git a/packages/conan/settings/profiles/ci_common2 b/packages/conan/settings/profiles_aswftesting/ci_common2 similarity index 72% rename from packages/conan/settings/profiles/ci_common2 rename to packages/conan/settings/profiles_aswftesting/ci_common2 index 3041869f..025d3688 100644 --- a/packages/conan/settings/profiles/ci_common2 +++ b/packages/conan/settings/profiles_aswftesting/ci_common2 @@ -1,15 +1,12 @@ [settings] os=Linux -os_build=Linux -os.version=rhel7 arch=x86_64 -arch_build=x86_64 compiler=gcc compiler.version=9.3 compiler.libcxx=libstdc++11 compiler.cppstd=17 build_type=Release [options] -[build_requires] -[env] +[tool_requires] +[buildenv] GCC_INSTALL_PREFIX=/opt/rh/devtoolset-9/root/usr diff --git a/packages/conan/settings/profiles/ci_common3 b/packages/conan/settings/profiles_aswftesting/ci_common3 similarity index 72% rename from packages/conan/settings/profiles/ci_common3 rename to packages/conan/settings/profiles_aswftesting/ci_common3 index 31eed0e7..8f2e8054 100644 --- a/packages/conan/settings/profiles/ci_common3 +++ b/packages/conan/settings/profiles_aswftesting/ci_common3 @@ -1,15 +1,15 @@ [settings] os=Linux -os_build=Linux -os.version=rhel8 arch=x86_64 -arch_build=x86_64 compiler=gcc compiler.version=11.2 compiler.libcxx=libstdc++11 compiler.cppstd=17 build_type=Release [options] -[build_requires] -[env] +[tool_requires] +[platform_requires] +bzip2/1.0.6 +zlib/1.2.11 +[buildenv] GCC_INSTALL_PREFIX=/opt/rh/gcc-toolset-11/root/usr diff --git a/packages/conan/settings/profiles_aswftesting/ci_common4 b/packages/conan/settings/profiles_aswftesting/ci_common4 new file mode 100644 index 00000000..11bc5a5d --- /dev/null +++ b/packages/conan/settings/profiles_aswftesting/ci_common4 @@ -0,0 +1,19 @@ +[settings] +os=Linux +arch=x86_64 +compiler=gcc +compiler.version=11.2 +compiler.libcxx=libstdc++11 +compiler.cppstd=17 +build_type=Release +[options] +# Build everything except Clang as shared libs by default +*:shared=True +clang/*:shared=False +[tool_requires] +[replace_requires] +[replace_tools_requires] +cmake/*: cmake/3.27.9@aswftesting/ci_common4 +[platform_requires] +[buildenv] +GCC_INSTALL_DIR=/opt/rh/gcc-toolset-11/root/lib/gcc/x86_64-redhat-linux/11 diff --git a/packages/conan/settings/profiles_aswftesting/ci_common5 b/packages/conan/settings/profiles_aswftesting/ci_common5 new file mode 100644 index 00000000..64dd3078 --- /dev/null +++ b/packages/conan/settings/profiles_aswftesting/ci_common5 @@ -0,0 +1,19 @@ +[settings] +os=Linux +arch=x86_64 +compiler=gcc +compiler.version=11.2 +compiler.libcxx=libstdc++11 +compiler.cppstd=17 +build_type=Release +[options] +# Build everything except Clang as shared libs by default +*:shared=True +clang/*:shared=False +[tool_requires] +[replace_requires] +[replace_tool_requires] +cmake/*: cmake/3.31.6@aswftesting/ci_common5 +[platform_requires] +[buildenv] +GCC_INSTALL_DIR=/opt/rh/gcc-toolset-11/root/lib/gcc/x86_64-redhat-linux/11 diff --git a/packages/conan/settings/profiles/vfx2019 b/packages/conan/settings/profiles_aswftesting/vfx2019 similarity index 66% rename from packages/conan/settings/profiles/vfx2019 rename to packages/conan/settings/profiles_aswftesting/vfx2019 index 15be9864..5b67628d 100644 --- a/packages/conan/settings/profiles/vfx2019 +++ b/packages/conan/settings/profiles_aswftesting/vfx2019 @@ -3,5 +3,5 @@ include(ci_common1) [settings] python=2.7 [options] -[build_requires] -[env] +[tool_requires] +[buildenv] diff --git a/packages/conan/settings/profiles/vfx2020 b/packages/conan/settings/profiles_aswftesting/vfx2020 similarity index 66% rename from packages/conan/settings/profiles/vfx2020 rename to packages/conan/settings/profiles_aswftesting/vfx2020 index 2eecaca0..e8467f75 100644 --- a/packages/conan/settings/profiles/vfx2020 +++ b/packages/conan/settings/profiles_aswftesting/vfx2020 @@ -3,5 +3,5 @@ include(ci_common1) [settings] python=3.7 [options] -[build_requires] -[env] +[tool_requires] +[buildenv] diff --git a/packages/conan/settings/profiles/vfx2021 b/packages/conan/settings/profiles_aswftesting/vfx2021 similarity index 66% rename from packages/conan/settings/profiles/vfx2021 rename to packages/conan/settings/profiles_aswftesting/vfx2021 index 779dba71..d4b86f4e 100644 --- a/packages/conan/settings/profiles/vfx2021 +++ b/packages/conan/settings/profiles_aswftesting/vfx2021 @@ -3,5 +3,5 @@ include(ci_common2) [settings] python=3.7 [options] -[build_requires] -[env] +[tool_requires] +[buildenv] diff --git a/packages/conan/settings/profiles/vfx2022 b/packages/conan/settings/profiles_aswftesting/vfx2022 similarity index 66% rename from packages/conan/settings/profiles/vfx2022 rename to packages/conan/settings/profiles_aswftesting/vfx2022 index b52de271..f79e9d76 100644 --- a/packages/conan/settings/profiles/vfx2022 +++ b/packages/conan/settings/profiles_aswftesting/vfx2022 @@ -3,5 +3,5 @@ include(ci_common2) [settings] python=3.9 [options] -[build_requires] -[env] +[tool_requires] +[buildenv] diff --git a/packages/conan/settings/profiles_aswftesting/vfx2023 b/packages/conan/settings/profiles_aswftesting/vfx2023 new file mode 100644 index 00000000..2fbe3172 --- /dev/null +++ b/packages/conan/settings/profiles_aswftesting/vfx2023 @@ -0,0 +1,10 @@ +include(ci_common3) + +[settings] +python=3.10 +[options] +[tool_requires] +[platform_requires] +bzip2/1.0.6 +zlib/1.2.11 +[buildenv] diff --git a/packages/conan/settings/profiles_aswftesting/vfx2024 b/packages/conan/settings/profiles_aswftesting/vfx2024 new file mode 100644 index 00000000..b588b08f --- /dev/null +++ b/packages/conan/settings/profiles_aswftesting/vfx2024 @@ -0,0 +1,106 @@ +include(ci_common4) + +[settings] +[options] +# Build everything as shared libs by default +*:shared=True +[tool_requires] +[replace_requires] +b2/*: b2/5.2.1@aswftesting/vfx2024 +boost/*: boost/1.82.0@aswftesting/vfx2024 +brotli/*: brotli/system@aswftesting/vfx2024 +bzip2/*: bzip2/1.0.8@aswftesting/vfx2024 +dbus/*: dbus/system@aswftesting/vfx2024 +double-conversion/*: double-conversion/system@aswftesting/vfx2024 +expat/*: expat/2.6.4@aswftesting/vfx2024 +fmt/*: fmt/11.1.4@aswftesting/vfx2024 +fontconfig/*: fontconfig/system@aswftesting/vfx2024 +freetype/*: freetype/2.13.2@aswftesting/vfx2024 +gdbm/*: gdbm/system@aswftesting/vfx2024 +giflib/*: giflib/5.1.4@aswftesting/vfx2024 +glew/*: glrew/2.1.0@aswftesting/vfx2024 +glib/*: glib/2.78.3@aswftesting/vfx2024 +highway/*: highway/1.2.0@aswftesting/vfx2024 +icu/*: icu/system@aswftesting/vfx2024 +imath/*: imath/3.1.12@aswftesting/vfx2024 +lcms/*: lcms/2.16@aswftesting/vfx2024 +libalsa/*: libalsa/system@aswftesting/vfx2024 +libaom-av1/*: libaom-av1/system@aswftesting/vfx2024 +libbacktrace/*: libbacktrace/cci.20210118@aswftesting/vfx2024 +libdeflate/*: libdeflate/1.23@aswftesting/vfx2024 +libdrm/*: libdrm/system@aswftesting/vfx2024 +libffi/*: libffi/system@aswftesting/vfx2024 +libiconv/*: libiconv/1.17@aswftesting/vfx2024 +libjpeg-turbo/*: libjpeg-turbo/3.0.4@aswftesting/vfx2024 +libjxl/*: libjxl/0.11.1@aswftesting/vfx2024 +libmp3lame/*: libmp3lame/system@aswftesting/vfx2024 +libpng/*: libpng/1.6.34@aswftesting/vfx2024 +libsndfile/*: libsndfile/system@aswftesting/vfx2024 +libsquish/*: libsquish/system@aswftesting/vfx2024 +libsvtav1/*: libsvtav1/system@aswftesting/vfx2024 +libtiff/*: libtiff/4.0.9@aswftesting/vfx2024 +libxcrypt/*: libxcrypt/4.4.36@aswftesting/vfx2024 +libuhdr/*: libuhdr/1.4.0@aswftesting/vfx2024 +libvpx/*: libvpx/system@aswftesting/vfx2024 +libwebp/*: libwebp/1.5.0@aswftesting/vfx2024 +libxshmfence/*: libxshmfence/system@aswftesting/vfx2024 +lz4/*: lz4/1.10.0@aswftesting/vfx2024 +md4c/*: md4c/0.4.8@aswftesting/vfx2024 +minizip-ng/*: minizip/4.0.8@aswftesting/vfx2024 +mpdecimal/*: mpdecimal/system@aswftesting/vfx2024 +mpg123/*: mpg123/system@aswftesting/vfx2024 +nasm/*: nasm/system@aswftesting/vfx2024 +nspr/*: nspr/system@aswftesting/vfx2024 +nss/*: nss/3.93@aswftesting/vfx2024 +ocio/*: ocio/2.3.2@aswftesting/vfx2024 +oiio/*: oiio/2.5.18.0@aswftesting/vfx2024 +ogg/*: ogg/system@aswftesting/vfx2024 +openal-soft/*: openal-soft/system@aswftesting/vfx2024 +openexr/*: openexr/3.2.4@aswftesting/vfx2024 +opengl/*: opengl/system@aswftesting/vfx2024 +openjpeg/*: openjpeg/2.4.0@aswftesting/vfx2024 +openssl/*: openssl/system@aswftesting/vfx2024 +opus/*: opus/system@aswftesting/vfx2024 +pcre2/*: pcre2/system@aswftesting/vfx2024 +ptex/*: ptex/2.4.2@aswftesting/vfx2024 +pugixml/*: pugixml/1.14@aswftesting/vfx2024 +pulseaudio/*: pulseaudio/system@aswftesting/vfx2024 +pystring/*: pystring/1.1.4@aswftesting/vfx2024 +sqlite3/*: sqlite3/system@aswftesting/vfx2024 +tcl/*: tcl/system@aswftesting/vfx2024 +tk/*: tk/system@aswftesting/vfx2024 +tsl-robin-map/*: tsl-robin-map/1.3.0@aswftesting/vfx2024 +util-linux-libuuid/*: util-linux-libuuid/system@aswftesting/vfx2024 +vorbis/*: vorbis/system@aswftesting/vfx2024 +vulkan-headers/*: vulkan-headers/system@aswftesting/vfx2024 +vulkan-loader/*: vulkan-loader/system@aswftesting/vfx2024 +xkbcommon/*: xkbcommon/0.9.1@aswftesting/vfx2024 +xorg/*: xorg/system@aswftesting/vfx2024 +xorg-proto/*: xorg-proto/system@aswftesting/vfx2024 +xz_utils/*: xz_utiles/system@aswftesting/vfx2024 +yaml-cpp/*: yaml-cpp/0.8.0@aswftesting/vfx2024 +zlib/*: zlib/1.3.1@aswftesting/vfx2024 +zstd/*: zstd/1.5.6@aswftesting/vfx2024 +[replace_tool_requires] +bison/*: bison/3.0.4@system +flex/*: flex/2.6.1@system +gperf/*: gperf/3.1@system +libtool/*: libtool/2.4.6@system +mesno/*: meson/0.58.2@system +ninja/*: ninja/1.12.1@aswftesting/ci_common5 +nodesj/*: nodejs/18.20.4@system +pkgconf/*: pkgconf/1.4.2@system +wayland/*: wayland/1.21.0@system +wayland-protocols/*: wayland-protocols/1.25@system +[platform_requires] +[platform_tool_requires] +bison/3.0.4 +flex/2.6.1 +gperf/3.1 +libtool/2.4.6 +meson/0.58.2 +nodejs/18.20.4 +pkgconf/1.4.2 +wayland/1.21.0 +wayland-protocols/1.25 +[buildenv] diff --git a/packages/conan/settings/profiles_aswftesting/vfx2025 b/packages/conan/settings/profiles_aswftesting/vfx2025 new file mode 100644 index 00000000..dbd0d207 --- /dev/null +++ b/packages/conan/settings/profiles_aswftesting/vfx2025 @@ -0,0 +1,106 @@ +include(ci_common5) + +[settings] +[options] +# Build everything as shared libs by default +*:shared=True +[tool_requires] +[replace_requires] +b2/*: b2/5.2.1@aswftesting/vfx2025 +boost/*: boost/1.85.0@aswftesting/vfx2025 +brotli/*: brotli/system@aswftesting/vfx2025 +bzip2/*: bzip2/1.0.8@aswftesting/vfx2025 +dbus/*: dbus/system@aswftesting/vfx2025 +double-conversion/*: double-conversion/system@aswftesting/vfx2025 +expat/*: expat/2.6.4@aswftesting/vfx2025 +fmt/*: fmt/11.1.4@aswftesting/vfx2025 +fontconfig/*: fontconfig/system@aswftesting/vfx2025 +freetype/*: freetype/2.13.2@aswftesting/vfx2025 +gdbm/*: gdbm/system@aswftesting/vfx2025 +giflib/*: giflib/5.1.4@aswftesting/vfx2025 +glew/*: glew/2.2.0@aswftesting/vfx2025 +glib/*: glib/2.78.3@aswftesting/vfx2025 +highway/*: highway/1.2.0@aswftesting/vfx2025 +icu/*: icu/system@aswftesting/vfx2025 +imath/*: imath/3.1.12@aswftesting/vfx2025 +lcms/*: lcms/2.16@aswftesting/vfx2025 +libalsa/*: libalsa/system@aswftesting/vfx2025 +libaom-av1/*: libaom-av1/system@aswftesting/vfx2025 +libbacktrace/*: libbacktrace/cci.20210118@aswftesting/vfx2025 +libdeflate/*: libdeflate/1.23@aswftesting/vfx2025 +libdrm/*: libdrm/system@aswftesting/vfx2025 +libffi/*: libffi/system@aswftesting/vfx2025 +libiconv/*: libiconv/1.17@aswftesting/vfx2025 +libjpeg-turbo/*: libjpeg-turbo/3.0.4@aswftesting/vfx2025 +libjxl/*: libjxl/0.11.1@aswftesting/vfx2025 +libmp3lame/*: libmp3lame/system@aswftesting/vfx2025 +libpng/*: libpng/1.6.34@aswftesting/vfx2025 +libsndfile/*: libsndfile/system@aswftesting/vfx2025 +libsquish/*: libsquish/system@aswftesting/vfx2025 +libsvtav1/*: libsvtav1/system@aswftesting/vfx2025 +libtiff/*: libtiff/4.0.9@aswftesting/vfx2025 +libuhdr/*: libuhdr/1.4.0@aswftesting/vfx2025 +libvpx/*: libvpx/system@aswftesting/vfx2025 +libwebp/*: libwebp/1.5.0@aswftesting/vfx2025 +libxcrypt/*: libxcrypt/4.4.36@aswftesting/vfx2025 +libxshmfence/*: libxshmfence/system@aswftesting/vfx2025 +lz4/*: lz4/1.10.0@aswftesting/vfx2025 +md4c/*: md4c/0.4.8@aswftesting/vfx2025 +minizip-ng/*: minizip-ng/4.0.8@aswftesting/vfx2025 +mpdecimal/*: mpdecimal/system@aswftesting/vfx2025 +mpg123/*: mpg123/system@aswftesting/vfx2025 +nasm/*: nasm/system@aswftesting/vfx2025 +nspr/*: nspr/system@aswftesting/vfx2025 +nss/*: nss/3.93@aswftesting/vfx2025 +ocio/*: ocio/2.4.2@aswftesting/vfx2025 +oiio/*: oiio/3.0.5.0@aswftesting/vfx2025 +ogg/*: ogg/system@aswftesting/vfx2025 +openal-soft/*: openal-soft/system@aswftesting/vfx2025 +openexr/*: openexr/3.3.3@aswftesting/vfx2025 +opengl/*: opengl/system@aswftesting/vfx2025 +openjpeg/*: openjpeg/2.4.0@aswftesting/vfx2025 +openssl/*: openssl/system@aswftesting/vfx2025 +opus/*: opus/system@aswftesting/vfx2025 +pcre2/*: pcre2/system@aswftesting/vfx2025 +ptex/*: ptex/2.4.3@aswftesting/vfx2025 +pugixml/*: pugixml/1.14@aswftesting/vfx2025 +pulseaudio/*: pulseaudio/system@aswftesting/vfx2025 +pystring/*: pystring/1.1.4@aswftesting/vfx2025 +sqlite3/*: sqlite3/system@aswftesting/vfx2025 +tcl/*: tcl/system@aswftesting/vfx2025 +tk/*: tk/system@aswftesting/vfx2025 +tsl-robin-map/*: tsl-robin-map/1.3.0@aswftesting/vfx2025 +util-linux-libuuid/*: util-linux-libuuid/system@aswftesting/vfx2025 +vorbis/*: vorbis/system@aswftesting/vfx2025 +vulkan-headers/*: vulkan-headers/system@aswftesting/vfx2025 +vulkan-loader/*: vulkan-loader/system@aswftesting/vfx2025 +xkbcommon/*: xkbcommon/0.9.1@aswftesting/vfx2025 +xorg/*: xorg/system@aswftesting/vfx2025 +xorg-proto/*: xorg-proto/system@aswftesting/vfx2025 +xz_utils/*: xz_utils/system@aswftesting/vfx2025 +yaml-cpp/*: yaml-cpp/0.8.0@aswftesting/vfx2025 +zlib/*: zlib/1.3.1@aswftesting/vfx2025 +zstd/*: zstd/1.5.6@aswftesting/vfx2025 +[replace_tool_requires] +bison/*: bison/3.0.4@system +flex/*: flex/2.6.1@system +gperf/*: gperf/3.1@system +libtool/*: libtool/2.4.6@system +meson/*: meson/0.58.2@system +ninja/*: ninja/1.12.1@aswftesting/ci_common5 +nodejs/*: nodejs/18.20.4@system +pkgconf/*: pkgconf/1.4.2@system +wayland/*: wayland/1.21.0@system +wayland-protocols/*: wayland-protocols/1.25@system +[platform_requires] +[platform_tool_requires] +bison/3.0.4 +flex/2.6.1 +gperf/3.1 +libtool/2.4.6 +meson/0.58.2 +nodejs/18.20.4 +pkgconf/1.4.2 +wayland/1.21.0 +wayland-protocols/1.25 +[buildenv] diff --git a/packages/conan/settings/remotes.json b/packages/conan/settings/remotes.json index d8775ca8..3e7ad599 100644 --- a/packages/conan/settings/remotes.json +++ b/packages/conan/settings/remotes.json @@ -7,7 +7,7 @@ }, { "name": "conan-central", - "url": "https://center.conan.io", + "url": "https://center2.conan.io", "verify_ssl": true }, { @@ -16,4 +16,4 @@ "verify_ssl": true } ] -} \ No newline at end of file +} diff --git a/packages/conan/settings/settings.yml b/packages/conan/settings/settings.yml index 50b9fb3a..f09befbd 100644 --- a/packages/conan/settings/settings.yml +++ b/packages/conan/settings/settings.yml @@ -1,157 +1,151 @@ - -# Only for cross building, 'os_build/arch_build' is the system that runs Conan -os_build: [Windows, WindowsStore, Linux, Macos, FreeBSD, SunOS, AIX, VxWorks] -arch_build: [x86, x86_64, ppc32be, ppc32, ppc64le, ppc64, armv5el, armv5hf, armv6, armv7, armv7hf, armv7s, armv7k, armv8, armv8_32, armv8.3, sparc, sparcv9, mips, mips64, avr, s390, s390x, sh4le, e2k-v2, e2k-v3, e2k-v4, e2k-v5, e2k-v6, e2k-v7] - -# Only for building cross compilation tools, 'os_target/arch_target' is the system for -# which the tools generate code -os_target: [Windows, Linux, Macos, Android, iOS, watchOS, tvOS, FreeBSD, SunOS, AIX, Arduino, Neutrino] -arch_target: [x86, x86_64, ppc32be, ppc32, ppc64le, ppc64, armv5el, armv5hf, armv6, armv7, armv7hf, armv7s, armv7k, armv8, armv8_32, armv8.3, sparc, sparcv9, mips, mips64, avr, s390, s390x, asm.js, wasm, sh4le, e2k-v2, e2k-v3, e2k-v4, e2k-v5, e2k-v6, e2k-v7, xtensalx6, xtensalx106, xtensalx7] - -# Rest of the settings are "host" settings: -# - For native building/cross building: Where the library/program will run. -# - For building cross compilation tools: Where the cross compiler will run. +# This file was generated by Conan. Remove this comment if you edit this file or Conan +# will destroy your changes. os: Windows: - subsystem: [None, cygwin, msys, msys2, wsl] + subsystem: [null, cygwin, msys, msys2, wsl] WindowsStore: version: ["8.1", "10.0"] WindowsCE: - platform: ANY + platform: [ANY] version: ["5.0", "6.0", "7.0", "8.0"] Linux: - version: [None, rhel7, rhel8] iOS: version: &ios_version - ["7.0", "7.1", "8.0", "8.1", "8.2", "8.3", "9.0", "9.1", "9.2", "9.3", "10.0", "10.1", "10.2", "10.3", - "11.0", "11.1", "11.2", "11.3", "11.4", "12.0", "12.1", "12.2", "12.3", "12.4", - "13.0", "13.1", "13.2", "13.3", "13.4", "13.5", "13.6", "13.7", - "14.0", "14.1", "14.2", "14.3", "14.4", "14.5", "14.6", "14.7", "14.8", - "15.0", "15.1", "15.2", "15.3", "15.4", "15.5", "15.6", "16.0", "16.1"] - sdk: [None, "iphoneos", "iphonesimulator"] - sdk_version: [None, "11.3", "11.4", "12.0", "12.1", "12.2", "12.4", - "13.0", "13.1", "13.2", "13.4", "13.5", "13.6", "13.7", - "14.0", "14.1", "14.2", "14.3", "14.4", "14.5", "15.0", "15.2", "15.4", "15.5", "16.0", "16.1"] + ["7.0", "7.1", "8.0", "8.1", "8.2", "8.3", "9.0", "9.1", "9.2", "9.3", "10.0", "10.1", "10.2", "10.3", + "11.0", "11.1", "11.2", "11.3", "11.4", "12.0", "12.1", "12.2", "12.3", "12.4", + "13.0", "13.1", "13.2", "13.3", "13.4", "13.5", "13.6", "13.7", + "14.0", "14.1", "14.2", "14.3", "14.4", "14.5", "14.6", "14.7", "14.8", + "15.0", "15.1", "15.2", "15.3", "15.4", "15.5", "15.6", "16.0", "16.1", + "16.2", "16.3", "16.4", "16.5", "16.6", "17.0", "17.1", "17.2", "17.3", "17.4", "17.5", + "18.0", "18.1"] + sdk: ["iphoneos", "iphonesimulator"] + sdk_version: [null, "11.3", "11.4", "12.0", "12.1", "12.2", "12.4", + "13.0", "13.1", "13.2", "13.4", "13.5", "13.6", "13.7", + "14.0", "14.1", "14.2", "14.3", "14.4", "14.5", "15.0", "15.2", "15.4", + "15.5", "16.0", "16.1", "16.2", "16.4", "17.0", "17.1", "17.2", "17.4", "17.5", + "18.0", "18.1"] watchOS: version: ["4.0", "4.1", "4.2", "4.3", "5.0", "5.1", "5.2", "5.3", "6.0", "6.1", "6.2", - "7.0", "7.1", "7.2", "7.3", "7.4", "7.5", "7.6", "8.0", "8.1", "8.3", "8.4", "8.5", "8.6", "8.7", "9.0", "9.1"] - sdk: [None, "watchos", "watchsimulator"] - sdk_version: [None, "4.3", "5.0", "5.1", "5.2", "5.3", "6.0", "6.1", "6.2", - "7.0", "7.1", "7.2", "7.4", "8.0", "8.0.1", "8.3", "8.5", "9.0", "9.1"] + "7.0", "7.1", "7.2", "7.3", "7.4", "7.5", "7.6", "8.0", "8.1", "8.3", "8.4", + "8.5", "8.6", "8.7", "9.0", "9.1", "9.2", "9.3", "9.4", "9.5", "9.6", + "10.0", "10.1", "10.2", "10.3", "10.4", "10.5", "11.0", "11.1"] + sdk: ["watchos", "watchsimulator"] + sdk_version: [null, "4.3", "5.0", "5.1", "5.2", "5.3", "6.0", "6.1", "6.2", + "7.0", "7.1", "7.2", "7.4", "8.0", "8.0.1", "8.3", "8.5", "9.0", "9.1", + "9.4", "10.0", "10.1", "10.2", "10.4", "10.5", "11.0", "11.1"] tvOS: version: ["11.0", "11.1", "11.2", "11.3", "11.4", "12.0", "12.1", "12.2", "12.3", "12.4", - "13.0", "13.2", "13.3", "13.4", "14.0", "14.2", "14.3", "14.4", "14.5", "14.6", "14.7", - "15.0", "15.1", "15.2", "15.3", "15.4", "15.5", "15.6", "16.0", "16.1"] - sdk: [None, "appletvos", "appletvsimulator"] - sdk_version: [None, "11.3", "11.4", "12.0", "12.1", "12.2", "12.4", - "13.0", "13.1", "13.2", "13.4", "14.0", "14.2", "14.3", "14.5", "15.0", "15.2", "15.4", "16.0", "16.1"] + "13.0", "13.2", "13.3", "13.4", "14.0", "14.2", "14.3", "14.4", "14.5", + "14.6", "14.7", "15.0", "15.1", "15.2", "15.3", "15.4", "15.5", "15.6", + "16.0", "16.1", "16.2", "16.3", "16.4", "16.5", "16.6", "17.0", "17.1", "17.2", "17.3", "17.4", + "17.5", "18.0", "18.1"] + sdk: ["appletvos", "appletvsimulator"] + sdk_version: [null, "11.3", "11.4", "12.0", "12.1", "12.2", "12.4", + "13.0", "13.1", "13.2", "13.4", "14.0", "14.2", "14.3", "14.5", "15.0", + "15.2", "15.4", "16.0", "16.1", "16.4", "17.0", "17.1", "17.2", "17.4", "17.5", + "18.0", "18.1"] + visionOS: + version: ["1.0", "1.1", "1.2", "2.0", "2.1"] + sdk: ["xros", "xrsimulator"] + sdk_version: [null, "1.0", "1.1", "1.2", "2.0", "2.1"] Macos: - version: [None, "10.6", "10.7", "10.8", "10.9", "10.10", "10.11", "10.12", "10.13", "10.14", "10.15", "11.0", "12.0", "13.0"] - sdk: [None, "macosx"] - sdk_version: [None, "10.13", "10.14", "10.15", "11.0", "11.1", "11.3", "12.0", "12.1", "12.3", "13.0", "13.1"] + version: [null, "10.6", "10.7", "10.8", "10.9", "10.10", "10.11", "10.12", "10.13", "10.14", "10.15", + "11.0", "11.1", "11.2", "11.3", "11.4", "11.5", "11.6", "11.7", + "12.0", "12.1", "12.2", "12.3", "12.4", "12.5", "12.6", "12.7", + "13.0", "13.1", "13.2", "13.3", "13.4", "13.5", "13.6", + "14.0", "14.1", "14.2", "14.3", "14.4", "14.5", "14.6", + "15.0", "15.1"] + sdk_version: [null, "10.13", "10.14", "10.15", "11.0", "11.1", "11.3", "12.0", "12.1", + "12.3", "13.0", "13.1", "13.3", "14.0", "14.2", "14.4", "14.5", + "15.0", "15.1"] subsystem: - None: + null: catalyst: ios_version: *ios_version Android: - api_level: ANY + api_level: [ANY] + ndk_version: [null, ANY] FreeBSD: SunOS: AIX: Arduino: - board: ANY + board: [ANY] Emscripten: Neutrino: version: ["6.4", "6.5", "6.6", "7.0", "7.1"] baremetal: VxWorks: version: ["7"] -arch: [x86, x86_64, ppc32be, ppc32, ppc64le, ppc64, armv4, armv4i, armv5el, armv5hf, armv6, armv7, armv7hf, armv7s, armv7k, armv8, armv8_32, armv8.3, sparc, sparcv9, mips, mips64, avr, s390, s390x, asm.js, wasm, sh4le, e2k-v2, e2k-v3, e2k-v4, e2k-v5, e2k-v6, e2k-v7, xtensalx6, xtensalx106, xtensalx7] +arch: [x86, x86_64, ppc32be, ppc32, ppc64le, ppc64, + armv4, armv4i, armv5el, armv5hf, armv6, armv7, armv7hf, armv7s, armv7k, armv8, armv8_32, armv8.3, arm64ec, + sparc, sparcv9, + mips, mips64, avr, s390, s390x, asm.js, wasm, sh4le, + e2k-v2, e2k-v3, e2k-v4, e2k-v5, e2k-v6, e2k-v7, + riscv64, riscv32, + xtensalx6, xtensalx106, xtensalx7, + tc131, tc16, tc161, tc162, tc18] compiler: sun-cc: version: ["5.10", "5.11", "5.12", "5.13", "5.14", "5.15"] - threads: [None, posix] + threads: [null, posix] libcxx: [libCstd, libstdcxx, libstlport, libstdc++] - gcc: &gcc + gcc: version: ["4.1", "4.4", "4.5", "4.6", "4.7", "4.8", "4.9", - "5", "5.1", "5.2", "5.3", "5.4", "5.5", - "6", "6.1", "6.2", "6.3", "6.4", "6.5", - "7", "7.1", "7.2", "7.3", "7.4", "7.5", - "8", "8.1", "8.2", "8.3", "8.4", "8.5", - "9", "9.1", "9.2", "9.3", "9.4", "9.5", - "10", "10.1", "10.2", "10.3", "10.4", - "11", "11.1", "11.2", "11.3", - "12", "12.1", "12.2", "12.3", - "13", "13.1"] + "5", "5.1", "5.2", "5.3", "5.4", "5.5", + "6", "6.1", "6.2", "6.3", "6.4", "6.5", + "7", "7.1", "7.2", "7.3", "7.4", "7.5", + "8", "8.1", "8.2", "8.3", "8.4", "8.5", + "9", "9.1", "9.2", "9.3", "9.4", "9.5", + "10", "10.1", "10.2", "10.3", "10.4", "10.5", + "11", "11.1", "11.2", "11.3", "11.4", + "12", "12.1", "12.2", "12.3", "12.4", + "13", "13.1", "13.2", "13.3", + "14", "14.1", "14.2"] libcxx: [libstdc++, libstdc++11] - threads: [None, posix, win32] # Windows MinGW - exception: [None, dwarf2, sjlj, seh] # Windows MinGW - cppstd: [None, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20, 23, gnu23] - Visual Studio: &visual_studio - runtime: [MD, MT, MTd, MDd] - version: ["8", "9", "10", "11", "12", "14", "15", "16", "17"] - toolset: [None, v90, v100, v110, v110_xp, v120, v120_xp, - v140, v140_xp, v140_clang_c2, LLVM-vs2012, LLVM-vs2012_xp, - LLVM-vs2013, LLVM-vs2013_xp, LLVM-vs2014, LLVM-vs2014_xp, - LLVM-vs2017, LLVM-vs2017_xp, v141, v141_xp, v141_clang_c2, v142, - llvm, ClangCL, v143] - cppstd: [None, 14, 17, 20, 23] + threads: [null, posix, win32] # Windows MinGW + exception: [null, dwarf2, sjlj, seh] # Windows MinGW + cppstd: [null, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20, 23, gnu23] + cstd: [null, 99, gnu99, 11, gnu11, 17, gnu17, 23, gnu23] msvc: - version: [170, 180, 190, 191, 192, 193] - update: [None, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + version: [170, 180, 190, 191, 192, 193, 194] + update: [null, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] runtime: [static, dynamic] runtime_type: [Debug, Release] - cppstd: [98, 14, 17, 20, 23] - toolset: [None, v110_xp, v120_xp, v140_xp, v141_xp] + cppstd: [null, 14, 17, 20, 23] + toolset: [null, v110_xp, v120_xp, v140_xp, v141_xp] + cstd: [null, 11, 17] clang: version: ["3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "4.0", "5.0", "6.0", "7.0", "7.1", - "8", "9", "10", "11", "12", "13", "14", "15", "16"] - libcxx: [None, libstdc++, libstdc++11, libc++, c++_shared, c++_static] - cppstd: [None, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20, 23, gnu23] - runtime: [None, MD, MT, MTd, MDd, static, dynamic] - runtime_type: [None, Debug, Release] - runtime_version: [None, v140, v141, v142, v143] - apple-clang: &apple_clang - version: ["5.0", "5.1", "6.0", "6.1", "7.0", "7.3", "8.0", "8.1", "9.0", "9.1", "10.0", "11.0", "12.0", "13", "13.0", "13.1", "14", "14.0"] + "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"] + libcxx: [null, libstdc++, libstdc++11, libc++, c++_shared, c++_static] + cppstd: [null, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20, 23, gnu23] + runtime: [null, static, dynamic] + runtime_type: [null, Debug, Release] + runtime_version: [null, v140, v141, v142, v143, v144] + cstd: [null, 99, gnu99, 11, gnu11, 17, gnu17, 23, gnu23] + apple-clang: + version: ["5.0", "5.1", "6.0", "6.1", "7.0", "7.3", "8.0", "8.1", "9.0", "9.1", + "10.0", "11.0", "12.0", "13", "13.0", "13.1", "14", "14.0", "15", "15.0", "16", "16.0"] libcxx: [libstdc++, libc++] - cppstd: [None, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20, 23, gnu23] - intel: - version: ["11", "12", "13", "14", "15", "16", "17", "18", "19", "19.1"] - update: [None, ANY] - base: - gcc: - <<: *gcc - threads: [None] - exception: [None] - Visual Studio: - <<: *visual_studio - apple-clang: - <<: *apple_clang + cppstd: [null, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20, 23, gnu23] + cstd: [null, 99, gnu99, 11, gnu11, 17, gnu17, 23, gnu23] intel-cc: - version: ["2021.1", "2021.2", "2021.3"] - update: [None, ANY] + version: ["2021.1", "2021.2", "2021.3", "2021.4", "2022.1", "2022.2", + "2022.3", "2023.0", "2023.1", "2023.2", "2024.0",] + update: [null, ANY] mode: ["icx", "classic", "dpcpp"] - libcxx: [None, libstdc++, libstdc++11, libc++] - cppstd: [None, 98, gnu98, 03, gnu03, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20, 23, gnu23] - runtime: [None, static, dynamic] - runtime_type: [None, Debug, Release] + libcxx: [null, libstdc++, libstdc++11, libc++] + cppstd: [null, 98, gnu98, "03", gnu03, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20, 23, gnu23] + runtime: [null, static, dynamic] + runtime_type: [null, Debug, Release] qcc: version: ["4.4", "5.4", "8.3"] libcxx: [cxx, gpp, cpp, cpp-ne, accp, acpp-ne, ecpp, ecpp-ne] - cppstd: [None, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17] + cppstd: [null, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17] mcst-lcc: version: ["1.19", "1.20", "1.21", "1.22", "1.23", "1.24", "1.25"] - base: - gcc: - <<: *gcc - threads: [None] - exceptions: [None] - -build_type: [None, Debug, Release, RelWithDebInfo, MinSizeRel] - - -cppstd: [None, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20, 23, gnu23] # Deprecated, use compiler.cppstd + libcxx: [libstdc++, libstdc++11] + cppstd: [null, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20, 23, gnu23] -# ASWF-specific settings -python: [None, "2.7", "3.7", "3.9", "3.10", "3.11"] +build_type: [null, Debug, Release, RelWithDebInfo, MinSizeRel] diff --git a/packages/conan/settings/version.txt b/packages/conan/settings/version.txt index 7cc6ef41..834f2629 100644 --- a/packages/conan/settings/version.txt +++ b/packages/conan/settings/version.txt @@ -1 +1 @@ -1.63.0 \ No newline at end of file +2.8.0 diff --git a/packages/review/Dockerfile b/packages/review/Dockerfile index 2699f50a..6d66c822 100644 --- a/packages/review/Dockerfile +++ b/packages/review/Dockerfile @@ -17,7 +17,7 @@ ARG ASWF_GLEW_VERSION ARG ASWF_GLFW_VERSION ARG ASWF_PYBIND11_VERSION ARG ASWF_NUMPY_VERSION -ARG ASWF_PYTHON_VERSION +ARG ASWF_CPYTHON_VERSION ARG ASWF_PYTHON_MAJOR_MINOR_VERSION ARG ASWF_TBB_VERSION @@ -43,7 +43,7 @@ FROM ${ASWF_ORG}/ci-package-ocio:${ASWF_VFXPLATFORM_VERSION}-${ASWF_OCIO_VERSION FROM ${ASWF_ORG}/ci-common:${CI_COMMON_VERSION}-clang${ASWF_CLANG_MAJOR_VERSION} AS ci-base-builder ARG ASWF_CMAKE_VERSION -ARG ASWF_PYTHON_VERSION +ARG ASWF_CPYTHON_VERSION ARG ASWF_PYTHON_MAJOR_MINOR_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_BOOST_VERSION @@ -53,7 +53,7 @@ ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION ENV ASWF_CMAKE_VERSION=${ASWF_CMAKE_VERSION} -ENV ASWF_PYTHON_VERSION=${ASWF_PYTHON_VERSION} +ENV ASWF_CPYTHON_VERSION=${ASWF_CPYTHON_VERSION} ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=${ASWF_PYTHON_MAJOR_MINOR_VERSION} ENV ASWF_NUMPY_VERSION=${ASWF_NUMPY_VERSION} ENV ASWF_BOOST_VERSION=${ASWF_BOOST_VERSION} @@ -69,13 +69,13 @@ COPY < . [requires] cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -python/${ASWF_PYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cpython/${ASWF_CPYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} COPY ../scripts/common/before_build.sh \ @@ -131,7 +131,7 @@ openexr/${ASWF_OPENEXR_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} # Qt files are under /tmp/qttemp because OpenRV compiles its own PySide2 and it @@ -147,7 +147,7 @@ qt/${ASWF_QT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /tmp/qttemp vfx${ASWF_VFXPLATFORM_VERSION} RUN --mount=type=cache,target=/tmp/ccache \ diff --git a/packages/vfx1/Dockerfile b/packages/vfx1/Dockerfile index a41aff2a..b7bf2a05 100644 --- a/packages/vfx1/Dockerfile +++ b/packages/vfx1/Dockerfile @@ -13,7 +13,7 @@ ARG ASWF_CMAKE_VERSION ARG ASWF_CPPUNIT_VERSION ARG ASWF_GLEW_VERSION ARG ASWF_GLFW_VERSION -ARG ASWF_PYTHON_VERSION +ARG ASWF_CPYTHON_VERSION ARG ASWF_PYTHON_MAJOR_MINOR_VERSION ARG ASWF_TBB_VERSION ARG ASWF_PYBIND11_VERSION @@ -30,7 +30,7 @@ ARG ASWF_OPENEXR_VERSION FROM ${ASWF_ORG}/ci-common:${CI_COMMON_VERSION}-clang${ASWF_CLANG_MAJOR_VERSION} AS ci-base-builder ARG ASWF_CMAKE_VERSION -ARG ASWF_PYTHON_VERSION +ARG ASWF_CPYTHON_VERSION ARG ASWF_PYTHON_MAJOR_MINOR_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_BOOST_VERSION @@ -41,7 +41,7 @@ ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION ENV ASWF_CMAKE_VERSION=${ASWF_CMAKE_VERSION} -ENV ASWF_PYTHON_VERSION=${ASWF_PYTHON_VERSION} +ENV ASWF_CPYTHON_VERSION=${ASWF_CPYTHON_VERSION} ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=${ASWF_PYTHON_MAJOR_MINOR_VERSION} ENV ASWF_NUMPY_VERSION=${ASWF_NUMPY_VERSION} ENV ASWF_BOOST_VERSION=${ASWF_BOOST_VERSION} @@ -57,15 +57,14 @@ COPY < . [requires] -cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -python/${ASWF_PYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cpython/${ASWF_CPYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} pybind11/${ASWF_PYBIND11_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} COPY ../scripts/common/before_build.sh \ @@ -203,12 +202,13 @@ cppunit/${ASWF_CPPUNIT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} expat/${ASWF_EXPAT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} glew/${ASWF_GLEW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} glfw/${ASWF_GLFW_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +imath/${ASWF_IMATH_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} qt/${ASWF_QT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} @@ -247,117 +247,3 @@ LABEL io.aswf.docker.versions.openvdb="${ASWF_OPENVDB_VERSION}" COPY --from=ci-openvdb-builder /package/. / - - -#################### ci-ocio-builder #################### -FROM ci-openvdb-builder AS ci-ocio-builder - -ARG ASWF_OCIO_VERSION -ENV ASWF_OCIO_VERSION=${ASWF_OCIO_VERSION} -ARG ASWF_OCIO_CONFIGS_VERSION -ENV ASWF_OCIO_CONFIGS_VERSION=${ASWF_OCIO_CONFIGS_VERSION} - -COPY ../scripts/vfx/build_ocio.sh \ - /tmp/ - -RUN --mount=type=cache,target=/tmp/ccache \ - --mount=type=cache,sharing=private,target=/tmp/downloads \ - /tmp/before_build.sh && \ - /tmp/build_ocio.sh && \ - /tmp/copy_new_files.sh && \ - ccache --show-stats - - -#################### ci-package-ocio #################### -FROM scratch AS ci-package-ocio - -ARG ASWF_ORG -ARG CI_COMMON_VERSION -ARG ASWF_DTS_VERSION -ARG ASWF_DTS_PREFIX -ARG ASWF_OCIO_CONFIGS_VERSION -ARG ASWF_OCIO_VERSION -ARG ASWF_VFXPLATFORM_VERSION - -LABEL org.opencontainers.image.name="$ASWF_ORG/ci-package-ocio" -LABEL org.opencontainers.image.title="OpenColorIO package built for ASWF Docker images" -LABEL org.opencontainers.image.description="OpenColorIO headers and binaries to be installed in ASWF Docker images" -LABEL org.opencontainers.image.authors="Built by aswf.io CI Working Group" -LABEL org.opencontainers.image.vendor="AcademySoftwareFoundation" -LABEL org.opencontainers.image.url="https://github.com/AcademySoftwareFoundation/OpenColorIO" -LABEL org.opencontainers.image.source="https://github.com/AcademySoftwareFoundation/aswf-docker/blob/main/packages/Dockerfile" -LABEL org.opencontainers.image.version="${ASWF_OCIO_VERSION}" -LABEL org.opencontainers.image.licenses="BSD-3-Clause" -LABEL io.aswf.docker.versions.ci-common="${CI_COMMON_VERSION}" -LABEL io.aswf.docker.versions.vfx-platform="${ASWF_VFXPLATFORM_VERSION}" -LABEL io.aswf.docker.versions.dts="${ASWF_DTS_VERSION}" -LABEL io.aswf.docker.versions.ocio="${ASWF_OCIO_VERSION}" -LABEL io.aswf.docker.versions.ocioconfigs="${ASWF_OCIO_CONFIGS_VERSION}" - -COPY --from=ci-ocio-builder /package/. / - -#################### ci-oiio-builder #################### -FROM ci-ocio-builder AS ci-oiio-builder - -ARG ASWF_OIIO_VERSION -ARG ASWF_CXX_STANDARD -ARG ASWF_PTEX_VERSION - -ENV ASWF_OIIO_VERSION=${ASWF_OIIO_VERSION} -ENV ASWF_CXX_STANDARD=${ASWF_CXX_STANDARD} -ENV ASWF_PTEX_VERSION=${ASWF_PTEX_VERSION} - - -COPY ../scripts/vfx/build_oiio.sh \ - /tmp/ - -COPY scripts/common/install_conanpackages.sh /tmp - -# Use conan to install some packages -COPY < . -[requires] -ptex/${ASWF_PTEX_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -EOF - -RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ - /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} - -RUN --mount=type=cache,target=/tmp/ccache \ - --mount=type=cache,sharing=private,target=/tmp/downloads \ - /tmp/before_build.sh && \ - /tmp/build_oiio.sh && \ - /tmp/copy_new_files.sh && \ - ccache --show-stats - - -#################### ci-package-oiio #################### -FROM scratch AS ci-package-oiio - -ARG ASWF_ORG -ARG CI_COMMON_VERSION -ARG ASWF_DTS_VERSION -ARG ASWF_DTS_PREFIX -ARG ASWF_OIIO_VERSION -ARG ASWF_VFXPLATFORM_VERSION - -LABEL org.opencontainers.image.name="$ASWF_ORG/ci-package-oiio" -LABEL org.opencontainers.image.title="OpenImageIO package built for ASWF Docker images" -LABEL org.opencontainers.image.description="OpenImageIO headers and binaries to be installed in ASWF Docker images" -LABEL org.opencontainers.image.authors="Built by aswf.io CI Working Group" -LABEL org.opencontainers.image.vendor="AcademySoftwareFoundation" -LABEL org.opencontainers.image.url="https://github.com/OpenImageIO/oiio" -LABEL org.opencontainers.image.source="https://github.com/AcademySoftwareFoundation/aswf-docker/blob/main/packages/Dockerfile" -LABEL org.opencontainers.image.version="${ASWF_OIIO_VERSION}" -LABEL org.opencontainers.image.licenses="BSD-3-Clause" -LABEL io.aswf.docker.versions.ci-common="${CI_COMMON_VERSION}" -LABEL io.aswf.docker.versions.vfx-platform="${ASWF_VFXPLATFORM_VERSION}" -LABEL io.aswf.docker.versions.dts="${ASWF_DTS_VERSION}" -LABEL io.aswf.docker.versions.oiio="${ASWF_OIIO_VERSION}" - -COPY --from=ci-oiio-builder /package/. / - - diff --git a/packages/vfx2/Dockerfile b/packages/vfx2/Dockerfile index ca816191..4682dbb4 100644 --- a/packages/vfx2/Dockerfile +++ b/packages/vfx2/Dockerfile @@ -13,13 +13,25 @@ ARG ASWF_BOOST_VERSION ARG ASWF_CMAKE_VERSION ARG ASWF_CPPUNIT_VERSION ARG ASWF_EXPAT_VERSION +ARG ASWF_FREETYPE_VERSION ARG ASWF_GLEW_VERSION ARG ASWF_GLFW_VERSION +ARG ASWF_HIGHWAY_VERSION ARG ASWF_PYBIND11_VERSION +ARG ASWF_LIBICONV_VERSION +ARG ASWF_LIBJPEG_TURBO_VERSION +ARG ASWF_LIBJXL_VERSION +ARG ASWF_LIBUHDR_VERSION +ARG ASWF_LIBWEBP_VERSION +ARG ASWF_MD4C_VERSION +ARG ASWF_MINIZIP_NG_VERSION ARG ASWF_NUMPY_VERSION -ARG ASWF_PYTHON_VERSION +ARG ASWF_PYSTRING_VERSION +ARG ASWF_CPYTHON_VERSION ARG ASWF_PYTHON_MAJOR_MINOR_VERSION ARG ASWF_TBB_VERSION +ARG ASWF_TSL_ROBIN_MAP_VERSION +ARG ASWF_YAML_CPP_VERSION ARG ASWF_ALEMBIC_VERSION ARG ASWF_BLOSC_VERSION @@ -40,15 +52,13 @@ ARG ASWF_USD_VERSION # Required base packages built in previous stages FROM ${ASWF_ORG}/ci-package-openvdb:${ASWF_VFXPLATFORM_VERSION}-${ASWF_OPENVDB_VERSION} AS ci-package-openvdb-external -FROM ${ASWF_ORG}/ci-package-oiio:${ASWF_VFXPLATFORM_VERSION}-${ASWF_OIIO_VERSION} AS ci-package-oiio-external -FROM ${ASWF_ORG}/ci-package-ocio:${ASWF_VFXPLATFORM_VERSION}-${ASWF_OCIO_VERSION} AS ci-package-ocio-external #################### ci-base-builder #################### FROM ${ASWF_ORG}/ci-common:${CI_COMMON_VERSION}-clang${ASWF_CLANG_MAJOR_VERSION} AS ci-base-builder ARG ASWF_CMAKE_VERSION -ARG ASWF_PYTHON_VERSION +ARG ASWF_CPYTHON_VERSION ARG ASWF_PYTHON_MAJOR_MINOR_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_BOOST_VERSION @@ -58,7 +68,7 @@ ARG ASWF_CONAN_CHANNEL ARG ASWF_VFXPLATFORM_VERSION ENV ASWF_CMAKE_VERSION=${ASWF_CMAKE_VERSION} -ENV ASWF_PYTHON_VERSION=${ASWF_PYTHON_VERSION} +ENV ASWF_CPYTHON_VERSION=${ASWF_CPYTHON_VERSION} ENV ASWF_PYTHON_MAJOR_MINOR_VERSION=${ASWF_PYTHON_MAJOR_MINOR_VERSION} ENV ASWF_NUMPY_VERSION=${ASWF_NUMPY_VERSION} ENV ASWF_BOOST_VERSION=${ASWF_BOOST_VERSION} @@ -73,14 +83,13 @@ COPY < . [requires] -cmake/${ASWF_CMAKE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -python/${ASWF_PYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +cpython/${ASWF_CPYTHON_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} boost/${ASWF_BOOST_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} tbb/${ASWF_TBB_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} COPY ../scripts/common/before_build.sh \ @@ -113,24 +122,54 @@ ARG ASWF_PARTIO_VERSION ENV ASWF_PARTIO_VERSION=${ASWF_PARTIO_VERSION} ARG ASWF_PYBIND11_VERSION ENV ASWF_PYBIND11_VERSION=${ASWF_PYBIND11_VERSION} +ARG ASWF_PYSTRING_VERSION +ENV ASWF_PYSTRING_VERSEION=${ASWF_PYSTRING_VERSION} ARG ASWF_EXPAT_VERSION ENV ASWF_EXPAT_VERSION=${ASWF_EXPAT_VERSION} +ARG ASWF_FREETYPE_VERSION +ENV ASWF_FREETYPE_VERSION=${ASWF_FREETYPE_VERSION} +ARG ASWF_MINIZIP_NG_VERSION +ENV ASWF_MINIZIP_NG_VERSION=${ASWF_MINIZIP_NG_VERSION} ARG ASWF_QT_VERSION ENV ASWF_QT_VERSION=${ASWF_QT_VERSION} ARG ASWF_PYSIDE_VERSION ENV ASWF_PYSIDE_VERSION=${ASWF_PYSIDE_VERSION} ARG ASWF_BLOSC_VERSION ENV ASWF_BLOSC_VERSION=${ASWF_BLOSC_VERSION} +ARG ASWF_HIGHWAY_VERSION +ENV ASWF_HIGHWAY_VERSION=${ASWF_HIGHWAY_VERSION} +ARG ASWF_LIBDEFLATE_VERSION +ENV ASWF_LIBDEFLATE_VERSION=${ASWF_LIBDEFLATE_VERSION} +ARG ASWF_LIBICONV_VERSION +ENV ASWF_LIBICONV_VERSION=${ASWF_LIBICONV_VERSION} +ARG ASWF_LIBJPEG_TURBO_VERSION +ENV ASWF_LIBJPEG_TURBO_VERSION=${ASWF_LIBJPEG_TURBO_VERSION} +ARG ASWF_LIBJXL_VERSION +ENV ASWF_LIBJXL_VERSION=${ASWF_LIBJXL_VERSION} +ARG ASWF_LIBUHDR_VERSION +ENV ASWF_LIBUHDR_VERSION=${ASWF_LIBUHDR_VERSION} +ARG ASWF_LIBWEBP_VERSION +ENV ASWF_LIBWEBP_VERSION=${ASWF_LIBWEBP_VERSION} +ARG ASWF_PUGIXML_VERSION +ENV ASWF_PUGIXML_VERSION=${ASWF_PUGIXML_VERSION} ARG ASWF_PTEX_VERSION ENV ASWF_PTEX_VERSION=${ASWF_PTEX_VERSION} ARG ASWF_IMATH_VERSION ENV ASWF_IMATH_VERSION=${ASWF_IMATH_VERSION} ARG ASWF_OPENEXR_VERSION ENV ASWF_OPENEXR_VERSION=${ASWF_OPENEXR_VERSION} +ARG ASWF_MD4C_VERSION +ENV ASWF_MD4C_VERSION=${ASWF_MD4C_VERSION} +ARG ASWF_OIIO_VERSION +ENV ASWF_OIIO_VERSION=${ASWF_OIIO_VERSION} +ARG ASWF_OCIO_VERSION +ENV ASWF_OCIO_VERSION=${ASWF_OCIO_VERSION} +ARG ASWF_TSL_ROBIN_MAP_VERSION +ENV ASWF_TSL_ROBIN_MAP_VERSION=${ASWF_TSL_ROBIN_MAP_VERSION} +ARG ASWF_YAML_CPP_VERSION +ENV ASWF_YAML_CPP_VERSION=${ASWF_YAML_CPP_VERSION} COPY --from=ci-package-openvdb-external /. /usr/local/ -COPY --from=ci-package-oiio-external /. /usr/local/ -COPY --from=ci-package-ocio-external /. /usr/local/ COPY ../scripts/vfx/build_osl.sh \ /tmp/ @@ -150,13 +189,28 @@ pybind11/${ASWF_PYBIND11_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} qt/${ASWF_QT_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} pyside/${ASWF_PYSIDE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} blosc/${ASWF_BLOSC_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} -ptex/${ASWF_PTEX_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +highway/${ASWF_HIGHWAY_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libdeflate/${ASWF_LIBDEFLATE_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libiconv/${ASWF_LIBICONV_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libjpeg-turbo/${ASWF_LIBJPEG_TURBO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libjxl/${ASWF_LIBJXL_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libuhdr/${ASWF_LIBUHDR_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +libwebp/${ASWF_LIBWEBP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +md4c/${ASWF_MD4C_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +minizip-ng/${ASWF_MINIZIP_NG_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} imath/${ASWF_IMATH_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} openexr/${ASWF_OPENEXR_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +oiio/${ASWF_OIIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +ocio/${ASWF_OCIO_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +ptex/${ASWF_PTEX_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pugixml/${ASWF_PUGIXML_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +pystring/${ASWF_PYSTRING_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +tsl-robin-map/${ASWF_TSL_ROBIN_MAP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} +yaml-cpp/${ASWF_YAML_CPP_VERSION}@${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL} EOF RUN --mount=type=cache,target=/opt/conan_home/d \ - --mount=type=bind,rw,target=/opt/conan_home/.conan,source=packages/conan/settings \ + --mount=type=bind,rw,target=/opt/conan_home/.conan2,source=packages/conan/settings \ /tmp/install_conanpackages.sh /usr/local vfx${ASWF_VFXPLATFORM_VERSION} RUN --mount=type=cache,target=/tmp/ccache \ @@ -204,9 +258,12 @@ ARG ASWF_PYSIDE_CLANG_VERSION ARG ASWF_USD_VERSION ARG ASWF_NUMPY_VERSION ARG ASWF_EXPAT_VERSION +ARG ASWF_FREETYPE_VERSION ARG ASWF_GLEW_VERSION ARG ASWF_GLFW_VERSION +ARG ASWF_MD4C_VERSION ARG ASWF_PYBIND11_VERSION +ARG ASWF_LIBDEFLATE_VERSION ARG ASWF_MATERIALX_VERSION ARG ASWF_QT_VERSION ARG ASWF_PYSIDE_VERSION @@ -216,16 +273,21 @@ ARG ASWF_OPENEXR_VERSION ARG ASWF_OPENSUBDIV_VERSION ARG ASWF_PARTIO_VERSION ARG ASWF_PTEX_VERSION +ARG ASWF_OIIO_VERSION +ARG ASWF_OCIO_VERSION ENV CI_COMMON_VERSION=${CI_COMMON_VERSION} ENV ASWF_PYSIDE_CLANG_VERSION=${ASWF_PYSIDE_CLANG_VERSION} ENV ASWF_USD_VERSION=${ASWF_USD_VERSION} ENV ASWF_NUMPY_VERSION=${ASWF_NUMPY_VERSION} ENV ASWF_EXPAT_VERSION=${ASWF_EXPAT_VERSION} +ENV ASWF_FREETYPE_VERSION=${ASWF_FREETYPE_VERSION} ENV ASWF_GLEW_VERSION=${ASWF_GLEW_VERSION} ENV ASWF_GLFW_VERSION=${ASWF_GLFW_VERSION} +ENV ASWF_MD4C_VERSION=${ASWF_MD4C_VERSION} ENV ASWF_PYBIND11_VERSION=${ASWF_PYBIND11_VERSION} -ENV ASWF_MATERIALIX_VERSION=${ASWF_MATERIALX_VERSION} +ENV ASWF_LIBDEFLATE_VERSION=${ASWF_LIBDEFLATE_VERSION} +ENV ASWF_MATERIALX_VERSION=${ASWF_MATERIALX_VERSION} ENV ASWF_QT_VERSION=${ASWF_PYSIDE_VERSION} ENV ASWF_PYSIDE_VERSION=${ASWF_PYSIDE_VERSION} ENV ASWF_ALEMBIC_VERSION=${ASWF_ALEMBIC_VERSION} @@ -234,10 +296,11 @@ ENV ASWF_OPENEXR_VERSION=${ASWF_OPENEXR_VERSION} ENV ASWF_OPENSUBDIV_VERSION=${ASWF_OPENSUBDIV_VERSION} ENV ASWF_PARTIO_VERSION=${ASWF_PARTIO_VERSION} ENV ASWF_PTEX_VERSION=${ASWF_PTEX_VERSION} +ENV ASWF_OIIO_VERSION=${ASWF_OIIO_VERSION} +ENV ASWF_OCIO_VERSION=${ASWF_OCIO_VERSION} + COPY --from=ci-package-openvdb-external /. /usr/local/ -COPY --from=ci-package-oiio-external /. /usr/local/ -COPY --from=ci-package-ocio-external /. /usr/local/ COPY ../scripts/vfx/build_usd.sh \ /tmp/ @@ -253,6 +316,7 @@ COPY < /etc/machine-id yum -y groupinstall "Development Tools" if [ "$BASEOS_MAJORVERSION" -gt "7" ]; then - dnf -y install gcc-toolset-$ASWF_DTS_VERSION + dnf -y install gcc-toolset-$ASWF_DTS_VERSION gcc-toolset-$ASWF_DTS_VERSION-libatomic-devel else yum install -y --setopt=tsflags=nodocs centos-release-scl-rh @@ -224,11 +231,13 @@ yum install -y \ alsa-lib-devel \ audiofile-devel \ lame-devel \ + libaom-devel \ libcaca-devel \ libdc1394-devel \ libdeflate-devel \ libdrm-devel \ libdrm \ + libsquish-devel \ libxshmfence \ libxshmfence-devel \ nss-devel \ @@ -237,6 +246,7 @@ yum install -y \ p7zip \ portaudio \ portaudio-devel \ + svt-av1-devel \ xcb-util-cursor \ xcb-util-cursor-devel \ yasm-devel \ @@ -252,11 +262,13 @@ if [ "$BASEOS_MAJORVERSION" -gt "7" ]; then dnf -y install \ git \ wayland-devel \ + wayland-protocols-devel \ python3-importlib-metadata \ brotli brotli-devel \ double-conversion double-conversion-devel \ perl-IPC-Cmd \ perl-Digest-SHA \ + perl-open \ python39 \ python39-devel \ python3.11 \ diff --git a/scripts/vfx/build_alembic.sh b/scripts/vfx/build_alembic.sh index de908a37..46471940 100755 --- a/scripts/vfx/build_alembic.sh +++ b/scripts/vfx/build_alembic.sh @@ -30,7 +30,7 @@ tar -zxf "$DOWNLOADS_DIR/alembic-${ASWF_ALEMBIC_VERSION}.tar.gz" cd "alembic-${ASWF_ALEMBIC_VERSION}" # Boost Python3 not found by cmake for PyAlembic as of Alembic 1.7.12 -if [[ $ASWF_PYTHON_VERSION == 2.7* ]]; then +if [[ $ASWF_CPYTHON_VERSION == 2.7* ]]; then USE_PYALEMBIC=TRUE else USE_PYALEMBIC=FALSE diff --git a/scripts/vfx/build_materialx.sh b/scripts/vfx/build_materialx.sh new file mode 100755 index 00000000..8dca194b --- /dev/null +++ b/scripts/vfx/build_materialx.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +# Copyright (c) Contributors to the aswf-docker Project. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +set -ex + +mkdir materialx +cd materialx + +if [ ! -f "$DOWNLOADS_DIR/materialx-${ASWF_MATERIALX_VERSION}.tar.gz" ]; then + curl --location "https://github.com/AcademySoftwareFoundation/MaterialX/archive/v${ASWF_MATERIALX_VERSION}.tar.gz" -o "$DOWNLOADS_DIR/materialx-${ASWF_MATERIALX_VERSION}.tar.gz" +fi +tar -zxf "$DOWNLOADS_DIR/materialx-${ASWF_MATERIALX_VERSION}.tar.gz" +cd "MaterialX-${ASWF_MATERIALX_VERSION}" + +mkdir build +cd build +# Can't enable MATERIALX_BUILD_VIEWER until we provide NanoGUI +# Can't enable MATERIALX_BUILD_GRAPH_EDITOR until we provide ImGUI +cmake \ + -DCMAKE_INSTALL_PREFIX="${ASWF_INSTALL_PREFIX}" \ + -DMATERIALX_BUILD_PYTHON=ON \ + -DMATERIALX_BUILD_VIEWER=ON \ + -DMATERIALX_BUILD_SHARED_LIBS=ON \ + -DMATERIALX_BUILD_OIIO=ON \ + -DMATERIALX_BUILD_OCIO=ON \ + .. +cmake --build . -j$(nproc) +cmake --install . + +cd ../.. +rm -rf materialx diff --git a/scripts/vfx/build_ocio.sh b/scripts/vfx/build_ocio.sh index 9a1fea87..2d842663 100755 --- a/scripts/vfx/build_ocio.sh +++ b/scripts/vfx/build_ocio.sh @@ -37,15 +37,10 @@ cmake \ make -j$(nproc) make install -cd ../.. - -curl --location "https://github.com/imageworks/OpenColorIO-Configs/archive/v${ASWF_OCIO_CONFIGS_VERSION}.tar.gz" -o "ocio-configs.tar.gz" -tar -zxf ocio-configs.tar.gz -cd "OpenColorIO-Configs-${ASWF_OCIO_CONFIGS_VERSION}" - -mkdir "${ASWF_INSTALL_PREFIX}/openColorIO" -cp nuke-default/config.ocio "${ASWF_INSTALL_PREFIX}/openColorIO/" -cp -r nuke-default/luts "${ASWF_INSTALL_PREFIX}/openColorIO/" +# As per the OCIO Slack #dev channel, we no longer need to download OCIO configs +# separately, the 2.x configs are now built-in to the library. +# Legacy 1.x configs: https://github.com/colour-science/OpenColorIO-Configs +# 2.x config source: https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES cd ../.. rm -rf ocio diff --git a/scripts/vfx/build_openexr.sh b/scripts/vfx/build_openexr.sh index 0cea7698..07be105f 100755 --- a/scripts/vfx/build_openexr.sh +++ b/scripts/vfx/build_openexr.sh @@ -34,7 +34,7 @@ else # TODO: add support for python-3 PyIlmBase when it works... if [[ $ASWF_OPENEXR_VERSION == 2.3.0 ]]; then - if [[ $ASWF_PYTHON_VERSION == 2.7* ]]; then + if [[ $ASWF_CPYTHON_VERSION == 2.7* ]]; then BUILD_PYILMBASE=on else BUILD_PYILMBASE=off diff --git a/scripts/vfx/build_osl.sh b/scripts/vfx/build_osl.sh index 718b272d..62f2c895 100755 --- a/scripts/vfx/build_osl.sh +++ b/scripts/vfx/build_osl.sh @@ -11,11 +11,6 @@ fi tar -zxf "$DOWNLOADS_DIR/osl-${ASWF_OSL_VERSION}.tar.gz" cd "OpenShadingLanguage-${ASWF_OSL_VERSION}" -export PUGIXML_INSTALL_DIR=${ASWF_INSTALL_PREFIX} -if [[ ! $ASWF_OSL_VERSION == 1.10* ]]; then - src/build-scripts/build_pugixml.bash -fi - mkdir build cd build @@ -23,6 +18,7 @@ cmake -DCMAKE_INSTALL_PREFIX="${ASWF_INSTALL_PREFIX}" \ -DBoost_USE_STATIC_LIBS=OFF \ -DBUILD_SHARED_LIBS=ON \ -DCMAKE_CXX_STANDARD="${ASWF_CXX_STANDARD}" \ + -Dpybind11_DIR="${ASWF_INSTALL_PREFIX}/lib64/cmake/pybind11" \ ../. make -j$(nproc) diff --git a/scripts/vfx/build_otio.sh b/scripts/vfx/build_otio.sh index da8c79a9..45cb6884 100755 --- a/scripts/vfx/build_otio.sh +++ b/scripts/vfx/build_otio.sh @@ -11,7 +11,7 @@ if [ "$ASWF_OTIO_VERSION" != "latest" ]; then git checkout "tags/v${ASWF_OTIO_VERSION}" -b "v${ASWF_OTIO_VERSION}" fi -pip install --prefix="${ASWF_INSTALL_PREFIX}" . +pip3 install --prefix="${ASWF_INSTALL_PREFIX}" . cd .. rm -rf OpenTimelineIO diff --git a/scripts/vfx/build_usd.sh b/scripts/vfx/build_usd.sh index 441992ca..0169dbc8 100755 --- a/scripts/vfx/build_usd.sh +++ b/scripts/vfx/build_usd.sh @@ -4,13 +4,22 @@ set -ex -pip install jinja2 PyOpenGL +pip3 install jinja2 PyOpenGL if [ ! -f "$DOWNLOADS_DIR/usd-${ASWF_USD_VERSION}.tar.gz" ]; then - curl --location "https://github.com/PixarAnimationStudios/OpenUSD/archive/v${ASWF_USD_VERSION}.tar.gz" -o "$DOWNLOADS_DIR/usd-${ASWF_USD_VERSION}.tar.gz" + # For VFX Platform 2025, we need a somewhat newer release of USD than the latest 25.05a tag to + # get MaterialX 1.39.3 compatibility. + if [[ $ASWF_USD_VERSION == 25.02a.eae7e67 ]]; then + curl --location "https://github.com/PixarAnimationStudios/OpenUSD/archive/eae7e678473eb78794a3a27287ff121af322d583.tar.gz" -o "$DOWNLOADS_DIR/usd-${ASWF_USD_VERSION}.tar.gz" + else + curl --location "https://github.com/PixarAnimationStudios/OpenUSD/archive/v${ASWF_USD_VERSION}.tar.gz" -o "$DOWNLOADS_DIR/usd-${ASWF_USD_VERSION}.tar.gz" + fi fi tar -zxf "$DOWNLOADS_DIR/usd-${ASWF_USD_VERSION}.tar.gz" +if [[ $ASWF_USD_VERSION == 25.02a.eae7e67 ]]; then +mv "OpenUSD-eae7e678473eb78794a3a27287ff121af322d583" "OpenUSD-${ASWF_USD_VERSION}" +fi cd "OpenUSD-${ASWF_USD_VERSION}" if [[ $ASWF_USD_VERSION == 23.05 && $ASWF_MATERIALX_VERSION == 1.38.7 ]]; then @@ -32,7 +41,7 @@ fi mkdir build cd build -if [[ $ASWF_PYTHON_VERSION == 2.7* ]]; then +if [[ $ASWF_CPYTHON_VERSION == 2.7* ]]; then USD_EXTRA_ARGS= else USD_EXTRA_ARGS=-DPXR_USE_PYTHON_3=ON @@ -56,6 +65,7 @@ cmake \ -DILMBASE_LOCATION="${ASWF_INSTALL_PREFIX}" \ -DGLEW_LOCATION="${ASWF_INSTALL_PREFIX}" \ -DMATERIALX_LOCATION="${ASWF_INSTALL_PREFIX}" \ + -DMATERIALX_STDLIB_DIR="${ASWF_INSTALL_PREFIX}" \ -DPXR_ENABLE_MATERIALX_SUPPORT=ON \ -DPXR_BUILD_TESTS=OFF \ -DUSD_ROOT_DIR="${ASWF_INSTALL_PREFIX}" \